diff --git a/doc/index.html b/doc/index.html index b72de78..bab4ce0 100644 --- a/doc/index.html +++ b/doc/index.html @@ -389,7 +389,7 @@ struct remove_pointer_if -

Besides boost/config.hpp header, the MPL heavily depends on two other Boost libraries - the Boost Preprocessor library [PRE], and the Type Traits library [TTL]. These dependencies are essential and cannot be eliminated. In addition to those, the boost/mpl/assert_is_same.hpp header depends on Boost Static Assert library [SAL]. The library tests and examples may depend on some additional Boost libraries, e.g. Boost Bind [BBL]; you don't have to have those unless you are interested in actually compiling the tests/examples (probably you are, though).

+

Besides boost/config.hpp header, the MPL heavily depends on two other Boost libraries - the Boost Preprocessor library [PRE], and the Type Traits library [TTL]. These dependencies are essential and cannot be eliminated. In addition to those, the boost/mpl/assert.hpp header depends on Boost Static Assert library [SAL]. The library tests and examples may depend on some additional Boost libraries, e.g. Boost Bind [BBL]; you don't have to have those unless you are interested in actually compiling the tests/examples (probably you are, though).

diff --git a/doc/src/technical.sgml b/doc/src/technical.sgml index d59b73e..b50d14a 100644 --- a/doc/src/technical.sgml +++ b/doc/src/technical.sgml @@ -20,7 +20,7 @@ The library provides you with a fine-grained header structure with one header pe Dependencies</> <para> -Besides <literal>boost/config.hpp</> header, the MPL heavily depends on two other Boost libraries - the Boost Preprocessor library <citation><xref linkend="ref.PRE"></>, and the Type Traits library <citation><xref linkend="ref.TTL"></>. These dependencies are essential and cannot be eliminated. In addition to those, the <literal>boost/mpl/assert_is_same.hpp</> header depends on Boost Static Assert library <citation><xref linkend="ref.SAL"></>. The library tests and examples may depend on some additional Boost libraries, e.g. Boost Bind <citation><xref linkend="ref.BBL"></>; you don't have to have those unless you are interested in actually compiling the tests/examples (probably you are, though). +Besides <literal>boost/config.hpp</> header, the MPL heavily depends on two other Boost libraries - the Boost Preprocessor library <citation><xref linkend="ref.PRE"></>, and the Type Traits library <citation><xref linkend="ref.TTL"></>. These dependencies are essential and cannot be eliminated. In addition to those, the <literal>boost/mpl/assert.hpp</> header depends on Boost Static Assert library <citation><xref linkend="ref.SAL"></>. The library tests and examples may depend on some additional Boost libraries, e.g. Boost Bind <citation><xref linkend="ref.BBL"></>; you don't have to have those unless you are interested in actually compiling the tests/examples (probably you are, though). </> </section> diff --git a/example/fsm/aux_/STT_impl_gen.hpp b/example/fsm/aux_/STT_impl_gen.hpp index b3a0b36..4fcf163 100644 --- a/example/fsm/aux_/STT_impl_gen.hpp +++ b/example/fsm/aux_/STT_impl_gen.hpp @@ -1,28 +1,28 @@ -//----------------------------------------------------------------------------- -// boost fsm/handler.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_FSM_HANDLER_INCLUDED #define BOOST_FSM_HANDLER_INCLUDED -#include "boost/mpl/if.hpp" -#include "boost/mpl/fold.hpp" -#include "boost/mpl/front.hpp" -#include "boost/type_traits/is_same.hpp" +// 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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/if.hpp> +#include <boost/mpl/fold.hpp> +#include <boost/mpl/front.hpp> +#include <boost/type_traits/is_same.hpp> #include <typeinfo> #include <cassert> -namespace fsm { -namespace aux { +namespace fsm { namespace aux { namespace mpl = boost::mpl; using namespace mpl::placeholders; @@ -140,7 +140,6 @@ struct STT_impl_gen > type; }; -} // namespace aux -} // namespace fsm +}} #endif // BOOST_FSM_HANDLER_INCLUDED diff --git a/example/fsm/aux_/base_event.hpp b/example/fsm/aux_/base_event.hpp index dc808f4..c49e25d 100644 --- a/example/fsm/aux_/base_event.hpp +++ b/example/fsm/aux_/base_event.hpp @@ -1,22 +1,22 @@ -//----------------------------------------------------------------------------- -// boost fsm/base_event.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_FSM_BASE_EVENT_INCLUDED #define BOOST_FSM_BASE_EVENT_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. + +// $Source$ +// $Date$ +// $Revision$ + #include <memory> -namespace fsm { -namespace aux { +namespace fsm { namespace aux { // represent an abstract base for FSM events @@ -34,7 +34,6 @@ struct base_event virtual std::auto_ptr<base_event> do_clone() const = 0; }; -} // namespace aux -} // namespace fsm +}} #endif // BOOST_FSM_BASE_EVENT_INCLUDED diff --git a/example/fsm/aux_/event.hpp b/example/fsm/aux_/event.hpp index 7d6a12a..df2529b 100644 --- a/example/fsm/aux_/event.hpp +++ b/example/fsm/aux_/event.hpp @@ -1,22 +1,22 @@ -//----------------------------------------------------------------------------- -// boost fsm/event.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_FSM_EVENT_INCLUDED #define BOOST_FSM_EVENT_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. + +// $Source$ +// $Date$ +// $Revision$ + #include "base_event.hpp" -namespace fsm { -namespace aux { +namespace fsm { namespace aux { template< typename Derived > struct event @@ -34,7 +34,6 @@ struct event } }; -} // namespace aux -} // namespace fsm +}} #endif // BOOST_FSM_EVENT_INCLUDED diff --git a/example/fsm/aux_/state.hpp b/example/fsm/aux_/state.hpp index 283c3de..54c3d33 100644 --- a/example/fsm/aux_/state.hpp +++ b/example/fsm/aux_/state.hpp @@ -1,22 +1,22 @@ -//----------------------------------------------------------------------------- -// boost fsm/state.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_FSM_STATE_INCLUDED #define BOOST_FSM_STATE_INCLUDED -#include "boost/mpl/integral_c.hpp" +// 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. -namespace fsm { -namespace aux { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/integral_c.hpp> + +namespace fsm { namespace aux { namespace mpl = boost::mpl; @@ -37,7 +37,6 @@ struct state } }; -} // namespace aux -} // namespace fsm +}} #endif // BOOST_FSM_STATE_INCLUDED diff --git a/example/fsm/aux_/transition.hpp b/example/fsm/aux_/transition.hpp index 9104b31..36499cc 100644 --- a/example/fsm/aux_/transition.hpp +++ b/example/fsm/aux_/transition.hpp @@ -1,22 +1,22 @@ -//----------------------------------------------------------------------------- -// boost fsm/transition.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_FSM_TRANSITION_INCLUDED #define BOOST_FSM_TRANSITION_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. + +// $Source$ +// $Date$ +// $Revision$ + #include <cassert> -namespace fsm { -namespace aux { +namespace fsm { namespace aux { // represent a signle transition between states |From| and |To| @@ -42,7 +42,6 @@ struct transition } }; -} // namespace aux -} // namespace fsm +}} #endif // BOOST_FSM_TRANSITION_INCLUDED diff --git a/example/fsm/player.cpp b/example/fsm/player.cpp index 6097755..5bc2d34 100644 --- a/example/fsm/player.cpp +++ b/example/fsm/player.cpp @@ -1,17 +1,18 @@ -//----------------------------------------------------------------------------- -// boost fsm/example/player.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2002-2004 // -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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 "state_machine.hpp" -#include "boost/mpl/list.hpp" +#include <boost/mpl/list.hpp> #include <iostream> diff --git a/example/fsm/state_machine.hpp b/example/fsm/state_machine.hpp index f2ff842..098ff02 100644 --- a/example/fsm/state_machine.hpp +++ b/example/fsm/state_machine.hpp @@ -1,23 +1,24 @@ -//----------------------------------------------------------------------------- -// boost fsm/state_machine.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_FSM_STATE_MACHINE_INCLUDED #define BOOST_FSM_STATE_MACHINE_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. + +// $Source$ +// $Date$ +// $Revision$ + #include "aux_/event.hpp" #include "aux_/state.hpp" #include "aux_/transition.hpp" #include "aux_/STT_impl_gen.hpp" -#include "boost/shared_ptr.hpp" +#include <boost/shared_ptr.hpp> #include <queue> #include <memory> diff --git a/example/inherit_linearly.cpp b/example/inherit_linearly.cpp index efb4b20..c780321 100644 --- a/example/inherit_linearly.cpp +++ b/example/inherit_linearly.cpp @@ -1,18 +1,19 @@ -//----------------------------------------------------------------------------- -// boost mpl/example/inherit_linearly.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#include "boost/mpl/inherit_linearly.hpp" -#include "boost/mpl/int.hpp" -#include "boost/mpl/list.hpp" +// 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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/inherit_linearly.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/list.hpp> #include <iostream> diff --git a/example/inherit_multiply.cpp b/example/inherit_multiply.cpp index 034ba48..118096c 100644 --- a/example/inherit_multiply.cpp +++ b/example/inherit_multiply.cpp @@ -1,18 +1,19 @@ -//----------------------------------------------------------------------------- -// boost mpl/example/inherit_multiply.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#include "boost/mpl/inherit.hpp" -#include "boost/mpl/inherit_linearly.hpp" -#include "boost/mpl/list.hpp" +// 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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/inherit.hpp> +#include <boost/mpl/inherit_linearly.hpp> +#include <boost/mpl/list.hpp> #include <iostream> diff --git a/example/integer.cpp b/example/integer.cpp index e7378c7..eee9866 100644 --- a/example/integer.cpp +++ b/example/integer.cpp @@ -1,27 +1,30 @@ -//----------------------------------------------------------------------------- -// boost mpl/example/integer.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#include "boost/mpl/multiplies.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/lower_bound.hpp" -#include "boost/mpl/transform_view.hpp" -#include "boost/mpl/sizeof.hpp" -#include "boost/mpl/int.hpp" -#include "boost/mpl/identity.hpp" -#include "boost/mpl/base.hpp" -#include "boost/mpl/apply_if.hpp" -#include "boost/mpl/apply.hpp" -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/assert_is_same.hpp" +// Copyright Aleksey Gurtovoy 2001-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/multiplies.hpp> +#include <boost/mpl/list.hpp> +#include <boost/mpl/lower_bound.hpp> +#include <boost/mpl/transform_view.hpp> +#include <boost/mpl/sizeof.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/base.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/deref.hpp> +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/assert.hpp> + +#include <boost/type_traits/is_same.hpp> namespace mpl = boost::mpl; using namespace mpl::placeholders; @@ -44,10 +47,10 @@ struct integer >::type >::type iter_; typedef typename mpl::end<builtins_>::type last_; - typedef typename mpl::apply_if< + typedef typename mpl::eval_if< boost::is_same<iter_,last_> , mpl::identity< big_int<bit_size> > - , mpl::apply0<iter_> + , mpl::deref<iter_> >::type type; }; @@ -57,8 +60,8 @@ typedef integer<15>::type int15; typedef integer<32>::type int32; typedef integer<100>::type int100; -BOOST_MPL_ASSERT_IS_SAME(int1, char); -BOOST_MPL_ASSERT_IS_SAME(int5, char); -BOOST_MPL_ASSERT_IS_SAME(int15, short); -BOOST_MPL_ASSERT_IS_SAME(int32, int); -BOOST_MPL_ASSERT_IS_SAME(int100, big_int<100>); +BOOST_MPL_ASSERT(( boost::is_same< int1, char > )); +BOOST_MPL_ASSERT(( boost::is_same< int5, char > )); +BOOST_MPL_ASSERT(( boost::is_same< int15, short > )); +BOOST_MPL_ASSERT(( boost::is_same< int32, int > )); +BOOST_MPL_ASSERT(( boost::is_same< int100, big_int<100> > )); diff --git a/example/lambda2.cpp b/example/lambda2.cpp deleted file mode 100644 index 333e3c9..0000000 --- a/example/lambda2.cpp +++ /dev/null @@ -1,74 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/example/lambda2.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include "boost/mpl/v2_1.hpp" - -#include "boost/mpl/not.hpp" -#include "boost/mpl/or.hpp" -#include "boost/mpl/less.hpp" -#include "boost/mpl/equal_to.hpp" -#include "boost/mpl/multiplies.hpp" -#include "boost/mpl/prior.hpp" -#include "boost/mpl/find_if.hpp" -#include "boost/mpl/count_if.hpp" -#include "boost/mpl/filter_view.hpp" -#include "boost/mpl/sizeof.hpp" - -#include "boost/static_assert.hpp" - -namespace mpl = boost::mpl; -using namespace mpl::placeholders; -using namespace mpl::v2_1; - - -typedef EVAL(apply_(lambda(is_same(_,_)), int, int)) r; - -BOOST_STATIC_ASSERT(r::value); - -typedef eval< - count_if( - list(int,char,long,int) - , lambda(is_same(_,int)) - ) - >::type res; - -BOOST_STATIC_ASSERT(res::value == 2); - -typedef eval< - find_if( - filter_view( - list(int,float,char,long,double) - , lambda(not_(is_float(_))) - ) - , lambda( or_( - is_same(_,short) - , less(sizeof_(_),sizeof_(int)) - ) ) - ) - >::type iter; - -typedef eval< is_same(iter::type,char) >::type res2; - -BOOST_STATIC_ASSERT(res2::value); - - - -METAFUNCTION(factorial, (N) - , if_( equal_to( N, int_<0> ) - , int_<1> - , multiplies( N, factorial( prior(N) ) ) - ) - ) - -typedef EVAL(factorial(int_<1>)) fact; - -//BOOST_STATIC_ASSERT(fact::value == 1); diff --git a/example/tuple_from_list.cpp b/example/tuple_from_list.cpp index 8eb0459..73c1ccd 100644 --- a/example/tuple_from_list.cpp +++ b/example/tuple_from_list.cpp @@ -1,26 +1,26 @@ -//----------------------------------------------------------------------------- -// boost mpl/example/tuple_from_list.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#include "boost/mpl/fold_backward.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/assert_is_same.hpp" -#include "boost/tuple/tuple.hpp" +// 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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/reverse_fold.hpp> +#include <boost/mpl/list.hpp> +#include <boost/tuple/tuple.hpp> #include <iostream> using namespace boost::mpl; template< typename Types > struct tuple_gen - : fold_backward< + : reverse_fold< Types , boost::tuples::null_type , boost::tuples::cons<_2,_1> diff --git a/include/boost/mpl/O1_size.hpp b/include/boost/mpl/O1_size.hpp index 002bcb4..02c5dfd 100644 --- a/include/boost/mpl/O1_size.hpp +++ b/include/boost/mpl/O1_size.hpp @@ -1,39 +1,40 @@ -//----------------------------------------------------------------------------- -// boost mpl/O1_size.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_O1_SIZE_HPP_INCLUDED #define BOOST_MPL_O1_SIZE_HPP_INCLUDED -#include "boost/mpl/O1_size_fwd.hpp" -#include "boost/mpl/aux_/O1_size_impl.hpp" -#include "boost/mpl/aux_/sequence_tag.hpp" -#include "boost/mpl/aux_/void_spec.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/O1_size_fwd.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/O1_size_impl.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { // returns sequence size if it's an O(1) operation; otherwise returns -1 template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct O1_size - : O1_size_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) > - ::template algorithm< Sequence > + : O1_size_impl< typename sequence_tag<Sequence>::type > + ::template apply< Sequence > { + BOOST_MPL_AUX_LAMBDA_SUPPORT(1, O1_size, (Sequence)) }; -BOOST_MPL_AUX_VOID_SPEC(1, O1_size) +BOOST_MPL_AUX_NA_SPEC(1, O1_size) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_O1_SIZE_HPP_INCLUDED diff --git a/include/boost/mpl/O1_size_fwd.hpp b/include/boost/mpl/O1_size_fwd.hpp index 893e546..360bbab 100644 --- a/include/boost/mpl/O1_size_fwd.hpp +++ b/include/boost/mpl/O1_size_fwd.hpp @@ -1,25 +1,24 @@ -//----------------------------------------------------------------------------- -// boost mpl/O1_size_fwd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED #define BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED -namespace boost { -namespace mpl { +// 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. -template< typename Tag > struct O1_size_traits; +// $Source$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct O1_size_impl; template< typename Sequence > struct O1_size; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/advance.hpp b/include/boost/mpl/advance.hpp index 699e8f0..06f23e2 100644 --- a/include/boost/mpl/advance.hpp +++ b/include/boost/mpl/advance.hpp @@ -1,190 +1,76 @@ -//----------------------------------------------------------------------------- -// boost mpl/advance.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_ADVANCE_HPP_INCLUDED #define BOOST_MPL_ADVANCE_HPP_INCLUDED -#include "boost/mpl/negate.hpp" -#include "boost/mpl/less.hpp" -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/if.hpp" -#include "boost/mpl/iterator_tag.hpp" -#include "boost/mpl/aux_/advance_forward.hpp" -#include "boost/mpl/aux_/advance_backward.hpp" -#include "boost/mpl/aux_/iterator_category.hpp" -#include "boost/mpl/aux_/iterator_names.hpp" -#include "boost/mpl/aux_/msvc_never_true.hpp" -#include "boost/mpl/aux_/common_name_wknd.hpp" -#include "boost/mpl/aux_/apply.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/config/nttp.hpp" -#include "boost/config.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -BOOST_MPL_AUX_COMMON_NAME_WKND(advance) +#include <boost/mpl/advance_fwd.hpp> +#include <boost/mpl/less.hpp> +#include <boost/mpl/negate.hpp> +#include <boost/mpl/long.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/tag.hpp> +#include <boost/mpl/apply_wrap.hpp> +#include <boost/mpl/aux_/advance_forward.hpp> +#include <boost/mpl/aux_/advance_backward.hpp> +#include <boost/mpl/aux_/value_wknd.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/nttp_decl.hpp> -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +namespace boost { namespace mpl { -namespace aux { - -// forward/bidirectional iterators -template< typename Category, typename Iterator, typename N > +// default implementation for forward/bidirectional iterators +template< typename Tag > struct advance_impl { - typedef typename less< N,integral_c<long,0> >::type backward_; - typedef typename if_< backward_, negate<N>, N >::type offset_; + template< typename Iterator, typename N > struct apply + { + typedef typename less< N,long_<0> >::type backward_; + typedef typename if_< backward_, negate<N>, N >::type offset_; - typedef typename if_< - backward_ - , aux::advance_backward< BOOST_MPL_AUX_VALUE_WKND(offset_)::value > - , aux::advance_forward< BOOST_MPL_AUX_VALUE_WKND(offset_)::value > - >::type algo_; + typedef typename if_< + backward_ + , aux::advance_backward< BOOST_MPL_AUX_VALUE_WKND(offset_)::value > + , aux::advance_forward< BOOST_MPL_AUX_VALUE_WKND(offset_)::value > + >::type f_; - typedef typename BOOST_MPL_AUX_APPLY1(algo_,Iterator)::type type; + typedef typename apply_wrap1<f_,Iterator>::type type; + }; }; -// random-access iterators -template< typename Iterator, typename N > -struct advance_impl<ra_iter_tag_,Iterator,N> -{ - typedef typename Iterator - ::template BOOST_MPL_AUX_ITERATOR_ADVANCE<N>::type type; -}; - -} // namespace aux - -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Iterator) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(N) + typename BOOST_MPL_AUX_NA_PARAM(Iterator) + , typename BOOST_MPL_AUX_NA_PARAM(N) > struct advance + : advance_impl< typename tag<Iterator>::type > + ::template apply<Iterator,N> { - typedef typename aux::advance_impl< - typename BOOST_MPL_AUX_ITERATOR_CATEGORY(Iterator) - , Iterator - , N - >::type type; }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END - template< typename Iterator , BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_c + : advance_impl< typename tag<Iterator>::type > + ::template apply<Iterator,long_<N> > { - typedef typename aux::advance_impl< - typename BOOST_MPL_AUX_ITERATOR_CATEGORY(Iterator) - , Iterator - , integral_c<long,N> - >::type type; }; -#else // no partial specialization +BOOST_MPL_AUX_NA_SPEC(2, advance) -namespace aux { - -// forward/bidirectional iterators -template< typename Category > -struct advance_impl -{ - template< typename Iterator, typename N > struct result_ - { - enum { n = N::value }; // MSVC 7.x workaround - typedef typename if_c< - (n < 0) - , aux::advance_backward<(-n)> - , aux::advance_forward<n> - >::type algo_; - - typedef typename BOOST_MPL_AUX_APPLY1(algo_,Iterator)::type type; - }; -}; - -// random-access iterators - -#if defined(BOOST_MSVC) && BOOST_MSVC < 1300 - -// msvc_advance -#define BOOST_MPL_AUX_MSVC_DTW_NAME msvc_advance -#define BOOST_MPL_AUX_MSVC_DTW_ORIGINAL_NAME BOOST_MPL_AUX_ITERATOR_ADVANCE -#define BOOST_MPL_AUX_MSVC_DTW_ARITY 1 -#include "boost/mpl/aux_/msvc_dtw.hpp" - -template<> -struct advance_impl<ra_iter_tag_> -{ - template< typename Iterator, typename N > struct result_ - { - typedef typename msvc_advance<Iterator> - ::template result_<N>::type type; - }; -}; -#else -template<> -struct advance_impl<ra_iter_tag_> -{ - template< typename Iterator, typename N > struct result_ - { - typedef typename Iterator - ::template BOOST_MPL_AUX_ITERATOR_ADVANCE<N>::type type; - }; -}; -#endif - -} // namespace aux - -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Iterator) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(N) - > -struct advance -{ - typedef typename BOOST_MPL_AUX_ITERATOR_CATEGORY(Iterator) tag_; - typedef typename aux::advance_impl<tag_> - ::template result_< - Iterator - , N - >::type type; -}; - -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END - -template< - typename Iterator - , BOOST_MPL_AUX_NTTP_DECL(long, N) - > -struct advance_c -{ - typedef typename BOOST_MPL_AUX_ITERATOR_CATEGORY(Iterator) tag_; - typedef typename aux::advance_impl<tag_> - ::template result_< - Iterator - , integral_c<long,N> - >::type type; -}; - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, advance) - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_ADVANCE_HPP_INCLUDED diff --git a/include/boost/mpl/advance_fwd.hpp b/include/boost/mpl/advance_fwd.hpp new file mode 100644 index 0000000..95452cd --- /dev/null +++ b/include/boost/mpl/advance_fwd.hpp @@ -0,0 +1,28 @@ + +#ifndef BOOST_MPL_ADVANCE_FWD_HPP_INCLUDED +#define BOOST_MPL_ADVANCE_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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/common_name_wknd.hpp> + +namespace boost { namespace mpl { + +BOOST_MPL_AUX_COMMON_NAME_WKND(advance) + +template< typename Tag > struct advance_impl; +template< typename Iterator, typename N > struct advance; + +}} + +#endif // BOOST_MPL_ADVANCE_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/alias.hpp b/include/boost/mpl/alias.hpp index ccb78b0..494de1e 100644 --- a/include/boost/mpl/alias.hpp +++ b/include/boost/mpl/alias.hpp @@ -1,18 +1,19 @@ -//----------------------------------------------------------------------------- -// boost mpl/alias.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_ALIAS_HPP_INCLUDED #define BOOST_MPL_ALIAS_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$ + namespace { namespace mpl = boost::mpl; } diff --git a/include/boost/mpl/always.hpp b/include/boost/mpl/always.hpp index 5c1ff2f..0ac83d0 100644 --- a/include/boost/mpl/always.hpp +++ b/include/boost/mpl/always.hpp @@ -1,32 +1,30 @@ -//----------------------------------------------------------------------------- -// boost mpl/always.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_ALWAYS_HPP_INCLUDED #define BOOST_MPL_ALWAYS_HPP_INCLUDED -#include "boost/mpl/aux_/preprocessor/def_params_tail.hpp" -#include "boost/mpl/void.hpp" -#include "boost/mpl/aux_/arity_spec.hpp" -#include "boost/mpl/aux_/lambda_spec.hpp" +// Copyright Aleksey Gurtovoy 2001-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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -template< typename Value > -struct always +#include <boost/mpl/aux_/preprocessor/def_params_tail.hpp> +#include <boost/mpl/aux_/na.hpp> +#include <boost/mpl/aux_/arity_spec.hpp> + +namespace boost { namespace mpl { + +template< typename Value > struct always { template< typename T - BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(1, typename T, void_) + BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(1, typename T, na) > struct apply { @@ -34,11 +32,8 @@ struct always }; }; +BOOST_MPL_AUX_ARITY_SPEC(1, always) -BOOST_MPL_AUX_ARITY_SPEC(1,always) -BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1,always) - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_ALWAYS_HPP_INCLUDED diff --git a/include/boost/mpl/and.hpp b/include/boost/mpl/and.hpp index d55924b..722c7a8 100644 --- a/include/boost/mpl/and.hpp +++ b/include/boost/mpl/and.hpp @@ -2,30 +2,30 @@ #ifndef BOOST_MPL_AND_HPP_INCLUDED #define BOOST_MPL_AND_HPP_INCLUDED -// + file: boost/mpl/and.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +// $Source$ +// $Date$ +// $Revision$ -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -# include "boost/mpl/bool.hpp" -# include "boost/mpl/aux_/nested_type_wknd.hpp" -# include "boost/mpl/aux_/void_spec.hpp" -# include "boost/mpl/aux_/lambda_support.hpp" +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# include <boost/mpl/bool.hpp> +# include <boost/mpl/aux_/nested_type_wknd.hpp> +# include <boost/mpl/aux_/na_spec.hpp> +# include <boost/mpl/aux_/lambda_support.hpp> // agurt, 19/may/04: workaround a conflict with <iso646.h> header's -// 'or' and 'and' macros, see http://tinyurl.com/3et69; 'defined(or)' +// 'or' and 'and' macros, see http://tinyurl.com/3et69; 'defined(and)' // has to be checked in a separate condition, otherwise GCC complains // about 'and' being an alternative token #if defined(_MSC_VER) @@ -37,7 +37,7 @@ #endif # define BOOST_MPL_PREPROCESSED_HEADER and.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" +# include <boost/mpl/aux_/include_preprocessed.hpp> #if defined(_MSC_VER) #if defined(and) @@ -47,10 +47,10 @@ #else -# define AUX_LOGICAL_OP_NAME and_ -# define AUX_LOGICAL_OP_VALUE1 false -# define AUX_LOGICAL_OP_VALUE2 true -# include "boost/mpl/aux_/logical_op.hpp" +# define AUX778076_OP_NAME and_ +# define AUX778076_OP_VALUE1 false +# define AUX778076_OP_VALUE2 true +# include <boost/mpl/aux_/logical_op.hpp> -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AND_HPP_INCLUDED diff --git a/include/boost/mpl/apply.hpp b/include/boost/mpl/apply.hpp index 5636c09..345344e 100644 --- a/include/boost/mpl/apply.hpp +++ b/include/boost/mpl/apply.hpp @@ -1,14 +1,3 @@ -//----------------------------------------------------------------------------- -// boost mpl/apply.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-03 -// Aleksey Gurtovoy -// -// 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) #if !defined(BOOST_PP_IS_ITERATING) @@ -17,335 +6,220 @@ #ifndef BOOST_MPL_APPLY_HPP_INCLUDED #define BOOST_MPL_APPLY_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/arg_fwd.hpp" -# include "boost/mpl/void.hpp" -# include "boost/mpl/aux_/arity.hpp" -# include "boost/mpl/aux_/msvc_never_true.hpp" -# include "boost/type_traits/same_traits.hpp" +# include <boost/mpl/apply_fwd.hpp> +# include <boost/mpl/apply_wrap.hpp> +# include <boost/mpl/placeholders.hpp> +# include <boost/mpl/lambda.hpp> +# include <boost/mpl/aux_/na.hpp> +# include <boost/mpl/aux_/lambda_support.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER apply.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" +# include <boost/mpl/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/limits/arity.hpp" -# include "boost/mpl/aux_/lambda_support.hpp" -# include "boost/mpl/aux_/preprocessor/params.hpp" -# include "boost/mpl/aux_/preprocessor/default_params.hpp" -# include "boost/mpl/aux_/preprocessor/partial_spec_params.hpp" -# include "boost/mpl/aux_/preprocessor/enum.hpp" -# include "boost/mpl/aux_/preprocessor/add.hpp" -# include "boost/mpl/aux_/config/dtp.hpp" -# include "boost/mpl/aux_/config/nttp.hpp" -# include "boost/mpl/aux_/config/eti.hpp" -# include "boost/mpl/aux_/config/lambda.hpp" +# include <boost/mpl/limits/arity.hpp> +# include <boost/mpl/aux_/preprocessor/params.hpp> +# include <boost/mpl/aux_/preprocessor/default_params.hpp> +# include <boost/mpl/aux_/preprocessor/partial_spec_params.hpp> +# include <boost/mpl/aux_/preprocessor/enum.hpp> +# include <boost/mpl/aux_/config/lambda.hpp> +# include <boost/mpl/aux_/config/dtp.hpp> +# include <boost/mpl/aux_/nttp_decl.hpp> +# include <boost/mpl/aux_/config/eti.hpp> +# include <boost/mpl/aux_/config/msvc.hpp> +# include <boost/mpl/aux_/config/workaround.hpp> -# include "boost/preprocessor/comma_if.hpp" -# include "boost/preprocessor/inc.hpp" -# include "boost/preprocessor/iterate.hpp" +# include <boost/preprocessor/comma_if.hpp> +# include <boost/preprocessor/inc.hpp> +# include <boost/preprocessor/iterate.hpp> +# include <boost/preprocessor/cat.hpp> -# include "boost/config.hpp" - -// agurt, 15/jan/02: top-level 'apply' template gives an ICE on MSVC -// (for known reasons) -#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1200) -# define BOOST_MPL_NO_APPLY_TEMPLATE -#endif - -namespace boost { -namespace mpl { +namespace boost { namespace mpl { // local macros, #undef-ined at the end of the header -# define AUX_APPLY_PARAMS(param) \ +# define AUX778076_APPLY_PARAMS(param) \ BOOST_MPL_PP_PARAMS( \ - BOOST_MPL_METAFUNCTION_MAX_ARITY \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ ) \ /**/ -# define AUX_APPLY_DEFAULT_PARAMS(param, value) \ +# define AUX778076_APPLY_DEF_PARAMS(param, value) \ BOOST_MPL_PP_DEFAULT_PARAMS( \ - BOOST_MPL_METAFUNCTION_MAX_ARITY \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ , value \ ) \ /**/ -# define AUX_APPLY_N_PARAMS(n, param) \ +# define AUX778076_APPLY_N_PARAMS(n, param) \ BOOST_MPL_PP_PARAMS(n, param) \ /**/ -# define AUX_APPLY_N_COMMA_PARAMS(n, param) \ +# define AUX778076_APPLY_N_COMMA_PARAMS(n, param) \ BOOST_PP_COMMA_IF(n) \ BOOST_MPL_PP_PARAMS(n, param) \ /**/ -# define AUX_APPLY_N_PARTIAL_SPEC_PARAMS(n, param, def) \ +# define AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS(n, param, def) \ BOOST_PP_COMMA_IF(n) \ BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ /**/ -# define AUX_APPLY_N_SPEC_PARAMS(n, param) \ +# define AUX778076_APPLY_N_SPEC_PARAMS(n, param) \ BOOST_MPL_PP_ENUM(BOOST_PP_INC(n), param) \ /**/ -# if !defined(BOOST_MPL_NO_APPLY_TEMPLATE) - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -// forward declaration -template< - typename F, AUX_APPLY_DEFAULT_PARAMS(typename T, void_) - > -struct apply; -#else -namespace aux { -template< BOOST_MPL_AUX_NTTP_DECL(int, arity_) > struct apply_impl_chooser; -} -#endif - -# endif // BOOST_MPL_NO_APPLY_TEMPLATE #define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(0, BOOST_MPL_METAFUNCTION_MAX_ARITY, "boost/mpl/apply.hpp")) + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/apply.hpp>)) #include BOOST_PP_ITERATE() -# if !defined(BOOST_MPL_NO_APPLY_TEMPLATE) +# if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) // real C++ version is already taken care of # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) namespace aux { // apply_count_args -#define BOOST_MPL_AUX_COUNT_ARGS_PREFIX apply -#define BOOST_MPL_AUX_COUNT_ARGS_DEFAULT void_ -#define BOOST_MPL_AUX_COUNT_ARGS_ARITY BOOST_MPL_METAFUNCTION_MAX_ARITY -#include "boost/mpl/aux_/count_args.hpp" -} // namespace aux +#define AUX778076_COUNT_ARGS_PREFIX apply +#define AUX778076_COUNT_ARGS_DEFAULT na +#define AUX778076_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY +#include <boost/mpl/aux_/count_args.hpp> +} + template< - typename F, AUX_APPLY_DEFAULT_PARAMS(typename T, void_) + typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na) > struct apply - : aux::apply_impl_chooser< - aux::apply_count_args< AUX_APPLY_PARAMS(T) >::value - >::template result_< F, AUX_APPLY_PARAMS(T) >::type + : aux::apply_chooser< + aux::apply_count_args< AUX778076_APPLY_PARAMS(T) >::value + >::template result_< F, AUX778076_APPLY_PARAMS(T) >::type { }; # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -# endif // BOOST_MPL_NO_APPLY_TEMPLATE +# endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE -# undef AUX_APPLY_N_SPEC_PARAMS -# undef AUX_APPLY_N_PARTIAL_SPEC_PARAMS -# undef AUX_APPLY_N_COMMA_PARAMS -# undef AUX_APPLY_N_PARAMS -# undef AUX_APPLY_DEFAULT_PARAMS -# undef AUX_APPLY_PARAMS +# undef AUX778076_APPLY_N_SPEC_PARAMS +# undef AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS +# undef AUX778076_APPLY_N_COMMA_PARAMS +# undef AUX778076_APPLY_N_PARAMS +# undef AUX778076_APPLY_DEF_PARAMS +# undef AUX778076_APPLY_PARAMS -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_APPLY_HPP_INCLUDED ///// iteration, depth == 1 #elif BOOST_PP_ITERATION_DEPTH() == 1 -# define i BOOST_PP_FRAME_ITERATION(1) -# if i == 0 +# define i_ BOOST_PP_FRAME_ITERATION(1) -template< typename F > -struct apply0 : F +template< + typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply,i_) +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + : BOOST_PP_CAT(apply_wrap,i_)< + typename lambda<F>::type + AUX778076_APPLY_N_COMMA_PARAMS(i_, T) + > { - BOOST_MPL_AUX_LAMBDA_SUPPORT(1, apply0, (F)) +#else +{ + typedef typename BOOST_PP_CAT(apply_wrap,i_)< + typename lambda<F>::type + AUX778076_APPLY_N_COMMA_PARAMS(i_, T) + >::type type; +#endif + BOOST_MPL_AUX_LAMBDA_SUPPORT( + BOOST_PP_INC(i_) + , BOOST_PP_CAT(apply,i_) + , (F AUX778076_APPLY_N_COMMA_PARAMS(i_,T)) + ) }; -#if defined(BOOST_MPL_MSVC_ETI_BUG) -//: workaround for the ETI bug + +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) +/// workaround for ETI bug template<> -struct apply0<int> +struct BOOST_PP_CAT(apply,i_)<AUX778076_APPLY_N_SPEC_PARAMS(i_, int)> { typedef int type; }; #endif -# else // i > 0 - -# if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) -// MSVC version - -namespace aux { -// msvc_apply##i -#define BOOST_MPL_AUX_MSVC_DTW_NAME BOOST_PP_CAT(msvc_apply,i) -#define BOOST_MPL_AUX_MSVC_DTW_ORIGINAL_NAME apply -#define BOOST_MPL_AUX_MSVC_DTW_ARITY i -#include "boost/mpl/aux_/msvc_dtw.hpp" -} // namespace aux - -template< - typename F, AUX_APPLY_N_PARAMS(i, typename T) - > -struct BOOST_PP_CAT(apply,i) -{ - // Metafunction forwarding confuses vc6 - typedef typename BOOST_PP_CAT(aux::msvc_apply,i)<F>::template result_< - AUX_APPLY_N_PARAMS(i, T) - >::type type; - - BOOST_MPL_AUX_LAMBDA_SUPPORT( - BOOST_PP_INC(i) - , BOOST_PP_CAT(apply,i) - , (F, AUX_APPLY_N_PARAMS(i,T)) - ) -}; - -# elif defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) -// MWCW/Borland version - -namespace aux { -template< - int N, typename F, AUX_APPLY_N_PARAMS(i, typename T) - > -struct BOOST_PP_CAT(apply_impl,i); -} - -#define BOOST_PP_ITERATION_PARAMS_2 \ - (3,(0, BOOST_MPL_METAFUNCTION_MAX_ARITY - i, "boost/mpl/apply.hpp")) -#include BOOST_PP_ITERATE() - -template< - typename F, AUX_APPLY_N_PARAMS(i, typename T) - > -struct BOOST_PP_CAT(apply,i) - : BOOST_PP_CAT(aux::apply_impl,i)< - ::boost::mpl::aux::arity<F,i>::value - , F - , AUX_APPLY_N_PARAMS(i, T) - >::type -{ - BOOST_MPL_AUX_LAMBDA_SUPPORT( - BOOST_PP_INC(i) - , BOOST_PP_CAT(apply,i) - , (F, AUX_APPLY_N_PARAMS(i,T)) - ) -}; - -# else -// ISO98 C++, with minor concession to vc7 - -template< - typename F, AUX_APPLY_N_PARAMS(i, typename T) - > -struct BOOST_PP_CAT(apply,i) -{ - // Metafunction forwarding confuses vc7 - typedef typename F::template apply< - AUX_APPLY_N_PARAMS(i, T) - >::type type; - - BOOST_MPL_AUX_LAMBDA_SUPPORT( - BOOST_PP_INC(i) - , BOOST_PP_CAT(apply,i) - , (F, AUX_APPLY_N_PARAMS(i,T)) - ) -}; - -# endif // workarounds - -#if defined(BOOST_MPL_MSVC_ETI_BUG) -//: workaround for ETI bug -template<> -struct BOOST_PP_CAT(apply,i)<AUX_APPLY_N_SPEC_PARAMS(i, int)> -{ - typedef int type; -}; -#endif - -# endif // i > 0 - -# if !defined(BOOST_MPL_NO_APPLY_TEMPLATE) +# if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -#if i == BOOST_MPL_METAFUNCTION_MAX_ARITY - -//: primary template (not a specialization!) +#if i_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY +/// primary template (not a specialization!) template< - typename F AUX_APPLY_N_COMMA_PARAMS(i, typename T) + typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) > struct apply - : BOOST_PP_CAT(apply,i)< F AUX_APPLY_N_COMMA_PARAMS(i, T) > + : BOOST_PP_CAT(apply,i_)< F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) > { }; - #else - template< - typename F AUX_APPLY_N_COMMA_PARAMS(i, typename T) + typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) > -struct apply< F AUX_APPLY_N_PARTIAL_SPEC_PARAMS(i, T, void_) > - : BOOST_PP_CAT(apply,i)< F AUX_APPLY_N_COMMA_PARAMS(i, T) > +struct apply< F AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS(i_, T, na) > + : BOOST_PP_CAT(apply,i_)< F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) > { }; +#endif -#endif // i == BOOST_MPL_METAFUNCTION_MAX_ARITY - -# else +# else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) namespace aux { template<> -struct apply_impl_chooser<i> +struct apply_chooser<i_> { template< - typename F, AUX_APPLY_PARAMS(typename T) + typename F, AUX778076_APPLY_PARAMS(typename T) > struct result_ { - typedef BOOST_PP_CAT(apply,i)< - F AUX_APPLY_N_COMMA_PARAMS(i, T) + typedef BOOST_PP_CAT(apply,i_)< + F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) > type; }; }; } // namespace aux +#endif # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -# endif // BOOST_MPL_NO_APPLY_TEMPLATE +# endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE -# undef i - -///// iteration, depth == 2 - -#elif BOOST_PP_ITERATION_DEPTH() == 2 - -# define j BOOST_PP_FRAME_ITERATION(2) - -namespace aux { - -template< - typename F, AUX_APPLY_N_PARAMS(i, typename T) - > -struct BOOST_PP_CAT(apply_impl,i)< - BOOST_MPL_PP_ADD(i, j) - , F - , AUX_APPLY_N_PARAMS(i, T) - > -{ - typedef typename F::template apply< - AUX_APPLY_N_PARAMS(i, T) - BOOST_PP_COMMA_IF(j) BOOST_MPL_PP_ENUM(j, void_) - > type; -}; - -} // namespace aux - -# undef j +# undef i_ #endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/apply_fwd.hpp b/include/boost/mpl/apply_fwd.hpp new file mode 100644 index 0000000..db05360 --- /dev/null +++ b/include/boost/mpl/apply_fwd.hpp @@ -0,0 +1,107 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_APPLY_FWD_HPP_INCLUDED +#define BOOST_MPL_APPLY_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. + +// $Source$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include <boost/mpl/aux_/na.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 apply_fwd.hpp +# include <boost/mpl/aux_/include_preprocessed.hpp> + +#else + +# include <boost/mpl/limits/arity.hpp> +# include <boost/mpl/aux_/preprocessor/params.hpp> +# include <boost/mpl/aux_/preprocessor/default_params.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# include <boost/mpl/aux_/nttp_decl.hpp> + +# include <boost/preprocessor/comma_if.hpp> +# include <boost/preprocessor/iterate.hpp> +# include <boost/preprocessor/cat.hpp> + +// agurt, 15/jan/02: top-level 'apply' template gives an ICE on MSVC +// (for known reasons) +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200) +# define BOOST_MPL_CFG_NO_APPLY_TEMPLATE +#endif + +namespace boost { namespace mpl { + +// local macro, #undef-ined at the end of the header +# define AUX778076_APPLY_DEF_PARAMS(param, value) \ + BOOST_MPL_PP_DEFAULT_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + , value \ + ) \ + /**/ + +# define AUX778076_APPLY_N_COMMA_PARAMS(n, param) \ + BOOST_PP_COMMA_IF(n) \ + BOOST_MPL_PP_PARAMS(n, param) \ + /**/ + +# if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +// forward declaration +template< + typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na) + > +struct apply; +#else +namespace aux { +template< BOOST_AUX_NTTP_DECL(int, arity_) > struct apply_chooser; +} +#endif + +# endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/apply_fwd.hpp>)) +#include BOOST_PP_ITERATE() + + +# undef AUX778076_APPLY_N_COMMA_PARAMS +# undef AUX778076_APPLY_DEF_PARAMS + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_APPLY_FWD_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +template< + typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply,i_); + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/apply_if.hpp b/include/boost/mpl/apply_if.hpp deleted file mode 100644 index b88dc8e..0000000 --- a/include/boost/mpl/apply_if.hpp +++ /dev/null @@ -1,60 +0,0 @@ -//----------------------------------------------------------------------------- -// boost/mpl/apply_if.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_APPLY_IF_HPP_INCLUDED -#define BOOST_MPL_APPLY_IF_HPP_INCLUDED - -#include "boost/mpl/if.hpp" -#include "boost/mpl/aux_/apply.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" - -namespace boost { -namespace mpl { - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(C) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(F1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(F2) - > -struct apply_if -{ - private: - typedef typename if_<C,F1,F2>::type nullary_func_; - - public: - typedef typename BOOST_MPL_AUX_APPLY0(nullary_func_)::type type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(3,apply_if,(C,F1,F2)) -}; - -// (almost) copy & paste in order to save one more -// recursively nested template instantiation to user -template< - bool C - , typename F1 - , typename F2 - > -struct apply_if_c -{ - private: - typedef typename if_c<C,F1,F2>::type nullary_func_; - - public: - typedef typename BOOST_MPL_AUX_APPLY0(nullary_func_)::type type; -}; - -BOOST_MPL_AUX_VOID_SPEC(3, apply_if) - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_APPLY_IF_HPP_INCLUDED diff --git a/include/boost/mpl/apply_wrap.hpp b/include/boost/mpl/apply_wrap.hpp new file mode 100644 index 0000000..7dd526a --- /dev/null +++ b/include/boost/mpl/apply_wrap.hpp @@ -0,0 +1,187 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_APPLY_WRAP_HPP_INCLUDED +#define BOOST_MPL_APPLY_WRAP_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/aux_/arity.hpp> +# include <boost/mpl/aux_/na.hpp> +# include <boost/mpl/aux_/msvc_never_true.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 apply_wrap.hpp +# include <boost/mpl/aux_/include_preprocessed.hpp> + +#else + +# include <boost/mpl/limits/arity.hpp> +# include <boost/mpl/aux_/preprocessor/params.hpp> +# include <boost/mpl/aux_/preprocessor/enum.hpp> +# include <boost/mpl/aux_/preprocessor/add.hpp> +# include <boost/mpl/aux_/config/dtp.hpp> +# include <boost/mpl/aux_/config/eti.hpp> +# include <boost/mpl/aux_/config/msvc.hpp> +# include <boost/mpl/aux_/config/workaround.hpp> + +# include <boost/preprocessor/comma_if.hpp> +# include <boost/preprocessor/logical/and.hpp> +# include <boost/preprocessor/inc.hpp> +# include <boost/preprocessor/iterate.hpp> + + +namespace boost { namespace mpl { + +// local macros, #undef-ined at the end of the header +# define AUX778076_APPLY_WRAP_PARAMS(n, param) \ + BOOST_MPL_PP_PARAMS(n, param) \ + /**/ + +# define AUX778076_APPLY_WRAP_SPEC_PARAMS(n, param) \ + BOOST_MPL_PP_ENUM(BOOST_PP_INC(n), param) \ + /**/ + + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/apply_wrap.hpp>)) +#include BOOST_PP_ITERATE() + + +# undef AUX778076_APPLY_WRAP_SPEC_PARAMS +# undef AUX778076_APPLY_WRAP_PARAMS + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_APPLY_WRAP_HPP_INCLUDED + +///// iteration, depth == 1 + +#elif BOOST_PP_ITERATION_DEPTH() == 1 + +# define i_ BOOST_PP_FRAME_ITERATION(1) + +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +// MSVC version + +#define AUX778076_MSVC_DTW_NAME BOOST_PP_CAT(msvc_apply,i_) +#define AUX778076_MSVC_DTW_ORIGINAL_NAME apply +#define AUX778076_MSVC_DTW_ARITY i_ +#include <boost/mpl/aux_/msvc_dtw.hpp> + +template< + typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply_wrap,i_) +{ + // Metafunction forwarding confuses vc6 + typedef typename BOOST_PP_CAT(msvc_apply,i_)<F>::template result_< + AUX778076_APPLY_WRAP_PARAMS(i_, T) + >::type type; +}; + +# elif defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +// MWCW/Borland version + +template< + int N, typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply_wrap_impl,i_); + +#define BOOST_PP_ITERATION_PARAMS_2 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY - i_, <boost/mpl/apply_wrap.hpp>)) +#include BOOST_PP_ITERATE() + +template< + typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply_wrap,i_) + : BOOST_PP_CAT(apply_wrap_impl,i_)< + ::boost::mpl::aux::arity<F,i_>::value + , F + BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T) + >::type +{ +}; + +# else +// ISO98 C++, with minor concession to vc7 + +template< + typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply_wrap,i_) +// metafunction forwarding confuses MSVC 7.0 +#if !BOOST_WORKAROUND(BOOST_MSVC, == 1300) + : F::template apply< AUX778076_APPLY_WRAP_PARAMS(i_, T) > +{ +#else +{ + typedef typename F::template apply< + AUX778076_APPLY_WRAP_PARAMS(i_, T) + >::type type; +#endif +}; + +# endif // workarounds + +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) +/// workaround for ETI bug +template<> +struct BOOST_PP_CAT(apply_wrap,i_)<AUX778076_APPLY_WRAP_SPEC_PARAMS(i_, int)> +{ + typedef int type; +}; +#endif + +# undef i_ + +///// iteration, depth == 2 + +#elif BOOST_PP_ITERATION_DEPTH() == 2 + +# define j_ BOOST_PP_FRAME_ITERATION(2) + +template< + typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply_wrap_impl,i_)< + BOOST_MPL_PP_ADD(i_, j_) + , F + BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T) + > +{ + typedef typename F::template apply< + AUX778076_APPLY_WRAP_PARAMS(i_, T) +#if i_ == 0 && j_ == 0 +/// since the defaults are "lost", we have to pass *something* even for nullary +/// metafunction classes + na +#else + BOOST_PP_COMMA_IF(BOOST_PP_AND(i_, j_)) BOOST_MPL_PP_ENUM(j_, na) +#endif + > type; +}; + +# undef j_ + +#endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/arg.hpp b/include/boost/mpl/arg.hpp index bb0c83c..cc364a0 100644 --- a/include/boost/mpl/arg.hpp +++ b/include/boost/mpl/arg.hpp @@ -1,14 +1,3 @@ -//----------------------------------------------------------------------------- -// boost mpl/arg.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Peter Dimov, Aleksey Gurtovoy -// -// 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) #if !defined(BOOST_PP_IS_ITERATING) @@ -17,96 +6,105 @@ #ifndef BOOST_MPL_ARG_HPP_INCLUDED #define BOOST_MPL_ARG_HPP_INCLUDED -#include "boost/mpl/aux_/config/static_constant.hpp" +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-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_/config/static_constant.hpp> #if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include "boost/mpl/arg_fwd.hpp" -# include "boost/mpl/void.hpp" -# include "boost/mpl/aux_/arity_spec.hpp" -# include "boost/mpl/aux_/arg_typedef.hpp" -# include "boost/static_assert.hpp" +# include <boost/mpl/arg_fwd.hpp> +# include <boost/mpl/assert.hpp> +# include <boost/mpl/aux_/na.hpp> +# include <boost/mpl/aux_/arity_spec.hpp> +# include <boost/mpl/aux_/arg_typedef.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER arg.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" +# include <boost/mpl/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/limits/arity.hpp" -# include "boost/mpl/aux_/preprocessor/default_params.hpp" -# include "boost/mpl/aux_/preprocessor/params.hpp" -# include "boost/mpl/aux_/config/lambda.hpp" -# include "boost/mpl/aux_/config/dtp.hpp" -# include "boost/mpl/aux_/config/nttp.hpp" -# include "boost/preprocessor/iterate.hpp" -# include "boost/preprocessor/inc.hpp" -# include "boost/preprocessor/cat.hpp" +# include <boost/mpl/limits/arity.hpp> +# include <boost/mpl/aux_/preprocessor/default_params.hpp> +# include <boost/mpl/aux_/preprocessor/params.hpp> +# include <boost/mpl/aux_/config/lambda.hpp> +# include <boost/mpl/aux_/config/dtp.hpp> +# include <boost/mpl/aux_/nttp_decl.hpp> -namespace boost { -namespace mpl { +# include <boost/preprocessor/iterate.hpp> +# include <boost/preprocessor/inc.hpp> +# include <boost/preprocessor/cat.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN // local macro, #undef-ined at the end of the header -#if !defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) -# define AUX_ARG_N_DEFAULT_PARAMS(param,value) \ +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +# define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \ BOOST_MPL_PP_DEFAULT_PARAMS( \ - BOOST_MPL_METAFUNCTION_MAX_ARITY \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ , value \ ) \ /**/ #else -# define AUX_ARG_N_DEFAULT_PARAMS(param,value) \ +# define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \ BOOST_MPL_PP_PARAMS( \ - BOOST_MPL_METAFUNCTION_MAX_ARITY \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ ) \ /**/ #endif #define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(0, BOOST_MPL_METAFUNCTION_MAX_ARITY, "boost/mpl/arg.hpp")) + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/arg.hpp>)) #include BOOST_PP_ITERATE() -# undef AUX_ARG_N_DEFAULT_PARAMS +# undef AUX778076_ARG_N_DEFAULT_PARAMS BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int,arg) -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_ARG_HPP_INCLUDED ///// iteration #else -#define i BOOST_PP_FRAME_ITERATION(1) +#define i_ BOOST_PP_FRAME_ITERATION(1) -#if i > 0 +#if i_ > 0 -template<> struct arg<i> +template<> struct arg<i_> { - BOOST_STATIC_CONSTANT(int, value = i); - typedef arg<BOOST_PP_INC(i)> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_STATIC_CONSTANT(int, value = i_); + typedef arg<BOOST_PP_INC(i_)> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - AUX_ARG_N_DEFAULT_PARAMS(typename U, void_) + AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na) > struct apply { - typedef BOOST_PP_CAT(U,i) type; -#if !defined(__BORLANDC__) || (__BORLANDC__ > 0x561 && defined(BOOST_STRICT_CONFIG)) - private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value); - BOOST_STATIC_ASSERT(nv); -#endif + typedef BOOST_PP_CAT(U,i_) type; + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -115,23 +113,20 @@ template<> struct arg<i> template<> struct arg<-1> { BOOST_STATIC_CONSTANT(int, value = -1); - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - AUX_ARG_N_DEFAULT_PARAMS(typename U, void_) + AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na) > struct apply { typedef U1 type; -#if !defined(__BORLANDC__) || (__BORLANDC__ > 0x561 && defined(BOOST_STRICT_CONFIG)) - private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_<type>::value); - BOOST_STATIC_ASSERT(nv); -#endif + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; -#endif // i > 0 +#endif // i_ > 0 -#undef i +#undef i_ #endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/arg_fwd.hpp b/include/boost/mpl/arg_fwd.hpp index ba56120..376d0b7 100644 --- a/include/boost/mpl/arg_fwd.hpp +++ b/include/boost/mpl/arg_fwd.hpp @@ -1,26 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/arg_fwd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Peter Dimov, Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_ARG_FWD_HPP_INCLUDED #define BOOST_MPL_ARG_FWD_HPP_INCLUDED -#include "boost/mpl/aux_/config/nttp.hpp" +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/adl_barrier.hpp> +#include <boost/mpl/aux_/nttp_decl.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arg; -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +BOOST_MPL_AUX_ADL_BARRIER_DECL(arg) #endif // BOOST_MPL_ARG_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/arithmetic.hpp b/include/boost/mpl/arithmetic.hpp index 769c534..759cea8 100644 --- a/include/boost/mpl/arithmetic.hpp +++ b/include/boost/mpl/arithmetic.hpp @@ -2,23 +2,24 @@ #ifndef BOOST_MPL_ARITHMETIC_HPP_INCLUDED #define BOOST_MPL_ARITHMETIC_HPP_INCLUDED -// + file: boost/mpl/arithmetic.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/plus.hpp" -#include "boost/mpl/minus.hpp" -#include "boost/mpl/multiplies.hpp" -#include "boost/mpl/divides.hpp" -#include "boost/mpl/modulus.hpp" -#include "boost/mpl/negate.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/plus.hpp> +#include <boost/mpl/minus.hpp> +#include <boost/mpl/times.hpp> +#include <boost/mpl/divides.hpp> +#include <boost/mpl/modulus.hpp> +#include <boost/mpl/negate.hpp> +#include <boost/mpl/multiplies.hpp> // deprecated #endif // BOOST_MPL_ARITHMETIC_HPP_INCLUDED diff --git a/include/boost/mpl/as_sequence.hpp b/include/boost/mpl/as_sequence.hpp index 646a099..42d76cb 100644 --- a/include/boost/mpl/as_sequence.hpp +++ b/include/boost/mpl/as_sequence.hpp @@ -1,29 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/as_sequence.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AS_SEQUENCE_HPP_INCLUDED #define BOOST_MPL_AS_SEQUENCE_HPP_INCLUDED -#include "boost/mpl/is_sequence.hpp" -#include "boost/mpl/single_view.hpp" -#include "boost/mpl/if.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/mpl/aux_/config/eti.hpp" +// 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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/is_sequence.hpp> +#include <boost/mpl/single_view.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(T) > struct as_sequence : if_< is_sequence<T>, T, single_view<T> > @@ -31,15 +31,8 @@ struct as_sequence BOOST_MPL_AUX_LAMBDA_SUPPORT(1,as_sequence,(T)) }; -#if defined(BOOST_MPL_MSVC_60_ETI_BUG) -template<> struct as_sequence<int> -{ - typedef single_view<int> type; -}; -#endif +BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, as_sequence) -BOOST_MPL_AUX_VOID_SPEC(1, as_sequence) - -}} // namespace boost::mpl +}} #endif // BOOST_MPL_AS_SEQUENCE_HPP_INCLUDED diff --git a/include/boost/mpl/assert.hpp b/include/boost/mpl/assert.hpp new file mode 100644 index 0000000..ab72639 --- /dev/null +++ b/include/boost/mpl/assert.hpp @@ -0,0 +1,276 @@ + +#ifndef BOOST_MPL_ASSERT_HPP_INCLUDED +#define BOOST_MPL_ASSERT_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$ + +#include <boost/mpl/not.hpp> +#include <boost/mpl/aux_/value_wknd.hpp> +#include <boost/mpl/aux_/nested_type_wknd.hpp> +#include <boost/mpl/aux_/yes_no.hpp> +#include <boost/mpl/aux_/na.hpp> +#include <boost/mpl/aux_/adl_barrier.hpp> + +#include <boost/mpl/aux_/config/nttp.hpp> +#include <boost/mpl/aux_/config/dtp.hpp> +#include <boost/mpl/aux_/config/gcc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +#include <boost/preprocessor/cat.hpp> + +#if BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, < 0x600) \ + || (BOOST_MPL_CFG_GCC != 0) +# define BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES +#endif + +#if BOOST_WORKAROUND(__MWERKS__, < 0x3202) \ + || BOOST_WORKAROUND(__BORLANDC__, < 0x600) \ + || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +# define BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER +#endif + + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +struct failed {}; + +// agurt, 24/aug/04: MSVC 7.1 workaround here and below: return/accept +// 'assert<false>' by reference +template< bool C > struct assert { typedef void* type; }; +template<> struct assert<false> { typedef assert& type; }; + +template< bool C > +int assertion_failed( typename assert<C>::type ); + +struct assert_ +{ +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) + template< typename T1, typename T2 = na, typename T3 = na, typename T4 = na > struct types {}; +#endif + enum relations { arg, equal, not_equal, greater, greater_equal, less, less_equal }; +}; + + +#if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES) + +bool operator==(failed, failed); +bool operator!=(failed, failed); +bool operator>(failed, failed); +bool operator>=(failed, failed); +bool operator<(failed, failed); +bool operator<=(failed, failed); + +#if defined(__EDG_VERSION__) +template< bool (*)(failed, failed), long x, long y > struct assert_relation {}; +# define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation<r,x,y> +#else +template< BOOST_MPL_AUX_NTTP_DECL(long, x), BOOST_MPL_AUX_NTTP_DECL(long, y), bool (*)(failed, failed) > +struct assert_relation {}; +# define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation<x,y,r> +#endif + +#else // BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES + +aux::weighted_tag<1>::type operator==(assert_::relations, assert_::relations); +aux::weighted_tag<2>::type operator!=(assert_::relations, assert_::relations); +aux::weighted_tag<3>::type operator>(assert_::relations, assert_::relations); +aux::weighted_tag<4>::type operator>=(assert_::relations, assert_::relations); +aux::weighted_tag<5>::type operator<(assert_::relations, assert_::relations); +aux::weighted_tag<6>::type operator<=(assert_::relations, assert_::relations); + +template< assert_::relations r, long x, long y > struct assert_relation {}; + +#endif + + +#if !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) + +template< bool > struct assert_arg_pred_impl { typedef int type; }; +template<> struct assert_arg_pred_impl<true> { typedef void* type; }; + +template< typename P > struct assert_arg_pred +{ + typedef typename P::type p_type; + typedef typename assert_arg_pred_impl< p_type::value >::type type; +}; + +template< typename P > struct assert_arg_pred_not +{ + typedef typename P::type p_type; + enum { p = !p_type::value }; + typedef typename assert_arg_pred_impl<p>::type type; +}; + +template< typename Pred > +failed ************ (Pred::************ + assert_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type ) + ); + +template< typename Pred > +failed ************ (boost::mpl::not_<Pred>::************ + assert_not_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type ) + ); + +template< typename Pred > +assert<false>& +assert_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type ); + +template< typename Pred > +assert<false>& +assert_not_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type ); + + +#else // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER + +template< bool c, typename Pred > struct assert_arg_type_impl +{ + typedef failed ************ Pred::* mwcw83_wknd; + typedef mwcw83_wknd ************* type; +}; + +template< typename Pred > struct assert_arg_type_impl<true,Pred> +{ + typedef assert<false>& type; +}; + +template< typename Pred > struct assert_arg_type + : assert_arg_type_impl< BOOST_MPL_AUX_VALUE_WKND(BOOST_MPL_AUX_NESTED_TYPE_WKND(Pred))::value, Pred > +{ +}; + +template< typename Pred > +typename assert_arg_type<Pred>::type +assert_arg(void (*)(Pred), int); + +template< typename Pred > +typename assert_arg_type< boost::mpl::not_<Pred> >::type +assert_not_arg(void (*)(Pred), int); + +# if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES) +template< long x, long y, bool (*r)(failed, failed) > +typename assert_arg_type_impl< false,BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) >::type +assert_rel_arg( assert_relation<x,y,r> ); +# else +template< assert_::relations r, long x, long y > +typename assert_arg_type_impl< false,assert_relation<r,x,y> >::type +assert_rel_arg( assert_relation<r,x,y> ); +# endif + +#endif + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + + +// BOOST_MPL_ASSERT((pred<x,...>)) + +#define BOOST_MPL_ASSERT(pred) \ +enum { \ + BOOST_PP_CAT(mpl_assertion_in_line_,__LINE__) = sizeof( \ + boost::mpl::assertion_failed<false>( \ + boost::mpl::assert_arg( (void (*) pred)0, 1 ) \ + ) \ + ) \ +}\ +/**/ + +// BOOST_MPL_ASSERT_NOT((pred<x,...>)) + +#define BOOST_MPL_ASSERT_NOT(pred) \ +enum { \ + BOOST_PP_CAT(mpl_assertion_in_line_,__LINE__) = sizeof( \ + boost::mpl::assertion_failed<false>( \ + boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \ + ) \ + ) \ +}\ +/**/ + +// BOOST_MPL_ASSERT_RELATION(x, ==|!=|<=|<|>=|>, y) + +#if defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES) + +# if !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) +# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ +enum { \ + BOOST_PP_CAT(mpl_assert_rel,__LINE__) = sizeof(boost::mpl::assert_::arg rel boost::mpl::assert_::arg) \ + , BOOST_PP_CAT(mpl_assertion_in_line_,__LINE__) = sizeof( \ + boost::mpl::assertion_failed<(x rel y)>( \ + (boost::mpl::failed ************ ( boost::mpl::assert_relation< \ + boost::mpl::assert_::relations(BOOST_PP_CAT(mpl_assert_rel,__LINE__)) \ + , x \ + , y \ + >::************)) 0 ) \ + ) \ +} \ +/**/ +# else +# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ +enum { \ + BOOST_PP_CAT(mpl_assert_rel,__LINE__) = sizeof(boost::mpl::assert_::arg rel boost::mpl::assert_::arg) \ + , BOOST_PP_CAT(mpl_assert_rel_value,__LINE__) = (x rel y) \ + , BOOST_PP_CAT(mpl_assertion_in_line_,__LINE__) = sizeof( \ + boost::mpl::assertion_failed<BOOST_PP_CAT(mpl_assert_rel_value,__LINE__)>( \ + boost::mpl::assert_rel_arg( boost::mpl::assert_relation< \ + boost::mpl::assert_::relations(BOOST_PP_CAT(mpl_assert_rel,__LINE__)) \ + , x \ + , y \ + >() ) \ + ) \ + ) \ +} \ +/**/ +# endif + +#else // !BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES + +# if defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) +# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ +enum { \ + BOOST_PP_CAT(mpl_assertion_in_line_,__LINE__) = sizeof( \ + boost::mpl::assertion_failed<(x rel y)>( boost::mpl::assert_rel_arg( \ + boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))() \ + ) ) \ + ) \ +}\ +/**/ +# else +# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ +enum { \ + BOOST_PP_CAT(mpl_assertion_in_line_,__LINE__) = sizeof( \ + boost::mpl::assertion_failed<(x rel y)>( (boost::mpl::failed ************ ( \ + boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))::************))0 ) \ + ) \ +}\ +/**/ +# endif + +#endif + + +// BOOST_MPL_ASSERT_MSG( (pred<x,...>::value), USER_PROVIDED_MESSAGE, (types<x,...>) ) + +# define BOOST_MPL_ASSERT_MSG( c, msg, types ) \ + struct msg; \ + typedef struct BOOST_PP_CAT(msg,__LINE__) : boost::mpl::assert_ \ + { \ + static boost::mpl::failed **************** (msg::**************** assert_arg()) types \ + { return 0; } \ + } BOOST_PP_CAT(mpl_assert_arg,__LINE__); \ + enum { \ + BOOST_PP_CAT(mpl_assertion_in_line_,__LINE__) = sizeof( \ + boost::mpl::assertion_failed<(c)>( BOOST_PP_CAT(mpl_assert_arg,__LINE__)::assert_arg() ) \ + ) \ + }\ +/**/ + +#endif // BOOST_MPL_ASSERT_HPP_INCLUDED diff --git a/include/boost/mpl/assert_is_same.hpp b/include/boost/mpl/assert_is_same.hpp deleted file mode 100644 index ad8a2cd..0000000 --- a/include/boost/mpl/assert_is_same.hpp +++ /dev/null @@ -1,42 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/assert_is_same.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_ASSERT_IS_SAME_HPP_INCLUDED -#define BOOST_MPL_ASSERT_IS_SAME_HPP_INCLUDED - -#include "boost/static_assert.hpp" -#include "boost/type_traits/same_traits.hpp" - -namespace boost { -namespace mpl { - -// the following macros are shortcuts for some often-used but verbose forms -// of static asserts - -// tokenization takes place before macro expansion (see 2.1 [lex.phases] -// para 3-4), so, strictly speaking, spaces between '<', 'type1', and -// 'type2', '>' tokens below are not required; they are needed in practice, -// though, because there is at least one compiler (MSVC 6.5) that does not -// conform to the standard here - -#define BOOST_MPL_ASSERT_IS_SAME(type1, type2) \ - BOOST_STATIC_ASSERT((::boost::is_same< type1, type2 >::value)) \ -/**/ - -#define BOOST_MPL_ASSERT_NOT_SAME(type1, type2) \ - BOOST_STATIC_ASSERT(!(::boost::is_same< type1, type2 >::value)) \ -/**/ - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_ASSERT_IS_SAME_HPP_INCLUDED diff --git a/include/boost/mpl/at.hpp b/include/boost/mpl/at.hpp index cd5ea83..77ac522 100644 --- a/include/boost/mpl/at.hpp +++ b/include/boost/mpl/at.hpp @@ -1,36 +1,36 @@ -//----------------------------------------------------------------------------- -// boost mpl/at.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AT_HPP_INCLUDED #define BOOST_MPL_AT_HPP_INCLUDED -#include "boost/mpl/at_fwd.hpp" -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/aux_/at_impl.hpp" -#include "boost/mpl/aux_/sequence_tag.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/mpl/aux_/config/nttp.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/at_fwd.hpp> +#include <boost/mpl/aux_/at_impl.hpp> +#include <boost/mpl/long.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> +#include <boost/mpl/aux_/nttp_decl.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(N) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(N) > struct at - : at_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) > - ::template algorithm< Sequence,N > + : at_impl< typename sequence_tag<Sequence>::type > + ::template apply< Sequence,N > { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,at,(Sequence,N)) }; @@ -40,14 +40,13 @@ template< , BOOST_MPL_AUX_NTTP_DECL(long, N) > struct at_c - : at_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) > - ::template algorithm< Sequence,integral_c<long,N> > + : at_impl< typename sequence_tag<Sequence>::type > + ::template apply< Sequence,long_<N> > { }; -BOOST_MPL_AUX_VOID_SPEC(2, at) +BOOST_MPL_AUX_NA_SPEC(2, at) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AT_HPP_INCLUDED diff --git a/include/boost/mpl/at_fwd.hpp b/include/boost/mpl/at_fwd.hpp index 77f1732..473c402 100644 --- a/include/boost/mpl/at_fwd.hpp +++ b/include/boost/mpl/at_fwd.hpp @@ -1,25 +1,24 @@ -//----------------------------------------------------------------------------- -// boost mpl/at_fwd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AT_FWD_HPP_INCLUDED #define BOOST_MPL_AT_FWD_HPP_INCLUDED -namespace boost { -namespace mpl { +// 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. -template< typename Tag > struct at_traits; +// $Source$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct at_impl; template< typename Sequence, typename N > struct at; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AT_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/O1_size_impl.hpp b/include/boost/mpl/aux_/O1_size_impl.hpp index 3be418d..b5324f9 100644 --- a/include/boost/mpl/aux_/O1_size_impl.hpp +++ b/include/boost/mpl/aux_/O1_size_impl.hpp @@ -1,68 +1,87 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/O1_size_impl.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED #define BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED -#include "boost/mpl/O1_size_fwd.hpp" -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/if.hpp" -#include "boost/mpl/aux_/has_size.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -// default implementation - returns |Sequence::size| if sequence has a |size| -// member, and -1 otherwise; conrete sequences might override it by specializing -// either the |O1_size_traits| or the primary |O1_size| template +#include <boost/mpl/O1_size_fwd.hpp> +#include <boost/mpl/long.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/aux_/has_size.hpp> +#include <boost/mpl/aux_/config/forwarding.hpp> +#include <boost/mpl/aux_/config/static_constant.hpp> +#include <boost/mpl/aux_/config/msvc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +namespace boost { namespace mpl { + +// default implementation - returns 'Sequence::size' if sequence has a 'size' +// member, and -1 otherwise; conrete sequences might override it by +// specializing either the 'O1_size_impl' or the primary 'O1_size' template + +# if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ + && !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) -#if 0//!defined(BOOST_MSVC) || BOOST_MSVC > 1300 namespace aux { - -template< typename Sequence > -struct O1_size_impl +template< typename Sequence > struct O1_size_impl : Sequence::size { }; - -} // namespace aux +} template< typename Tag > -struct O1_size_traits +struct O1_size_impl { - template< typename Sequence > struct algorithm - : if_c< - ::boost::mpl::aux::has_size<Sequence>::value + template< typename Sequence > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) + : if_< + aux::has_size<Sequence> , aux::O1_size_impl<Sequence> - , integral_c<long,-1> + , long_<-1> >::type { +#else + { + typedef typename if_< + aux::has_size<Sequence> + , aux::O1_size_impl<Sequence> + , long_<-1> + >::type type; + + BOOST_STATIC_CONSTANT(long, value = + (if_< + aux::has_size<Sequence> + , aux::O1_size_impl<Sequence> + , long_<-1> + >::type::value) + ); +#endif }; }; -#else + +# else // BOOST_MSVC template< typename Tag > -struct O1_size_traits +struct O1_size_impl { - template< typename Sequence > struct algorithm - : integral_c<long,-1> + template< typename Sequence > struct apply + : long_<-1> { }; }; -#endif // BOOST_MSVC > 1300 +# endif - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/adl_barrier.hpp b/include/boost/mpl/aux_/adl_barrier.hpp new file mode 100644 index 0000000..ac711bc --- /dev/null +++ b/include/boost/mpl/aux_/adl_barrier.hpp @@ -0,0 +1,61 @@ + +#ifndef BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED +#define BOOST_MPL_AUX_ADL_BARRIER_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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/msvc.hpp> +#include <boost/mpl/aux_/config/intel.hpp> +#include <boost/mpl/aux_/config/gcc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +// agurt, 25/apr/04: technically, the ADL workaround is only needed for GCC, +// but putting everything expect public, user-specializable metafunctions into +// a separate global namespace has a nice side effect of reducing the length +// of template instantiation symbols, so we apply the workaround on all +// platforms that can handle it + +#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ + || BOOST_WORKAROUND(__BORLANDC__, < 0x600) \ + || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) \ + || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \ + || BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, BOOST_TESTED_AT(810)) \ + +# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE boost::mpl +# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN namespace boost { namespace mpl { +# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE }} + +#else + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +namespace mpl_ { namespace aux {} } +namespace boost { namespace mpl { using namespace mpl_; +namespace aux { using namespace mpl_::aux; } +}} +#endif + +# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE mpl_ +# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN namespace mpl_ { +# define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE } + +#endif + +#if BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, <= 0x0295) +# define BOOST_MPL_AUX_ADL_BARRIER_DECL(type) \ + namespace boost { namespace mpl { using ::mpl_::type; } } \ +/**/ +#else +# define BOOST_MPL_AUX_ADL_BARRIER_DECL(type) /**/ +#endif + +#endif // BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/advance_backward.hpp b/include/boost/mpl/aux_/advance_backward.hpp index ca7a795..df8996d 100644 --- a/include/boost/mpl/aux_/advance_backward.hpp +++ b/include/boost/mpl/aux_/advance_backward.hpp @@ -3,86 +3,84 @@ ///// header body -#ifndef BOOST_MPL_AUX_ADVANCE_BACKWARD_HPP_INCLUDED -#define BOOST_MPL_AUX_ADVANCE_BACKWARD_HPP_INCLUDED +#ifndef BOOST_MPL_AUX778076_ADVANCE_BACKWARD_HPP_INCLUDED +#define BOOST_MPL_AUX778076_ADVANCE_BACKWARD_HPP_INCLUDED -// + file: boost/mpl/aux_/advance_backward.hpp -// + last modified: 06/aug/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/aux_/apply.hpp" -#include "boost/mpl/aux_/prior.hpp" -#include "boost/mpl/aux_/config/eti.hpp" +// $Source$ +// $Date$ +// $Revision$ -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include <boost/mpl/prior.hpp> +# include <boost/mpl/apply_wrap.hpp> +#endif -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ +#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 advance_backward.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" +# include <boost/mpl/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/limits/unrolling.hpp" -# include "boost/mpl/aux_/config/nttp.hpp" +# include <boost/mpl/limits/unrolling.hpp> +# include <boost/mpl/aux_/nttp_decl.hpp> +# include <boost/mpl/aux_/config/eti.hpp> -# include "boost/preprocessor/iterate.hpp" -# include "boost/preprocessor/cat.hpp" -# include "boost/preprocessor/inc.hpp" +# include <boost/preprocessor/iterate.hpp> +# include <boost/preprocessor/cat.hpp> +# include <boost/preprocessor/inc.hpp> -namespace boost { -namespace mpl { -namespace aux { +namespace boost { namespace mpl { namespace aux { // forward declaration template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_backward; # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(0, BOOST_MPL_UNROLLING_LIMIT, "boost/mpl/aux_/advance_backward.hpp")) + (3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux_/advance_backward.hpp>)) # include BOOST_PP_ITERATE() -// implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT +// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_backward { template< typename Iterator > struct apply { - typedef typename BOOST_MPL_AUX_APPLY1( - advance_backward<BOOST_MPL_UNROLLING_LIMIT> + typedef typename apply_wrap1< + advance_backward<BOOST_MPL_LIMIT_UNROLLING> , Iterator - )::type chunk_result_; + >::type chunk_result_; - typedef typename BOOST_MPL_AUX_APPLY1( + typedef typename apply_wrap1< advance_backward<( - (N - BOOST_MPL_UNROLLING_LIMIT) < 0 + (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 - : N - BOOST_MPL_UNROLLING_LIMIT + : N - BOOST_MPL_LIMIT_UNROLLING )> , chunk_result_ - )::type type; + >::type type; }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS -#endif // BOOST_MPL_AUX_ADVANCE_BACKWARD_HPP_INCLUDED +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX778076_ADVANCE_BACKWARD_HPP_INCLUDED ///// iteration, depth == 1 #elif BOOST_PP_ITERATION_DEPTH() == 1 -#define i BOOST_PP_FRAME_ITERATION(1) +#define i_ BOOST_PP_FRAME_ITERATION(1) template<> struct advance_backward< BOOST_PP_FRAME_ITERATION(1) > @@ -91,17 +89,17 @@ struct advance_backward< BOOST_PP_FRAME_ITERATION(1) > { typedef Iterator iter0; -#if i > 0 +#if i_ > 0 # define BOOST_PP_ITERATION_PARAMS_2 \ - (3,(1, BOOST_PP_FRAME_ITERATION(1), "boost/mpl/aux_/advance_backward.hpp")) + (3,(1, BOOST_PP_FRAME_ITERATION(1), <boost/mpl/aux_/advance_backward.hpp>)) # include BOOST_PP_ITERATE() #endif typedef BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(1)) type; }; -#if defined(BOOST_MPL_MSVC_60_ETI_BUG) - //: ETI workaround +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) + /// ETI workaround template<> struct apply<int> { typedef int type; @@ -109,18 +107,18 @@ struct advance_backward< BOOST_PP_FRAME_ITERATION(1) > #endif }; -#undef i +#undef i_ ///// iteration, depth == 2 #elif BOOST_PP_ITERATION_DEPTH() == 2 -# define AUX_ITER_0 BOOST_PP_CAT(iter,BOOST_PP_DEC(BOOST_PP_FRAME_ITERATION(2))) -# define AUX_ITER_1 BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(2)) +# define AUX778076_ITER_0 BOOST_PP_CAT(iter,BOOST_PP_DEC(BOOST_PP_FRAME_ITERATION(2))) +# define AUX778076_ITER_1 BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(2)) - typedef typename BOOST_MPL_AUX_PRIOR(AUX_ITER_0) AUX_ITER_1; + typedef typename prior<AUX778076_ITER_0>::type AUX778076_ITER_1; -# undef AUX_ITER_1 -# undef AUX_ITER_0 +# undef AUX778076_ITER_1 +# undef AUX778076_ITER_0 #endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/aux_/advance_forward.hpp b/include/boost/mpl/aux_/advance_forward.hpp index 8a8ddf8..ad9240f 100644 --- a/include/boost/mpl/aux_/advance_forward.hpp +++ b/include/boost/mpl/aux_/advance_forward.hpp @@ -6,83 +6,81 @@ #ifndef BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED #define BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED -// + file: boost/mpl/aux_/advance_forward.hpp -// + last modified: 06/aug/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/aux_/apply.hpp" -#include "boost/mpl/aux_/next.hpp" -#include "boost/mpl/aux_/config/eti.hpp" +// $Source$ +// $Date$ +// $Revision$ -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include <boost/mpl/next.hpp> +# include <boost/mpl/apply_wrap.hpp> +#endif -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ +#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 advance_forward.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" +# include <boost/mpl/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/limits/unrolling.hpp" -# include "boost/mpl/aux_/config/nttp.hpp" +# include <boost/mpl/limits/unrolling.hpp> +# include <boost/mpl/aux_/nttp_decl.hpp> +# include <boost/mpl/aux_/config/eti.hpp> -# include "boost/preprocessor/iterate.hpp" -# include "boost/preprocessor/cat.hpp" -# include "boost/preprocessor/inc.hpp" +# include <boost/preprocessor/iterate.hpp> +# include <boost/preprocessor/cat.hpp> +# include <boost/preprocessor/inc.hpp> -namespace boost { -namespace mpl { -namespace aux { +namespace boost { namespace mpl { namespace aux { // forward declaration template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_forward; # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(0, BOOST_MPL_UNROLLING_LIMIT, "boost/mpl/aux_/advance_forward.hpp")) + (3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux_/advance_forward.hpp>)) # include BOOST_PP_ITERATE() -// implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT +// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_forward { template< typename Iterator > struct apply { - typedef typename BOOST_MPL_AUX_APPLY1( - advance_forward<BOOST_MPL_UNROLLING_LIMIT> + typedef typename apply_wrap1< + advance_forward<BOOST_MPL_LIMIT_UNROLLING> , Iterator - )::type chunk_result_; + >::type chunk_result_; - typedef typename BOOST_MPL_AUX_APPLY1( + typedef typename apply_wrap1< advance_forward<( - (N - BOOST_MPL_UNROLLING_LIMIT) < 0 + (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 - : N - BOOST_MPL_UNROLLING_LIMIT + : N - BOOST_MPL_LIMIT_UNROLLING )> , chunk_result_ - )::type type; + >::type type; }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED ///// iteration, depth == 1 #elif BOOST_PP_ITERATION_DEPTH() == 1 -#define i BOOST_PP_FRAME_ITERATION(1) +#define i_ BOOST_PP_FRAME_ITERATION(1) template<> struct advance_forward< BOOST_PP_FRAME_ITERATION(1) > @@ -91,16 +89,16 @@ struct advance_forward< BOOST_PP_FRAME_ITERATION(1) > { typedef Iterator iter0; -#if i > 0 +#if i_ > 0 # define BOOST_PP_ITERATION_PARAMS_2 \ - (3,(1, i, "boost/mpl/aux_/advance_forward.hpp")) + (3,(1, i_, <boost/mpl/aux_/advance_forward.hpp>)) # include BOOST_PP_ITERATE() #endif - typedef BOOST_PP_CAT(iter,i) type; + typedef BOOST_PP_CAT(iter,i_) type; }; -#if defined(BOOST_MPL_MSVC_60_ETI_BUG) - //: ETI workaround +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) + /// ETI workaround template<> struct apply<int> { typedef int type; @@ -108,18 +106,18 @@ struct advance_forward< BOOST_PP_FRAME_ITERATION(1) > #endif }; -#undef i +#undef i_ ///// iteration, depth == 2 #elif BOOST_PP_ITERATION_DEPTH() == 2 -# define AUX_ITER_0 BOOST_PP_CAT(iter,BOOST_PP_DEC(BOOST_PP_FRAME_ITERATION(2))) -# define AUX_ITER_1 BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(2)) +# define AUX778076_ITER_0 BOOST_PP_CAT(iter,BOOST_PP_DEC(BOOST_PP_FRAME_ITERATION(2))) +# define AUX778076_ITER_1 BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(2)) - typedef typename BOOST_MPL_AUX_NEXT(AUX_ITER_0) AUX_ITER_1; + typedef typename next<AUX778076_ITER_0>::type AUX778076_ITER_1; -# undef AUX_ITER_1 -# undef AUX_ITER_0 +# undef AUX778076_ITER_1 +# undef AUX778076_ITER_0 #endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/aux_/algorithm_namespace.hpp b/include/boost/mpl/aux_/algorithm_namespace.hpp deleted file mode 100644 index a748d70..0000000 --- a/include/boost/mpl/aux_/algorithm_namespace.hpp +++ /dev/null @@ -1,30 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/algorithm_namespace.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_ALGORITHM_NAMESPACE_HPP_INCLUDED -#define BOOST_MPL_AUX_ALGORITHM_NAMESPACE_HPP_INCLUDED - -#if defined(__GNUC__) && __GNUC__ >= 3 - -# define BOOST_MPL_AUX_AGLORITHM_NAMESPACE_PREFIX algo_:: -# define BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN namespace algo_ { -# define BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END } using namespace algo_; - -#else - -# define BOOST_MPL_AUX_AGLORITHM_NAMESPACE_PREFIX /**/ -# define BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN /**/ -# define BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END /**/ - -#endif - -#endif // BOOST_MPL_AUX_ALGORITHM_NAMESPACE_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/apply.hpp b/include/boost/mpl/aux_/apply.hpp deleted file mode 100644 index 9456a87..0000000 --- a/include/boost/mpl/aux_/apply.hpp +++ /dev/null @@ -1,68 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/apply.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_APPLY_HPP_INCLUDED -#define BOOST_MPL_AUX_APPLY_HPP_INCLUDED - -#include "boost/mpl/aux_/config/dtp.hpp" -#include "boost/config.hpp" - -#define BOOST_MPL_AUX_APPLY(arity, args) \ - BOOST_PP_CAT(BOOST_MPL_AUX_APPLY,arity) args \ -/**/ - -// agurt, 14/nov/02: temporary fix, need to research a couple of ICEs to -// get rid of this mess -#if defined(BOOST_MSVC) && BOOST_MSVC == 1300 && !defined(BOOST_MPL_PREPROCESSING_MODE) -# include "boost/mpl/apply.hpp" -#endif - -#if defined(BOOST_MPL_USE_APPLY_INTERNALLY) \ - || defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) \ - || defined(BOOST_MSVC) && (BOOST_MSVC < 1300 || BOOST_MSVC == 1300 && defined(BOOST_MPL_PREPROCESSING_MODE)) - -# if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include "boost/mpl/apply.hpp" -# endif - -// tokenization takes place before macro expansion (see 2.1 [lex.phases] -// para 3-4), so, strictly speaking, spaces between '<', 'f', and '>' tokens -// below (BOOST_MPL_AUX_APPLY0) are not required; they are needed in practice, -// though, because there is at least one compiler (MSVC 6.5) that does not -// conform to the standard here -# define BOOST_MPL_AUX_APPLY0(f) apply0< f > -# define BOOST_MPL_AUX_APPLY1(f,a1) apply1<f,a1> -# define BOOST_MPL_AUX_APPLY2(f,a1,a2) apply2<f,a1,a2> -# define BOOST_MPL_AUX_APPLY3(f,a1,a2,a3) apply3<f,a1,a2,a3> -# define BOOST_MPL_AUX_APPLY4(f,a1,a2,a3,a4) apply4<f,a1,a2,a3,a4> -# define BOOST_MPL_AUX_APPLY5(f,a1,a2,a3,a4,a5) apply5<f,a1,a2,a3,a4,a5> -# define BOOST_MPL_AUX_APPLY6(f,a1,a2,a3,a4,a5,a6) apply6<f,a1,a2,a3,a4,a5,a6> -# define BOOST_MPL_AUX_APPLY7(f,a1,a2,a3,a4,a5,a6,a7) apply7<f,a1,a2,a3,a4,a5,a6,a7> -# define BOOST_MPL_AUX_APPLY8(f,a1,a2,a3,a4,a5,a6,a7,a8) apply8<f,a1,a2,a3,a4,a5,a6,a7,a8> -# define BOOST_MPL_AUX_APPLY9(f,a1,a2,a3,a4,a5,a6,a7,a8,a9) apply9<f,a1,a2,a3,a4,a5,a6,a7,a8,a9> - -#else - -# define BOOST_MPL_AUX_APPLY0(f) f -# define BOOST_MPL_AUX_APPLY1(f,a1) f::template apply<a1> -# define BOOST_MPL_AUX_APPLY2(f,a1,a2) f::template apply<a1,a2> -# define BOOST_MPL_AUX_APPLY3(f,a1,a2,a3) f::template apply<a1,a2,a3> -# define BOOST_MPL_AUX_APPLY4(f,a1,a2,a3,a4) f::template apply<a1,a2,a3,a4> -# define BOOST_MPL_AUX_APPLY5(f,a1,a2,a3,a4,a5) f::template apply<a1,a2,a3,a4,a5> -# define BOOST_MPL_AUX_APPLY6(f,a1,a2,a3,a4,a5,a6) f::template apply<a1,a2,a3,a4,a5,a6> -# define BOOST_MPL_AUX_APPLY7(f,a1,a2,a3,a4,a5,a6,a7) f::template apply<a1,a2,a3,a4,a5,a6,a7> -# define BOOST_MPL_AUX_APPLY8(f,a1,a2,a3,a4,a5,a6,a7,a8) f::template apply<a1,a2,a3,a4,a5,a6,a7,a8> -# define BOOST_MPL_AUX_APPLY9(f,a1,a2,a3,a4,a5,a6,a7,a8,a9) f::template apply<a1,a2,a3,a4,a5,a6,a7,a8,a9> - -#endif - -#endif // BOOST_MPL_AUX_APPLY_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/apply_1st.hpp b/include/boost/mpl/aux_/apply_1st.hpp index 2490f31..0346bd5 100644 --- a/include/boost/mpl/aux_/apply_1st.hpp +++ b/include/boost/mpl/aux_/apply_1st.hpp @@ -1,23 +1,22 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/apply_1st.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_APPLY_1ST_HPP_INCLUDED #define BOOST_MPL_AUX_APPLY_1ST_HPP_INCLUDED -#include "boost/mpl/apply.hpp" +// 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. -namespace boost { -namespace mpl { -namespace aux { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/apply.hpp> + +namespace boost { namespace mpl { namespace aux { struct apply_1st { @@ -31,8 +30,6 @@ struct apply_1st }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} #endif // BOOST_MPL_AUX_APPLY_1ST_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/arg_typedef.hpp b/include/boost/mpl/aux_/arg_typedef.hpp index 3424555..5567b81 100644 --- a/include/boost/mpl/aux_/arg_typedef.hpp +++ b/include/boost/mpl/aux_/arg_typedef.hpp @@ -1,24 +1,31 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/arg_typedef.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED #define BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED -#include "boost/mpl/aux_/config/lambda.hpp" +// Copyright Aleksey Gurtovoy 2001-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. -#if defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/lambda.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +#if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \ + || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) + # define BOOST_MPL_AUX_ARG_TYPEDEF(T, name) typedef T name; + #else + # define BOOST_MPL_AUX_ARG_TYPEDEF(T, name) /**/ + #endif #endif // BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/arithmetic_op.hpp b/include/boost/mpl/aux_/arithmetic_op.hpp new file mode 100644 index 0000000..3dbf92a --- /dev/null +++ b/include/boost/mpl/aux_/arithmetic_op.hpp @@ -0,0 +1,90 @@ + +// 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. + +// $Source$ +// $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/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 BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +namespace aux { +template< typename T, T n1, T n2 > +struct BOOST_PP_CAT(BOOST_PP_CAT(msvc_,AUX778076_OP_PREFIX),_impl) +{ + enum msvc_wknd { 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 !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + : 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(BOOST_PP_CAT(msvc_,AUX778076_OP_PREFIX),_impl)< + 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 diff --git a/include/boost/mpl/aux_/arity.hpp b/include/boost/mpl/aux_/arity.hpp index f365753..45f179e 100644 --- a/include/boost/mpl/aux_/arity.hpp +++ b/include/boost/mpl/aux_/arity.hpp @@ -1,28 +1,27 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/arity.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_ARITY_HPP_INCLUDED #define BOOST_MPL_AUX_ARITY_HPP_INCLUDED -#include "boost/mpl/aux_/config/dtp.hpp" -#include "boost/mpl/aux_/config/nttp.hpp" +// Copyright Aleksey Gurtovoy 2001-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. -#if defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) +// $Source$ +// $Date$ +// $Revision$ -# include "boost/config.hpp" +#include <boost/mpl/aux_/config/dtp.hpp> -namespace boost { -namespace mpl { -namespace aux { +#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) + +# include <boost/mpl/aux_/nttp_decl.hpp> +# include <boost/mpl/aux_/config/static_constant.hpp> + +namespace boost { namespace mpl { namespace aux { // agurt, 15/mar/02: it's possible to implement the template so that it will // "just work" and do not require any specialization, but not on the compilers @@ -33,10 +32,8 @@ struct arity BOOST_STATIC_CONSTANT(int, value = N); }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} -#endif // BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES +#endif // BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES #endif // BOOST_MPL_AUX_ARITY_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/arity_spec.hpp b/include/boost/mpl/aux_/arity_spec.hpp index 8cea102..65445ea 100644 --- a/include/boost/mpl/aux_/arity_spec.hpp +++ b/include/boost/mpl/aux_/arity_spec.hpp @@ -1,25 +1,26 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/arity_spec.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED #define BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED -#include "boost/mpl/aux_/config/dtp.hpp" -#include "boost/mpl/aux_/preprocessor/params.hpp" -#include "boost/mpl/aux_/arity.hpp" -#include "boost/mpl/limits/arity.hpp" -#include "boost/config.hpp" +// Copyright Aleksey Gurtovoy 2001-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. -#if defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/dtp.hpp> +#include <boost/mpl/aux_/preprocessor/params.hpp> +#include <boost/mpl/aux_/arity.hpp> +#include <boost/mpl/limits/arity.hpp> +#include <boost/config.hpp> + +#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) # define BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,type,name) \ namespace aux { \ template< BOOST_MPL_AUX_NTTP_DECL(int, N), BOOST_MPL_PP_PARAMS(i,type T) > \ @@ -29,7 +30,7 @@ struct arity< \ > \ { \ BOOST_STATIC_CONSTANT(int \ - , value = BOOST_MPL_METAFUNCTION_MAX_ARITY \ + , value = BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ ); \ }; \ } \ diff --git a/include/boost/mpl/aux_/at_impl.hpp b/include/boost/mpl/aux_/at_impl.hpp index 51a038a..6763bdd 100644 --- a/include/boost/mpl/aux_/at_impl.hpp +++ b/include/boost/mpl/aux_/at_impl.hpp @@ -1,46 +1,45 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/at_impl.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_AT_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_AT_IMPL_HPP_INCLUDED -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/advance.hpp" -#include "boost/mpl/aux_/deref_wknd.hpp" -#include "boost/mpl/aux_/traits_lambda_spec.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/advance.hpp> +#include <boost/mpl/deref.hpp> +#include <boost/mpl/aux_/traits_lambda_spec.hpp> + +namespace boost { namespace mpl { // default implementation; conrete sequences might override it by -// specializing either the |at_traits| or the primary |at| template +// specializing either the 'at_impl' or the primary 'at' template template< typename Tag > -struct at_traits +struct at_impl { - template< typename Sequence, typename N > struct algorithm + template< typename Sequence, typename N > struct apply { typedef typename advance< typename begin<Sequence>::type , N >::type iter_; - typedef typename BOOST_MPL_AUX_DEREF_WNKD(iter_) type; + typedef typename deref<iter_>::type type; }; }; -BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,at_traits) +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2, at_impl) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AUX_AT_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/back_impl.hpp b/include/boost/mpl/aux_/back_impl.hpp index e4b2195..1a38c41 100644 --- a/include/boost/mpl/aux_/back_impl.hpp +++ b/include/boost/mpl/aux_/back_impl.hpp @@ -1,49 +1,43 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/back_impl.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_BACK_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_BACK_IMPL_HPP_INCLUDED -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/prior.hpp" -#include "boost/mpl/aux_/deref_wknd.hpp" -#include "boost/mpl/aux_/traits_lambda_spec.hpp" -#include "boost/mpl/aux_/config/eti.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/next_prior.hpp> +#include <boost/mpl/deref.hpp> +#include <boost/mpl/aux_/traits_lambda_spec.hpp> + +namespace boost { namespace mpl { // default implementation, requires at least bi-directional iterators; // conrete sequences might override it by specializing either the -// 'back_traits' or the primary 'back' template +// 'back_impl' or the primary 'back' template template< typename Tag > -struct back_traits +struct back_impl { - template< typename Sequence > struct algorithm + template< typename Sequence > struct apply { - typedef typename end<Sequence>::type iter_; -#if defined(BOOST_MPL_MSVC_ETI_BUG) - typedef typename prior<iter_>::type last_; -#else - typedef typename iter_::prior last_; -#endif - typedef typename BOOST_MPL_AUX_DEREF_WNKD(last_) type; + typedef typename end<Sequence>::type end_; + typedef typename prior<end_>::type last_; + typedef typename deref<last_>::type type; }; }; -BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,back_traits) +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, back_impl) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AUX_BACK_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/begin_end_impl.hpp b/include/boost/mpl/aux_/begin_end_impl.hpp index e10cde1..7fb10b2 100644 --- a/include/boost/mpl/aux_/begin_end_impl.hpp +++ b/include/boost/mpl/aux_/begin_end_impl.hpp @@ -1,44 +1,45 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/begin_end_impl.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_BEGIN_END_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_BEGIN_END_IMPL_HPP_INCLUDED -#include "boost/mpl/begin_end_fwd.hpp" -#include "boost/mpl/sequence_tag_fwd.hpp" -#include "boost/mpl/void.hpp" -#include "boost/mpl/aux_/traits_lambda_spec.hpp" -#include "boost/mpl/aux_/config/eti.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/begin_end_fwd.hpp> +#include <boost/mpl/sequence_tag_fwd.hpp> +#include <boost/mpl/void.hpp> +#include <boost/mpl/aux_/na.hpp> +#include <boost/mpl/aux_/traits_lambda_spec.hpp> +#include <boost/mpl/aux_/config/eti.hpp> + +namespace boost { namespace mpl { // default implementation; conrete sequences might override it by -// specializing either the 'begin_traits/end_traits' or the primary +// specializing either the 'begin_impl/end_impl' or the primary // 'begin/end' templates template< typename Tag > -struct begin_traits +struct begin_impl { - template< typename Sequence > struct algorithm + template< typename Sequence > struct apply { typedef typename Sequence::begin type; }; }; template< typename Tag > -struct end_traits +struct end_impl { - template< typename Sequence > struct algorithm + template< typename Sequence > struct apply { typedef typename Sequence::end type; }; @@ -46,11 +47,11 @@ struct end_traits // specialize 'begin_trait/end_trait' for two pre-defined tags -# define AUX_AGLORITM_TRAIT_SPEC(name, tag, result) \ +# define AUX778076_IMPL_SPEC(name, tag, result) \ template<> \ -struct name##_traits<tag> \ +struct name##_impl<tag> \ { \ - template< typename Sequence > struct algorithm \ + template< typename Sequence > struct apply \ { \ typedef result type; \ }; \ @@ -58,22 +59,23 @@ struct name##_traits<tag> \ /**/ // a sequence with nested 'begin/end' typedefs; just query them -AUX_AGLORITM_TRAIT_SPEC(begin, nested_begin_end_tag, typename Sequence::begin) -AUX_AGLORITM_TRAIT_SPEC(end, nested_begin_end_tag, typename Sequence::end) +AUX778076_IMPL_SPEC(begin, nested_begin_end_tag, typename Sequence::begin) +AUX778076_IMPL_SPEC(end, nested_begin_end_tag, typename Sequence::end) // if a type 'T' does not contain 'begin/end' or 'tag' members -// and doesn't specialize either 'begin/end' or 'begin_traits/end_traits' +// and doesn't specialize either 'begin/end' or 'begin_impl/end_impl' // templates, then we end up here -AUX_AGLORITM_TRAIT_SPEC(begin, non_sequence_tag, void_) -AUX_AGLORITM_TRAIT_SPEC(end, non_sequence_tag, void_) +AUX778076_IMPL_SPEC(begin, non_sequence_tag, void_) +AUX778076_IMPL_SPEC(end, non_sequence_tag, void_) +AUX778076_IMPL_SPEC(begin, na, void_) +AUX778076_IMPL_SPEC(end, na, void_) -# undef AUX_AGLORITM_TRAIT_SPEC +# undef AUX778076_IMPL_SPEC -BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,begin_traits) -BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,end_traits) +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,begin_impl) +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,end_impl) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AUX_BEGIN_END_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/bool_value_wknd.hpp b/include/boost/mpl/aux_/bool_value_wknd.hpp deleted file mode 100644 index d49a46e..0000000 --- a/include/boost/mpl/aux_/bool_value_wknd.hpp +++ /dev/null @@ -1,47 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/bool_value_wknd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_BOOL_VALUE_WKND_HPP_INCLUDED -#define BOOST_MPL_AUX_BOOL_VALUE_WKND_HPP_INCLUDED - -#include "boost/config.hpp" - -#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \ - || defined(BOOST_MSVC) && BOOST_MSVC < 1300 - -# include "boost/mpl/bool.hpp" - -namespace boost { namespace mpl { namespace aux { - -template< typename C > -struct bool_value_wknd - : C -{ -}; - -template<> -struct bool_value_wknd<int> - : false_ -{ -}; - -}}} // namespace boost::mpl::aux - -# define BOOST_MPL_AUX_BOOL_VALUE_WKND(C) ::boost::mpl::aux::bool_value_wknd<C> - -#else - -# define BOOST_MPL_AUX_BOOL_VALUE_WKND(C) C - -#endif // __BORLANDC__ - -#endif // BOOST_MPL_AUX_BOOL_VALUE_WKND_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/clear_impl.hpp b/include/boost/mpl/aux_/clear_impl.hpp index c1e6bc2..b0fa8d7 100644 --- a/include/boost/mpl/aux_/clear_impl.hpp +++ b/include/boost/mpl/aux_/clear_impl.hpp @@ -1,36 +1,35 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/clear_impl.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_CLEAR_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_CLEAR_IMPL_HPP_INCLUDED -#include "boost/mpl/clear_fwd.hpp" -#include "boost/mpl/aux_/traits_lambda_spec.hpp" -#include "boost/mpl/aux_/config/eti.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/clear_fwd.hpp> +#include <boost/mpl/aux_/traits_lambda_spec.hpp> +#include <boost/mpl/aux_/config/eti.hpp> + +namespace boost { namespace mpl { // no default implementation; the definition is needed to make MSVC happy template< typename Tag > -struct clear_traits +struct clear_impl { - template< typename Sequence > struct algorithm; + template< typename Sequence > struct apply; }; -BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,clear_traits) +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, clear_impl) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AUX_CLEAR_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/common_name_wknd.hpp b/include/boost/mpl/aux_/common_name_wknd.hpp index 8a199ba..5cdc242 100644 --- a/include/boost/mpl/aux_/common_name_wknd.hpp +++ b/include/boost/mpl/aux_/common_name_wknd.hpp @@ -1,21 +1,24 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/common_name_wknd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_COMMON_NAME_WKND_HPP_INCLUDED #define BOOST_MPL_AUX_COMMON_NAME_WKND_HPP_INCLUDED -#if defined(__BORLANDC__) && __BORLANDC__ < 0x561 -// agurt 12/nov/02: to suppress the bogus "Cannot have both a template class and -// function named 'xxx'" diagnostic +// 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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/workaround.hpp> + +#if BOOST_WORKAROUND(__BORLANDC__, < 0x561) +// agurt, 12/nov/02: to suppress the bogus "Cannot have both a template class +// and function named 'xxx'" diagnostic # define BOOST_MPL_AUX_COMMON_NAME_WKND(name) \ namespace name_##wknd { \ template< typename > void name(); \ diff --git a/include/boost/mpl/aux_/comparison_op.hpp b/include/boost/mpl/aux_/comparison_op.hpp new file mode 100644 index 0000000..e8d01eb --- /dev/null +++ b/include/boost/mpl/aux_/comparison_op.hpp @@ -0,0 +1,81 @@ + +// 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. + +// $Source$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include <boost/mpl/bool.hpp> +# include <boost/mpl/aux_/value_wknd.hpp> +#endif + +#if !defined(AUX778076_OP_PREFIX) +# define AUX778076_OP_PREFIX AUX778076_OP_NAME +#endif + +#define AUX778076_OP_ARITY 2 + +#include <boost/mpl/aux_/numeric_op.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 { + +// MSVC workaround: implement less in terms of greater +#if 0 AUX778076_OP_TOKEN 1 && !(1 AUX778076_OP_TOKEN 0) && !(0 AUX778076_OP_TOKEN 0) +# define AUX778076_OP(N1, N2) \ + ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) \ +/**/ +#else +# define AUX778076_OP(N1, N2) \ + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value \ + AUX778076_OP_TOKEN BOOST_MPL_AUX_VALUE_WKND(N2)::value ) \ +/**/ +#endif + +template<> +struct AUX778076_OP_IMPL_NAME<integral_c_tag,integral_c_tag> +{ + template< typename N1, typename N2 > struct apply +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + : bool_< AUX778076_OP(N1, N2) > + { +#else + { + BOOST_STATIC_CONSTANT(bool, value = AUX778076_OP(N1, N2)); + typedef bool_<value> type; +#endif + }; +}; + +#undef AUX778076_OP + +}} + +#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 diff --git a/include/boost/mpl/aux_/config/arrays.hpp b/include/boost/mpl/aux_/config/arrays.hpp new file mode 100644 index 0000000..db966ba --- /dev/null +++ b/include/boost/mpl/aux_/config/arrays.hpp @@ -0,0 +1,29 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/msvc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +#if !defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(__BORLANDC__, < 0x600) \ + || BOOST_WORKAROUND(BOOST_MSVC, == 1300) + +# define BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/bcc_integral_constants.hpp b/include/boost/mpl/aux_/config/bcc_integral_constants.hpp new file mode 100644 index 0000000..8e0cd36 --- /dev/null +++ b/include/boost/mpl/aux_/config/bcc_integral_constants.hpp @@ -0,0 +1,27 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_BCC_INTEGRAL_CONSTANTS_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_BCC_INTEGRAL_CONSTANTS_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/aux_/config/workaround.hpp> + +#if !defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(__BORLANDC__, < 0x600) + +# define BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_BCC_INTEGRAL_CONSTANTS_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/bind.hpp b/include/boost/mpl/aux_/config/bind.hpp index ae9bfd5..653b88e 100644 --- a/include/boost/mpl/aux_/config/bind.hpp +++ b/include/boost/mpl/aux_/config/bind.hpp @@ -1,28 +1,33 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/config/bind.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// David Abrahams, Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED -#include "boost/config.hpp" +// Copyright David Abrahams 2002 +// 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. -#if !defined(BOOST_MPL_NO_BIND_TEMPLATE) \ +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/msvc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ - && ( defined(BOOST_MSVC) && BOOST_MSVC <= 1300 \ - || defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \ + && ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ + || BOOST_WORKAROUND(__BORLANDC__, < 0x600) \ ) -# define BOOST_MPL_NO_BIND_TEMPLATE +# define BOOST_MPL_CFG_NO_BIND_TEMPLATE -#endif +#endif + +//#define BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT #endif // BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/compiler.hpp b/include/boost/mpl/aux_/config/compiler.hpp index 38e99a1..bb7b289 100644 --- a/include/boost/mpl/aux_/config/compiler.hpp +++ b/include/boost/mpl/aux_/config/compiler.hpp @@ -1,53 +1,64 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/config/dtp.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED -#include "boost/mpl/aux_/config/dtp.hpp" -#include "boost/mpl/aux_/config/ttp.hpp" -#include "boost/config.hpp" +// Copyright Aleksey Gurtovoy 2001-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. -#if defined(BOOST_MSVC) && BOOST_MSVC < 1300 -# define BOOST_MPL_COMPILER_DIR msvc60 +// $Source$ +// $Date$ +// $Revision$ -#elif defined(BOOST_MSVC) && BOOST_MSVC == 1300 -# define BOOST_MPL_COMPILER_DIR msvc70 +#if !defined(BOOST_MPL_CFG_COMPILER_DIR) -#elif defined(__GNUC__) && !defined(__EDG_VERSION__) -# define BOOST_MPL_COMPILER_DIR gcc +# include <boost/mpl/aux_/config/dtp.hpp> +# include <boost/mpl/aux_/config/ttp.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# include <boost/mpl/aux_/config/msvc.hpp> +# include <boost/mpl/aux_/config/gcc.hpp> +# include <boost/mpl/aux_/config/workaround.hpp> + +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +# define BOOST_MPL_CFG_COMPILER_DIR msvc60 + +# elif BOOST_WORKAROUND(BOOST_MSVC, == 1300) +# define BOOST_MPL_CFG_COMPILER_DIR msvc70 + +# elif BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) +# define BOOST_MPL_CFG_COMPILER_DIR gcc + +# elif BOOST_WORKAROUND(__BORLANDC__, < 0x600) +# if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +# define BOOST_MPL_CFG_COMPILER_DIR bcc551 +# else +# define BOOST_MPL_CFG_COMPILER_DIR bcc +# endif + +# elif BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +# define BOOST_MPL_CFG_COMPILER_DIR dmc + +# elif defined(__MWERKS__) +# if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +# define BOOST_MPL_CFG_COMPILER_DIR mwcw +# else +# define BOOST_MPL_CFG_COMPILER_DIR plain +# endif + +# elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +# define BOOST_MPL_CFG_COMPILER_DIR no_ctps + +# elif defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) +# define BOOST_MPL_CFG_COMPILER_DIR no_ttp -#elif defined(__BORLANDC__) -# if !defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) -# define BOOST_MPL_COMPILER_DIR bcc551 # else -# define BOOST_MPL_COMPILER_DIR bcc +# define BOOST_MPL_CFG_COMPILER_DIR plain # endif -#elif defined(__MWERKS__) -# if defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) -# define BOOST_MPL_COMPILER_DIR mwcw -# else -# define BOOST_MPL_COMPILER_DIR plain -# endif - -#elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -# define BOOST_MPL_COMPILER_DIR no_ctps - -#elif defined(BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS) -# define BOOST_MPL_COMPILER_DIR no_ttp - -#else -# define BOOST_MPL_COMPILER_DIR plain -#endif +#endif // BOOST_MPL_CFG_COMPILER_DIR #endif // BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/ctps.hpp b/include/boost/mpl/aux_/config/ctps.hpp index c65f8f7..b03657d 100644 --- a/include/boost/mpl/aux_/config/ctps.hpp +++ b/include/boost/mpl/aux_/config/ctps.hpp @@ -1,28 +1,30 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/config/ctps.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED -#include "boost/config.hpp" +// 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. -#if !defined(BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION) \ +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/workaround.hpp> +#include <boost/config.hpp> + +#if !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ - && defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) + && BOOST_WORKAROUND(__BORLANDC__, < 0x600) -# define BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION +# define BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC #endif -// BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION is defined in "boost/config.hpp" +// BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION is defined in <boost/config.hpp> #endif // BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/dependent_nttp.hpp b/include/boost/mpl/aux_/config/dependent_nttp.hpp index 19e420f..96b8acb 100644 --- a/include/boost/mpl/aux_/config/dependent_nttp.hpp +++ b/include/boost/mpl/aux_/config/dependent_nttp.hpp @@ -1,33 +1,34 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/config/dependent_nttp.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED -#include "boost/config.hpp" +// 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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/gcc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> // GCC and EDG-based compilers incorrectly reject the following code: // template< typename T, T n > struct a; // template< typename T > struct b; // template< typename T, T n > struct b< a<T,n> > {}; -#if !defined(BOOST_NO_DEPENDENT_NON_TYPE_PARAMETER_IN_PARTIAL_SPECIALIZATION) \ +#if !defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ - && ( defined(__EDG__) && (__EDG_VERSION__ <= 300 || !defined(BOOST_STRICT_CONFIG)) \ - || defined(__GNUC__) && !defined(__EDG_VERSION__) && (__GNUC__ < 3 || __GNUC__ == 3 && __GNUC_MINOR__ <= 2 \ - || !defined(BOOST_STRICT_CONFIG)) \ + && ( BOOST_WORKAROUND(__EDG_VERSION__, BOOST_TESTED_AT(300)) \ + || BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) \ ) -# define BOOST_NO_DEPENDENT_NON_TYPE_PARAMETER_IN_PARTIAL_SPECIALIZATION +# define BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC #endif diff --git a/include/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp b/include/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp new file mode 100644 index 0000000..0af1be1 --- /dev/null +++ b/include/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp @@ -0,0 +1,27 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_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/aux_/config/workaround.hpp> + +#if !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) + +# define BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/dtp.hpp b/include/boost/mpl/aux_/config/dtp.hpp index 7c659a6..568bef6 100644 --- a/include/boost/mpl/aux_/config/dtp.hpp +++ b/include/boost/mpl/aux_/config/dtp.hpp @@ -1,19 +1,20 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/config/dtp.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED -#include "boost/config.hpp" +// Copyright Aleksey Gurtovoy 2001-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_/config/workaround.hpp> // MWCW 7.x-8.0 "losts" default template parameters of nested class // templates when their owner classes are passed as arguments to other @@ -21,24 +22,24 @@ // the owner class is a class template), and Borland 5.6 isn't even // able to compile a definition of nested class template with DTP -#if !defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) \ +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ - && defined(__BORLANDC__) && __BORLANDC__ >= 0x560 && \ - (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) + && BOOST_WORKAROUND(__BORLANDC__, >= 0x560) \ + && BOOST_WORKAROUND(__BORLANDC__, < 0x600) -# define BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES +# define BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES #endif -#if !defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) \ +#if !defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ - && ( defined(__MWERKS__) && __MWERKS__ <= 0x3001 \ - || defined(__BORLANDC__) && (__BORLANDC__ <= 0x570 || !defined(BOOST_STRICT_CONFIG)) \ - || defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) \ + && ( BOOST_WORKAROUND(__MWERKS__, <= 0x3001) \ + || BOOST_WORKAROUND(__BORLANDC__, < 0x600) \ + || defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \ ) -# define BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES +# define BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES #endif diff --git a/include/boost/mpl/aux_/config/eti.hpp b/include/boost/mpl/aux_/config/eti.hpp index 3e8a282..8166f89 100644 --- a/include/boost/mpl/aux_/config/eti.hpp +++ b/include/boost/mpl/aux_/config/eti.hpp @@ -1,26 +1,47 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/config/eti.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED -#include "boost/config.hpp" +// Copyright Aleksey Gurtovoy 2001-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_/config/msvc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> // flags for MSVC 6.5's so-called "early template instantiation bug" -#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 -# if BOOST_MSVC < 1300 -# define BOOST_MPL_MSVC_60_ETI_BUG -# endif -# define BOOST_MPL_MSVC_ETI_BUG +#if !defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(BOOST_MSVC, < 1300) + +# define BOOST_MPL_CFG_MSVC_60_ETI_BUG + +#endif + +#if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(BOOST_MSVC, == 1300) + +# define BOOST_MPL_CFG_MSVC_70_ETI_BUG + +#endif + +#if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) \ + || defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) \ + ) + +# define BOOST_MPL_CFG_MSVC_ETI_BUG + #endif #endif // BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/forwarding.hpp b/include/boost/mpl/aux_/config/forwarding.hpp new file mode 100644 index 0000000..cbf7e4f --- /dev/null +++ b/include/boost/mpl/aux_/config/forwarding.hpp @@ -0,0 +1,27 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_FORWARDING_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_FORWARDING_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/aux_/config/workaround.hpp> + +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(__BORLANDC__, < 0x600) + +# define BOOST_MPL_CFG_NO_NESTED_FORWARDING + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_FORWARDING_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/gcc.hpp b/include/boost/mpl/aux_/config/gcc.hpp new file mode 100644 index 0000000..0ec5319 --- /dev/null +++ b/include/boost/mpl/aux_/config/gcc.hpp @@ -0,0 +1,23 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_GCC_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_GCC_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$ + +#if defined(__GNUC__) && !defined(__EDG_VERSION__) +# define BOOST_MPL_CFG_GCC ((__GNUC__ << 8) | __GNUC_MINOR__) +#else +# define BOOST_MPL_CFG_GCC 0 +#endif + +#endif // BOOST_MPL_AUX_CONFIG_GCC_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/has_xxx.hpp b/include/boost/mpl/aux_/config/has_xxx.hpp new file mode 100644 index 0000000..014faf7 --- /dev/null +++ b/include/boost/mpl/aux_/config/has_xxx.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_HAS_XXX_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_HAS_XXX_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// Copyright David Abrahams 2002-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/overload_resolution.hpp> +#include <boost/mpl/aux_/config/gcc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +// agurt, 11/jan/03: signals a stub-only 'has_xxx' implementation + +#if !defined(BOOST_MPL_CFG_NO_HAS_XXX) \ + && ( defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) \ + || BOOST_WORKAROUND(__GNUC__, <= 2) \ + || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) \ + ) + +# define BOOST_MPL_CFG_NO_HAS_XXX + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_HAS_XXX_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/intel.hpp b/include/boost/mpl/aux_/config/intel.hpp new file mode 100644 index 0000000..93702d4 --- /dev/null +++ b/include/boost/mpl/aux_/config/intel.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_INTEL_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_INTEL_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$ + + +// BOOST_INTEL_CXX_VERSION is defined here: +#include <boost/config.hpp> + +#endif // BOOST_MPL_AUX_CONFIG_INTEL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/internals.hpp b/include/boost/mpl/aux_/config/internals.hpp deleted file mode 100644 index 5e92298..0000000 --- a/include/boost/mpl/aux_/config/internals.hpp +++ /dev/null @@ -1,23 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/config/use_preprocessed.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_CONFIG_INTERNALS_HPP_INCLUDED -#define BOOST_MPL_AUX_CONFIG_INTERNALS_HPP_INCLUDED - -#include "boost/config.hpp" - -#if defined(BOOST_MSVC) && BOOST_MSVC < 1300 \ - && !defined(BOOST_MPL_INTERNALS_USE_ITERATOR_CATEGORY) -# define BOOST_MPL_INTERNALS_USE_ITERATOR_CATEGORY -#endif - -#endif // BOOST_MPL_AUX_CONFIG_INTERNALS_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/lambda.hpp b/include/boost/mpl/aux_/config/lambda.hpp index cd31674..604afe9 100644 --- a/include/boost/mpl/aux_/config/lambda.hpp +++ b/include/boost/mpl/aux_/config/lambda.hpp @@ -1,31 +1,32 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/config/lambda.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED -#include "boost/mpl/aux_/config/ttp.hpp" -#include "boost/config.hpp" +// 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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/ttp.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> // agurt, 15/jan/02: full-fledged implementation requires both // template template parameters _and_ partial specialization -#if defined(BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS) \ - || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) -# define BOOST_MPL_NO_FULL_LAMBDA_SUPPORT +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \ + && ( defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \ + || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + ) + +# define BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + #endif -//#define BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT -//#define BOOST_MPL_NO_LAMBDA_HEURISTIC - #endif // BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/msvc.hpp b/include/boost/mpl/aux_/config/msvc.hpp index a386458..5dc63bc 100644 --- a/include/boost/mpl/aux_/config/msvc.hpp +++ b/include/boost/mpl/aux_/config/msvc.hpp @@ -1,19 +1,21 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/config/msvc.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_MSVC_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. + +// $Source$ +// $Date$ +// $Revision$ + + // BOOST_MSVC is defined here: -#include "boost/config.hpp" +#include <boost/config.hpp> #endif // BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/msvc_typename.hpp b/include/boost/mpl/aux_/config/msvc_typename.hpp index 12f45dc..fadf6b9 100644 --- a/include/boost/mpl/aux_/config/msvc_typename.hpp +++ b/include/boost/mpl/aux_/config/msvc_typename.hpp @@ -1,21 +1,23 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/config/msvc_typename.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED -#include "boost/config.hpp" +// 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. -#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/msvc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) # define BOOST_MSVC_TYPENAME #else # define BOOST_MSVC_TYPENAME typename diff --git a/include/boost/mpl/aux_/config/nttp.hpp b/include/boost/mpl/aux_/config/nttp.hpp index 1e27c7d..d273d63 100644 --- a/include/boost/mpl/aux_/config/nttp.hpp +++ b/include/boost/mpl/aux_/config/nttp.hpp @@ -1,21 +1,24 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/config/nttp.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED -#include "boost/mpl/aux_/config/msvc.hpp" +// Copyright Aleksey Gurtovoy 2001-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. -// MSVC 6.5 ICE-s on the code as simple as this: +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/msvc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +// MSVC 6.5 ICE-s on the code as simple as this (see "aux_/nttp_decl.hpp" +// for a workaround): // // namespace std { // template< typename Char > struct string; @@ -26,27 +29,13 @@ // namespace boost { namespace mpl { // template< int > struct arg; // }} -// -// fortunately, a workaround is simple as well: -// -// typedef int nttp_int; -// template< nttp_int > struct arg; -#if defined(BOOST_MSVC) && BOOST_MSVC < 1300 +#if !defined(BOOST_MPL_CFG_NTTP_BUG) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && BOOST_WORKAROUND(BOOST_MSVC, < 1300) -#include "boost/preprocessor/cat.hpp" +# define BOOST_MPL_CFG_NTTP_BUG -#if !defined(BOOST_MPL_PREPROCESSING_MODE) -namespace boost { namespace mpl { -typedef int nttp_int; -typedef long nttp_long; -}} -#endif - -# define BOOST_MPL_AUX_NTTP_DECL(T, x) BOOST_PP_CAT(nttp_,T) x /**/ - -#else -# define BOOST_MPL_AUX_NTTP_DECL(T, x) T x /**/ #endif #endif // BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/operators.hpp b/include/boost/mpl/aux_/config/operators.hpp new file mode 100644 index 0000000..99e9a84 --- /dev/null +++ b/include/boost/mpl/aux_/config/operators.hpp @@ -0,0 +1,31 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_OPERATORS_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_OPERATORS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/gcc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +// agurt, 03/may/03: when defining 'friend' operators, use specialization +// in place of conventional overloading to supress a warning on GCC 3.x; +// breaks 2.95.x! +#if !defined(BOOST_MPL_CFG_USE_OPERATORS_SPECIALIZATION) \ + && BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, > 0x0295) \ + && BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) + +# define BOOST_MPL_CFG_USE_OPERATORS_SPECIALIZATION + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_OPERATORS_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/overload_resolution.hpp b/include/boost/mpl/aux_/config/overload_resolution.hpp index edd5d79..a7618ab 100644 --- a/include/boost/mpl/aux_/config/overload_resolution.hpp +++ b/include/boost/mpl/aux_/config/overload_resolution.hpp @@ -2,27 +2,27 @@ #ifndef BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED -// + file: boost/mpl/aux_/config/overload_resolution.hpp -// + last modified: 23/jun/03 - -// Copyright (c) 2002-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2002-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/aux_/config/workaround.hpp" +// $Source$ +// $Date$ +// $Revision$ -#if !defined(BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION) \ +#include <boost/mpl/aux_/config/workaround.hpp> + +#if !defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ - && ( BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ + && ( BOOST_WORKAROUND(__BORLANDC__, < 0x600) \ || BOOST_WORKAROUND(__MWERKS__, < 0x3001) \ ) -# define BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION +# define BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION #endif diff --git a/include/boost/mpl/aux_/config/preprocessor.hpp b/include/boost/mpl/aux_/config/preprocessor.hpp index 76d427f..0acd76e 100644 --- a/include/boost/mpl/aux_/config/preprocessor.hpp +++ b/include/boost/mpl/aux_/config/preprocessor.hpp @@ -2,11 +2,11 @@ #ifndef BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED -// Copyright (c) 2000-04 Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. @@ -14,25 +14,26 @@ // $Date$ // $Revision$ -#include "boost/mpl/aux_/config/workaround.hpp" +#include <boost/mpl/aux_/config/workaround.hpp> -#if !defined(BOOST_MPL_BROKEN_PP_MACRO_EXPANSION) \ +#if !defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION) \ && ( BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(502)) \ ) -# define BOOST_MPL_BROKEN_PP_MACRO_EXPANSION +# define BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION #endif -//#define BOOST_MPL_NO_OWN_PP_PRIMITIVES +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) +# define BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES +#endif #if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) \ - && BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x833)) - + && BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) # define BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING - #endif + #endif // BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/static_constant.hpp b/include/boost/mpl/aux_/config/static_constant.hpp index ca423cb..7b2a369 100644 --- a/include/boost/mpl/aux_/config/static_constant.hpp +++ b/include/boost/mpl/aux_/config/static_constant.hpp @@ -1,21 +1,22 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/config/static_constant.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_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) // BOOST_STATIC_CONSTANT is defined here: -# include "boost/config.hpp" +# include <boost/config.hpp> #endif #endif // BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/tag_protocol.hpp b/include/boost/mpl/aux_/config/tag_protocol.hpp deleted file mode 100755 index 798267e..0000000 --- a/include/boost/mpl/aux_/config/tag_protocol.hpp +++ /dev/null @@ -1,20 +0,0 @@ - -#ifndef BOOST_MPL_AUX_CONFIG_TAG_PROTOCOL_HPP_INCLUDED -#define BOOST_MPL_AUX_CONFIG_TAG_PROTOCOL_HPP_INCLUDED - -// Copyright (c) David Abrahams 2004 -// -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source$ -// $Date$ -// $Revision$ - -#define BOOST_MPL_TAG_IMPL_SUFFIX traits -#define BOOST_MPL_TAG_IMPL_APPLY algorithm - -#endif // BOOST_MPL_AUX_CONFIG_TAG_PROTOCOL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/ttp.hpp b/include/boost/mpl/aux_/config/ttp.hpp index 8e4e8c9..88c38d6 100644 --- a/include/boost/mpl/aux_/config/ttp.hpp +++ b/include/boost/mpl/aux_/config/ttp.hpp @@ -1,36 +1,38 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/config/ttp.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED -#include "boost/config.hpp" +// 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. -#if defined(BOOST_NO_TEMPLATE_TEMPLATES) \ - && ( !defined(BOOST_MSVC) || BOOST_MSVC < 1300 ) +// $Source$ +// $Date$ +// $Revision$ -# define BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS +#include <boost/mpl/aux_/config/msvc.hpp> +#include <boost/mpl/aux_/config/gcc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +#if !defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \ + && defined(BOOST_NO_TEMPLATE_TEMPLATES) + +# define BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS #endif -#if !defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \ +#if !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ - && ( defined(__GNUC__) && !defined(__EDG_VERSION__) && (__GNUC__ < 3 || __GNUC__ == 3 && __GNUC_MINOR__ <= 2 \ - || !defined(BOOST_STRICT_CONFIG)) \ - || defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \ + && ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) \ + || BOOST_WORKAROUND(__BORLANDC__, < 0x600) \ ) -# define BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING +# define BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING #endif diff --git a/include/boost/mpl/aux_/config/typeof.hpp b/include/boost/mpl/aux_/config/typeof.hpp new file mode 100644 index 0000000..e8dcde2 --- /dev/null +++ b/include/boost/mpl/aux_/config/typeof.hpp @@ -0,0 +1,38 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_TYPEOF_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_TYPEOF_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/gcc.hpp> + +#if !defined(BOOST_MPL_CFG_HAS_TYPEOF) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( defined(BOOST_MPL_CFG_GCC) && BOOST_MPL_CFG_GCC >= 0x0302 \ + || defined(__MWERKS__) && __MWERKS__ >= 0x3000 \ + ) + +# define BOOST_MPL_CFG_HAS_TYPEOF + +#endif + + +#if !defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && defined(BOOST_MPL_CFG_HAS_TYPEOF) + +# define BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_TYPEOF_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/use_preprocessed.hpp b/include/boost/mpl/aux_/config/use_preprocessed.hpp index dbf2b97..e1a05d6 100644 --- a/include/boost/mpl/aux_/config/use_preprocessed.hpp +++ b/include/boost/mpl/aux_/config/use_preprocessed.hpp @@ -1,18 +1,19 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/config/use_preprocessed.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED -//#define BOOST_MPL_NO_PREPROCESSED_HEADERS +// 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$ + +// #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/vector.hpp b/include/boost/mpl/aux_/config/vector.hpp deleted file mode 100644 index dd82ce7..0000000 --- a/include/boost/mpl/aux_/config/vector.hpp +++ /dev/null @@ -1,27 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/config/vector.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_CONFIG_VECTOR_HPP_INCLUDED -#define BOOST_MPL_AUX_CONFIG_VECTOR_HPP_INCLUDED - -// agurt, 10/jul/02: full-fledged __typeof is needed to permit the optimal -// vector implementation - -#if !defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) \ - && defined(__MWERKS__) && __MWERKS__ >= 0x3001 - -# define BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL - -#endif - -#endif // BOOST_MPL_AUX_CONFIG_VECTOR_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/workaround.hpp b/include/boost/mpl/aux_/config/workaround.hpp index 89ba974..0e64dc7 100644 --- a/include/boost/mpl/aux_/config/workaround.hpp +++ b/include/boost/mpl/aux_/config/workaround.hpp @@ -1,18 +1,19 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/config/workaround.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED -#include "boost/detail/workaround.hpp" +// 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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/detail/workaround.hpp> #endif // BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/contains_impl.hpp b/include/boost/mpl/aux_/contains_impl.hpp new file mode 100644 index 0000000..0107ace --- /dev/null +++ b/include/boost/mpl/aux_/contains_impl.hpp @@ -0,0 +1,61 @@ + +#ifndef BOOST_MPL_AUX_CONTAINS_IMPL_HPP_INCLUDED +#define BOOST_MPL_AUX_CONTAINS_IMPL_HPP_INCLUDED + +// Copyright Eric Friedman 2002 +// 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/contains_fwd.hpp> +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/find.hpp> +#include <boost/mpl/not.hpp> +#include <boost/mpl/aux_/traits_lambda_spec.hpp> +#include <boost/mpl/aux_/config/forwarding.hpp> +#include <boost/mpl/aux_/config/static_constant.hpp> + +#include <boost/type_traits/is_same.hpp> + +namespace boost { namespace mpl { + +template< typename Tag > +struct contains_impl +{ + template< typename Sequence, typename T > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) + : not_< is_same< + typename find<Sequence,T>::type + , typename end<Sequence>::type + > > + { +#else + { + typedef not_< is_same< + typename find<Sequence,T>::type + , typename end<Sequence>::type + > > type; + + BOOST_STATIC_CONSTANT(bool, value = + (not_< is_same< + typename find<Sequence,T>::type + , typename end<Sequence>::type + > >::value) + ); +#endif + }; +}; + +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,contains_impl) + +}} + +#endif // BOOST_MPL_AUX_CONTAINS_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/copy_if_op.hpp b/include/boost/mpl/aux_/copy_if_op.hpp deleted file mode 100644 index 127341c..0000000 --- a/include/boost/mpl/aux_/copy_if_op.hpp +++ /dev/null @@ -1,49 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/copy_if_op.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_COPY_IF_OP_HPP_INCLUDED -#define BOOST_MPL_AUX_COPY_IF_OP_HPP_INCLUDED - -#include "boost/mpl/identity.hpp" -#include "boost/mpl/apply.hpp" -#include "boost/mpl/apply_if.hpp" -#include "boost/mpl/aux_/lambda_spec.hpp" - -namespace boost { -namespace mpl { - -namespace aux { - -template< - typename Operation - , typename Predicate - > -struct copy_if_op -{ - template< typename Sequence, typename T > struct apply - { - typedef typename apply_if< - typename apply1<Predicate,T>::type - , apply2<Operation,Sequence,T> - , identity<Sequence> - >::type type; - }; -}; - -} // namespace aux - -BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(2,aux::copy_if_op) - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_AUX_COPY_IF_OP_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/copy_op.hpp b/include/boost/mpl/aux_/copy_op.hpp deleted file mode 100644 index 284a2d3..0000000 --- a/include/boost/mpl/aux_/copy_op.hpp +++ /dev/null @@ -1,46 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/copy_op.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_COPY_OP_HPP_INCLUDED -#define BOOST_MPL_AUX_COPY_OP_HPP_INCLUDED - -#include "boost/mpl/apply.hpp" -#include "boost/mpl/aux_/lambda_spec.hpp" - -namespace boost { -namespace mpl { -namespace aux { - -// hand-written version is more efficient than bind/lambda expression -template< - typename Operation - > -struct copy_op -{ - template< typename Sequence, typename T > struct apply - { - typedef typename apply2< - Operation - , Sequence - , T - >::type type; - }; -}; - -} // namespace aux - -BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1,aux::copy_op) - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_AUX_COPY_OP_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/count_args.hpp b/include/boost/mpl/aux_/count_args.hpp index f13742d..510a92a 100644 --- a/include/boost/mpl/aux_/count_args.hpp +++ b/include/boost/mpl/aux_/count_args.hpp @@ -1,99 +1,105 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/count_args.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -// no include guards, the header is intended for multiple inclusion! +// $Source$ +// $Date$ +// $Revision$ -#include "boost/preprocessor/expr_if.hpp" -#include "boost/preprocessor/inc.hpp" -#include "boost/preprocessor/cat.hpp" +#include <boost/preprocessor/expr_if.hpp> +#include <boost/preprocessor/inc.hpp> +#include <boost/preprocessor/cat.hpp> -#if !defined(BOOST_MPL_AUX_COUNT_ARGS_TEMPLATE_PARAM) -# define BOOST_MPL_AUX_COUNT_ARGS_TEMPLATE_PARAM typename T +#if !defined(AUX778076_COUNT_ARGS_PARAM_NAME) +# define AUX778076_COUNT_ARGS_PARAM_NAME T +#endif + +#if !defined(AUX778076_COUNT_ARGS_TEMPLATE_PARAM) +# define AUX778076_COUNT_ARGS_TEMPLATE_PARAM typename AUX778076_COUNT_ARGS_PARAM_NAME #endif // local macros, #undef-ined at the end of the header -#if !defined(BOOST_MPL_AUX_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES) +#if !defined(AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES) -# include "boost/mpl/aux_/preprocessor/repeat.hpp" -# include "boost/mpl/aux_/preprocessor/params.hpp" +# include <boost/mpl/aux_/preprocessor/repeat.hpp> +# include <boost/mpl/aux_/preprocessor/params.hpp> -# define AUX_COUNT_ARGS_REPEAT BOOST_MPL_PP_REPEAT -# define AUX_COUNT_ARGS_PARAMS(param) \ +# define AUX778076_COUNT_ARGS_REPEAT BOOST_MPL_PP_REPEAT +# define AUX778076_COUNT_ARGS_PARAMS(param) \ BOOST_MPL_PP_PARAMS( \ - BOOST_MPL_AUX_COUNT_ARGS_ARITY \ + AUX778076_COUNT_ARGS_ARITY \ , param \ ) \ /**/ #else -# include "boost/preprocessor/enum_shifted_params.hpp" -# include "boost/preprocessor/repeat.hpp" -# include "boost/preprocessor/inc.hpp" +# include <boost/preprocessor/enum_shifted_params.hpp> +# include <boost/preprocessor/repeat.hpp> +# include <boost/preprocessor/inc.hpp> -# define AUX_COUNT_ARGS_REPEAT BOOST_PP_REPEAT_1 -# define AUX_COUNT_ARGS_PARAMS(param) \ +# define AUX778076_COUNT_ARGS_REPEAT BOOST_PP_REPEAT +# define AUX778076_COUNT_ARGS_PARAMS(param) \ BOOST_PP_ENUM_SHIFTED_PARAMS( \ - BOOST_PP_INC(BOOST_MPL_AUX_COUNT_ARGS_ARITY) \ + BOOST_PP_INC(AUX778076_COUNT_ARGS_ARITY) \ , param \ ) \ /**/ -#endif // BOOST_MPL_AUX_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES +#endif // AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES -#define AUX_IS_ARG_TEMPLATE_NAME \ - BOOST_PP_CAT(is_,BOOST_PP_CAT(BOOST_MPL_AUX_COUNT_ARGS_PREFIX,_arg)) \ +#define AUX778076_IS_ARG_TEMPLATE_NAME \ + BOOST_PP_CAT(is_,BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX,_arg)) \ /**/ -#define AUX_COUNT_ARGS_FUNC(unused, i, param) \ +#define AUX778076_COUNT_ARGS_FUNC(unused, i, param) \ BOOST_PP_EXPR_IF(i, +) \ - AUX_IS_ARG_TEMPLATE_NAME<BOOST_PP_CAT(param,BOOST_PP_INC(i))>::value \ + AUX778076_IS_ARG_TEMPLATE_NAME<BOOST_PP_CAT(param,BOOST_PP_INC(i))>::value \ /**/ // is_<xxx>_arg -template< BOOST_MPL_AUX_COUNT_ARGS_TEMPLATE_PARAM > -struct AUX_IS_ARG_TEMPLATE_NAME +template< AUX778076_COUNT_ARGS_TEMPLATE_PARAM > +struct AUX778076_IS_ARG_TEMPLATE_NAME { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> -struct AUX_IS_ARG_TEMPLATE_NAME<BOOST_MPL_AUX_COUNT_ARGS_DEFAULT> +struct AUX778076_IS_ARG_TEMPLATE_NAME<AUX778076_COUNT_ARGS_DEFAULT> { BOOST_STATIC_CONSTANT(bool, value = false); }; // <xxx>_count_args template< - AUX_COUNT_ARGS_PARAMS(BOOST_MPL_AUX_COUNT_ARGS_TEMPLATE_PARAM) + AUX778076_COUNT_ARGS_PARAMS(AUX778076_COUNT_ARGS_TEMPLATE_PARAM) > -struct BOOST_PP_CAT(BOOST_MPL_AUX_COUNT_ARGS_PREFIX,_count_args) +struct BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX,_count_args) { - BOOST_STATIC_CONSTANT(int, value = AUX_COUNT_ARGS_REPEAT( - BOOST_MPL_AUX_COUNT_ARGS_ARITY - , AUX_COUNT_ARGS_FUNC - , T + BOOST_STATIC_CONSTANT(int, value = AUX778076_COUNT_ARGS_REPEAT( + AUX778076_COUNT_ARGS_ARITY + , AUX778076_COUNT_ARGS_FUNC + , AUX778076_COUNT_ARGS_PARAM_NAME )); }; -#undef AUX_COUNT_ARGS_FUNC -#undef AUX_IS_ARG_TEMPLATE_NAME -#undef AUX_COUNT_ARGS_PARAMS -#undef AUX_COUNT_ARGS_REPEAT +#undef AUX778076_COUNT_ARGS_FUNC +#undef AUX778076_IS_ARG_TEMPLATE_NAME +#undef AUX778076_COUNT_ARGS_PARAMS +#undef AUX778076_COUNT_ARGS_REPEAT -#undef BOOST_MPL_AUX_COUNT_ARGS_ARITY -#undef BOOST_MPL_AUX_COUNT_ARGS_DEFAULT -#undef BOOST_MPL_AUX_COUNT_ARGS_PREFIX -#undef BOOST_MPL_AUX_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES -#undef BOOST_MPL_AUX_COUNT_ARGS_TEMPLATE_PARAM +#undef AUX778076_COUNT_ARGS_ARITY +#undef AUX778076_COUNT_ARGS_DEFAULT +#undef AUX778076_COUNT_ARGS_PREFIX +#undef AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES +#undef AUX778076_COUNT_ARGS_TEMPLATE_PARAM +#undef AUX778076_COUNT_ARGS_PARAM_NAME diff --git a/include/boost/mpl/aux_/count_impl.hpp b/include/boost/mpl/aux_/count_impl.hpp index 36fcdc3..d489a41 100644 --- a/include/boost/mpl/aux_/count_impl.hpp +++ b/include/boost/mpl/aux_/count_impl.hpp @@ -2,26 +2,26 @@ #ifndef BOOST_MPL_AUX_COUNT_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_COUNT_IMPL_HPP_INCLUDED -// + file: boost/mpl/aux_/count_impl.hpp -// + last modified: 05/nov/03 - -// Copyright Aleksey Gurtovoy 2000-03 +// Copyright Aleksey Gurtovoy 2000-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. -#include "boost/mpl/count_fwd.hpp" -#include "boost/mpl/count_if.hpp" -#include "boost/mpl/same_as.hpp" -#include "boost/mpl/aux_/config/static_constant.hpp" -#include "boost/mpl/aux_/config/workaround.hpp" -#include "boost/mpl/aux_/traits_lambda_spec.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { +#include <boost/mpl/count_fwd.hpp> +#include <boost/mpl/count_if.hpp> +#include <boost/mpl/same_as.hpp> +#include <boost/mpl/aux_/config/static_constant.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> +#include <boost/mpl/aux_/traits_lambda_spec.hpp> + +namespace boost { namespace mpl { template< typename Tag > struct count_impl { diff --git a/include/boost/mpl/aux_/debug_print.hpp b/include/boost/mpl/aux_/debug_print.hpp deleted file mode 100644 index b016cf5..0000000 --- a/include/boost/mpl/aux_/debug_print.hpp +++ /dev/null @@ -1,34 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/debug_print.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Fernando Cacciola, Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_DEBUG_PRINT_HPP_INCLUDED -#define BOOST_MPL_AUX_DEBUG_PRINT_HPP_INCLUDED - -namespace boost { -namespace mpl { -namespace aux { - -template< typename T > -struct print_ -{ - enum { value = T::not_existing_memeber }; -}; - -} // namespace aux -} // namespace mpl -} // namespace boost - -#define BOOST_MPL_AUX_DEBUG_PRINT(type) \ -enum { mpl_debug_print_##type = boost::mpl::aux::print_<type>::value } ;\ -/**/ - -#endif // BOOST_MPL_AUX_DEBUG_PRINT_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/deref_wknd.hpp b/include/boost/mpl/aux_/deref_wknd.hpp deleted file mode 100644 index e147c9d..0000000 --- a/include/boost/mpl/aux_/deref_wknd.hpp +++ /dev/null @@ -1,71 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/deref_wknd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-03 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_DEREF_WNKD_HPP_INCLUDED -#define BOOST_MPL_AUX_DEREF_WNKD_HPP_INCLUDED - -#include "boost/mpl/aux_/is_msvc_eti_arg.hpp" -#include "boost/mpl/aux_/config/eti.hpp" - -#if defined(BOOST_MPL_MSVC_ETI_BUG) - -namespace boost { namespace mpl { namespace aux { - -# if defined(BOOST_MPL_MSVC_60_ETI_BUG) - -template< typename Iterator > struct deref_wknd -{ - typedef typename Iterator::type type; -}; - -template<> struct deref_wknd<int> -{ - typedef int type; -}; - -# else - -template< bool > struct deref_wknd_impl -{ - template< typename Iterator > struct result_ - { - typedef typename Iterator::type type; - }; -}; - -template<> struct deref_wknd_impl<false> -{ - template< typename Iterator > struct result_ - { - typedef int type; - }; -}; - -template< typename Iterator > struct deref_wknd - : deref_wknd_impl< !aux::is_msvc_eti_arg<Iterator>::value > - ::template result_<Iterator> -{ -}; - -# endif // BOOST_MPL_MSVC_60_ETI_BUG - -}}} // namespace boost::mpl::aux - -# define BOOST_MPL_AUX_DEREF_WNKD(iter) ::boost::mpl::aux::deref_wknd<iter>::type - -#else - -# define BOOST_MPL_AUX_DEREF_WNKD(iter) iter::type - -#endif // BOOST_MPL_MSVC_ETI_BUG - -#endif // BOOST_MPL_AUX_DEREF_WNKD_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/empty_impl.hpp b/include/boost/mpl/aux_/empty_impl.hpp index d08a3b5..35ef234 100644 --- a/include/boost/mpl/aux_/empty_impl.hpp +++ b/include/boost/mpl/aux_/empty_impl.hpp @@ -1,33 +1,33 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/empty_impl.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_EMPTY_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_EMPTY_IMPL_HPP_INCLUDED -#include "boost/mpl/empty_fwd.hpp" -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/aux_/traits_lambda_spec.hpp" -#include "boost/type_traits/is_same.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/empty_fwd.hpp> +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/aux_/traits_lambda_spec.hpp> +#include <boost/type_traits/is_same.hpp> + +namespace boost { namespace mpl { // default implementation; conrete sequences might override it by -// specializing either the |empty_traits| or the primary |empty| template +// specializing either the 'empty_impl' or the primary 'empty' template template< typename Tag > -struct empty_traits +struct empty_impl { - template< typename Sequence > struct algorithm + template< typename Sequence > struct apply : is_same< typename begin<Sequence>::type , typename end<Sequence>::type @@ -36,9 +36,8 @@ struct empty_traits }; }; -BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,empty_traits) +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,empty_impl) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AUX_EMPTY_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/erase_impl.hpp b/include/boost/mpl/aux_/erase_impl.hpp index 4bb8452..319c9d1 100644 --- a/include/boost/mpl/aux_/erase_impl.hpp +++ b/include/boost/mpl/aux_/erase_impl.hpp @@ -1,41 +1,43 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/erase_impl.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_ERASE_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_ERASE_IMPL_HPP_INCLUDED -#include "boost/mpl/clear.hpp" -#include "boost/mpl/push_front.hpp" -#include "boost/mpl/copy_backward.hpp" -#include "boost/mpl/iterator_range.hpp" -#include "boost/mpl/aux_/void_spec.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/clear.hpp> +#include <boost/mpl/push_front.hpp> +#include <boost/mpl/reverse_fold.hpp> +#include <boost/mpl/iterator_range.hpp> +#include <boost/mpl/next.hpp> +#include <boost/mpl/aux_/na.hpp> + +namespace boost { namespace mpl { // default implementation; conrete sequences might override it by -// specializing either the |erase_traits| or the primary |erase| template +// specializing either the 'erase_impl' or the primary 'erase' template template< typename Tag > -struct erase_traits +struct erase_impl { template< typename Sequence , typename First , typename Last > - struct algorithm + struct apply { - private: + typedef typename if_na< Last,typename next<First>::type >::type last_; + // 1st half: [begin, first) typedef iterator_range< typename begin<Sequence>::type @@ -44,27 +46,24 @@ struct erase_traits // 2nd half: [last, end) ... that is, [last + 1, end) typedef iterator_range< - Last + last_ , typename end<Sequence>::type > second_half_; - typedef typename copy_backward< + typedef typename reverse_fold< second_half_ , typename clear<Sequence>::type , push_front<_,_> >::type half_sequence_; - public: - typedef typename copy_backward< + typedef typename reverse_fold< first_half_ , half_sequence_ , push_front<_,_> >::type type; }; - }; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AUX_ERASE_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/erase_key_impl.hpp b/include/boost/mpl/aux_/erase_key_impl.hpp new file mode 100644 index 0000000..1d59740 --- /dev/null +++ b/include/boost/mpl/aux_/erase_key_impl.hpp @@ -0,0 +1,32 @@ + +#ifndef BOOST_MPL_AUX_ERASE_KEY_IMPL_HPP_INCLUDED +#define BOOST_MPL_AUX_ERASE_KEY_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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/erase_key_fwd.hpp> +#include <boost/mpl/aux_/traits_lambda_spec.hpp> + +namespace boost { namespace mpl { + +template< typename Tag > +struct erase_key_impl +{ + template< typename Sequence, typename Key > struct apply; +}; + +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, erase_key_impl) + +}} + +#endif // BOOST_MPL_AUX_ERASE_KEY_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/filter_iter.hpp b/include/boost/mpl/aux_/filter_iter.hpp index 4325228..912654c 100644 --- a/include/boost/mpl/aux_/filter_iter.hpp +++ b/include/boost/mpl/aux_/filter_iter.hpp @@ -1,27 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/filter_iter.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_FILTER_ITER_HPP_INCLUDED #define BOOST_MPL_AUX_FILTER_ITER_HPP_INCLUDED -#include "boost/mpl/find_if.hpp" -#include "boost/mpl/iterator_range.hpp" -#include "boost/mpl/apply.hpp" -#include "boost/mpl/aux_/lambda_spec.hpp" -#include "boost/mpl/aux_/config/ctps.hpp" -#include "boost/type_traits/is_same.hpp" +// 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/mpl/find_if.hpp> +#include <boost/mpl/iterator_range.hpp> +#include <boost/mpl/iterator_tags.hpp> +#include <boost/mpl/deref.hpp> +#include <boost/mpl/aux_/lambda_spec.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> +#include <boost/type_traits/is_same.hpp> + +namespace boost { namespace mpl { -namespace boost { -namespace mpl { namespace aux { template< @@ -38,13 +40,11 @@ template< > struct next_filter_iter { - private: typedef typename find_if< iterator_range<Iterator,LastIterator> , Predicate >::type base_iter_; - public: typedef filter_iter<base_iter_,LastIterator,Predicate> type; }; @@ -58,14 +58,14 @@ template< struct filter_iter { typedef Iterator base; - typedef typename base::category category; + typedef forward_iterator_tag category; typedef typename aux::next_filter_iter< - typename base::next + typename next<base>::type , LastIterator , Predicate >::type next; - typedef typename base::type type; + typedef typename deref<base>::type type; }; template< @@ -75,7 +75,7 @@ template< struct filter_iter< LastIterator,LastIterator,Predicate > { typedef LastIterator base; - typedef typename base::category category; + typedef forward_iterator_tag category; }; #else @@ -91,16 +91,14 @@ struct filter_iter_impl struct result_ { typedef Iterator base; - // agurt, 14/oct/02: have to use 'Iterator' instead of 'base' below - // to prevent 'base' and 'mpl::base' conflict on MSVC 6.0 - typedef typename Iterator::category category; + typedef forward_iterator_tag category; typedef typename next_filter_iter< - typename Iterator::next + typename next<Iterator>::type , LastIterator , Predicate >::type next; - typedef typename base::type type; + typedef typename deref<base>::type type; }; }; @@ -115,7 +113,7 @@ struct filter_iter_impl< true > struct result_ { typedef Iterator base; - typedef typename Iterator::category category; + typedef forward_iterator_tag category; }; }; @@ -137,7 +135,6 @@ struct filter_iter BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, aux::filter_iter) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AUX_FILTER_ITER_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/find_if_pred.hpp b/include/boost/mpl/aux_/find_if_pred.hpp index b908246..c07d89d 100644 --- a/include/boost/mpl/aux_/find_if_pred.hpp +++ b/include/boost/mpl/aux_/find_if_pred.hpp @@ -1,24 +1,20 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/find_if_pred.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy, Eric Friedman -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED #define BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED -#include "boost/mpl/aux_/iter_apply.hpp" -#include "boost/mpl/not.hpp" +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Eric Friedman 2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. -namespace boost { -namespace mpl { -namespace aux { +#include <boost/mpl/aux_/iter_apply.hpp> +#include <boost/mpl/not.hpp> + +namespace boost { namespace mpl { namespace aux { template< typename Predicate > struct find_if_pred @@ -30,8 +26,6 @@ struct find_if_pred }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} #endif // BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/fold_backward_impl.hpp b/include/boost/mpl/aux_/fold_backward_impl.hpp deleted file mode 100644 index f5cab6d..0000000 --- a/include/boost/mpl/aux_/fold_backward_impl.hpp +++ /dev/null @@ -1,42 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/fold_backward_impl.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_FOLD_BACKWARD_IMPL_HPP_INCLUDED -#define BOOST_MPL_AUX_FOLD_BACKWARD_IMPL_HPP_INCLUDED - -#include "boost/mpl/aux_/apply.hpp" -#include "boost/mpl/aux_/next.hpp" -#include "boost/mpl/aux_/config/eti.hpp" -#include "boost/config.hpp" - -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && \ - !defined(BOOST_MPL_PREPROCESSING_MODE) -# include "boost/mpl/if.hpp" -# include "boost/type_traits/is_same.hpp" -#endif - -#include "boost/mpl/aux_/config/use_preprocessed.hpp" - -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \ - !defined(BOOST_MPL_PREPROCESSING_MODE) - -# define BOOST_MPL_PREPROCESSED_HEADER fold_backward_impl.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" - -#else - -# define BOOST_MPL_AUX_FOLD_IMPL_OP(iter) typename iter::type -# define BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX fold_backward -# include "boost/mpl/aux_/fold_backward_impl_body.hpp" - -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS -#endif // BOOST_MPL_AUX_FOLD_BACKWARD_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/fold_backward_impl_body.hpp b/include/boost/mpl/aux_/fold_backward_impl_body.hpp deleted file mode 100644 index a7390ad..0000000 --- a/include/boost/mpl/aux_/fold_backward_impl_body.hpp +++ /dev/null @@ -1,417 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/fold_backward_impl_body.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// 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) - -// no include guards, the header is intended for multiple inclusion! - -#if !defined(BOOST_PP_IS_ITERATING) - -# include "boost/mpl/aux_/apply.hpp" -# include "boost/mpl/aux_/next.hpp" -# include "boost/mpl/aux_/config/ctps.hpp" -# include "boost/mpl/aux_/config/nttp.hpp" - -# include "boost/mpl/limits/unrolling.hpp" -# include "boost/mpl/aux_/preprocessor/repeat.hpp" - -# include "boost/preprocessor/arithmetic/sub.hpp" -# include "boost/preprocessor/iterate.hpp" -# include "boost/preprocessor/dec.hpp" -# include "boost/preprocessor/inc.hpp" -# include "boost/preprocessor/cat.hpp" - -// local macros, #undef-ined at the end of the header - -# define AUX_ITER_FOLD_FORWARD_STEP(unused, i, unused2) \ - typedef typename BOOST_MPL_AUX_APPLY2( \ - ForwardOp \ - , BOOST_PP_CAT(fwd_state,i) \ - , BOOST_MPL_AUX_FOLD_IMPL_OP(BOOST_PP_CAT(iter,i)) \ - )::type BOOST_PP_CAT(fwd_state,BOOST_PP_INC(i)); \ - typedef typename BOOST_MPL_AUX_NEXT(BOOST_PP_CAT(iter,i)) \ - BOOST_PP_CAT(iter,BOOST_PP_INC(i)); \ - /**/ - -# define AUX_ITER_FOLD_BACKWARD_STEP_FUNC(i) \ - typedef typename BOOST_MPL_AUX_APPLY2( \ - BackwardOp \ - , BOOST_PP_CAT(bkwd_state,i) \ - , BOOST_MPL_AUX_FOLD_IMPL_OP(BOOST_PP_CAT(iter,BOOST_PP_DEC(i))) \ - )::type BOOST_PP_CAT(bkwd_state,BOOST_PP_DEC(i)); \ - /**/ - -# define AUX_ITER_FOLD_BACKWARD_STEP(unused, i, j) \ - AUX_ITER_FOLD_BACKWARD_STEP_FUNC( \ - BOOST_PP_SUB_D(1,j,i) \ - ) \ - /**/ - -# define AUX_FIRST_BACKWARD_STATE_TYPEDEF(i) \ - typedef typename nested_chunk::state BOOST_PP_CAT(bkwd_state,i); - /**/ - -# define AUX_FOLD_IMPL_NAME \ - BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_impl) \ - /**/ - -# define AUX_FOLD_CHUNK_NAME \ - BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_chunk) \ - /**/ - -namespace boost { -namespace mpl { -namespace aux { - -//: forward declaration -template< - BOOST_MPL_AUX_NTTP_DECL(long, N) - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct AUX_FOLD_IMPL_NAME; - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !defined(BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION) - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(0, BOOST_MPL_UNROLLING_LIMIT, "boost/mpl/aux_/fold_backward_impl_body.hpp")) -# include BOOST_PP_ITERATE() - -// implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT -template< - BOOST_MPL_AUX_NTTP_DECL(long, N) - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct AUX_FOLD_IMPL_NAME -{ - typedef First iter0; - typedef State fwd_state0; - - BOOST_MPL_PP_REPEAT( - BOOST_MPL_UNROLLING_LIMIT - , AUX_ITER_FOLD_FORWARD_STEP - , unused - ) - - typedef AUX_FOLD_IMPL_NAME< - ( (N - BOOST_MPL_UNROLLING_LIMIT) < 0 ? 0 : N - BOOST_MPL_UNROLLING_LIMIT ) - , BOOST_PP_CAT(iter,BOOST_MPL_UNROLLING_LIMIT) - , Last - , BOOST_PP_CAT(fwd_state,BOOST_MPL_UNROLLING_LIMIT) - , BackwardOp - , ForwardOp - > nested_chunk; - - AUX_FIRST_BACKWARD_STATE_TYPEDEF(BOOST_MPL_UNROLLING_LIMIT) - - BOOST_MPL_PP_REPEAT( - BOOST_MPL_UNROLLING_LIMIT - , AUX_ITER_FOLD_BACKWARD_STEP - , BOOST_MPL_UNROLLING_LIMIT - ) - - typedef bkwd_state0 state; - typedef typename nested_chunk::iterator iterator; -}; - -// fallback implementation for sequences of unknown size -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct AUX_FOLD_IMPL_NAME<-1,First,Last,State,BackwardOp,ForwardOp> -{ - typedef AUX_FOLD_IMPL_NAME< - -1 - , typename BOOST_MPL_AUX_NEXT(First) - , Last - , typename BOOST_MPL_AUX_APPLY2(ForwardOp,State,BOOST_MPL_AUX_FOLD_IMPL_OP(First))::type - , BackwardOp - , ForwardOp - > nested_step; - - typedef typename BOOST_MPL_AUX_APPLY2( - BackwardOp - , typename nested_step::state - , BOOST_MPL_AUX_FOLD_IMPL_OP(First) - )::type state; - - typedef typename nested_step::iterator iterator; -}; - -template< - typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct AUX_FOLD_IMPL_NAME<-1,Last,Last,State,BackwardOp,ForwardOp> -{ - typedef State state; - typedef Last iterator; -}; - -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -template< BOOST_MPL_AUX_NTTP_DECL(long, N) > -struct AUX_FOLD_CHUNK_NAME; - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(0, BOOST_MPL_UNROLLING_LIMIT, "boost/mpl/aux_/fold_backward_impl_body.hpp")) -# include BOOST_PP_ITERATE() - -// implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT -template< BOOST_MPL_AUX_NTTP_DECL(long, N) > -struct AUX_FOLD_CHUNK_NAME -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - - BOOST_MPL_PP_REPEAT( - BOOST_MPL_UNROLLING_LIMIT - , AUX_ITER_FOLD_FORWARD_STEP - , unused - ) - - typedef AUX_FOLD_IMPL_NAME< - ( (N - BOOST_MPL_UNROLLING_LIMIT) < 0 ? 0 : N - BOOST_MPL_UNROLLING_LIMIT ) - , BOOST_PP_CAT(iter,BOOST_MPL_UNROLLING_LIMIT) - , Last - , BOOST_PP_CAT(fwd_state,BOOST_MPL_UNROLLING_LIMIT) - , BackwardOp - , ForwardOp - > nested_chunk; - - AUX_FIRST_BACKWARD_STATE_TYPEDEF(BOOST_MPL_UNROLLING_LIMIT) - - BOOST_MPL_PP_REPEAT( - BOOST_MPL_UNROLLING_LIMIT - , AUX_ITER_FOLD_BACKWARD_STEP - , BOOST_MPL_UNROLLING_LIMIT - ) - - typedef bkwd_state0 state; - typedef typename nested_chunk::iterator iterator; - }; -}; - -// fallback implementation for sequences of unknown size -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_step); - -template< - typename Last - , typename State - > -struct BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_null_step) -{ - typedef Last iterator; - typedef State state; -}; - -template<> -struct AUX_FOLD_CHUNK_NAME<-1> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef typename if_< - typename is_same<First,Last>::type - , BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_null_step)<Last,State> - , BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_step)<First,Last,State,BackwardOp,ForwardOp> - >::type res_; - - typedef typename res_::state state; - typedef typename res_::iterator iterator; - }; - -#if defined(BOOST_MPL_MSVC_60_ETI_BUG) - //: ETI workaround - template<> struct result_<int,int,int,int,int> - { - typedef int state; - typedef int iterator; - }; -#endif -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_step) -{ - typedef AUX_FOLD_CHUNK_NAME<-1>::template result_< - typename BOOST_MPL_AUX_NEXT(First) - , Last - , typename BOOST_MPL_AUX_APPLY2(ForwardOp,State,BOOST_MPL_AUX_FOLD_IMPL_OP(First))::type - , BackwardOp - , ForwardOp - > nested_step; - - typedef typename BOOST_MPL_AUX_APPLY2( - BackwardOp - , typename nested_step::state - , BOOST_MPL_AUX_FOLD_IMPL_OP(First) - )::type state; - - typedef typename nested_step::iterator iterator; -}; - -template< - BOOST_MPL_AUX_NTTP_DECL(long, N) - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct AUX_FOLD_IMPL_NAME - : AUX_FOLD_CHUNK_NAME<N> - ::template result_<First,Last,State,BackwardOp,ForwardOp> -{ -}; - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -} // namespace aux -} // namespace mpl -} // namespace boost - -# undef AUX_FIRST_BACKWARD_STATE_TYPEDEF -# undef AUX_ITER_FOLD_BACKWARD_STEP -# undef AUX_ITER_FOLD_BACKWARD_STEP_FUNC -# undef AUX_ITER_FOLD_FORWARD_STEP - -#undef BOOST_MPL_AUX_FOLD_IMPL_OP -#undef BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX - -///// iteration - -#else -#define i BOOST_PP_FRAME_ITERATION(1) - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !defined(BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION) - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct AUX_FOLD_IMPL_NAME<i,First,Last,State,BackwardOp,ForwardOp> -{ - typedef First iter0; - typedef State fwd_state0; - - BOOST_MPL_PP_REPEAT( - i - , AUX_ITER_FOLD_FORWARD_STEP - , unused - ) - - typedef BOOST_PP_CAT(fwd_state,i) BOOST_PP_CAT(bkwd_state,i); - - BOOST_MPL_PP_REPEAT( - i - , AUX_ITER_FOLD_BACKWARD_STEP - , i - ) - - typedef bkwd_state0 state; - typedef BOOST_PP_CAT(iter,i) iterator; -}; - -#else - -template<> -struct AUX_FOLD_CHUNK_NAME<BOOST_PP_FRAME_ITERATION(1)> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - - BOOST_MPL_PP_REPEAT( - i - , AUX_ITER_FOLD_FORWARD_STEP - , unused - ) - - typedef BOOST_PP_CAT(fwd_state,i) BOOST_PP_CAT(bkwd_state,i); - - BOOST_MPL_PP_REPEAT( - i - , AUX_ITER_FOLD_BACKWARD_STEP - , i - ) - - typedef bkwd_state0 state; - typedef BOOST_PP_CAT(iter,i) iterator; - }; - -#if defined(BOOST_MPL_MSVC_60_ETI_BUG) - //: ETI workaround - template<> struct result_<int,int,int,int,int> - { - typedef int state; - typedef int iterator; - }; -#endif -}; - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -#undef i -#endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/aux_/fold_impl.hpp b/include/boost/mpl/aux_/fold_impl.hpp index 37a8686..a4ab307 100644 --- a/include/boost/mpl/aux_/fold_impl.hpp +++ b/include/boost/mpl/aux_/fold_impl.hpp @@ -1,42 +1,43 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/fold_impl.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED -#include "boost/mpl/aux_/apply.hpp" -#include "boost/mpl/aux_/next.hpp" -#include "boost/mpl/aux_/config/eti.hpp" -#include "boost/config.hpp" +// 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. -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && \ - !defined(BOOST_MPL_PREPROCESSING_MODE) -# include "boost/mpl/if.hpp" -# include "boost/type_traits/is_same.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include <boost/mpl/next_prior.hpp> +# include <boost/mpl/apply.hpp> +# include <boost/mpl/deref.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +# include <boost/mpl/if.hpp> +# include <boost/type_traits/is_same.hpp> +# endif #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \ - !defined(BOOST_MPL_PREPROCESSING_MODE) +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER fold_impl.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" +# include <boost/mpl/aux_/include_preprocessed.hpp> #else -# define BOOST_MPL_AUX_FOLD_IMPL_OP(iter) typename iter::type -# define BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX fold -# include "boost/mpl/aux_/fold_impl_body.hpp" +# define AUX778076_FOLD_IMPL_OP(iter) typename deref<iter>::type +# define AUX778076_FOLD_IMPL_NAME_PREFIX fold +# include <boost/mpl/aux_/fold_impl_body.hpp> -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/fold_impl_body.hpp b/include/boost/mpl/aux_/fold_impl_body.hpp index 5aeee86..0321f0d 100644 --- a/include/boost/mpl/aux_/fold_impl_body.hpp +++ b/include/boost/mpl/aux_/fold_impl_body.hpp @@ -1,93 +1,91 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/fold_impl_body.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// 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) -// no include guards, the header is intended for multiple inclusion! +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION #if !defined(BOOST_PP_IS_ITERATING) -# include "boost/mpl/aux_/apply.hpp" -# include "boost/mpl/aux_/next.hpp" -# include "boost/mpl/aux_/config/ctps.hpp" -# include "boost/mpl/aux_/config/nttp.hpp" +// 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. -# include "boost/mpl/limits/unrolling.hpp" -# include "boost/mpl/aux_/preprocessor/repeat.hpp" +// $Source$ +// $Date$ +// $Revision$ -# include "boost/preprocessor/iterate.hpp" -# include "boost/preprocessor/dec.hpp" -# include "boost/preprocessor/cat.hpp" +# include <boost/mpl/limits/unrolling.hpp> +# include <boost/mpl/aux_/preprocessor/repeat.hpp> +# include <boost/mpl/aux_/config/workaround.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# include <boost/mpl/aux_/nttp_decl.hpp> +# include <boost/mpl/aux_/config/eti.hpp> + +# include <boost/preprocessor/iterate.hpp> +# include <boost/preprocessor/dec.hpp> +# include <boost/preprocessor/cat.hpp> // local macros, #undef-ined at the end of the header -# define AUX_ITER_FOLD_STEP(unused, i, unused2) \ - typedef typename BOOST_MPL_AUX_APPLY2( \ +# define AUX778076_ITER_FOLD_STEP(unused, i, unused2) \ + typedef typename apply2< \ ForwardOp \ , BOOST_PP_CAT(state,i) \ - , BOOST_MPL_AUX_FOLD_IMPL_OP(BOOST_PP_CAT(iter,i)) \ - )::type BOOST_PP_CAT(state,BOOST_PP_INC(i)); \ - typedef typename BOOST_MPL_AUX_NEXT(BOOST_PP_CAT(iter,i)) \ + , AUX778076_FOLD_IMPL_OP(BOOST_PP_CAT(iter,i)) \ + >::type BOOST_PP_CAT(state,BOOST_PP_INC(i)); \ + typedef typename next<BOOST_PP_CAT(iter,i)>::type \ BOOST_PP_CAT(iter,BOOST_PP_INC(i)); \ /**/ -# define AUX_FOLD_IMPL_NAME \ - BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_impl) \ +# define AUX778076_FOLD_IMPL_NAME \ + BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_impl) \ /**/ -# define AUX_FOLD_CHUNK_NAME \ - BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_chunk) \ +# define AUX778076_FOLD_CHUNK_NAME \ + BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_chunk) \ /**/ -namespace boost { -namespace mpl { -namespace aux { +namespace boost { namespace mpl { namespace aux { -//: forward declaration +/// forward declaration template< - BOOST_MPL_AUX_NTTP_DECL(long, N) + BOOST_MPL_AUX_NTTP_DECL(int, N) , typename First , typename Last , typename State , typename ForwardOp > -struct AUX_FOLD_IMPL_NAME; +struct AUX778076_FOLD_IMPL_NAME; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -# if !defined(__BORLANDC__) +# if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(0, BOOST_MPL_UNROLLING_LIMIT, "boost/mpl/aux_/fold_impl_body.hpp")) + (3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux_/fold_impl_body.hpp>)) # include BOOST_PP_ITERATE() -// implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT +// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING template< - BOOST_MPL_AUX_NTTP_DECL(long, N) + BOOST_MPL_AUX_NTTP_DECL(int, N) , typename First , typename Last , typename State , typename ForwardOp > -struct AUX_FOLD_IMPL_NAME +struct AUX778076_FOLD_IMPL_NAME { - typedef AUX_FOLD_IMPL_NAME< - BOOST_MPL_UNROLLING_LIMIT + typedef AUX778076_FOLD_IMPL_NAME< + BOOST_MPL_LIMIT_UNROLLING , First , Last , State , ForwardOp > chunk_; - typedef AUX_FOLD_IMPL_NAME< - ( (N - BOOST_MPL_UNROLLING_LIMIT) < 0 ? 0 : N - BOOST_MPL_UNROLLING_LIMIT ) + typedef AUX778076_FOLD_IMPL_NAME< + ( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING ) , typename chunk_::iterator , Last , typename chunk_::state @@ -105,12 +103,12 @@ template< , typename State , typename ForwardOp > -struct AUX_FOLD_IMPL_NAME<-1,First,Last,State,ForwardOp> - : AUX_FOLD_IMPL_NAME< +struct AUX778076_FOLD_IMPL_NAME<-1,First,Last,State,ForwardOp> + : AUX778076_FOLD_IMPL_NAME< -1 - , typename BOOST_MPL_AUX_NEXT(First) + , typename next<First>::type , Last - , typename BOOST_MPL_AUX_APPLY2(ForwardOp,State,BOOST_MPL_AUX_FOLD_IMPL_OP(First))::type + , typename apply2<ForwardOp,State,AUX778076_FOLD_IMPL_OP(First)>::type , ForwardOp > { @@ -121,30 +119,30 @@ template< , typename State , typename ForwardOp > -struct AUX_FOLD_IMPL_NAME<-1,Last,Last,State,ForwardOp> +struct AUX778076_FOLD_IMPL_NAME<-1,Last,Last,State,ForwardOp> { typedef State state; typedef Last iterator; }; -# else // __BORLANDC__ +# else // BOOST_WORKAROUND(__BORLANDC__, < 0x600) // Borland have some serious problems with the unrolled version, so // we always use a basic implementation template< - BOOST_MPL_AUX_NTTP_DECL(long, N) + BOOST_MPL_AUX_NTTP_DECL(int, N) , typename First , typename Last , typename State , typename ForwardOp > -struct AUX_FOLD_IMPL_NAME +struct AUX778076_FOLD_IMPL_NAME { - typedef AUX_FOLD_IMPL_NAME< + typedef AUX778076_FOLD_IMPL_NAME< -1 - , typename First::next + , typename next<First>::type , Last - , typename BOOST_MPL_AUX_APPLY2(ForwardOp,State,BOOST_MPL_AUX_FOLD_IMPL_OP(First))::type + , typename apply2<ForwardOp,State,AUX778076_FOLD_IMPL_OP(First)>::type , ForwardOp > res_; @@ -154,32 +152,32 @@ struct AUX_FOLD_IMPL_NAME }; template< - BOOST_MPL_AUX_NTTP_DECL(long, N) + BOOST_MPL_AUX_NTTP_DECL(int, N) , typename Last , typename State , typename ForwardOp > -struct AUX_FOLD_IMPL_NAME<N,Last,Last,State,ForwardOp > +struct AUX778076_FOLD_IMPL_NAME<N,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; typedef state type; }; -# endif // __BORLANDC__ +# endif // BOOST_WORKAROUND(__BORLANDC__, < 0x600) #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -template< BOOST_MPL_AUX_NTTP_DECL(long, N) > -struct AUX_FOLD_CHUNK_NAME; +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > +struct AUX778076_FOLD_CHUNK_NAME; # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(0, BOOST_MPL_UNROLLING_LIMIT, "boost/mpl/aux_/fold_impl_body.hpp")) + (3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux_/fold_impl_body.hpp>)) # include BOOST_PP_ITERATE() -// implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT -template< BOOST_MPL_AUX_NTTP_DECL(long, N) > -struct AUX_FOLD_CHUNK_NAME +// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > +struct AUX778076_FOLD_CHUNK_NAME { template< typename First @@ -189,16 +187,16 @@ struct AUX_FOLD_CHUNK_NAME > struct result_ { - typedef AUX_FOLD_IMPL_NAME< - BOOST_MPL_UNROLLING_LIMIT + typedef AUX778076_FOLD_IMPL_NAME< + BOOST_MPL_LIMIT_UNROLLING , First , Last , State , ForwardOp > chunk_; - typedef AUX_FOLD_IMPL_NAME< - ( (N - BOOST_MPL_UNROLLING_LIMIT) < 0 ? 0 : N - BOOST_MPL_UNROLLING_LIMIT ) + typedef AUX778076_FOLD_IMPL_NAME< + ( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING ) , typename chunk_::iterator , Last , typename chunk_::state @@ -217,20 +215,20 @@ template< , typename State , typename ForwardOp > -struct BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_step); +struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step); template< typename Last , typename State > -struct BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_null_step) +struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step) { typedef Last iterator; typedef State state; }; template<> -struct AUX_FOLD_CHUNK_NAME<-1> +struct AUX778076_FOLD_CHUNK_NAME<-1> { template< typename First @@ -242,16 +240,16 @@ struct AUX_FOLD_CHUNK_NAME<-1> { typedef typename if_< typename is_same<First,Last>::type - , BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_null_step)<Last,State> - , BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_step)<First,Last,State,ForwardOp> + , BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step)<Last,State> + , BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step)<First,Last,State,ForwardOp> >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; -#if defined(BOOST_MPL_MSVC_60_ETI_BUG) - //: ETI workaround +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) + /// ETI workaround template<> struct result_<int,int,int,int> { typedef int state; @@ -266,13 +264,13 @@ template< , typename State , typename ForwardOp > -struct BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_step) +struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step) { // can't inherit here - it breaks MSVC 7.0 - typedef AUX_FOLD_CHUNK_NAME<-1>::template result_< - typename BOOST_MPL_AUX_NEXT(First) + typedef AUX778076_FOLD_CHUNK_NAME<-1>::template result_< + typename next<First>::type , Last - , typename BOOST_MPL_AUX_APPLY2(ForwardOp,State,BOOST_MPL_AUX_FOLD_IMPL_OP(First))::type + , typename apply2<ForwardOp,State,AUX778076_FOLD_IMPL_OP(First)>::type , ForwardOp > chunk_; @@ -281,35 +279,35 @@ struct BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_step) }; template< - BOOST_MPL_AUX_NTTP_DECL(long, N) + BOOST_MPL_AUX_NTTP_DECL(int, N) , typename First , typename Last , typename State , typename ForwardOp > -struct AUX_FOLD_IMPL_NAME - : AUX_FOLD_CHUNK_NAME<N> +struct AUX778076_FOLD_IMPL_NAME + : AUX778076_FOLD_CHUNK_NAME<N> ::template result_<First,Last,State,ForwardOp> { }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -} // namespace aux -} // namespace mpl -} // namespace boost +}}} -# undef AUX_FOLD_IMPL_NAME -# undef AUX_FOLD_CHUNK_NAME -# undef AUX_ITER_FOLD_STEP +# undef AUX778076_FOLD_IMPL_NAME +# undef AUX778076_FOLD_CHUNK_NAME +# undef AUX778076_ITER_FOLD_STEP -#undef BOOST_MPL_AUX_FOLD_IMPL_OP -#undef BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX +#undef AUX778076_FOLD_IMPL_OP +#undef AUX778076_FOLD_IMPL_NAME_PREFIX ///// iteration #else +# define n_ BOOST_PP_FRAME_ITERATION(1) + #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< @@ -318,25 +316,20 @@ template< , typename State , typename ForwardOp > -struct AUX_FOLD_IMPL_NAME<BOOST_PP_FRAME_ITERATION(1),First,Last,State,ForwardOp> +struct AUX778076_FOLD_IMPL_NAME<n_,First,Last,State,ForwardOp> { typedef First iter0; typedef State state0; - BOOST_MPL_PP_REPEAT( - BOOST_PP_FRAME_ITERATION(1) - , AUX_ITER_FOLD_STEP - , unused - ) + BOOST_MPL_PP_REPEAT(n_, AUX778076_ITER_FOLD_STEP, unused) - typedef BOOST_PP_CAT(state,BOOST_PP_FRAME_ITERATION(1)) state; - typedef BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(1)) iterator; + typedef BOOST_PP_CAT(state,n_) state; + typedef BOOST_PP_CAT(iter,n_) iterator; }; #else -template<> -struct AUX_FOLD_CHUNK_NAME<BOOST_PP_FRAME_ITERATION(1)> +template<> struct AUX778076_FOLD_CHUNK_NAME<n_> { template< typename First @@ -349,18 +342,14 @@ struct AUX_FOLD_CHUNK_NAME<BOOST_PP_FRAME_ITERATION(1)> typedef First iter0; typedef State state0; - BOOST_MPL_PP_REPEAT( - BOOST_PP_FRAME_ITERATION(1) - , AUX_ITER_FOLD_STEP - , unused - ) + BOOST_MPL_PP_REPEAT(n_, AUX778076_ITER_FOLD_STEP, unused) - typedef BOOST_PP_CAT(state,BOOST_PP_FRAME_ITERATION(1)) state; - typedef BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(1)) iterator; + typedef BOOST_PP_CAT(state,n_) state; + typedef BOOST_PP_CAT(iter,n_) iterator; }; -#if defined(BOOST_MPL_MSVC_60_ETI_BUG) - //: ETI workaround +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) + /// ETI workaround template<> struct result_<int,int,int,int> { typedef int state; @@ -371,4 +360,6 @@ struct AUX_FOLD_CHUNK_NAME<BOOST_PP_FRAME_ITERATION(1)> #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# undef n_ + #endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/aux_/fold_op.hpp b/include/boost/mpl/aux_/fold_op.hpp index 55c7412..6775da6 100644 --- a/include/boost/mpl/aux_/fold_op.hpp +++ b/include/boost/mpl/aux_/fold_op.hpp @@ -1,23 +1,22 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/fold_op.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_FOLD_OP_HPP_INCLUDED #define BOOST_MPL_AUX_FOLD_OP_HPP_INCLUDED -#include "boost/mpl/apply.hpp" +// Copyright Aleksey Gurtovoy 2001-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. -namespace boost { -namespace mpl { -namespace aux { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/apply.hpp> + +namespace boost { namespace mpl { namespace aux { // hand-written version is more efficient than bind/lambda expression template< typename Op > @@ -33,8 +32,6 @@ struct fold_op }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} #endif // BOOST_MPL_AUX_FOLD_OP_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/fold_pred.hpp b/include/boost/mpl/aux_/fold_pred.hpp index 1171c22..b0eb504 100644 --- a/include/boost/mpl/aux_/fold_pred.hpp +++ b/include/boost/mpl/aux_/fold_pred.hpp @@ -1,24 +1,23 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/fold_pred.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_FOLD_PRED_HPP_INCLUDED #define BOOST_MPL_AUX_FOLD_PRED_HPP_INCLUDED -#include "boost/mpl/same_as.hpp" -#include "boost/mpl/apply.hpp" +// Copyright Aleksey Gurtovoy 2001-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. -namespace boost { -namespace mpl { -namespace aux { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/same_as.hpp> +#include <boost/mpl/apply.hpp> + +namespace boost { namespace mpl { namespace aux { template< typename Last > struct fold_pred @@ -33,8 +32,6 @@ struct fold_pred }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} #endif // BOOST_MPL_AUX_FOLD_PRED_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/front_impl.hpp b/include/boost/mpl/aux_/front_impl.hpp index daca036..4e3d1a4 100644 --- a/include/boost/mpl/aux_/front_impl.hpp +++ b/include/boost/mpl/aux_/front_impl.hpp @@ -1,42 +1,41 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/front_impl.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_FRONT_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_FRONT_IMPL_HPP_INCLUDED -#include "boost/mpl/front_fwd.hpp" -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/aux_/deref_wknd.hpp" -#include "boost/mpl/aux_/traits_lambda_spec.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/front_fwd.hpp> +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/deref.hpp> +#include <boost/mpl/aux_/traits_lambda_spec.hpp> + +namespace boost { namespace mpl { // default implementation; conrete sequences might override it by -// specializing either the |front_traits| or the primary |front| template +// specializing either the 'front_impl' or the primary 'front' template template< typename Tag > -struct front_traits +struct front_impl { - template< typename Sequence > struct algorithm + template< typename Sequence > struct apply { typedef typename begin<Sequence>::type iter_; - typedef typename BOOST_MPL_AUX_DEREF_WNKD(iter_) type; + typedef typename deref<iter_>::type type; }; }; -BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,front_traits) +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,front_impl) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AUX_FRONT_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/full_lambda.hpp b/include/boost/mpl/aux_/full_lambda.hpp index 61372ae..8143352 100644 --- a/include/boost/mpl/aux_/full_lambda.hpp +++ b/include/boost/mpl/aux_/full_lambda.hpp @@ -6,105 +6,86 @@ #ifndef BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED #define BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED -// + file: boost/mpl/aux_/full_lambda.hpp -// + last modified: 03/aug/03 - -// Copyright (c) 2001-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2001-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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/lambda_fwd.hpp" -# include "boost/mpl/bind.hpp" -# include "boost/mpl/protect.hpp" -# include "boost/mpl/quote.hpp" -# include "boost/mpl/bool.hpp" -# include "boost/mpl/int_fwd.hpp" -# include "boost/mpl/aux_/template_arity.hpp" -# include "boost/mpl/aux_/config/ttp.hpp" +# include <boost/mpl/lambda_fwd.hpp> +# include <boost/mpl/bind_fwd.hpp> +# include <boost/mpl/protect.hpp> +# include <boost/mpl/quote.hpp> +# include <boost/mpl/arg.hpp> +# include <boost/mpl/bool.hpp> +# include <boost/mpl/int_fwd.hpp> +# include <boost/mpl/aux_/template_arity.hpp> +# include <boost/mpl/aux_/na_spec.hpp> +# include <boost/mpl/aux_/config/ttp.hpp> +# if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) +# include <boost/mpl/if.hpp> +# endif #endif -#include "boost/mpl/aux_/lambda_expr.hpp" -#include "boost/mpl/aux_/lambda_arity_param.hpp" -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/lambda_arity_param.hpp> +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER full_lambda.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" +# include <boost/mpl/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/limits/arity.hpp" -# include "boost/mpl/aux_/preprocessor/default_params.hpp" -# include "boost/mpl/aux_/preprocessor/params.hpp" -# include "boost/mpl/aux_/preprocessor/enum.hpp" -# include "boost/mpl/aux_/preprocessor/repeat.hpp" +# include <boost/mpl/limits/arity.hpp> +# include <boost/mpl/aux_/preprocessor/default_params.hpp> +# include <boost/mpl/aux_/preprocessor/params.hpp> +# include <boost/mpl/aux_/preprocessor/enum.hpp> +# include <boost/mpl/aux_/preprocessor/repeat.hpp> +# include <boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp> -# include "boost/preprocessor/iterate.hpp" -# include "boost/preprocessor/comma_if.hpp" -# include "boost/preprocessor/inc.hpp" -# include "boost/preprocessor/cat.hpp" +# include <boost/preprocessor/iterate.hpp> +# include <boost/preprocessor/comma_if.hpp> +# include <boost/preprocessor/inc.hpp> +# include <boost/preprocessor/cat.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { // local macros, #undef-ined at the end of the header -# define AUX_LAMBDA_PARAMS(i, param) \ - BOOST_MPL_PP_PARAMS(i, param) \ +# define AUX778076_LAMBDA_PARAMS(i_, param) \ + BOOST_MPL_PP_PARAMS(i_, param) \ /**/ -# define AUX_LAMBDA_BIND_PARAMS(param) \ +# define AUX778076_BIND_PARAMS(param) \ BOOST_MPL_PP_PARAMS( \ - BOOST_MPL_METAFUNCTION_MAX_ARITY \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ ) \ /**/ -# define AUX_LAMBDA_BIND_N_PARAMS(i, param) \ - BOOST_PP_COMMA_IF(i) \ - BOOST_MPL_PP_PARAMS(i, param) \ +# define AUX778076_BIND_N_PARAMS(i_, param) \ + BOOST_PP_COMMA_IF(i_) \ + BOOST_MPL_PP_PARAMS(i_, param) \ /**/ -# define AUX_ARITY_PARAM(param) \ +# define AUX778076_ARITY_PARAM(param) \ BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) \ /**/ -template< - typename T - , typename Tag - , typename Protect = false_ - AUX_ARITY_PARAM(typename Arity = int_< aux::template_arity<T>::value >) - > -struct lambda_impl -{ - BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_) - typedef T type; -}; -template< - typename T - , typename Tag = void_ - AUX_ARITY_PARAM(typename Arity = int_< aux::template_arity<T>::value >) - > -struct lambda - : lambda_impl<T,Tag,false_ AUX_ARITY_PARAM(Arity)> -{ -}; - -#if !defined(BOOST_MPL_NO_LAMBDA_HEURISTIC) - -#define n BOOST_MPL_METAFUNCTION_MAX_ARITY +#define n_ BOOST_MPL_LIMIT_METAFUNCTION_ARITY namespace aux { template< - BOOST_MPL_PP_DEFAULT_PARAMS(n,bool C,false) + BOOST_MPL_PP_DEFAULT_PARAMS(n_,bool C,false) > struct lambda_or : true_ @@ -112,234 +93,258 @@ struct lambda_or }; template<> -struct lambda_or< BOOST_MPL_PP_ENUM(n,false) > +struct lambda_or< BOOST_MPL_PP_ENUM(n_,false) > : false_ { }; } // namespace aux -#undef n +#undef n_ -template< int N, typename Tag, typename Protect > -struct lambda_impl< arg<N>,Tag,Protect AUX_ARITY_PARAM(int_<-1>) > +template< + typename T + , typename Tag + AUX778076_ARITY_PARAM(typename Arity) + > +struct lambda { - BOOST_MPL_AUX_IS_LAMBDA_EXPR(true_) - typedef mpl::arg<N> type; // qualified for the sake of MIPSpro 7.41 + typedef false_ is_le; + typedef T result_; + typedef T type; }; -#endif // BOOST_MPL_NO_LAMBDA_HEURISTIC +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le +{ +}; -#define BOOST_PP_ITERATION_LIMITS (0, BOOST_MPL_METAFUNCTION_MAX_ARITY) -#define BOOST_PP_FILENAME_1 "boost/mpl/aux_/full_lambda.hpp" + +template< int N, typename Tag > +struct lambda< arg<N>,Tag AUX778076_ARITY_PARAM(int_<-1>) > +{ + typedef true_ is_le; + typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41 + typedef protect<result_> type; +}; + + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/aux_/full_lambda.hpp>)) #include BOOST_PP_ITERATE() -//: special case for 'protect' -template< typename T, typename Tag, typename Protect > -struct lambda_impl< protect<T>,Tag,Protect AUX_ARITY_PARAM(int_<1>) > +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< protect<T>,Tag AUX778076_ARITY_PARAM(int_<1>) > { - BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_) - typedef protect<T> type; + typedef false_ is_le; + typedef protect<T> result_; + typedef result_ type; }; -//: specializations for main 'bind', 'bind1st' and 'bind2nd' forms +/// specializations for the main 'bind' form template< - typename F, AUX_LAMBDA_BIND_PARAMS(typename T) + typename F, AUX778076_BIND_PARAMS(typename T) , typename Tag - , typename Protect - > -struct lambda_impl< - bind<F,AUX_LAMBDA_BIND_PARAMS(T)> - , Tag - , Protect - AUX_ARITY_PARAM(int_<BOOST_PP_INC(BOOST_MPL_METAFUNCTION_MAX_ARITY)>) > +struct lambda< + bind<F,AUX778076_BIND_PARAMS(T)> + , Tag + AUX778076_ARITY_PARAM(int_<BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY)>) + > { - BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_) - typedef bind<F, AUX_LAMBDA_BIND_PARAMS(T)> type; + typedef false_ is_le; + typedef bind<F, AUX778076_BIND_PARAMS(T)> result_; + typedef result_ type; }; + +#if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) + template< - typename F, typename T - , typename Tag - , typename Protect + typename F + , typename Tag1 + , typename Tag2 + , typename Arity > -struct lambda_impl< bind1st<F,T>,Tag,Protect AUX_ARITY_PARAM(int_<2>) > +struct lambda< + lambda<F,Tag1,Arity> + , Tag2 + , int_<3> + > { - BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_) - typedef bind1st<F,T> type; + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + + typedef typename l1::is_le is_le; + typedef bind1< quote1<aux::template_arity>, typename l1::result_ > arity_; + typedef lambda< typename if_<is_le,arity_,Arity>::type,Tag2 > l3; + + typedef aux::le_result3<is_le, Tag2, mpl::lambda, l1, l2, l3> le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; +#elif !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) + +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars template< - typename F, typename T - , typename Tag - , typename Protect + typename F, typename Tag1, typename Tag2 > -struct lambda_impl< bind2nd<F,T>,Tag,Protect AUX_ARITY_PARAM(int_<2>) > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > { - BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_) - typedef bind2nd<F,T> type; + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + + typedef typename l1::is_le is_le; + typedef aux::le_result2<is_le, Tag2, mpl::lambda, l1, l2> le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; -# undef AUX_ARITY_PARAM -# undef AUX_LAMBDA_BIND_N_PARAMS -# undef AUX_LAMBDA_BIND_PARAMS -# undef AUX_LAMBDA_PARAMS +#endif -} // namespace mpl -} // namespace boost +# undef AUX778076_ARITY_PARAM +# undef AUX778076_BIND_N_PARAMS +# undef AUX778076_BIND_PARAMS +# undef AUX778076_LAMBDA_PARAMS -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#if !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) +BOOST_MPL_AUX_NA_SPEC(2, lambda) +#else +BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) +#endif + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED ///// iteration, depth == 1 #elif BOOST_PP_ITERATION_DEPTH() == 1 -#define i BOOST_PP_FRAME_ITERATION(1) +#define i_ BOOST_PP_FRAME_ITERATION(1) -#if i > 0 - -template< - template< AUX_LAMBDA_PARAMS(i, typename P) > class F - , AUX_LAMBDA_PARAMS(i, typename T) - , typename Tag - > -struct lambda< F<AUX_LAMBDA_PARAMS(i, T)>, Tag AUX_ARITY_PARAM(int_<i>) > - : lambda_impl< F<AUX_LAMBDA_PARAMS(i, T)>,Tag,true_ AUX_ARITY_PARAM(int_<i>) > -{ -}; - -#if defined(BOOST_MPL_NO_LAMBDA_HEURISTIC) - -template< - template< AUX_LAMBDA_PARAMS(i, typename P) > class F - , AUX_LAMBDA_PARAMS(i, typename T) - , typename Tag - , typename Protect - > -struct lambda_impl< - F<AUX_LAMBDA_PARAMS(i, T)>, Tag, Protect AUX_ARITY_PARAM(int_<i>) - > -{ -# define AUX_LAMBDA_INVOCATION(unused, i, T) \ - BOOST_PP_COMMA_IF(i) \ - typename lambda_impl< BOOST_PP_CAT(T, BOOST_PP_INC(i)),Tag >::type \ - /**/ - - typedef BOOST_PP_CAT(bind,i)< - BOOST_PP_CAT(quote,i)<F,Tag> - , BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T) - > type; - -# undef AUX_LAMBDA_INVOCATION -}; - -#else // BOOST_MPL_NO_LAMBDA_HEURISTIC - -# define AUX_LAMBDA_RESULT(unused, i, T) \ - BOOST_PP_COMMA_IF(i) \ - typename BOOST_PP_CAT(T, BOOST_PP_INC(i))::type \ - /**/ +#if i_ > 0 namespace aux { +# define AUX778076_RESULT(unused, i_, T) \ + BOOST_PP_COMMA_IF(i_) \ + typename BOOST_PP_CAT(T, BOOST_PP_INC(i_))::result_ \ + /**/ + +# define AUX778076_TYPE(unused, i_, T) \ + BOOST_PP_COMMA_IF(i_) \ + typename BOOST_PP_CAT(T, BOOST_PP_INC(i_))::type \ + /**/ + template< - typename IsLE, typename Tag, typename Protect - , template< AUX_LAMBDA_PARAMS(i, typename P) > class F - , AUX_LAMBDA_PARAMS(i, typename L) + typename IsLE, typename Tag + , template< AUX778076_LAMBDA_PARAMS(i_, typename P) > class F + , AUX778076_LAMBDA_PARAMS(i_, typename L) > -struct BOOST_PP_CAT(le_result,i) +struct BOOST_PP_CAT(le_result,i_) { typedef F< - BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_RESULT, L) - > type; + BOOST_MPL_PP_REPEAT(i_, AUX778076_TYPE, L) + > result_; + + typedef result_ type; }; template< typename Tag - , template< AUX_LAMBDA_PARAMS(i, typename P) > class F - , AUX_LAMBDA_PARAMS(i, typename L) + , template< AUX778076_LAMBDA_PARAMS(i_, typename P) > class F + , AUX778076_LAMBDA_PARAMS(i_, typename L) > -struct BOOST_PP_CAT(le_result,i)< true_,Tag,false_,F,AUX_LAMBDA_PARAMS(i, L) > +struct BOOST_PP_CAT(le_result,i_)< true_,Tag,F,AUX778076_LAMBDA_PARAMS(i_, L) > { - typedef BOOST_PP_CAT(bind,i)< - BOOST_PP_CAT(quote,i)<F,Tag> - , BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_RESULT, L) - > type; + typedef BOOST_PP_CAT(bind,i_)< + BOOST_PP_CAT(quote,i_)<F,Tag> + , BOOST_MPL_PP_REPEAT(i_, AUX778076_RESULT, L) + > result_; + + typedef protect<result_> type; }; -template< - typename Tag - , template< AUX_LAMBDA_PARAMS(i, typename P) > class F - , AUX_LAMBDA_PARAMS(i, typename L) - > -struct BOOST_PP_CAT(le_result,i)< true_,Tag,true_,F,AUX_LAMBDA_PARAMS(i, L) > -{ - typedef protect< BOOST_PP_CAT(bind,i)< - BOOST_PP_CAT(quote,i)<F,Tag> - , BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_RESULT, L) - > > type; -}; +# undef AUX778076_TYPE +# undef AUX778076_RESULT } // namespace aux -# define AUX_LAMBDA_INVOCATION(unused, i, T) \ - typedef lambda_impl< BOOST_PP_CAT(T, BOOST_PP_INC(i)), Tag > \ - BOOST_PP_CAT(l,BOOST_PP_INC(i)); \ - /**/ -# define AUX_IS_LAMBDA_EXPR(unused, i, unused2) \ - BOOST_PP_COMMA_IF(i) \ - BOOST_PP_CAT(l,BOOST_PP_INC(i))::is_le::value \ - /**/ +# define AUX778076_LAMBDA_TYPEDEF(unused, i_, T) \ + typedef lambda< BOOST_PP_CAT(T, BOOST_PP_INC(i_)), Tag > \ + BOOST_PP_CAT(l,BOOST_PP_INC(i_)); \ +/**/ + +# define AUX778076_IS_LE_TYPEDEF(unused, i_, unused2) \ + typedef typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::is_le \ + BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)); \ +/**/ + +# define AUX778076_IS_LAMBDA_EXPR(unused, i_, unused2) \ + BOOST_PP_COMMA_IF(i_) \ + BOOST_PP_CAT(is_le,BOOST_PP_INC(i_))::value \ +/**/ template< - template< AUX_LAMBDA_PARAMS(i, typename P) > class F - , AUX_LAMBDA_PARAMS(i, typename T) + template< AUX778076_LAMBDA_PARAMS(i_, typename P) > class F + , AUX778076_LAMBDA_PARAMS(i_, typename T) , typename Tag - , typename Protect > -struct lambda_impl< - F<AUX_LAMBDA_PARAMS(i, T)>, Tag, Protect AUX_ARITY_PARAM(int_<i>) - > -{ - BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T) - typedef aux::lambda_or< - BOOST_MPL_PP_REPEAT(i, AUX_IS_LAMBDA_EXPR, unused) - > is_le; - - typedef typename aux::BOOST_PP_CAT(le_result,i)< - typename is_le::type +struct lambda< + F<AUX778076_LAMBDA_PARAMS(i_, T)> , Tag - , Protect - , F - , AUX_LAMBDA_PARAMS(i, l) - >::type type; + AUX778076_ARITY_PARAM(int_<i_>) + > +{ + BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_TYPEDEF, T) + BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LE_TYPEDEF, unused) + + typedef typename aux::lambda_or< + BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LAMBDA_EXPR, unused) + >::type is_le; + + typedef aux::BOOST_PP_CAT(le_result,i_)< + is_le, Tag, F, AUX778076_LAMBDA_PARAMS(i_, l) + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; -# undef AUX_IS_LAMBDA_EXPR -# undef AUX_LAMBDA_INVOCATION -# undef AUX_LAMBDA_RESULT -#endif // BOOST_MPL_NO_LAMBDA_HEURISTIC -#endif // i > 0 +# undef AUX778076_IS_LAMBDA_EXPR +# undef AUX778076_IS_LE_TYPEDEF +# undef AUX778076_LAMBDA_TYPEDEF + +#endif // i_ > 0 template< - typename F AUX_LAMBDA_BIND_N_PARAMS(i, typename T) + typename F AUX778076_BIND_N_PARAMS(i_, typename T) , typename Tag - , typename Protect - > -struct lambda_impl< - BOOST_PP_CAT(bind,i)<F AUX_LAMBDA_BIND_N_PARAMS(i, T)> - , Tag - , Protect AUX_ARITY_PARAM(int_<BOOST_PP_INC(i)>) > +struct lambda< + BOOST_PP_CAT(bind,i_)<F AUX778076_BIND_N_PARAMS(i_, T)> + , Tag + AUX778076_ARITY_PARAM(int_<BOOST_PP_INC(i_)>) + > { - BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_) - typedef BOOST_PP_CAT(bind,i)< + typedef false_ is_le; + typedef BOOST_PP_CAT(bind,i_)< F - AUX_LAMBDA_BIND_N_PARAMS(i, T) - > type; + AUX778076_BIND_N_PARAMS(i_, T) + > result_; + + typedef result_ type; }; -#undef i +#undef i_ #endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/aux_/has_begin.hpp b/include/boost/mpl/aux_/has_begin.hpp index 89eb857..7788c58 100644 --- a/include/boost/mpl/aux_/has_begin.hpp +++ b/include/boost/mpl/aux_/has_begin.hpp @@ -1,19 +1,20 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/has_begin.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_HAS_BEGIN_HPP_INCLUDED #define BOOST_MPL_AUX_HAS_BEGIN_HPP_INCLUDED -#include "boost/mpl/aux_/has_xxx.hpp" +// 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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/has_xxx.hpp> namespace boost { namespace mpl { namespace aux { BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_begin, begin, true) diff --git a/include/boost/mpl/aux_/has_key_impl.hpp b/include/boost/mpl/aux_/has_key_impl.hpp index d78ad6a..deb2d10 100644 --- a/include/boost/mpl/aux_/has_key_impl.hpp +++ b/include/boost/mpl/aux_/has_key_impl.hpp @@ -2,23 +2,23 @@ #ifndef BOOST_MPL_AUX_HAS_KEY_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_HAS_KEY_IMPL_HPP_INCLUDED -// + file: boost/mpl/aux_/has_key_impl.hpp -// + last modified: 02/may/03 - -// Copyright (c) 2002-03 -// David Abrahams, Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2002-2004 +// Copyright David Abrahams 2003 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/has_key_fwd.hpp" -#include "boost/mpl/aux_/traits_lambda_spec.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { +#include <boost/mpl/has_key_fwd.hpp> +#include <boost/mpl/aux_/traits_lambda_spec.hpp> + +namespace boost { namespace mpl { // no default implementation; the definition is needed to make MSVC happy diff --git a/include/boost/mpl/aux_/has_rebind.hpp b/include/boost/mpl/aux_/has_rebind.hpp index b6ac288..45fc86f 100644 --- a/include/boost/mpl/aux_/has_rebind.hpp +++ b/include/boost/mpl/aux_/has_rebind.hpp @@ -1,37 +1,90 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/has_rebind.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED #define BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED -#include "boost/mpl/aux_/has_xxx.hpp" -#include "boost/mpl/if.hpp" -#include "boost/mpl/bool.hpp" -#include "boost/type_traits/is_class.hpp" +// 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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/workaround.hpp> +#include <boost/mpl/aux_/config/msvc.hpp> + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200) +# include <boost/mpl/has_xxx.hpp> +# include <boost/mpl/if.hpp> +# include <boost/mpl/bool.hpp> +# include <boost/mpl/aux_/msvc_is_class.hpp> +#elif BOOST_WORKAROUND(__BORLANDC__, < 0x600) +# include <boost/mpl/if.hpp> +# include <boost/mpl/bool.hpp> +# include <boost/mpl/aux_/config/static_constant.hpp> +# include <boost/type_traits/is_class.hpp> +#else +# include <boost/mpl/aux_/type_wrapper.hpp> +# include <boost/mpl/aux_/config/static_constant.hpp> +#endif namespace boost { namespace mpl { namespace aux { +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200) + BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind_impl, rebind, false) template< typename T > struct has_rebind - : if_c< - ::boost::is_class<T>::value + : if_< + msvc_is_class<T> , has_rebind_impl<T> , bool_<false> >::type { }; +#else + +template< typename T > struct has_rebind_tag {}; +yes_tag operator|(has_rebind_tag<int>, void const volatile*); + +# if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) +template< typename T > +struct has_rebind +{ + static has_rebind_tag<T>* get(); + BOOST_STATIC_CONSTANT(bool, value = + sizeof(has_rebind_tag<int>() | get()) == sizeof(char) + ); +}; +# else +template< typename T > +struct has_rebind_impl +{ + static T* get(); + BOOST_STATIC_CONSTANT(bool, value = + sizeof(has_rebind_tag<int>() | get()) == sizeof(char) + ); +}; + +template< typename T > +struct has_rebind + : if_< + is_class<T> + , has_rebind_impl<T> + , bool_<false> + >::type +{ +}; +# endif + +#endif // BOOST_MSVC + }}} #endif // BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/has_size.hpp b/include/boost/mpl/aux_/has_size.hpp index 6315d88..9189b41 100644 --- a/include/boost/mpl/aux_/has_size.hpp +++ b/include/boost/mpl/aux_/has_size.hpp @@ -1,19 +1,20 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/has_size.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_HAS_SIZE_HPP_INCLUDED #define BOOST_MPL_AUX_HAS_SIZE_HPP_INCLUDED -#include "boost/mpl/aux_/has_xxx.hpp" +// 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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/has_xxx.hpp> namespace boost { namespace mpl { namespace aux { BOOST_MPL_HAS_XXX_TRAIT_DEF(size) diff --git a/include/boost/mpl/aux_/has_tag.hpp b/include/boost/mpl/aux_/has_tag.hpp index c7628ca..9663028 100644 --- a/include/boost/mpl/aux_/has_tag.hpp +++ b/include/boost/mpl/aux_/has_tag.hpp @@ -1,22 +1,23 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/has_tag.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_HAS_TAG_HPP_INCLUDED #define BOOST_MPL_AUX_HAS_TAG_HPP_INCLUDED -#include "boost/mpl/aux_/has_xxx.hpp" +// 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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/has_xxx.hpp> namespace boost { namespace mpl { namespace aux { -BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_tag, tag, true) +BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_tag, tag, false) }}} #endif // BOOST_MPL_AUX_HAS_TAG_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/has_type.hpp b/include/boost/mpl/aux_/has_type.hpp index d758c2d..8e3f37a 100644 --- a/include/boost/mpl/aux_/has_type.hpp +++ b/include/boost/mpl/aux_/has_type.hpp @@ -1,19 +1,20 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/has_type.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_HAS_TYPE_HPP_INCLUDED #define BOOST_MPL_AUX_HAS_TYPE_HPP_INCLUDED -#include "boost/mpl/aux_/has_xxx.hpp" +// 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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/has_xxx.hpp> namespace boost { namespace mpl { namespace aux { BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_type, type, true) diff --git a/include/boost/mpl/aux_/has_xxx.hpp b/include/boost/mpl/aux_/has_xxx.hpp deleted file mode 100644 index cf32526..0000000 --- a/include/boost/mpl/aux_/has_xxx.hpp +++ /dev/null @@ -1,224 +0,0 @@ - -#ifndef BOOST_MPL_AUX_HAS_XXX_HPP_INCLUDED -#define BOOST_MPL_AUX_HAS_XXX_HPP_INCLUDED - -// Copyright (C) Aleksey Gurtovoy 2002-2003 -// Copyright (C) David Abrahams 2002-2003 -// -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source$ -// $Date$ -// $Revision$ - -#include "boost/mpl/aux_/type_wrapper.hpp" -#include "boost/mpl/aux_/yes_no.hpp" -#include "boost/mpl/aux_/config/msvc_typename.hpp" -#include "boost/mpl/aux_/config/overload_resolution.hpp" -#include "boost/mpl/aux_/config/static_constant.hpp" -#include "boost/detail/workaround.hpp" - -#if !defined(BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION) \ - && !BOOST_WORKAROUND(__GNUC__, <= 2) \ - && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x833)) - -# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - -// the implementation below is based on a USENET newsgroup's posting by -// Rani Sharoni (comp.lang.c++.moderated, 2002-03-17 07:45:09 PST) - -# if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) - -# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \ -template< typename T > \ -boost::mpl::aux::yes_tag \ -trait##_helper( \ - boost::mpl::aux::type_wrapper<T> const volatile* \ - , boost::mpl::aux::type_wrapper<BOOST_MSVC_TYPENAME T::name>* = 0 \ - ); \ - \ -boost::mpl::aux::no_tag \ -trait##_helper(...); \ - \ -template< typename T > \ -struct trait \ -{ \ - typedef boost::mpl::aux::type_wrapper<T> t_; \ - BOOST_STATIC_CONSTANT(bool, value = \ - sizeof((trait##_helper)(static_cast<t_*>(0))) \ - == sizeof(boost::mpl::aux::yes_tag) \ - ); \ -}; \ -/**/ - -# else // conforming compilers - -# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \ -template< typename T > \ -struct trait \ -{ \ - struct helpers \ - { \ - template< typename U > \ - static boost::mpl::aux::yes_tag \ - test( \ - boost::mpl::aux::type_wrapper<U> const volatile* \ - , boost::mpl::aux::type_wrapper<BOOST_MSVC_TYPENAME U::name>* = 0 \ - ); \ - \ - static boost::mpl::aux::no_tag \ - test(...); \ - }; \ - \ - typedef boost::mpl::aux::type_wrapper<T> t_; \ - \ - BOOST_STATIC_CONSTANT( \ - bool, value = \ - sizeof(helpers::test(static_cast<t_*>(0))) \ - == sizeof(boost::mpl::aux::yes_tag) \ - ); \ -}; \ -/**/ - -# endif - -# else - -# include "boost/mpl/if.hpp" -# include "boost/mpl/bool.hpp" -# include "boost/preprocessor/cat.hpp" - -// agurt, 11/sep/02: MSVC version, based on a USENET newsgroup's posting by -// John Madsen (comp.lang.c++.moderated, 1999-11-12 19:17:06 GMT); -// note that the code is _not_ standard-conforming, but it works, -// and it resolves some nasty ICE cases with the above implementation - -// Modified dwa 8/Oct/02 to handle reference types. - -namespace boost { namespace mpl { namespace aux { - -struct has_xxx_tag; - -# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) - template <class U> - struct msvc_incomplete_array - { - typedef char (&type)[sizeof(U) + 1]; - }; -# endif - -template <typename T> -struct msvc_is_incomplete -{ - // MSVC is capable of some kinds of SFINAE. If U is an incomplete - // type, it won't pick the second overload - static char tester(...); - -# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) - template <class U> - static typename msvc_incomplete_array<U>::type tester(type_wrapper<U>); -# else - template <class U> - static char (& tester(type_wrapper<U>) )[sizeof(U)+1]; -# endif - - BOOST_STATIC_CONSTANT( - bool, value = sizeof(tester(type_wrapper<T>())) == 1); -}; - -template<> -struct msvc_is_incomplete<int> -{ - BOOST_STATIC_CONSTANT(bool, value = false); -}; - -}}} - -# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \ -template< typename T, typename name = ::boost::mpl::aux::has_xxx_tag > \ -struct BOOST_PP_CAT(trait,_impl) : T \ -{ \ - private: \ - static boost::mpl::aux::no_tag test(void(*)(::boost::mpl::aux::has_xxx_tag)); \ - static boost::mpl::aux::yes_tag test(...); \ - \ - public: \ - BOOST_STATIC_CONSTANT(bool, value = \ - sizeof(test(static_cast<void(*)(name)>(0))) \ - != sizeof(boost::mpl::aux::no_tag) \ - ); \ -}; \ - \ -template< typename T > struct trait \ - : boost::mpl::if_c< \ - boost::mpl::aux::msvc_is_incomplete<T>::value \ - , boost::mpl::bool_<false> \ - , BOOST_PP_CAT(trait,_impl)<T> \ - >::type \ -{ \ -}; \ - \ -BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, void) \ -BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, bool) \ -BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, char) \ -BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed char) \ -BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned char) \ -BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed short) \ -BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned short) \ -BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed int) \ -BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned int) \ -BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed long) \ -BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned long) \ -BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, float) \ -BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, double) \ -BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, long double) \ -/**/ - -# define BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, T) \ -template<> struct trait<T> \ -{ \ - BOOST_STATIC_CONSTANT(bool,value = false); \ -}; \ -/**/ - -# if !defined(BOOST_NO_INTRINSIC_WCHAR_T) - -# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \ - BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \ - BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, wchar_t) \ - /**/ - -# else - -# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \ - BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \ - /**/ - -# endif - -# endif // BOOST_MSVC > 1300 - -#else - -// agurt, 11/jan/03: signals a stub-only implementation -# define BOOST_MPL_NO_AUX_HAS_XXX - -# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_value) \ -template< typename T > \ -struct trait \ -{ \ - BOOST_STATIC_CONSTANT(bool, value = default_value); \ -}; \ -/**/ - -#endif // BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION - -#define BOOST_MPL_HAS_XXX_TRAIT_DEF(name) \ -BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_##name, name, false) \ -/**/ - -#endif // BOOST_MPL_AUX_HAS_XXX_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/ice_cast.hpp b/include/boost/mpl/aux_/ice_cast.hpp index 5d0872f..3079f38 100644 --- a/include/boost/mpl/aux_/ice_cast.hpp +++ b/include/boost/mpl/aux_/ice_cast.hpp @@ -1,22 +1,23 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/ice_cast.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-03 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_ICE_CAST_HPP_INCLUDED #define BOOST_MPL_AUX_ICE_CAST_HPP_INCLUDED -#include "boost/mpl/aux_/config/workaround.hpp" +// Copyright Aleksey Gurtovoy 2001-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_/config/workaround.hpp> #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ - || BOOST_WORKAROUND(__GNUC__, < 3) + || BOOST_WORKAROUND(__GNUC__, < 3) # define BOOST_MPL_AUX_ICE_CAST(T, expr) (T)(expr) #elif BOOST_WORKAROUND(__MWERKS__, <= 0x3001) # define BOOST_MPL_AUX_ICE_CAST(T, expr) (T)(expr) diff --git a/include/boost/mpl/aux_/include_preprocessed.hpp b/include/boost/mpl/aux_/include_preprocessed.hpp index 59f082a..2d5ab27 100644 --- a/include/boost/mpl/aux_/include_preprocessed.hpp +++ b/include/boost/mpl/aux_/include_preprocessed.hpp @@ -1,9 +1,11 @@ -// Copyright (c) 2001-04 Aleksey Gurtovoy +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. @@ -11,20 +13,18 @@ // $Date$ // $Revision$ -// no include guards, the header is intended for multiple inclusion! - -#include "boost/mpl/aux_/config/compiler.hpp" -#include "boost/mpl/aux_/config/preprocessor.hpp" -#include "boost/preprocessor/cat.hpp" -#include "boost/preprocessor/stringize.hpp" +#include <boost/mpl/aux_/config/compiler.hpp> +#include <boost/mpl/aux_/config/preprocessor.hpp> +#include <boost/preprocessor/cat.hpp> +#include <boost/preprocessor/stringize.hpp> #if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) # define AUX_PREPROCESSED_HEADER \ - BOOST_MPL_COMPILER_DIR/BOOST_MPL_PREPROCESSED_HEADER \ + BOOST_MPL_CFG_COMPILER_DIR/BOOST_MPL_PREPROCESSED_HEADER \ /**/ #else # define AUX_PREPROCESSED_HEADER \ - BOOST_PP_CAT(BOOST_MPL_COMPILER_DIR,/)##BOOST_MPL_PREPROCESSED_HEADER \ + BOOST_PP_CAT(BOOST_MPL_CFG_COMPILER_DIR,/)##BOOST_MPL_PREPROCESSED_HEADER \ /**/ #endif diff --git a/include/boost/mpl/aux_/insert_impl.hpp b/include/boost/mpl/aux_/insert_impl.hpp index 6b86b92..941f83e 100644 --- a/include/boost/mpl/aux_/insert_impl.hpp +++ b/include/boost/mpl/aux_/insert_impl.hpp @@ -1,41 +1,41 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/insert_impl.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_INSERT_IMPL_HPP_INCLUDED #define BOOST_MPL_INSERT_IMPL_HPP_INCLUDED -#include "boost/mpl/copy_backward.hpp" -#include "boost/mpl/iterator_range.hpp" -#include "boost/mpl/clear.hpp" -#include "boost/mpl/push_front.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/traits_lambda_spec.hpp" -#include "boost/type_traits/is_same.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $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_traits| or the primary |insert| template +// specializing either the 'insert_impl' or the primary 'insert' template template< typename Tag > -struct insert_traits +struct insert_impl { template< typename Sequence , typename Pos , typename T > - struct algorithm + struct apply { typedef iterator_range< typename begin<Sequence>::type @@ -47,13 +47,13 @@ struct insert_traits , typename end<Sequence>::type > second_half_; - typedef typename copy_backward< + typedef typename reverse_fold< second_half_ , typename clear<Sequence>::type , push_front<_,_> >::type half_sequence_; - typedef typename copy_backward< + typedef typename reverse_fold< first_half_ , typename push_front<half_sequence_,T>::type , push_front<_,_> @@ -61,9 +61,8 @@ struct insert_traits }; }; -BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(3,insert_traits) +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(3,insert_impl) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_INSERT_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/insert_range_impl.hpp b/include/boost/mpl/aux_/insert_range_impl.hpp index 0666271..c69a25f 100644 --- a/include/boost/mpl/aux_/insert_range_impl.hpp +++ b/include/boost/mpl/aux_/insert_range_impl.hpp @@ -1,69 +1,77 @@ -//----------------------------------------------------------------------------- -// boost mpl/insert_range_impl.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED -#include "boost/mpl/copy_backward.hpp" -#include "boost/mpl/clear.hpp" -#include "boost/mpl/push_front.hpp" -#include "boost/mpl/iterator_range.hpp" -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/iter_push_front.hpp" -#include "boost/mpl/aux_/traits_lambda_spec.hpp" -#include "boost/type_traits/same_traits.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/copy.hpp> +#include <boost/mpl/clear.hpp> +#include <boost/mpl/front_inserter.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_traits| or the primary -// |insert_range| template +// specializing either the 'insert_range_impl' or the primary +// 'insert_range' template template< typename Tag > -struct insert_range_traits +struct insert_range_impl { template< typename Sequence , typename Pos , typename Range > - struct algorithm + struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) + : reverse_copy< + joint_view< + iterator_range<typename begin<Sequence>::type,Pos> + , joint_view< + Range + , iterator_range<Pos,typename end<Sequence>::type> + > + > + , front_inserter< typename clear<Sequence>::type > + > { - typedef typename copy_backward< - iterator_range<Pos, typename end<Sequence>::type> - , typename clear<Sequence>::type - , push_front<_,_> - >::type first_part_; - - typedef typename copy_backward< - Range - , first_part_ - , push_front<_,_> - >::type second_part_; - - typedef typename copy_backward< - iterator_range<typename begin<Sequence>::type,Pos> - , second_part_ - , push_front<_,_> +#else + { + typedef typename reverse_copy< + joint_view< + iterator_range<typename begin<Sequence>::type,Pos> + , joint_view< + Range + , iterator_range<Pos,typename end<Sequence>::type> + > + > + , front_inserter< typename clear<Sequence>::type > >::type type; +#endif }; }; -BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(3,insert_range_traits) +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(3,insert_range_impl) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/inserter_algorithm.hpp b/include/boost/mpl/aux_/inserter_algorithm.hpp new file mode 100644 index 0000000..20510bc --- /dev/null +++ b/include/boost/mpl/aux_/inserter_algorithm.hpp @@ -0,0 +1,159 @@ + +#ifndef BOOST_MPL_AUX_INSERTER_ALGORITHM_HPP_INCLUDED +#define BOOST_MPL_AUX_INSERTER_ALGORITHM_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/back_inserter.hpp> +#include <boost/mpl/front_inserter.hpp> +#include <boost/mpl/push_back.hpp> +#include <boost/mpl/push_front.hpp> +#include <boost/mpl/back_inserter.hpp> +#include <boost/mpl/front_inserter.hpp> +#include <boost/mpl/clear.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/aux_/na.hpp> +#include <boost/mpl/aux_/common_name_wknd.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/preprocessor/params.hpp> +#include <boost/mpl/aux_/preprocessor/default_params.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> + +#include <boost/preprocessor/arithmetic/dec.hpp> + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +# define BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(arity, name) \ +BOOST_MPL_AUX_COMMON_NAME_WKND(name) \ +template< \ + BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \ + > \ +struct name \ + : aux::name##_impl<BOOST_MPL_PP_PARAMS(arity, P)> \ +{ \ +}; \ +\ +template< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \ + > \ +struct name< BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P),na > \ + : if_< has_push_back<P1> \ + , aux::name##_impl< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ + , back_inserter< typename clear<P1>::type > \ + > \ + , aux::reverse_##name##_impl< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ + , front_inserter< typename clear<P1>::type > \ + > \ + >::type \ +{ \ +}; \ +\ +template< \ + BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \ + > \ +struct reverse_##name \ + : aux::reverse_##name##_impl<BOOST_MPL_PP_PARAMS(arity, P)> \ +{ \ +}; \ +\ +template< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \ + > \ +struct reverse_##name< BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P),na > \ + : if_< has_push_back<P1> \ + , aux::reverse_##name##_impl< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ + , back_inserter< typename clear<P1>::type > \ + > \ + , aux::name##_impl< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ + , front_inserter< typename clear<P1>::type > \ + > \ + >::type \ +{ \ +}; \ +BOOST_MPL_AUX_NA_SPEC(arity, name) \ +BOOST_MPL_AUX_NA_SPEC(arity, reverse_##name) \ +/**/ + +#else + +# define BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(arity, name) \ +BOOST_MPL_AUX_COMMON_NAME_WKND(name) \ +template< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \ + > \ +struct def_##name##_impl \ + : if_< has_push_back<P1> \ + , aux::name##_impl< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ + , back_inserter< typename clear<P1>::type > \ + > \ + , aux::reverse_##name##_impl< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ + , front_inserter< typename clear<P1>::type > \ + > \ + >::type \ +{ \ +}; \ +\ +template< \ + BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \ + > \ +struct name \ +{ \ + typedef typename eval_if< \ + is_na<BOOST_PP_CAT(P, arity)> \ + , def_##name##_impl<BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P)> \ + , aux::name##_impl<BOOST_MPL_PP_PARAMS(arity, P)> \ + >::type type; \ +}; \ +\ +template< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \ + > \ +struct def_reverse_##name##_impl \ + : if_< has_push_back<P1> \ + , aux::reverse_##name##_impl< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ + , back_inserter< typename clear<P1>::type > \ + > \ + , aux::name##_impl< \ + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ + , front_inserter< typename clear<P1>::type > \ + > \ + >::type \ +{ \ +}; \ +template< \ + BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \ + > \ +struct reverse_##name \ +{ \ + typedef typename eval_if< \ + is_na<BOOST_PP_CAT(P, arity)> \ + , def_reverse_##name##_impl<BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P)> \ + , aux::reverse_##name##_impl<BOOST_MPL_PP_PARAMS(arity, P)> \ + >::type type; \ +}; \ +BOOST_MPL_AUX_NA_SPEC(arity, name) \ +BOOST_MPL_AUX_NA_SPEC(arity, reverse_##name) \ +/**/ + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#endif // BOOST_MPL_AUX_INSERTER_ALGORITHM_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/integral_wrapper.hpp b/include/boost/mpl/aux_/integral_wrapper.hpp index 92c49d2..fb38162 100644 --- a/include/boost/mpl/aux_/integral_wrapper.hpp +++ b/include/boost/mpl/aux_/integral_wrapper.hpp @@ -1,24 +1,25 @@ -// + file: boost/mpl/aux_/intergal_wrapper.hpp -// + last modified: 12/apr/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -// no include guards, the header is intended for multiple inclusion! +// $Source$ +// $Date$ +// $Revision$ -#include "boost/mpl/aux_/static_cast.hpp" -#include "boost/mpl/aux_/config/nttp.hpp" -#include "boost/mpl/aux_/config/static_constant.hpp" -#include "boost/mpl/aux_/config/workaround.hpp" +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! -#include "boost/preprocessor/cat.hpp" +#include <boost/mpl/integral_c_tag.hpp> +#include <boost/mpl/aux_/static_cast.hpp> +#include <boost/mpl/aux_/nttp_decl.hpp> +#include <boost/mpl/aux_/config/static_constant.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +#include <boost/preprocessor/cat.hpp> #if !defined(AUX_WRAPPER_NAME) # define AUX_WRAPPER_NAME BOOST_PP_CAT(AUX_WRAPPER_VALUE_TYPE,_) @@ -32,11 +33,11 @@ # if BOOST_WORKAROUND(__MWERKS__, <= 0x2407) # define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< value > # else -# define AUX_WRAPPER_INST(value) mpl::AUX_WRAPPER_NAME< value > +# define AUX_WRAPPER_INST(value) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::AUX_WRAPPER_NAME< value > # endif #endif -namespace boost { namespace mpl { +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template< AUX_WRAPPER_PARAMS(N) > struct AUX_WRAPPER_NAME @@ -50,6 +51,7 @@ struct AUX_WRAPPER_NAME typedef AUX_WRAPPER_NAME type; #endif typedef AUX_WRAPPER_VALUE_TYPE value_type; + typedef integral_c_tag tag; // have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC), // while some other don't like 'value + 1' (Borland), and some don't like @@ -83,7 +85,7 @@ template< AUX_WRAPPER_PARAMS(N) > AUX_WRAPPER_VALUE_TYPE const AUX_WRAPPER_INST(N)::value; #endif -}} // namespace boost::mpl +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE #undef AUX_WRAPPER_NAME #undef AUX_WRAPPER_PARAMS diff --git a/include/boost/mpl/aux_/is_msvc_eti_arg.hpp b/include/boost/mpl/aux_/is_msvc_eti_arg.hpp index 63ac8fe..0900eb8 100644 --- a/include/boost/mpl/aux_/is_msvc_eti_arg.hpp +++ b/include/boost/mpl/aux_/is_msvc_eti_arg.hpp @@ -1,27 +1,28 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/is_msvc_eti_arg.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-03 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_IS_MSVC_ETI_ARG_HPP_INCLUDED #define BOOST_MPL_AUX_IS_MSVC_ETI_ARG_HPP_INCLUDED -#include "boost/mpl/aux_/yes_no.hpp" -#include "boost/mpl/aux_/config/eti.hpp" -#include "boost/mpl/aux_/config/static_constant.hpp" +// Copyright Aleksey Gurtovoy 2001-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_/yes_no.hpp> +#include <boost/mpl/aux_/config/eti.hpp> +#include <boost/mpl/aux_/config/static_constant.hpp> namespace boost { namespace mpl { namespace aux { -#if defined(BOOST_MPL_MSVC_ETI_BUG) +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) -#if defined(BOOST_MPL_MSVC_60_ETI_BUG) +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) template< typename T > struct is_msvc_eti_arg @@ -29,7 +30,7 @@ struct is_msvc_eti_arg BOOST_STATIC_CONSTANT(bool, value = false); }; -#else +#else // BOOST_MPL_CFG_MSVC_60_ETI_BUG struct eti_int_convertible { @@ -48,7 +49,7 @@ struct is_msvc_eti_arg ); }; -#endif // BOOST_MPL_MSVC_60_ETI_BUG +#endif template<> struct is_msvc_eti_arg<int> @@ -56,8 +57,8 @@ struct is_msvc_eti_arg<int> BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif // BOOST_MPL_MSVC_ETI_BUG +#endif // BOOST_MPL_CFG_MSVC_ETI_BUG -}}} // namespace boost::mpl::aux +}}} #endif // BOOST_MPL_AUX_IS_MSVC_ETI_ARG_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/iter_apply.hpp b/include/boost/mpl/aux_/iter_apply.hpp index df25b14..03716a5 100644 --- a/include/boost/mpl/aux_/iter_apply.hpp +++ b/include/boost/mpl/aux_/iter_apply.hpp @@ -1,30 +1,30 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/iter_apply.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_ITER_APPLY_HPP_INCLUDED #define BOOST_MPL_ITER_APPLY_HPP_INCLUDED -#include "boost/mpl/apply.hpp" +// 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. -namespace boost { -namespace mpl { -namespace aux { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/apply.hpp> +#include <boost/mpl/deref.hpp> + +namespace boost { namespace mpl { namespace aux { template< typename F , typename Iterator > struct iter_apply1 - : apply1<F,typename Iterator::type> + : apply1< F,typename deref<Iterator>::type > { }; @@ -36,14 +36,12 @@ template< struct iter_apply2 : apply2< F - , typename Iterator1::type - , typename Iterator2::type + , typename deref<Iterator1>::type + , typename deref<Iterator2>::type > { }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} #endif // BOOST_MPL_ITER_APPLY_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/iter_distance.hpp b/include/boost/mpl/aux_/iter_distance.hpp deleted file mode 100644 index 96cb845..0000000 --- a/include/boost/mpl/aux_/iter_distance.hpp +++ /dev/null @@ -1,58 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/iter_distance.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_ITER_DISTANCE_HPP_INCLUDED -#define BOOST_MPL_AUX_ITER_DISTANCE_HPP_INCLUDED - -#include "boost/mpl/aux_/iterator_names.hpp" -#include "boost/mpl/aux_/msvc_never_true.hpp" -#include "boost/config.hpp" - -namespace boost { -namespace mpl { -namespace aux { - -#if defined(BOOST_MSVC) && BOOST_MSVC < 1300 - -// msvc_distance -#define BOOST_MPL_AUX_MSVC_DTW_NAME msvc_distance -#define BOOST_MPL_AUX_MSVC_DTW_ORIGINAL_NAME BOOST_MPL_AUX_ITERATOR_DISTANCE -#define BOOST_MPL_AUX_MSVC_DTW_ARITY 1 -#include "boost/mpl/aux_/msvc_dtw.hpp" - -template< - typename Iterator - , typename Other - > -struct iter_distance - : msvc_distance<Iterator>::template result_<Other> -{ -}; - -#else - -template< - typename Iterator - , typename Other - > -struct iter_distance - : Iterator::template BOOST_MPL_AUX_ITERATOR_DISTANCE<Other> -{ -}; - -#endif - -} // namespace aux -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_AUX_ITER_DISTANCE_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/iter_fold_backward_impl.hpp b/include/boost/mpl/aux_/iter_fold_backward_impl.hpp deleted file mode 100644 index 3f9a14c..0000000 --- a/include/boost/mpl/aux_/iter_fold_backward_impl.hpp +++ /dev/null @@ -1,42 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/iter_fold_backward_impl.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_ITER_FOLD_BACKWARD_IMPL_HPP_INCLUDED -#define BOOST_MPL_AUX_ITER_FOLD_BACKWARD_IMPL_HPP_INCLUDED - -#include "boost/mpl/aux_/apply.hpp" -#include "boost/mpl/aux_/next.hpp" -#include "boost/mpl/aux_/config/eti.hpp" -#include "boost/config.hpp" - -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && \ - !defined(BOOST_MPL_PREPROCESSING_MODE) -# include "boost/mpl/if.hpp" -# include "boost/type_traits/is_same.hpp" -#endif - -#include "boost/mpl/aux_/config/use_preprocessed.hpp" - -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \ - !defined(BOOST_MPL_PREPROCESSING_MODE) - -# define BOOST_MPL_PREPROCESSED_HEADER iter_fold_backward_impl.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" - -#else - -# define BOOST_MPL_AUX_FOLD_IMPL_OP(iter) iter -# define BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX iter_fold_backward -# include "boost/mpl/aux_/fold_backward_impl_body.hpp" - -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS -#endif // BOOST_MPL_AUX_ITER_FOLD_BACKWARD_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/iter_fold_if_impl.hpp b/include/boost/mpl/aux_/iter_fold_if_impl.hpp index b716d48..cee373b 100644 --- a/include/boost/mpl/aux_/iter_fold_if_impl.hpp +++ b/include/boost/mpl/aux_/iter_fold_if_impl.hpp @@ -1,48 +1,46 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/iter_fold_if_impl.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy, David Abrahams -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_ITER_FOLD_IF_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_ITER_FOLD_IF_IMPL_HPP_INCLUDED -#include "boost/mpl/aux_/apply.hpp" +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include "boost/mpl/identity.hpp" -# include "boost/mpl/next.hpp" -# include "boost/mpl/if.hpp" -# include "boost/mpl/aux_/value_wknd.hpp" -# include "boost/mpl/aux_/bool_value_wknd.hpp" +# include <boost/mpl/identity.hpp> +# include <boost/mpl/next.hpp> +# include <boost/mpl/if.hpp> +# include <boost/mpl/apply.hpp> +# include <boost/mpl/aux_/value_wknd.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \ - !defined(BOOST_MPL_PREPROCESSING_MODE) +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER iter_fold_if_impl.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" +# include <boost/mpl/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/limits/unrolling.hpp" -# include "boost/preprocessor/arithmetic/sub.hpp" -# include "boost/preprocessor/repeat.hpp" -# include "boost/preprocessor/inc.hpp" -# include "boost/preprocessor/dec.hpp" -# include "boost/preprocessor/cat.hpp" +# include <boost/mpl/limits/unrolling.hpp> +# include <boost/preprocessor/arithmetic/sub.hpp> +# include <boost/preprocessor/repeat.hpp> +# include <boost/preprocessor/inc.hpp> +# include <boost/preprocessor/dec.hpp> +# include <boost/preprocessor/cat.hpp> -namespace boost { -namespace mpl { -namespace aux { +namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step @@ -62,7 +60,7 @@ struct iter_fold_if_step_impl > struct result_ { - typedef typename BOOST_MPL_AUX_APPLY2(StateOp,State,Iterator)::type state; + typedef typename apply2<StateOp,State,Iterator>::type state; typedef typename IteratorOp::type iterator; }; }; @@ -94,7 +92,7 @@ template< > struct iter_fold_if_forward_step { - typedef typename BOOST_MPL_AUX_APPLY2(Predicate,State,Iterator)::type not_last; + typedef typename apply2<Predicate,State,Iterator>::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp,mpl::next<Iterator> > impl_; @@ -111,7 +109,7 @@ template< > struct iter_fold_if_backward_step { - typedef typename BOOST_MPL_AUX_APPLY2(Predicate,State,Iterator)::type not_last; + typedef typename apply2<Predicate,State,Iterator>::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_; @@ -143,16 +141,16 @@ struct iter_fold_if_backward_step # define AUX_ITER_FOLD_BACKWARD_STEP(unused, i, unused2) \ AUX_ITER_FOLD_BACKWARD_STEP_FUNC( \ - BOOST_PP_SUB_D(1,BOOST_MPL_UNROLLING_LIMIT,i) \ + BOOST_PP_SUB_D(1,BOOST_MPL_LIMIT_UNROLLING,i) \ ) \ /**/ # define AUX_LAST_FORWARD_STEP \ - BOOST_PP_CAT(forward_step, BOOST_MPL_UNROLLING_LIMIT) \ + BOOST_PP_CAT(forward_step, BOOST_MPL_LIMIT_UNROLLING) \ /**/ # define AUX_LAST_BACKWARD_STEP \ - BOOST_PP_CAT(backward_step, BOOST_MPL_UNROLLING_LIMIT) \ + BOOST_PP_CAT(backward_step, BOOST_MPL_LIMIT_UNROLLING) \ /**/ template< @@ -167,8 +165,8 @@ struct iter_fold_if_impl { private: typedef iter_fold_if_null_step<Iterator,State> forward_step0; - BOOST_PP_REPEAT_1( - BOOST_MPL_UNROLLING_LIMIT + BOOST_PP_REPEAT( + BOOST_MPL_LIMIT_UNROLLING , AUX_ITER_FOLD_FORWARD_STEP , unused ) @@ -189,8 +187,8 @@ struct iter_fold_if_impl > >::type AUX_LAST_BACKWARD_STEP; - BOOST_PP_REPEAT_1( - BOOST_MPL_UNROLLING_LIMIT + BOOST_PP_REPEAT( + BOOST_MPL_LIMIT_UNROLLING , AUX_ITER_FOLD_BACKWARD_STEP , unused ) @@ -206,9 +204,7 @@ struct iter_fold_if_impl # undef AUX_ITER_FOLD_BACKWARD_STEP_FUNC # undef AUX_ITER_FOLD_FORWARD_STEP -} // namespace aux -} // namespace mpl -} // namespace boost +}}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_ITER_FOLD_IF_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/iter_fold_impl.hpp b/include/boost/mpl/aux_/iter_fold_impl.hpp index d0e3722..0ea79e4 100644 --- a/include/boost/mpl/aux_/iter_fold_impl.hpp +++ b/include/boost/mpl/aux_/iter_fold_impl.hpp @@ -1,42 +1,42 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/iter_fold_impl.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_ITER_FOLD_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_ITER_FOLD_IMPL_HPP_INCLUDED -#include "boost/mpl/aux_/apply.hpp" -#include "boost/mpl/aux_/next.hpp" -#include "boost/mpl/aux_/config/eti.hpp" -#include "boost/config.hpp" +// 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. -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && \ - !defined(BOOST_MPL_PREPROCESSING_MODE) -# include "boost/mpl/if.hpp" -# include "boost/type_traits/is_same.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include <boost/mpl/next_prior.hpp> +# include <boost/mpl/apply.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +# include <boost/mpl/if.hpp> +# include <boost/type_traits/is_same.hpp> +# endif #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \ - !defined(BOOST_MPL_PREPROCESSING_MODE) +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER iter_fold_impl.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" +# include <boost/mpl/aux_/include_preprocessed.hpp> #else -# define BOOST_MPL_AUX_FOLD_IMPL_OP(iter) iter -# define BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX iter_fold -# include "boost/mpl/aux_/fold_impl_body.hpp" +# define AUX778076_FOLD_IMPL_OP(iter) iter +# define AUX778076_FOLD_IMPL_NAME_PREFIX iter_fold +# include <boost/mpl/aux_/fold_impl_body.hpp> -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_ITER_FOLD_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/iter_push_front.hpp b/include/boost/mpl/aux_/iter_push_front.hpp index 46e86b0..2ec92f2 100644 --- a/include/boost/mpl/aux_/iter_push_front.hpp +++ b/include/boost/mpl/aux_/iter_push_front.hpp @@ -1,23 +1,23 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/iter_push_front.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_ITER_PUSH_FRONT_HPP_INCLUDED #define BOOST_MPL_ITER_PUSH_FRONT_HPP_INCLUDED -#include "boost/mpl/push_front.hpp" +// 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. -namespace boost { -namespace mpl { -namespace aux { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/push_front.hpp> +#include <boost/mpl/deref.hpp> + +namespace boost { namespace mpl { namespace aux { template< typename Sequence @@ -27,12 +27,10 @@ struct iter_push_front { typedef typename push_front< Sequence - , typename Iterator::type + , typename deref<Iterator>::type >::type type; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} #endif // BOOST_MPL_ITER_PUSH_FRONT_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/iterator_category.hpp b/include/boost/mpl/aux_/iterator_category.hpp deleted file mode 100644 index 1416886..0000000 --- a/include/boost/mpl/aux_/iterator_category.hpp +++ /dev/null @@ -1,29 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/iterator_category.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_ITERATOR_CATEGORY_HPP_INCLUDED -#define BOOST_MPL_AUX_ITERATOR_CATEGORY_HPP_INCLUDED - -#include "boost/mpl/aux_/config/internals.hpp" - -#if defined(BOOST_MPL_INTERNALS_USE_ITERATOR_CATEGORY) - -# include "boost/mpl/iterator_category.hpp" -# define BOOST_MPL_AUX_ITERATOR_CATEGORY(iter) iterator_category<iter>::type - -#else - -# define BOOST_MPL_AUX_ITERATOR_CATEGORY(iter) iter::category - -#endif - -#endif // BOOST_MPL_AUX_ITERATOR_CATEGORY_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/iterator_names.hpp b/include/boost/mpl/aux_/iterator_names.hpp index e2af9cc..dcaa558 100644 --- a/include/boost/mpl/aux_/iterator_names.hpp +++ b/include/boost/mpl/aux_/iterator_names.hpp @@ -1,26 +1,28 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/iterator_names.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_ITERATOR_NAMES_HPP_INCLUDED #define BOOST_MPL_AUX_ITERATOR_NAMES_HPP_INCLUDED -#include "boost/config.hpp" +// 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. -#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/workaround.hpp> +#include <boost/mpl/aux_/config/msvc.hpp> + +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) # define BOOST_MPL_AUX_ITERATOR_ADVANCE advance -# define BOOST_MPL_AUX_ITERATOR_DISTANCE distance +# define BOOST_MPL_AUX_ITERATOR_DISTANCE distance_to #else # define BOOST_MPL_AUX_ITERATOR_ADVANCE advance_ -# define BOOST_MPL_AUX_ITERATOR_DISTANCE distance_ +# define BOOST_MPL_AUX_ITERATOR_DISTANCE distance_to #endif #endif // BOOST_MPL_AUX_ITERATOR_NAMES_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/joint_iter.hpp b/include/boost/mpl/aux_/joint_iter.hpp index bcd4f8e..a09b423 100644 --- a/include/boost/mpl/aux_/joint_iter.hpp +++ b/include/boost/mpl/aux_/joint_iter.hpp @@ -1,21 +1,25 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/joint_iter.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED #define BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED -#include "boost/mpl/aux_/lambda_spec.hpp" -#include "boost/mpl/aux_/config/ctps.hpp" -#include "boost/type_traits/is_same.hpp" +// 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/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> +#include <boost/type_traits/is_same.hpp> namespace boost { namespace mpl { @@ -31,14 +35,14 @@ template< struct joint_iter { typedef Iterator1 base; - typedef typename base::category category; + typedef forward_iterator_tag category; typedef joint_iter< - typename base::next + typename next<base>::type , LastIterator1 , Iterator2 > next; - typedef typename base::type type; + typedef typename deref<base>::type type; }; template< @@ -48,14 +52,14 @@ template< struct joint_iter<LastIterator1,LastIterator1,Iterator2> { typedef Iterator2 base; - typedef typename base::category category; + typedef forward_iterator_tag category; typedef joint_iter< LastIterator1 , LastIterator1 - , typename base::next + , typename next<base>::type > next; - typedef typename base::type type; + typedef typename deref<base>::type type; }; @@ -79,16 +83,14 @@ template< bool > struct joint_iter_impl struct result_ { typedef Iterator1 base; - // agurt, 16/nov/02: have to use 'Iterator1' instead of 'base' below - // to prevent 'base' and 'mpl::base' conflict on MSVC 6.0 - typedef typename Iterator1::category category; + typedef forward_iterator_tag category; typedef joint_iter< - typename Iterator1::next + typename next<Iterator1>::type , LastIterator1 , Iterator2 > next; - typedef typename Iterator1::type type; + typedef typename deref<Iterator1>::type type; }; }; @@ -102,14 +104,14 @@ template<> struct joint_iter_impl<true> struct result_ { typedef Iterator2 base; - typedef typename Iterator2::category category; + typedef forward_iterator_tag category; typedef joint_iter< LastIterator1 , LastIterator1 - , typename Iterator2::next + , typename next<Iterator2>::type > next; - typedef typename Iterator2::type type; + typedef typename deref<Iterator2>::type type; }; }; @@ -131,6 +133,6 @@ struct joint_iter BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, aux::joint_iter) -}} // namespace boost::mpl +}} #endif // BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/lambda_arity_param.hpp b/include/boost/mpl/aux_/lambda_arity_param.hpp index 812ce43..f4c3e50 100644 --- a/include/boost/mpl/aux_/lambda_arity_param.hpp +++ b/include/boost/mpl/aux_/lambda_arity_param.hpp @@ -1,21 +1,22 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/lambda_arity_param.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED #define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED -#include "boost/mpl/aux_/config/ttp.hpp" +// Copyright Aleksey Gurtovoy 2001-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. -#if !defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/ttp.hpp> + +#if !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) # define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) #else # define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) , param diff --git a/include/boost/mpl/aux_/lambda_expr.hpp b/include/boost/mpl/aux_/lambda_expr.hpp deleted file mode 100644 index b747822..0000000 --- a/include/boost/mpl/aux_/lambda_expr.hpp +++ /dev/null @@ -1,26 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/lambda_expr.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_LAMBDA_EXPR_HPP_INCLUDED -#define BOOST_MPL_AUX_LAMBDA_EXPR_HPP_INCLUDED - -#include "boost/mpl/aux_/config/lambda.hpp" - -#if defined(BOOST_MPL_NO_LAMBDA_HEURISTIC) -# define BOOST_MPL_AUX_IS_LAMBDA_EXPR(value) /**/ -#else -# define BOOST_MPL_AUX_IS_LAMBDA_EXPR(value) \ - typedef value is_le; \ - /**/ -#endif - -#endif // BOOST_MPL_AUX_LAMBDA_EXPR_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/lambda_no_ctps.hpp b/include/boost/mpl/aux_/lambda_no_ctps.hpp index 8c1bbc7..d6fa60c 100644 --- a/include/boost/mpl/aux_/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/lambda_no_ctps.hpp @@ -6,140 +6,188 @@ #ifndef BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED #define BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED -// + file: boost/mpl/aux_/lambda_no_ctps.hpp -// + last modified: 03/aug/03 - -// Copyright (c) 2001-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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/lambda_fwd.hpp" -# include "boost/mpl/bind.hpp" -# include "boost/mpl/protect.hpp" -# include "boost/mpl/bool.hpp" -# include "boost/mpl/void.hpp" -# include "boost/mpl/aux_/template_arity.hpp" +# include <boost/mpl/lambda_fwd.hpp> +# include <boost/mpl/bind_fwd.hpp> +# include <boost/mpl/protect.hpp> +# include <boost/mpl/is_placeholder.hpp> +# include <boost/mpl/if.hpp> +# include <boost/mpl/identity.hpp> +# include <boost/mpl/bool.hpp> +# include <boost/mpl/aux_/na_spec.hpp> +# include <boost/mpl/aux_/lambda_support.hpp> +# include <boost/mpl/aux_/template_arity.hpp> +# include <boost/mpl/aux_/value_wknd.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER lambda_no_ctps.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" +# include <boost/mpl/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/aux_/config/nttp.hpp" -# include "boost/mpl/limits/arity.hpp" -# include "boost/mpl/aux_/preprocessor/params.hpp" -# include "boost/mpl/aux_/preprocessor/repeat.hpp" +# include <boost/mpl/limits/arity.hpp> +# include <boost/mpl/aux_/preprocessor/params.hpp> +# include <boost/mpl/aux_/preprocessor/default_params.hpp> +# include <boost/mpl/aux_/preprocessor/repeat.hpp> +# include <boost/mpl/aux_/preprocessor/enum.hpp> +# include <boost/mpl/aux_/config/msvc.hpp> +# include <boost/mpl/aux_/config/workaround.hpp> -# include "boost/preprocessor/iterate.hpp" -# include "boost/preprocessor/inc.hpp" -# include "boost/preprocessor/cat.hpp" +# include <boost/preprocessor/comma_if.hpp> +# include <boost/preprocessor/iterate.hpp> +# include <boost/preprocessor/inc.hpp> +# include <boost/preprocessor/cat.hpp> -# include "boost/config.hpp" +namespace boost { namespace mpl { -namespace boost { -namespace mpl { - -// local macros, #undef-ined at the end of the header -# define AUX_LAMBDA_PARAMS(i, param) \ - BOOST_MPL_PP_PARAMS(i, param) \ +# define AUX778076_LAMBDA_PARAMS(i_, param) \ + BOOST_MPL_PP_PARAMS(i_, param) \ /**/ namespace aux { -template< BOOST_MPL_AUX_NTTP_DECL(int, arity_), bool Protect > struct lambda_impl +#define n_ BOOST_MPL_LIMIT_METAFUNCTION_ARITY +template< + BOOST_MPL_PP_DEFAULT_PARAMS(n_,bool C,false) + > +struct lambda_or + : true_ { - template< typename T, typename Tag > struct result_ +}; + +template<> +struct lambda_or< BOOST_MPL_PP_ENUM(n_,false) > + : false_ +{ +}; +#undef n_ + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; + typedef is_placeholder<T> is_le; }; }; #define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(1, BOOST_MPL_METAFUNCTION_MAX_ARITY, "boost/mpl/aux_/lambda_no_ctps.hpp")) + (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/aux_/lambda_no_ctps.hpp>)) #include BOOST_PP_ITERATE() } // namespace aux template< typename T - , typename Tag = void_ - , bool Protect = true + , typename Tag + , typename Protect > struct lambda { - // Metafunction forwarding confuses vc6 - typedef typename aux::lambda_impl< - ::boost::mpl::aux::template_arity<T>::value -#if !defined(BOOST_MSVC) || BOOST_MSVC > 1200 - , Protect -#else - , bool_<Protect>::value -#endif - >::template result_<T,Tag>::type type; + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity<T>::type arity_; + typedef typename aux::lambda_impl<arity_> + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; -# undef AUX_LAMBDA_PARAMS +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) -} // namespace mpl -} // namespace boost +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le +{ +}; -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +# undef AUX778076_LAMBDA_PARAMS + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED -///// iteration +///// iteration, depth == 1 #else -#define i BOOST_PP_FRAME_ITERATION(1) -# define AUX_LAMBDA_INVOCATION(unused, i, T) \ - typedef typename lambda< \ - typename F::BOOST_PP_CAT(arg,BOOST_PP_INC(i)) \ +#define i_ BOOST_PP_FRAME_ITERATION(1) + +# define AUX778076_LAMBDA_TYPEDEF(unused, i_, F) \ + typedef lambda< \ + typename F::BOOST_PP_CAT(arg,BOOST_PP_INC(i_)) \ , Tag \ - , false \ - >::type BOOST_PP_CAT(arg,BOOST_PP_INC(i)); \ + , false_ \ + > BOOST_PP_CAT(l,BOOST_PP_INC(i_)); \ /**/ -template<> struct lambda_impl<i,false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T) +# define AUX778076_IS_LE_TYPEDEF(unused, i_, unused2) \ + typedef typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::is_le \ + BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)); \ + /**/ - typedef BOOST_PP_CAT(bind,i)< - f_ - , AUX_LAMBDA_PARAMS(i, arg) - > type; +# define AUX778076_IS_LAMBDA_EXPR(unused, i_, unused2) \ + BOOST_PP_COMMA_IF(i_) \ + BOOST_MPL_AUX_MSVC_VALUE_WKND(BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)))::value \ + /**/ + +# define AUX778076_LAMBDA_RESULT(unused, i_, unused2) \ + , typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::type \ + /**/ + +template<> struct lambda_impl< int_<i_> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_TYPEDEF, F) + BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LE_TYPEDEF, unused) + + typedef aux::lambda_or< + BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LAMBDA_EXPR, unused) + > is_le; + + typedef BOOST_PP_CAT(bind,i_)< + typename F::rebind + BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_RESULT, unused) + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<i,true> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T) +# undef AUX778076_LAMBDA_RESULT +# undef AUX778076_IS_LAMBDA_EXPR +# undef AUX778076_IS_LE_TYPEDEF +# undef AUX778076_LAMBDA_TYPEDEF - typedef mpl::protect< BOOST_PP_CAT(bind,i)< - f_ - , AUX_LAMBDA_PARAMS(i, arg) - > > type; - }; -}; +#undef i_ -# undef AUX_LAMBDA_INVOCATION - -#undef i #endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/aux_/lambda_spec.hpp b/include/boost/mpl/aux_/lambda_spec.hpp index 722bcc1..6a6cdde 100644 --- a/include/boost/mpl/aux_/lambda_spec.hpp +++ b/include/boost/mpl/aux_/lambda_spec.hpp @@ -1,26 +1,27 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/lambda_spec.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED #define BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED -#include "boost/mpl/void.hpp" -#include "boost/mpl/lambda_fwd.hpp" -#include "boost/mpl/int_fwd.hpp" -#include "boost/mpl/aux_/preprocessor/params.hpp" -#include "boost/mpl/aux_/lambda_arity_param.hpp" -#include "boost/mpl/aux_/config/lambda.hpp" +// Copyright Aleksey Gurtovoy 2001-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. -#if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/void.hpp> +#include <boost/mpl/lambda_fwd.hpp> +#include <boost/mpl/int_fwd.hpp> +#include <boost/mpl/aux_/preprocessor/params.hpp> +#include <boost/mpl/aux_/lambda_arity_param.hpp> +#include <boost/mpl/aux_/config/lambda.hpp> + +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) # define BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(i, name) \ template< \ @@ -30,9 +31,10 @@ template< \ struct lambda< \ name< BOOST_MPL_PP_PARAMS(i, T) > \ , Tag \ - BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<-1>) \ + BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<i>) \ > \ { \ + typedef false_ is_le; \ typedef name< BOOST_MPL_PP_PARAMS(i, T) > type; \ }; \ /**/ diff --git a/include/boost/mpl/aux_/lambda_support.hpp b/include/boost/mpl/aux_/lambda_support.hpp index 8a999a3..2c653cc 100644 --- a/include/boost/mpl/aux_/lambda_support.hpp +++ b/include/boost/mpl/aux_/lambda_support.hpp @@ -1,33 +1,36 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/lambda_support.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED #define BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED -#include "boost/mpl/aux_/config/lambda.hpp" +// Copyright Aleksey Gurtovoy 2001-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. -#if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/lambda.hpp> + +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) # define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) /**/ # define BOOST_MPL_AUX_LAMBDA_SUPPORT(i,name,params) /**/ #else -# include "boost/mpl/aux_/config/workaround.hpp" -# include "boost/mpl/aux_/preprocessor/params.hpp" -# include "boost/preprocessor/tuple/to_list.hpp" -# include "boost/preprocessor/list/for_each_i.hpp" -# include "boost/preprocessor/inc.hpp" -# include "boost/preprocessor/cat.hpp" +# include <boost/mpl/int_fwd.hpp> +# include <boost/mpl/aux_/preprocessor/params.hpp> +# include <boost/mpl/aux_/config/msvc.hpp> +# include <boost/mpl/aux_/config/workaround.hpp> +# include <boost/preprocessor/tuple/to_list.hpp> +# include <boost/preprocessor/list/for_each_i.hpp> +# include <boost/preprocessor/inc.hpp> +# include <boost/preprocessor/cat.hpp> # define BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC(R,typedef_,i,param) \ typedef_ param BOOST_PP_CAT(arg,BOOST_PP_INC(i)); \ @@ -37,7 +40,7 @@ #if BOOST_WORKAROUND(__EDG_VERSION__, <= 238) # define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ - BOOST_STATIC_CONSTANT(int, arity = i); \ + typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_<i> arity; \ BOOST_PP_LIST_FOR_EACH_I_R( \ 1 \ , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \ @@ -63,7 +66,7 @@ // MSVC-optimized implementation # define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ - BOOST_STATIC_CONSTANT(int, arity = i); \ + typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_<i> arity; \ BOOST_PP_LIST_FOR_EACH_I_R( \ 1 \ , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \ @@ -87,8 +90,12 @@ struct name<BOOST_MPL_PP_PARAMS(i,T)>::rebind \ #else // __EDG_VERSION__ +namespace boost { namespace mpl { namespace aux { +template< typename T > struct has_rebind_tag; +}}} + # define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ - BOOST_STATIC_CONSTANT(int, arity = i); \ + typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_<i> arity; \ BOOST_PP_LIST_FOR_EACH_I_R( \ 1 \ , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \ @@ -99,10 +106,31 @@ struct name<BOOST_MPL_PP_PARAMS(i,T)>::rebind \ typedef BOOST_PP_CAT(name,_rebind) rebind; \ /**/ +#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) +# define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ +template< BOOST_MPL_PP_PARAMS(i,typename T) > \ +char operator|( \ + ::boost::mpl::aux::has_rebind_tag<int> \ + , name<BOOST_MPL_PP_PARAMS(i,T)>* \ + ); \ +/**/ +#elif !BOOST_WORKAROUND(BOOST_MSVC, <= 1200) +# define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ +template< BOOST_MPL_PP_PARAMS(i,typename T) > \ +char operator|( \ + ::boost::mpl::aux::has_rebind_tag<int> \ + , ::boost::mpl::aux::has_rebind_tag< name<BOOST_MPL_PP_PARAMS(i,T)> >* \ + ); \ +/**/ +#else +# define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) /**/ +#endif + # if !defined(__BORLANDC__) # define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ }; \ +BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ class BOOST_PP_CAT(name,_rebind) \ { \ public: \ @@ -115,6 +143,7 @@ class BOOST_PP_CAT(name,_rebind) \ # define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ }; \ +BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ class BOOST_PP_CAT(name,_rebind) \ { \ public: \ @@ -127,6 +156,6 @@ class BOOST_PP_CAT(name,_rebind) \ #endif // __EDG_VERSION__ -#endif // BOOST_MPL_NO_FULL_LAMBDA_SUPPORT +#endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT #endif // BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/largest_int.hpp b/include/boost/mpl/aux_/largest_int.hpp new file mode 100644 index 0000000..9d000db --- /dev/null +++ b/include/boost/mpl/aux_/largest_int.hpp @@ -0,0 +1,58 @@ + +#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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/if.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/aux_/config/msvc.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> {}; + +template< typename T1, typename T2 > struct largest_int +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + : 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 diff --git a/include/boost/mpl/aux_/logical_op.hpp b/include/boost/mpl/aux_/logical_op.hpp index 404b841..51c3c7f 100644 --- a/include/boost/mpl/aux_/logical_op.hpp +++ b/include/boost/mpl/aux_/logical_op.hpp @@ -1,57 +1,57 @@ -// + file: boost/mpl/aux_/logical_op.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -// no include guards, the header is intended for multiple inclusion! +// $Source$ +// $Date$ +// $Revision$ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! #if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include "boost/mpl/bool.hpp" -# include "boost/mpl/aux_/nested_type_wknd.hpp" -# include "boost/mpl/aux_/void_spec.hpp" -# include "boost/mpl/aux_/lambda_support.hpp" +# include <boost/mpl/bool.hpp> +# include <boost/mpl/aux_/nested_type_wknd.hpp> +# include <boost/mpl/aux_/na_spec.hpp> +# include <boost/mpl/aux_/lambda_support.hpp> #endif -#include "boost/mpl/limits/arity.hpp" -#include "boost/mpl/aux_/preprocessor/params.hpp" -#include "boost/mpl/aux_/preprocessor/ext_params.hpp" -#include "boost/mpl/aux_/preprocessor/def_params_tail.hpp" -#include "boost/mpl/aux_/preprocessor/enum.hpp" -#include "boost/mpl/aux_/preprocessor/sub.hpp" -#include "boost/mpl/aux_/config/workaround.hpp" +#include <boost/mpl/limits/arity.hpp> +#include <boost/mpl/aux_/preprocessor/params.hpp> +#include <boost/mpl/aux_/preprocessor/ext_params.hpp> +#include <boost/mpl/aux_/preprocessor/def_params_tail.hpp> +#include <boost/mpl/aux_/preprocessor/enum.hpp> +#include <boost/mpl/aux_/preprocessor/sub.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> -#include "boost/preprocessor/dec.hpp" -#include "boost/preprocessor/inc.hpp" -#include "boost/preprocessor/cat.hpp" +#include <boost/preprocessor/dec.hpp> +#include <boost/preprocessor/inc.hpp> +#include <boost/preprocessor/cat.hpp> namespace boost { namespace mpl { -// local macros, #undef-ined at the end of the header -# define AUX_LOGICAL_OP_PARAMS(param, sub) \ +# define AUX778076_PARAMS(param, sub) \ BOOST_MPL_PP_PARAMS( \ - BOOST_MPL_PP_SUB(BOOST_MPL_METAFUNCTION_MAX_ARITY, sub) \ + BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY, sub) \ , param \ ) \ /**/ -# define AUX_LOGICAL_OP_SHIFTED_PARAMS(param, sub) \ +# define AUX778076_SHIFTED_PARAMS(param, sub) \ BOOST_MPL_PP_EXT_PARAMS( \ - 2, BOOST_MPL_PP_SUB(BOOST_PP_INC(BOOST_MPL_METAFUNCTION_MAX_ARITY), sub) \ + 2, BOOST_MPL_PP_SUB(BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY), sub) \ , param \ ) \ /**/ -# define AUX_LOGICAL_OP_SPEC_PARAMS(param) \ +# define AUX778076_SPEC_PARAMS(param) \ BOOST_MPL_PP_ENUM( \ - BOOST_PP_DEC(BOOST_MPL_METAFUNCTION_MAX_ARITY) \ + BOOST_PP_DEC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) \ , param \ ) \ /**/ @@ -60,53 +60,53 @@ namespace aux { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -template< bool C_, AUX_LOGICAL_OP_PARAMS(typename T, 1) > -struct BOOST_PP_CAT(AUX_LOGICAL_OP_NAME,impl) - : BOOST_PP_CAT(AUX_LOGICAL_OP_VALUE1,_) +template< bool C_, AUX778076_PARAMS(typename T, 1) > +struct BOOST_PP_CAT(AUX778076_OP_NAME,impl) + : BOOST_PP_CAT(AUX778076_OP_VALUE1,_) { }; -template< AUX_LOGICAL_OP_PARAMS(typename T, 1) > -struct BOOST_PP_CAT(AUX_LOGICAL_OP_NAME,impl)< AUX_LOGICAL_OP_VALUE2,AUX_LOGICAL_OP_PARAMS(T, 1) > - : BOOST_PP_CAT(AUX_LOGICAL_OP_NAME,impl)< +template< AUX778076_PARAMS(typename T, 1) > +struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)< AUX778076_OP_VALUE2,AUX778076_PARAMS(T, 1) > + : BOOST_PP_CAT(AUX778076_OP_NAME,impl)< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value - , AUX_LOGICAL_OP_SHIFTED_PARAMS(T, 1) - , BOOST_PP_CAT(AUX_LOGICAL_OP_VALUE2,_) + , AUX778076_SHIFTED_PARAMS(T, 1) + , BOOST_PP_CAT(AUX778076_OP_VALUE2,_) > { }; template<> -struct BOOST_PP_CAT(AUX_LOGICAL_OP_NAME,impl)< - AUX_LOGICAL_OP_VALUE2 - , AUX_LOGICAL_OP_SPEC_PARAMS(BOOST_PP_CAT(AUX_LOGICAL_OP_VALUE2,_)) +struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)< + AUX778076_OP_VALUE2 + , AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) > - : BOOST_PP_CAT(AUX_LOGICAL_OP_VALUE2,_) + : BOOST_PP_CAT(AUX778076_OP_VALUE2,_) { }; #else -template< bool C_ > struct BOOST_PP_CAT(AUX_LOGICAL_OP_NAME,impl) +template< bool C_ > struct BOOST_PP_CAT(AUX778076_OP_NAME,impl) { - template< AUX_LOGICAL_OP_PARAMS(typename T, 1) > struct result_ - : BOOST_PP_CAT(AUX_LOGICAL_OP_VALUE1,_) + template< AUX778076_PARAMS(typename T, 1) > struct result_ + : BOOST_PP_CAT(AUX778076_OP_VALUE1,_) { }; }; -template<> struct BOOST_PP_CAT(AUX_LOGICAL_OP_NAME,impl)<AUX_LOGICAL_OP_VALUE2> +template<> struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)<AUX778076_OP_VALUE2> { - template< AUX_LOGICAL_OP_PARAMS(typename T, 1) > struct result_ - : BOOST_PP_CAT(AUX_LOGICAL_OP_NAME,impl)< + template< AUX778076_PARAMS(typename T, 1) > struct result_ + : BOOST_PP_CAT(AUX778076_OP_NAME,impl)< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value - >::template result_< AUX_LOGICAL_OP_SHIFTED_PARAMS(T,1),BOOST_PP_CAT(AUX_LOGICAL_OP_VALUE2,_) > + >::template result_< AUX778076_SHIFTED_PARAMS(T,1),BOOST_PP_CAT(AUX778076_OP_VALUE2,_) > { }; #if BOOST_WORKAROUND(BOOST_MSVC, == 1300) - template<> struct result_<AUX_LOGICAL_OP_SPEC_PARAMS(BOOST_PP_CAT(AUX_LOGICAL_OP_VALUE2,_))> - : BOOST_PP_CAT(AUX_LOGICAL_OP_VALUE2,_) + template<> struct result_<AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_))> + : BOOST_PP_CAT(AUX778076_OP_VALUE2,_) { }; }; @@ -114,9 +114,9 @@ template<> struct BOOST_PP_CAT(AUX_LOGICAL_OP_NAME,impl)<AUX_LOGICAL_OP_VALUE2> }; template<> -struct BOOST_PP_CAT(AUX_LOGICAL_OP_NAME,impl)<AUX_LOGICAL_OP_VALUE2> - ::result_< AUX_LOGICAL_OP_SPEC_PARAMS(BOOST_PP_CAT(AUX_LOGICAL_OP_VALUE2,_)) > - : BOOST_PP_CAT(AUX_LOGICAL_OP_VALUE2,_) +struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)<AUX778076_OP_VALUE2> + ::result_< AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) > + : BOOST_PP_CAT(AUX778076_OP_VALUE2,_) { }; #endif // BOOST_MSVC == 1300 @@ -126,40 +126,40 @@ struct BOOST_PP_CAT(AUX_LOGICAL_OP_NAME,impl)<AUX_LOGICAL_OP_VALUE2> } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) - BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename T, BOOST_PP_CAT(AUX_LOGICAL_OP_VALUE2,_)) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename T, BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) > -struct AUX_LOGICAL_OP_NAME +struct AUX778076_OP_NAME #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - : aux::BOOST_PP_CAT(AUX_LOGICAL_OP_NAME,impl)< + : aux::BOOST_PP_CAT(AUX778076_OP_NAME,impl)< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value - , AUX_LOGICAL_OP_SHIFTED_PARAMS(T,0) + , AUX778076_SHIFTED_PARAMS(T,0) > #else - : aux::BOOST_PP_CAT(AUX_LOGICAL_OP_NAME,impl)< + : aux::BOOST_PP_CAT(AUX778076_OP_NAME,impl)< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value - >::template result_< AUX_LOGICAL_OP_SHIFTED_PARAMS(T,0) > + >::template result_< AUX778076_SHIFTED_PARAMS(T,0) > #endif { BOOST_MPL_AUX_LAMBDA_SUPPORT( - BOOST_MPL_METAFUNCTION_MAX_ARITY - , AUX_LOGICAL_OP_NAME - , (AUX_LOGICAL_OP_PARAMS(T, 0)) + BOOST_MPL_LIMIT_METAFUNCTION_ARITY + , AUX778076_OP_NAME + , (AUX778076_PARAMS(T, 0)) ) }; -BOOST_MPL_AUX_VOID_SPEC_EXT( +BOOST_MPL_AUX_NA_SPEC2( 2 - , BOOST_MPL_METAFUNCTION_MAX_ARITY - , AUX_LOGICAL_OP_NAME + , BOOST_MPL_LIMIT_METAFUNCTION_ARITY + , AUX778076_OP_NAME ) -}} // namespace boost::mpl +}} -#undef AUX_LOGICAL_OP_SPEC_PARAMS -#undef AUX_LOGICAL_OP_SHIFTED_PARAMS -#undef AUX_LOGICAL_OP_PARAMS -#undef AUX_LOGICAL_OP_NAME -#undef AUX_LOGICAL_OP_VALUE1 -#undef AUX_LOGICAL_OP_VALUE2 +#undef AUX778076_SPEC_PARAMS +#undef AUX778076_SHIFTED_PARAMS +#undef AUX778076_PARAMS +#undef AUX778076_OP_NAME +#undef AUX778076_OP_VALUE1 +#undef AUX778076_OP_VALUE2 diff --git a/include/boost/mpl/aux_/metafunction.hpp b/include/boost/mpl/aux_/metafunction.hpp deleted file mode 100644 index 9f743ff..0000000 --- a/include/boost/mpl/aux_/metafunction.hpp +++ /dev/null @@ -1,20 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/metafunction.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_METAFUNCTION_HPP_INCLUDED -#define BOOST_MPL_AUX_METAFUNCTION_HPP_INCLUDED - -#define BOOST_MPL_AUX_METAFUNCTION(arity, name) name -#define BOOST_MPL_AUX_METAFUNCTION_TRAITS_1(name,T1) /**/ -#define BOOST_MPL_AUX_METAFUNCTION_TRAITS_2(name,T1,T2) /**/ - -#endif // BOOST_MPL_AUX_METAFUNCTION_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/msvc_dtw.hpp b/include/boost/mpl/aux_/msvc_dtw.hpp index 3cb6322..391b483 100644 --- a/include/boost/mpl/aux_/msvc_dtw.hpp +++ b/include/boost/mpl/aux_/msvc_dtw.hpp @@ -1,52 +1,68 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/msvc_dtw.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -// no include guards, the header is intended for multiple inclusion! +// $Source$ +// $Date$ +// $Revision$ -#include "boost/mpl/aux_/preprocessor/params.hpp" +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! + +#include <boost/mpl/aux_/preprocessor/params.hpp> // local macros, #undef-ined at the end of the header -#define AUX_DTW_PARAMS(param) \ - BOOST_MPL_PP_PARAMS(BOOST_MPL_AUX_MSVC_DTW_ARITY, param) \ +#define AUX778076_DTW_PARAMS(param) \ + BOOST_MPL_PP_PARAMS(AUX778076_MSVC_DTW_ARITY, param) \ /**/ -#define AUX_DTW_ORIGINAL_NAME \ - BOOST_MPL_AUX_MSVC_DTW_ORIGINAL_NAME \ +#define AUX778076_DTW_ORIGINAL_NAME \ + AUX778076_MSVC_DTW_ORIGINAL_NAME \ /**/ // warning: not a well-formed C++ // workaround for MSVC 6.5's "dependent template typedef bug" template< typename F> -struct BOOST_MPL_AUX_MSVC_DTW_NAME +struct AUX778076_MSVC_DTW_NAME { template< bool > struct f_ : F {}; template<> struct f_<true> { - template< AUX_DTW_PARAMS(typename P) > struct AUX_DTW_ORIGINAL_NAME +#if AUX778076_MSVC_DTW_ARITY > 0 + template< AUX778076_DTW_PARAMS(typename P) > struct AUX778076_DTW_ORIGINAL_NAME { + typedef int type; }; }; - template< AUX_DTW_PARAMS(typename T) > struct result_ + template< AUX778076_DTW_PARAMS(typename T) > struct result_ : f_< aux::msvc_never_true<F>::value > - ::template AUX_DTW_ORIGINAL_NAME< AUX_DTW_PARAMS(T) > + ::template AUX778076_DTW_ORIGINAL_NAME< AUX778076_DTW_PARAMS(T) > { }; +#else + template< typename P = int > struct AUX778076_DTW_ORIGINAL_NAME + { + typedef int type; + }; + }; + + template< typename T = int > struct result_ + : f_< aux::msvc_never_true<F>::value > + ::template AUX778076_DTW_ORIGINAL_NAME<> + { + }; +#endif }; -#undef AUX_DTW_ORIGINAL_NAME -#undef AUX_DTW_PARAMS +#undef AUX778076_DTW_ORIGINAL_NAME +#undef AUX778076_DTW_PARAMS -#undef BOOST_MPL_AUX_MSVC_DTW_NAME -#undef BOOST_MPL_AUX_MSVC_DTW_ORIGINAL_NAME -#undef BOOST_MPL_AUX_MSVC_DTW_ARITY +#undef AUX778076_MSVC_DTW_NAME +#undef AUX778076_MSVC_DTW_ORIGINAL_NAME +#undef AUX778076_MSVC_DTW_ARITY diff --git a/include/boost/mpl/aux_/msvc_eti_base.hpp b/include/boost/mpl/aux_/msvc_eti_base.hpp index 66bcec0..24d46bf 100644 --- a/include/boost/mpl/aux_/msvc_eti_base.hpp +++ b/include/boost/mpl/aux_/msvc_eti_base.hpp @@ -1,28 +1,30 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/msvc_msvc_eti_base.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-03 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_MSVC_ETI_BASE_HPP_INCLUDED #define BOOST_MPL_AUX_MSVC_ETI_BASE_HPP_INCLUDED -#include "boost/mpl/aux_/config/eti.hpp" -#include "boost/mpl/aux_/is_msvc_eti_arg.hpp" +// Copyright Aleksey Gurtovoy 2001-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_/config/eti.hpp> +#include <boost/mpl/aux_/is_msvc_eti_arg.hpp> namespace boost { namespace mpl { namespace aux { -#if defined(BOOST_MPL_MSVC_ETI_BUG) +#if defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) template< bool > struct msvc_eti_base_impl { template< typename T > struct result_ + : T { typedef T type; }; @@ -33,6 +35,9 @@ template<> struct msvc_eti_base_impl<true> template< typename T > struct result_ { typedef result_ type; + typedef result_ first; + typedef result_ second; + typedef result_ tag; }; }; @@ -42,15 +47,24 @@ template< typename T > struct msvc_eti_base { }; -#else +#else // BOOST_MPL_CFG_MSVC_70_ETI_BUG template< typename T > struct msvc_eti_base + : T { typedef T type; }; -#endif // BOOST_MPL_MSVC_ETI_BUG +#endif -}}} // namespace boost::mpl::aux +template<> struct msvc_eti_base<int> +{ + typedef msvc_eti_base type; + typedef msvc_eti_base first; + typedef msvc_eti_base second; + typedef msvc_eti_base tag; +}; + +}}} #endif // BOOST_MPL_AUX_MSVC_ETI_BASE_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/msvc_is_class.hpp b/include/boost/mpl/aux_/msvc_is_class.hpp new file mode 100644 index 0000000..4c8f67e --- /dev/null +++ b/include/boost/mpl/aux_/msvc_is_class.hpp @@ -0,0 +1,48 @@ + +#ifndef BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED +#define BOOST_MPL_AUX_MSVC_IS_CLASS_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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/bool.hpp> +#include <boost/mpl/aux_/type_wrapper.hpp> +#include <boost/mpl/aux_/yes_no.hpp> +#include <boost/mpl/aux_/adl_barrier.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +namespace aux { + +template< typename T > struct is_class_helper +{ + typedef int (T::* type)(); +}; + +// MSVC 6.x-specific lightweight 'is_class' implementation; +// Distinguishing feature: does not instantiate the type being tested. +template< typename T > +struct msvc_is_class +{ + template< typename U> + static yes_tag test(type_wrapper<U>*, /*typename*/ is_class_helper<U>::type = 0); + static no_tag test(void const volatile*, ...); + + enum { value = sizeof(test((type_wrapper<T>*)0)) == sizeof(yes_tag) }; + typedef bool_<value> type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +#endif // BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/msvc_never_true.hpp b/include/boost/mpl/aux_/msvc_never_true.hpp index 4af5a42..f961368 100644 --- a/include/boost/mpl/aux_/msvc_never_true.hpp +++ b/include/boost/mpl/aux_/msvc_never_true.hpp @@ -1,25 +1,25 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/msvc_never_true.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED #define BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED -#include "boost/config.hpp" +// 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. -#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { -namespace aux { +#include <boost/mpl/aux_/config/msvc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + +namespace boost { namespace mpl { namespace aux { template< typename T > struct msvc_never_true @@ -27,10 +27,8 @@ struct msvc_never_true enum { value = false }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} -#endif // BOOST_MSVC < 1300 +#endif // BOOST_MSVC #endif // BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/msvc_type.hpp b/include/boost/mpl/aux_/msvc_type.hpp new file mode 100644 index 0000000..bbd4065 --- /dev/null +++ b/include/boost/mpl/aux_/msvc_type.hpp @@ -0,0 +1,62 @@ + +#ifndef BOOST_MPL_AUX_MSVC_TYPE_HPP_INCLUDED +#define BOOST_MPL_AUX_MSVC_TYPE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-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_/config/eti.hpp> +#include <boost/mpl/aux_/is_msvc_eti_arg.hpp> + +namespace boost { namespace mpl { namespace aux { + +#if defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) + +template< bool > struct msvc_type_impl +{ + template< typename T > struct result_ + { + typedef typename T::type type; + }; +}; + +template<> struct msvc_type_impl<true> +{ + template< typename T > struct result_ + { + typedef result_ type; + }; +}; + +template< typename T > struct msvc_type + : msvc_type_impl< is_msvc_eti_arg<T>::value > + ::template result_<T> +{ +}; + +#else // BOOST_MPL_CFG_MSVC_70_ETI_BUG + +template< typename T > struct msvc_type +{ + typedef typename T::type type; +}; + +template<> struct msvc_type<int> +{ + typedef int type; +}; + +#endif + +}}} + +#endif // BOOST_MPL_AUX_MSVC_TYPE_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/na.hpp b/include/boost/mpl/aux_/na.hpp new file mode 100644 index 0000000..aa028fc --- /dev/null +++ b/include/boost/mpl/aux_/na.hpp @@ -0,0 +1,101 @@ + +#ifndef BOOST_MPL_AUX_NA_HPP_INCLUDED +#define BOOST_MPL_AUX_NA_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-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/bool.hpp" +#include "boost/mpl/aux_/config/msvc.hpp" +#include <boost/mpl/aux_/config/ctps.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +// n.a. == not available +struct na +{ + typedef na type; + enum { value = 0 }; +}; + +template< typename T > +struct is_na + : false_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using false_::value; +#endif +}; + +template<> +struct is_na<na> + : true_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using true_::value; +#endif +}; + +template< typename T > +struct is_not_na + : true_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using true_::value; +#endif +}; + +template<> +struct is_not_na<na> + : false_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using false_::value; +#endif +}; + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +template< typename T, typename U > struct if_na +{ + typedef T type; +}; + +template< typename U > struct if_na<na,U> +{ + typedef U type; +}; +#else +template< typename T > struct if_na_impl +{ + template< typename U > struct apply + { + typedef T type; + }; +}; + +template<> struct if_na_impl<na> +{ + template< typename U > struct apply + { + typedef U type; + }; +}; + +template< typename T, typename U > struct if_na + : if_na_impl<T>::template apply<U> +{ +}; +#endif + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +#endif // BOOST_MPL_AUX_NA_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/na_spec.hpp b/include/boost/mpl/aux_/na_spec.hpp new file mode 100644 index 0000000..1cae618 --- /dev/null +++ b/include/boost/mpl/aux_/na_spec.hpp @@ -0,0 +1,174 @@ + +#ifndef BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED +#define BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-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/lambda_fwd.hpp> +# include <boost/mpl/int.hpp> +# include <boost/mpl/bool.hpp> +# include <boost/mpl/aux_/na.hpp> +# include <boost/mpl/aux_/arity.hpp> +# include <boost/mpl/aux_/template_arity_fwd.hpp> +#endif + +#include <boost/mpl/aux_/preprocessor/params.hpp> +#include <boost/mpl/aux_/preprocessor/enum.hpp> +#include <boost/mpl/aux_/preprocessor/def_params_tail.hpp> +#include <boost/mpl/aux_/lambda_arity_param.hpp> +#include <boost/mpl/aux_/config/dtp.hpp> +#include <boost/mpl/aux_/config/eti.hpp> +#include <boost/mpl/aux_/nttp_decl.hpp> +#include <boost/mpl/aux_/config/ttp.hpp> +#include <boost/mpl/aux_/config/lambda.hpp> +#include <boost/mpl/aux_/config/overload_resolution.hpp> + + +#define BOOST_MPL_AUX_NA_PARAMS(i) \ + BOOST_MPL_PP_ENUM(i, na) \ +/**/ + +#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +# define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \ +namespace aux { \ +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > \ +struct arity< \ + name< BOOST_MPL_AUX_NA_PARAMS(i) > \ + , N \ + > \ + : int_< BOOST_MPL_LIMIT_METAFUNCTION_ARITY > \ +{ \ +}; \ +} \ +/**/ +#else +# define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) /**/ +#endif + +#define BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \ +template<> \ +struct name< BOOST_MPL_AUX_NA_PARAMS(i) > \ +{ \ + template< \ + BOOST_MPL_PP_PARAMS(i, typename T) \ + BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, typename T, na) \ + > \ + struct apply \ + : name< BOOST_MPL_PP_PARAMS(i, T) > \ + { \ + }; \ +}; \ +/**/ + +#if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +# define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ +template<> \ +struct lambda< \ + name< BOOST_MPL_AUX_NA_PARAMS(i) > \ + , void_ \ + , true_ \ + > \ +{ \ + typedef false_ is_le; \ + typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \ +}; \ +template<> \ +struct lambda< \ + name< BOOST_MPL_AUX_NA_PARAMS(i) > \ + , void_ \ + , false_ \ + > \ +{ \ + typedef false_ is_le; \ + typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \ +}; \ +/**/ +#else +# define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ +template< typename Tag > \ +struct lambda< \ + name< BOOST_MPL_AUX_NA_PARAMS(i) > \ + , Tag \ + BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<-1>) \ + > \ +{ \ + typedef false_ is_le; \ + typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \ +}; \ +/**/ +#endif + +#if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \ + || defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \ + && defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) +# define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \ +namespace aux { \ +template< BOOST_MPL_PP_PARAMS(j, typename T) > \ +struct template_arity< \ + name< BOOST_MPL_PP_PARAMS(j, T) > \ + > \ + : int_<j> \ +{ \ +}; \ +\ +template<> \ +struct template_arity< \ + name< BOOST_MPL_PP_ENUM(i, na) > \ + > \ + : int_<-1> \ +{ \ +}; \ +} \ +/**/ +#else +# define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) /**/ +#endif + +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) +# define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \ +template<> \ +struct name< BOOST_MPL_PP_ENUM(i, int) > \ +{ \ + typedef int type; \ + enum { value = 0 }; \ +}; \ +/**/ +#else +# define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) /**/ +#endif + +#define BOOST_MPL_AUX_NA_PARAM(param) param = na + +#define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \ +BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \ +BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ +BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \ +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, i, name) \ +/**/ + +#define BOOST_MPL_AUX_NA_SPEC(i, name) \ +BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \ +BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \ +/**/ + +#define BOOST_MPL_AUX_NA_SPEC2(i, j, name) \ +BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \ +BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \ +BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ +BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \ +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \ +/**/ + + +#endif // BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/nested_type_wknd.hpp b/include/boost/mpl/aux_/nested_type_wknd.hpp index 43d0db5..255278e 100644 --- a/include/boost/mpl/aux_/nested_type_wknd.hpp +++ b/include/boost/mpl/aux_/nested_type_wknd.hpp @@ -1,41 +1,51 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/nested_type_wknd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED #define BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED -#include "boost/config.hpp" +// 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. -#if defined(__GNUC__) && (__GNUC__ < 3 || __GNUC__ == 3 && __GNUC_MINOR__ <= 2 \ - || !defined(BOOST_STRICT_CONFIG)) \ - || defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \ - || defined(__SUNPRO_CC) +// $Source$ +// $Date$ +// $Revision$ -namespace boost { namespace mpl { namespace aux { +#include <boost/mpl/aux_/config/gcc.hpp> +#include <boost/mpl/aux_/adl_barrier.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> -template< typename T > -struct nested_type_wknd +#if BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ + || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x530)) \ + || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +namespace aux { +template< typename T > struct nested_type_wknd : T::type { }; +} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE -}}} // namespace boost::mpl::aux - -# define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) ::boost::mpl::aux::nested_type_wknd<T> - +#if BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +# define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) \ + aux::nested_type_wknd<T> \ +/**/ #else +# define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) \ + ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::aux::nested_type_wknd<T> \ +/**/ +#endif + +#else // !BOOST_MPL_CFG_GCC et al. # define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) T::type -#endif // __GNUC__ +#endif #endif // BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/next.hpp b/include/boost/mpl/aux_/next.hpp deleted file mode 100644 index 1bd8feb..0000000 --- a/include/boost/mpl/aux_/next.hpp +++ /dev/null @@ -1,30 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/next.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_NEXT_HPP_INCLUDED -#define BOOST_MPL_AUX_NEXT_HPP_INCLUDED - -#if defined(BOOST_MPL_USE_NEXT_INTERNALLY) - -# if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include "boost/mpl/next.hpp" -# endif - -# define BOOST_MPL_AUX_NEXT(x) next<x>::type - -#else - -# define BOOST_MPL_AUX_NEXT(x) x::next - -#endif - -#endif // BOOST_MPL_AUX_NEXT_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/nttp_decl.hpp b/include/boost/mpl/aux_/nttp_decl.hpp new file mode 100644 index 0000000..56e13ec --- /dev/null +++ b/include/boost/mpl/aux_/nttp_decl.hpp @@ -0,0 +1,33 @@ + +#ifndef BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED +#define BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-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_/config/nttp.hpp> + +#if defined(BOOST_MPL_CFG_NTTP_BUG) + +typedef int _mpl_nttp_int; +typedef long _mpl_nttp_long; + +# include <boost/preprocessor/cat.hpp> +# define BOOST_MPL_AUX_NTTP_DECL(T, x) BOOST_PP_CAT(_mpl_nttp_,T) x /**/ + +#else + +# define BOOST_MPL_AUX_NTTP_DECL(T, x) T x /**/ + +#endif + +#endif // BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/numeric_op.hpp b/include/boost/mpl/aux_/numeric_op.hpp new file mode 100644 index 0000000..f4c566f --- /dev/null +++ b/include/boost/mpl/aux_/numeric_op.hpp @@ -0,0 +1,253 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +// 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. + +// $Source$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include <boost/mpl/numeric_cast.hpp> +# include <boost/mpl/apply_wrap.hpp> +# include <boost/mpl/if.hpp> +# include <boost/mpl/tag.hpp> +# include <boost/mpl/aux_/na.hpp> +# include <boost/mpl/aux_/na_spec.hpp> +# include <boost/mpl/aux_/lambda_support.hpp> +# include <boost/mpl/aux_/msvc_eti_base.hpp> +# include <boost/mpl/aux_/value_wknd.hpp> +# include <boost/mpl/aux_/config/eti.hpp> +# include <boost/mpl/aux_/nttp_decl.hpp> +# include <boost/mpl/aux_/config/static_constant.hpp> +#endif + +#if defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + || defined(BOOST_MPL_PREPROCESSING_MODE) + +# include <boost/mpl/limits/arity.hpp> +# include <boost/mpl/aux_/preprocessor/partial_spec_params.hpp> +# include <boost/mpl/aux_/preprocessor/def_params_tail.hpp> +# include <boost/mpl/aux_/preprocessor/repeat.hpp> +# include <boost/mpl/aux_/preprocessor/params.hpp> +# include <boost/mpl/aux_/preprocessor/enum.hpp> +# include <boost/mpl/aux_/preprocessor/add.hpp> +# include <boost/mpl/aux_/preprocessor/sub.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# include <boost/mpl/aux_/config/eti.hpp> +# include <boost/mpl/aux_/config/msvc.hpp> +# include <boost/mpl/aux_/config/workaround.hpp> + +# include <boost/preprocessor/dec.hpp> +# include <boost/preprocessor/iterate.hpp> +# include <boost/preprocessor/cat.hpp> + + +#if !defined(AUX778076_OP_ARITY) +# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +# define AUX778076_OP_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY +# else +# define AUX778076_OP_ARITY 2 +# endif +#endif + +#if !defined(AUX778076_OP_IMPL_NAME) +# define AUX778076_OP_IMPL_NAME BOOST_PP_CAT(AUX778076_OP_PREFIX,_impl) +#endif + +#if !defined(AUX778076_OP_TAG_NAME) +# define AUX778076_OP_TAG_NAME BOOST_PP_CAT(AUX778076_OP_PREFIX,_tag) +#endif + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct AUX778076_OP_IMPL_NAME + : if_c< + ( tag1_ > tag2_ ) +#else + > +struct AUX778076_OP_IMPL_NAME + : if_c< + ( Tag1::value > Tag2::value ) +#endif + , aux::cast2nd_impl< AUX778076_OP_IMPL_NAME<Tag1,Tag2>,Tag1,Tag2 > + , aux::cast1st_impl< AUX778076_OP_IMPL_NAME<Tag1,Tag2>,Tag1,Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct AUX778076_OP_IMPL_NAME<na,na> +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +template< typename Tag > struct AUX778076_OP_IMPL_NAME<na,Tag> +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct AUX778076_OP_IMPL_NAME<Tag,na> +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; +#else +template<> struct AUX778076_OP_IMPL_NAME<na,integral_c_tag> +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct AUX778076_OP_IMPL_NAME<integral_c_tag,na> +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; +#endif + + +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && BOOST_WORKAROUND(BOOST_MSVC, != 1200) +template< typename T > struct AUX778076_OP_TAG_NAME + : tag<T,na> +{ +}; +#else +template< typename T > struct AUX778076_OP_TAG_NAME +{ + typedef typename T::tag type; +}; +#endif + + +#if AUX778076_OP_ARITY == 2 +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct AUX778076_OP_NAME +#else + +# define AUX778076_OP_RIGHT_OPERAND(unused, i, N) , BOOST_PP_CAT(N, BOOST_MPL_PP_ADD(i, 2))> +# define AUX778076_OP_N_CALLS(i, N) \ + BOOST_MPL_PP_REPEAT( BOOST_PP_DEC(i), BOOST_MPL_PP_REPEAT_IDENTITY_FUNC, AUX778076_OP_NAME< ) \ + N1 BOOST_MPL_PP_REPEAT( BOOST_MPL_PP_SUB(i, 1), AUX778076_OP_RIGHT_OPERAND, N ) \ +/**/ + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename N, na) + > +struct AUX778076_OP_NAME + : AUX778076_OP_N_CALLS(AUX778076_OP_ARITY, N) +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + AUX778076_OP_ARITY + , AUX778076_OP_NAME + , ( BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) ) + ) +}; + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,( BOOST_PP_DEC(AUX778076_OP_ARITY), 2, <boost/mpl/aux_/numeric_op.hpp> )) +#include BOOST_PP_ITERATE() + +# undef AUX778076_OP_N_CALLS +# undef AUX778076_OP_RIGHT_OPERAND + +#endif // AUX778076_OP_ARITY == 2 + +#if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) + : AUX778076_OP_IMPL_NAME< + typename AUX778076_OP_TAG_NAME<N1>::type + , typename AUX778076_OP_TAG_NAME<N2>::type + >::template apply<N1,N2>::type +#else + : aux::msvc_eti_base< typename apply_wrap2< + AUX778076_OP_IMPL_NAME< + typename AUX778076_OP_TAG_NAME<N1>::type + , typename AUX778076_OP_TAG_NAME<N2>::type + > + , N1 + , N2 + >::type >::type +#endif +{ +#if AUX778076_OP_ARITY == 2 + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, AUX778076_OP_NAME, (N1, N2)) +#else + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + AUX778076_OP_ARITY + , AUX778076_OP_NAME + , ( BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(2, N, na) ) + ) +#endif +}; + +BOOST_MPL_AUX_NA_SPEC2(2, AUX778076_OP_ARITY, AUX778076_OP_NAME) + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +///// iteration, depth == 1 + +#elif BOOST_PP_ITERATION_DEPTH() == 1 + +# define i_ BOOST_PP_FRAME_ITERATION(1) + +template< + BOOST_MPL_PP_PARAMS(i_, typename N) + > +struct AUX778076_OP_NAME<BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(i_, N, na)> +#if i_ != 2 + : AUX778076_OP_N_CALLS(i_, N) +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + AUX778076_OP_ARITY + , AUX778076_OP_NAME + , ( BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(i_, N, na) ) + ) +}; +#endif + +# undef i_ + +#endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/aux_/order_impl.hpp b/include/boost/mpl/aux_/order_impl.hpp index 30b16a6..0358d34 100644 --- a/include/boost/mpl/aux_/order_impl.hpp +++ b/include/boost/mpl/aux_/order_impl.hpp @@ -2,29 +2,74 @@ #ifndef BOOST_MPL_AUX_ORDER_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_ORDER_IMPL_HPP_INCLUDED -// + file: boost/mpl/aux_/order_impl.hpp -// + last modified: 03/may/03 - -// Copyright (c) 2002-03 -// David Abrahams, Aleksey Gurtovoy +// 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 +// 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. -#include "boost/mpl/order_fwd.hpp" -#include "boost/mpl/aux_/traits_lambda_spec.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { +#include <boost/mpl/order_fwd.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/long.hpp> +#include <boost/mpl/has_key.hpp> +#include <boost/mpl/aux_/static_cast.hpp> +#include <boost/mpl/aux_/type_wrapper.hpp> +#include <boost/mpl/aux_/ptr_to_ref.hpp> +#include <boost/mpl/aux_/traits_lambda_spec.hpp> +#include <boost/mpl/aux_/config/msvc.hpp> +#include <boost/mpl/aux_/config/static_constant.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> -// no default implementation; the definition is needed to make MSVC happy +namespace boost { namespace mpl { -template< typename Tag > struct order_impl +// default implementation; requires 'Seq' to provide corresponding overloads +// of 'operator/' + +template< typename Seq, typename Key > struct x_order_impl +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) { - template< typename AssociativeSequence, typename Key > struct apply; + BOOST_STATIC_CONSTANT(long, value = + sizeof( + *BOOST_MPL_AUX_STATIC_CAST(Seq*, 0) + / BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<Key>*, 0) + ) + ); + +# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) + typedef long_<(x_order_impl::value)> type; +# else + typedef long_<value> type; +# endif + +#else // ISO98 C++ + : long_< + sizeof( + aux::ptr_to_ref(BOOST_MPL_AUX_STATIC_CAST(Seq*, 0)) + / BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<Key>*, 0) + ) + > +{ +#endif +}; + +template< typename Tag > +struct order_impl +{ + template< typename Seq, typename Key > struct apply + : if_< + typename has_key_impl<Tag>::template apply<Seq,Key> + , x_order_impl<Seq,Key> + , void_ + >::type + { + }; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,order_impl) diff --git a/include/boost/mpl/aux_/partition_op.hpp b/include/boost/mpl/aux_/partition_op.hpp index 6b7f060..00b4cbc 100644 --- a/include/boost/mpl/aux_/partition_op.hpp +++ b/include/boost/mpl/aux_/partition_op.hpp @@ -1,27 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/partition_op.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2003 -// Eric Friedman -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_PARTITION_OP_HPP_INCLUDED #define BOOST_MPL_AUX_PARTITION_OP_HPP_INCLUDED -#include "boost/mpl/apply.hpp" -#include "boost/mpl/apply_if.hpp" -#include "boost/mpl/if.hpp" -#include "boost/mpl/pair.hpp" -#include "boost/mpl/push_front.hpp" -#include "boost/mpl/aux_/lambda_spec.hpp" +// Copyright Eric Friedman 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/apply.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/pair.hpp> +#include <boost/mpl/deref.hpp> +#include <boost/mpl/push_front.hpp> +#include <boost/mpl/aux_/lambda_spec.hpp> + +namespace boost { namespace mpl { -namespace boost { -namespace mpl { namespace aux { template <typename Predicate> @@ -33,10 +35,10 @@ struct partition_op private: typedef typename State::first first_; typedef typename State::second second_; - typedef typename Iter::type t_; + typedef typename deref<Iter>::type t_; typedef typename apply1< Predicate,t_ >::type pred_; - typedef typename apply_if< + typedef typename eval_if< pred_ , push_front< first_, t_ > , push_front< second_, t_ > @@ -55,7 +57,6 @@ struct partition_op BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1,aux::partition_op) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AUX_PARTITION_OP_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/pop_back_impl.hpp b/include/boost/mpl/aux_/pop_back_impl.hpp index b5fe45a..9dc483d 100644 --- a/include/boost/mpl/aux_/pop_back_impl.hpp +++ b/include/boost/mpl/aux_/pop_back_impl.hpp @@ -1,35 +1,34 @@ -//----------------------------------------------------------------------------- -// boost mpl/pop_back_impl.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_POP_BACK_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_POP_BACK_IMPL_HPP_INCLUDED -#include "boost/mpl/pop_back_fwd.hpp" -#include "boost/mpl/aux_/traits_lambda_spec.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/pop_back_fwd.hpp> +#include <boost/mpl/aux_/traits_lambda_spec.hpp> + +namespace boost { namespace mpl { // no default implementation; the definition is needed to make MSVC happy template< typename Tag > -struct pop_back_traits +struct pop_back_impl { - template< typename Sequence > struct algorithm; + template< typename Sequence > struct apply; }; -BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,pop_back_traits) +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, pop_back_impl) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AUX_POP_BACK_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/pop_front_impl.hpp b/include/boost/mpl/aux_/pop_front_impl.hpp index 7a1ece9..cae2c3e 100644 --- a/include/boost/mpl/aux_/pop_front_impl.hpp +++ b/include/boost/mpl/aux_/pop_front_impl.hpp @@ -1,32 +1,32 @@ -//----------------------------------------------------------------------------- -// boost mpl/pop_front_impl.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_POP_FRONT_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_POP_FRONT_IMPL_HPP_INCLUDED -#include "boost/config.hpp" -#include "boost/mpl/pop_front_fwd.hpp" -#include "boost/mpl/aux_/traits_lambda_spec.hpp" -#include "boost/detail/workaround.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/pop_front_fwd.hpp> +#include <boost/mpl/aux_/traits_lambda_spec.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> +#include <boost/mpl/aux_/config/msvc.hpp> + +namespace boost { namespace mpl { // no default implementation; the definition is needed to make MSVC happy template< typename Tag > -struct pop_front_traits +struct pop_front_impl { - template< typename Sequence > struct algorithm + template< typename Sequence > struct apply // conservatively placed, but maybe should go outside surrounding // braces. #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) @@ -37,9 +37,8 @@ struct pop_front_traits ; }; -BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,pop_front_traits) +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, pop_front_impl) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AUX_POP_FRONT_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/pred.hpp b/include/boost/mpl/aux_/pred.hpp deleted file mode 100644 index a31a3cf..0000000 --- a/include/boost/mpl/aux_/pred.hpp +++ /dev/null @@ -1,35 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux/pred.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_PRED_HPP_INCLUDED -#define BOOST_MPL_AUX_PRED_HPP_INCLUDED - -namespace boost { -namespace mpl { -namespace aux { - -// wrapper class to help users to deal with "legacy" metafunctions -// (i.e. the ones that do not provide the '::type' interface) -// -// usage example: mpl::pred< boost::is_same<mpl::_1, int> > - -template< typename Pred > -struct pred : Pred -{ - typedef pred type; -}; - -} // namespace aux -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_AUX_PRED_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/preprocessed/bcc/advance_backward.hpp b/include/boost/mpl/aux_/preprocessed/bcc/advance_backward.hpp index 16e576c..26de94c 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/advance_backward.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/advance_backward.hpp @@ -1,9 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/advance_backward.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> @@ -22,7 +28,7 @@ struct advance_backward<1> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; + typedef typename prior<iter0>::type iter1; typedef iter1 type; }; }; @@ -33,8 +39,8 @@ struct advance_backward<2> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; typedef iter2 type; }; }; @@ -45,9 +51,9 @@ struct advance_backward<3> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; - typedef typename iter2::prior iter3; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; + typedef typename prior<iter2>::type iter3; typedef iter3 type; }; }; @@ -58,10 +64,10 @@ struct advance_backward<4> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; - typedef typename iter2::prior iter3; - typedef typename iter3::prior iter4; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; + typedef typename prior<iter2>::type iter3; + typedef typename prior<iter3>::type iter4; typedef iter4 type; }; }; @@ -71,12 +77,21 @@ struct advance_backward { template< typename Iterator > struct apply { - typedef typename apply1< advance_backward<4>,Iterator >::type chunk_result_; - typedef typename apply1<advance_backward<( (N - 4) < 0 ? 0 : N - 4 )>,chunk_result_>::type type; + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/advance_forward.hpp b/include/boost/mpl/aux_/preprocessed/bcc/advance_forward.hpp index e6840b7..b137cc7 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/advance_forward.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/advance_forward.hpp @@ -1,9 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/advance_forward.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> @@ -22,7 +28,7 @@ struct advance_forward<1> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef iter1 type; }; }; @@ -33,8 +39,8 @@ struct advance_forward<2> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; typedef iter2 type; }; }; @@ -45,9 +51,9 @@ struct advance_forward<3> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; - typedef typename iter2::next iter3; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; + typedef typename next<iter2>::type iter3; typedef iter3 type; }; }; @@ -58,10 +64,10 @@ struct advance_forward<4> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; - typedef typename iter2::next iter3; - typedef typename iter3::next iter4; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; + typedef typename next<iter2>::type iter3; + typedef typename next<iter3>::type iter4; typedef iter4 type; }; }; @@ -71,12 +77,21 @@ struct advance_forward { template< typename Iterator > struct apply { - typedef typename apply1< advance_forward<4>,Iterator >::type chunk_result_; - typedef typename apply1<advance_forward<( (N - 4) < 0 ? 0 : N - 4 )>,chunk_result_>::type type; + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/and.hpp b/include/boost/mpl/aux_/preprocessed/bcc/and.hpp index 9f6982a..010ad1f 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/and.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/and.hpp @@ -1,5 +1,13 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { @@ -33,8 +41,8 @@ struct and_impl< } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ @@ -48,15 +56,14 @@ struct and_ BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ - , (T1, T2, T3, T4, T5) + , ( T1, T2, T3, T4, T5) ) }; -BOOST_MPL_AUX_VOID_SPEC_EXT( +BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) -}} // namespace boost::mpl - +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/apply.hpp b/include/boost/mpl/aux_/preprocessed/bcc/apply.hpp index 4bcd50d..e08eacc 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/apply.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/apply.hpp @@ -1,500 +1,161 @@ -// preprocessed version of 'boost/mpl/apply.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename F, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ + typename F > -struct apply; +struct apply0 -template< typename F > -struct apply0 : F + : apply_wrap0< + typename lambda<F>::type + + > { - static int const arity = 1; typedef F arg1; - friend class apply0_rebind; - typedef apply0_rebind rebind; - }; - class apply0_rebind { public: template< typename U1 > struct apply { typedef typename apply0<U1>::type type; - }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) }; template< typename F > -struct apply< F,void_,void_,void_,void_,void_ > +struct apply< F,na,na,na,na,na > : apply0<F> { }; -namespace aux { -template< - int N, typename F, typename T1 - > -struct apply_impl1; -} - -namespace aux { - -template< - typename F, typename T1 - > -struct apply_impl1< - 1 - , F - , T1 - > -{ - typedef typename F::template apply< - T1 - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1 - > -struct apply_impl1< - 2 - , F - , T1 - > -{ - typedef typename F::template apply< - T1 - , void_ - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1 - > -struct apply_impl1< - 3 - , F - , T1 - > -{ - typedef typename F::template apply< - T1 - , void_, void_ - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1 - > -struct apply_impl1< - 4 - , F - , T1 - > -{ - typedef typename F::template apply< - T1 - , void_, void_, void_ - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1 - > -struct apply_impl1< - 5 - , F - , T1 - > -{ - typedef typename F::template apply< - T1 - , void_, void_, void_, void_ - > type; -}; - -} // namespace aux - template< typename F, typename T1 > struct apply1 - : aux::apply_impl1< - ::boost::mpl::aux::arity< F,1 >::value - , F + + : apply_wrap1< + typename lambda<F>::type , T1 - >::type + > { - static int const arity = 2; typedef F arg1; - typedef T1 arg2; - friend class apply1_rebind; - typedef apply1_rebind rebind; - }; - class apply1_rebind { public: template< typename U1, typename U2 > struct apply { typedef typename apply1< U1,U2 >::type type; - }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) }; template< typename F, typename T1 > -struct apply< F,T1,void_,void_,void_,void_ > +struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; -namespace aux { -template< - int N, typename F, typename T1, typename T2 - > -struct apply_impl2; -} - -namespace aux { - -template< - typename F, typename T1, typename T2 - > -struct apply_impl2< - 2 - , F - , T1, T2 - > -{ - typedef typename F::template apply< - T1, T2 - - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1, typename T2 - > -struct apply_impl2< - 3 - , F - , T1, T2 - > -{ - typedef typename F::template apply< - T1, T2 - , void_ - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1, typename T2 - > -struct apply_impl2< - 4 - , F - , T1, T2 - > -{ - typedef typename F::template apply< - T1, T2 - , void_, void_ - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1, typename T2 - > -struct apply_impl2< - 5 - , F - , T1, T2 - > -{ - typedef typename F::template apply< - T1, T2 - , void_, void_, void_ - > type; -}; - -} // namespace aux - template< typename F, typename T1, typename T2 > struct apply2 - : aux::apply_impl2< - ::boost::mpl::aux::arity< F,2 >::value - , F + + : apply_wrap2< + typename lambda<F>::type , T1, T2 - >::type + > { - static int const arity = 3; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - friend class apply2_rebind; - typedef apply2_rebind rebind; - }; - class apply2_rebind { public: template< typename U1, typename U2, typename U3 > struct apply { typedef typename apply2< U1,U2,U3 >::type type; - }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) }; template< typename F, typename T1, typename T2 > -struct apply< F,T1,T2,void_,void_,void_ > +struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; -namespace aux { -template< - int N, typename F, typename T1, typename T2, typename T3 - > -struct apply_impl3; -} - -namespace aux { - -template< - typename F, typename T1, typename T2, typename T3 - > -struct apply_impl3< - 3 - , F - , T1, T2, T3 - > -{ - typedef typename F::template apply< - T1, T2, T3 - - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1, typename T2, typename T3 - > -struct apply_impl3< - 4 - , F - , T1, T2, T3 - > -{ - typedef typename F::template apply< - T1, T2, T3 - , void_ - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1, typename T2, typename T3 - > -struct apply_impl3< - 5 - , F - , T1, T2, T3 - > -{ - typedef typename F::template apply< - T1, T2, T3 - , void_, void_ - > type; -}; - -} // namespace aux - template< typename F, typename T1, typename T2, typename T3 > struct apply3 - : aux::apply_impl3< - ::boost::mpl::aux::arity< F,3 >::value - , F + + : apply_wrap3< + typename lambda<F>::type , T1, T2, T3 - >::type + > { - static int const arity = 4; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - typedef T3 arg4; - friend class apply3_rebind; - typedef apply3_rebind rebind; - }; - class apply3_rebind { public: template< typename U1, typename U2, typename U3, typename U4 > struct apply { typedef typename apply3< U1,U2,U3,U4 >::type type; - }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) }; template< typename F, typename T1, typename T2, typename T3 > -struct apply< F,T1,T2,T3,void_,void_ > +struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; -namespace aux { -template< - int N, typename F, typename T1, typename T2, typename T3, typename T4 - > -struct apply_impl4; -} - -namespace aux { - -template< - typename F, typename T1, typename T2, typename T3, typename T4 - > -struct apply_impl4< - 4 - , F - , T1, T2, T3, T4 - > -{ - typedef typename F::template apply< - T1, T2, T3, T4 - - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1, typename T2, typename T3, typename T4 - > -struct apply_impl4< - 5 - , F - , T1, T2, T3, T4 - > -{ - typedef typename F::template apply< - T1, T2, T3, T4 - , void_ - > type; -}; - -} // namespace aux - template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 - : aux::apply_impl4< - ::boost::mpl::aux::arity< F,4 >::value - , F + + : apply_wrap4< + typename lambda<F>::type , T1, T2, T3, T4 - >::type + > { - static int const arity = 5; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - typedef T3 arg4; - typedef T4 arg5; - friend class apply4_rebind; - typedef apply4_rebind rebind; - }; - class apply4_rebind { public: template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef typename apply4< U1,U2,U3,U4,U5 >::type type; - }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) }; template< typename F, typename T1, typename T2, typename T3, typename T4 > -struct apply< F,T1,T2,T3,T4,void_ > +struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; -namespace aux { -template< - int N, typename F, typename T1, typename T2, typename T3, typename T4 - , typename T5 - > -struct apply_impl5; -} - -namespace aux { - -template< - typename F, typename T1, typename T2, typename T3, typename T4 - , typename T5 - > -struct apply_impl5< - 5 - , F - , T1, T2, T3, T4, T5 - > -{ - typedef typename F::template apply< - T1, T2, T3, T4, T5 - - > type; -}; - -} // namespace aux - template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 - : aux::apply_impl5< - ::boost::mpl::aux::arity< F,5 >::value - , F + + : apply_wrap5< + typename lambda<F>::type , T1, T2, T3, T4, T5 - >::type + > { - static int const arity = 6; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - typedef T3 arg4; - typedef T4 arg5; - typedef T5 arg6; - friend class apply5_rebind; - typedef apply5_rebind rebind; - }; - class apply5_rebind { public: template< typename U1, typename U2, typename U3, typename U4, typename U5, typename U6 > struct apply { typedef typename apply5< U1,U2,U3,U4,U5,U6 >::type type; - }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) }; -// primary template (not a specialization!) +/// primary template (not a specialization!) + template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 @@ -504,6 +165,5 @@ struct apply { }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/apply_fwd.hpp b/include/boost/mpl/aux_/preprocessed/bcc/apply_fwd.hpp new file mode 100644 index 0000000..bd50b89 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/bcc/apply_wrap.hpp b/include/boost/mpl/aux_/preprocessed/bcc/apply_wrap.hpp new file mode 100644 index 0000000..baeda39 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/apply_wrap.hpp @@ -0,0 +1,456 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + int N, typename F + > +struct apply_wrap_impl0; + +template< + typename F + > +struct apply_wrap_impl0< + 0 + , F + + > +{ + typedef typename F::template apply< + +/// since the defaults are "lost", we have to pass *something* even for nullary +/// metafunction classes + na + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 1 + , F + + > +{ + typedef typename F::template apply< + + na + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 2 + , F + + > +{ + typedef typename F::template apply< + + na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 3 + , F + + > +{ + typedef typename F::template apply< + + na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 4 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 5 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap0 + : apply_wrap_impl0< + ::boost::mpl::aux::arity< F,0 >::value + , F + + >::type +{ +}; + +template< + int N, typename F, typename T1 + > +struct apply_wrap_impl1; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 1 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 2 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 3 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 4 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 5 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap1 + : apply_wrap_impl1< + ::boost::mpl::aux::arity< F,1 >::value + , F + , T1 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2 + > +struct apply_wrap_impl2; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 2 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 3 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 4 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 5 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap2 + : apply_wrap_impl2< + ::boost::mpl::aux::arity< F,2 >::value + , F + , T1, T2 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 3 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 4 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 5 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap3 + : apply_wrap_impl3< + ::boost::mpl::aux::arity< F,3 >::value + , F + , T1, T2, T3 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 4 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 5 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap4 + : apply_wrap_impl4< + ::boost::mpl::aux::arity< F,4 >::value + , F + , T1, T2, T3, T4 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5< + 5 + , F + , T1, T2, T3, T4, T5 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4, T5 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap5 + : apply_wrap_impl5< + ::boost::mpl::aux::arity< F,5 >::value + , F + , T1, T2, T3, T4, T5 + >::type +{ +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/bcc/arg.hpp b/include/boost/mpl/aux_/preprocessed/bcc/arg.hpp index 499b58f..d346d4d 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/arg.hpp @@ -1,13 +1,21 @@ -// preprocessed version of 'boost/mpl/arg.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-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) +// -template<> struct arg<-1> +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > { static int const value = -1; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 @@ -15,6 +23,7 @@ template<> struct arg<-1> struct apply { typedef U1 type; + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -22,7 +31,8 @@ template<> struct arg<1> { static int const value = 1; typedef arg<2> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 @@ -30,6 +40,7 @@ template<> struct arg<1> struct apply { typedef U1 type; + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -37,7 +48,8 @@ template<> struct arg<2> { static int const value = 2; typedef arg<3> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 @@ -45,6 +57,7 @@ template<> struct arg<2> struct apply { typedef U2 type; + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -52,7 +65,8 @@ template<> struct arg<3> { static int const value = 3; typedef arg<4> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 @@ -60,6 +74,7 @@ template<> struct arg<3> struct apply { typedef U3 type; + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -67,7 +82,8 @@ template<> struct arg<4> { static int const value = 4; typedef arg<5> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 @@ -75,6 +91,7 @@ template<> struct arg<4> struct apply { typedef U4 type; + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -82,7 +99,8 @@ template<> struct arg<5> { static int const value = 5; typedef arg<6> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 @@ -90,11 +108,10 @@ template<> struct arg<5> struct apply { typedef U5 type; + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; -BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1, int, arg) - -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/include/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp index f393b0b..a84603c 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp @@ -1,11 +1,16 @@ -// preprocessed version of 'boost/mpl/bind.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-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) +// -BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) -BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { @@ -18,43 +23,15 @@ struct resolve_bind_arg typedef T type; }; -} // namespace aux -template< typename F, typename T > struct bind1st; -template< typename F, typename T > struct bind2nd; - -namespace aux { - template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > -struct resolve_bind_arg< arg<N>,U1,U2,U3,U4,U5 > +struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 > { - typedef typename apply5<mpl::arg< N>,U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind1st<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind1st< F,T > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind2nd<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind2nd< F,T > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type; }; } // namespace aux -BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) -BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) template< typename F @@ -70,7 +47,10 @@ struct bind0 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: - typedef typename apply0<f_>::type type; + typedef typename apply_wrap0< + f_ + >::type type; + }; }; @@ -81,11 +61,11 @@ template< , typename U5 > struct resolve_bind_arg< - bind0<F>,U1, U2, U3, U4, U5 + bind0<F>, U1, U2, U3, U4, U5 > { typedef bind0<F> f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -104,10 +84,14 @@ struct bind1 { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: - typedef typename apply1< f_,t1 >::type type; + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + }; }; @@ -118,11 +102,11 @@ template< , typename U4, typename U5 > struct resolve_bind_arg< - bind1< F,T1 >,U1, U2, U3, U4, U5 + bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -141,11 +125,15 @@ struct bind2 { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: - typedef typename apply2< f_,t1,t2 >::type type; + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + }; }; @@ -156,11 +144,11 @@ template< , typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind2< F,T1,T2 >,U1, U2, U3, U4, U5 + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -179,12 +167,16 @@ struct bind3 { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: - typedef typename apply3< f_,t1,t2,t3 >::type type; + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + }; }; @@ -195,11 +187,11 @@ template< , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind3< F,T1,T2,T3 >,U1, U2, U3, U4, U5 + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -218,13 +210,18 @@ struct bind4 { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; - typedef typename aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 >::type t4; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: - typedef typename apply4< f_,t1,t2,t3,t4 >::type type; + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + }; }; @@ -235,11 +232,11 @@ template< , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind4< F,T1,T2,T3,T4 >,U1, U2, U3, U4, U5 + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -259,14 +256,19 @@ struct bind5 { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; - typedef typename aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 >::type t4; - typedef typename aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 >::type t5; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: - typedef typename apply5< f_,t1,t2,t3,t4,t5 >::type type; + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + }; }; @@ -278,43 +280,15 @@ template< , typename U5 > struct resolve_bind_arg< - bind5< F,T1,T2,T3,T4,T5 >,U1, U2, U3, U4, U5 + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) - -template< typename F, typename T > -struct bind1st -{ - template< - typename U - , typename U2, typename U3, typename U4, typename U5 - > - struct apply - : apply2< F,T,U > - { - }; -}; - -template< typename F, typename T > -struct bind2nd -{ - template< - typename U - , typename U2, typename U3, typename U4, typename U5 - > - struct apply - : apply2< F,U,T > - { - }; -}; - -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/bind.hpp b/include/boost/mpl/aux_/preprocessed/bcc/bind.hpp index 835b850..1d166e2 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/bind.hpp @@ -1,11 +1,16 @@ -// preprocessed version of 'boost/mpl/bind.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-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) +// -BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) -BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { @@ -24,56 +29,28 @@ template< > struct replace_unnamed_arg { - typedef Arg next_arg; + typedef Arg next; typedef T type; }; template< typename Arg > -struct replace_unnamed_arg< arg<-1>,Arg > +struct replace_unnamed_arg< arg< -1 >, Arg > { - typedef typename Arg::next next_arg; + typedef typename Arg::next next; typedef Arg type; }; -} // namespace aux -template< typename F, typename T > struct bind1st; -template< typename F, typename T > struct bind2nd; - -namespace aux { - template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > -struct resolve_bind_arg< arg<N>,U1,U2,U3,U4,U5 > +struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 > { - typedef typename apply5<mpl::arg< N>,U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind1st<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind1st< F,T > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind2nd<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind2nd< F,T > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type; }; } // namespace aux -BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) -BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) template< typename F @@ -86,13 +63,16 @@ struct bind0 struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// public: - typedef typename apply0<f_>::type type; + typedef typename apply_wrap0< + f_ + >::type type; + }; }; @@ -103,11 +83,11 @@ template< , typename U5 > struct resolve_bind_arg< - bind0<F>,U1, U2, U3, U4, U5 + bind0<F>, U1, U2, U3, U4, U5 > { typedef bind0<F> f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -125,18 +105,22 @@ struct bind1 struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// public: - typedef typename apply1< f_,t1 >::type type; + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + }; }; @@ -147,11 +131,11 @@ template< , typename U4, typename U5 > struct resolve_bind_arg< - bind1< F,T1 >,U1, U2, U3, U4, U5 + bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -169,23 +153,27 @@ struct bind2 struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// public: - typedef typename apply2< f_,t1,t2 >::type type; + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + }; }; @@ -196,11 +184,11 @@ template< , typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind2< F,T1,T2 >,U1, U2, U3, U4, U5 + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -218,28 +206,32 @@ struct bind3 struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// public: - typedef typename apply3< f_,t1,t2,t3 >::type type; + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + }; }; @@ -250,11 +242,11 @@ template< , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind3< F,T1,T2,T3 >,U1, U2, U3, U4, U5 + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -272,33 +264,38 @@ struct bind4 struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; - typedef typename r4::next_arg n5; - typedef typename aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 >::type t4; - + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// public: - typedef typename apply4< f_,t1,t2,t3,t4 >::type type; + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + }; }; @@ -309,11 +306,11 @@ template< , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind4< F,T1,T2,T3,T4 >,U1, U2, U3, U4, U5 + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -332,38 +329,43 @@ struct bind5 struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; - typedef typename r4::next_arg n5; - typedef typename aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 >::type t4; - + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; - typedef typename r5::next_arg n6; - typedef typename aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 >::type t5; - + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// public: - typedef typename apply5< f_,t1,t2,t3,t4,t5 >::type type; + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + }; }; @@ -375,43 +377,15 @@ template< , typename U5 > struct resolve_bind_arg< - bind5< F,T1,T2,T3,T4,T5 >,U1, U2, U3, U4, U5 + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) - -template< typename F, typename T > -struct bind1st -{ - template< - typename U - , typename U2, typename U3, typename U4, typename U5 - > - struct apply - : apply2< F,T,U > - { - }; -}; - -template< typename F, typename T > -struct bind2nd -{ - template< - typename U - , typename U2, typename U3, typename U4, typename U5 - > - struct apply - : apply2< F,U,T > - { - }; -}; - -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/bind_fwd.hpp b/include/boost/mpl/aux_/preprocessed/bcc/bind_fwd.hpp new file mode 100644 index 0000000..21e6a93 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/bind_fwd.hpp @@ -0,0 +1,46 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/bcc/bitand.hpp b/include/boost/mpl/aux_/preprocessed/bcc/bitand.hpp new file mode 100644 index 0000000..642f042 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/bitand.hpp @@ -0,0 +1,144 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag<N1>::type + , typename bitand_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/bitor.hpp b/include/boost/mpl/aux_/preprocessed/bcc/bitor.hpp new file mode 100644 index 0000000..4ccbe89 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/bitor.hpp @@ -0,0 +1,144 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag<N1>::type + , typename bitor_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/bitxor.hpp b/include/boost/mpl/aux_/preprocessed/bcc/bitxor.hpp new file mode 100644 index 0000000..73b519e --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/bitxor.hpp @@ -0,0 +1,144 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag<N1>::type + , typename bitxor_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/divides.hpp b/include/boost/mpl/aux_/preprocessed/bcc/divides.hpp new file mode 100644 index 0000000..c963f62 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/divides.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag<N1>::type + , typename divides_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/equal_to.hpp b/include/boost/mpl/aux_/preprocessed/bcc/equal_to.hpp new file mode 100644 index 0000000..bb051d6 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/equal_to.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + : equal_to_impl< + typename equal_to_tag<N1>::type + , typename equal_to_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/bcc/fold_backward_impl.hpp deleted file mode 100644 index b95ff53..0000000 --- a/include/boost/mpl/aux_/preprocessed/bcc/fold_backward_impl.hpp +++ /dev/null @@ -1,297 +0,0 @@ -// preprocessed version of 'boost/mpl/aux_/fold_backward_impl.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { -namespace aux { - -// forward declaration -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl; - -template< long N > -struct fold_backward_chunk; - -template<> -struct fold_backward_chunk<0> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef fwd_state0 bkwd_state0; - typedef bkwd_state0 state; - typedef iter0 iterator; - }; - -}; - -template<> -struct fold_backward_chunk<1> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - - - typedef fwd_state1 bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - typedef bkwd_state0 state; - typedef iter1 iterator; - }; - -}; - -template<> -struct fold_backward_chunk<2> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - - - typedef fwd_state2 bkwd_state2; - typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter2 iterator; - }; - -}; - -template<> -struct fold_backward_chunk<3> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename apply2<ForwardOp, fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - - - typedef fwd_state3 bkwd_state3; - typedef typename apply2<BackwardOp, bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter3 iterator; - }; - -}; - -template<> -struct fold_backward_chunk<4> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename apply2<ForwardOp, fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename apply2<ForwardOp, fwd_state3, typename iter3::type>::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fwd_state4 bkwd_state4; - typedef typename apply2<BackwardOp, bkwd_state4, typename iter3::type>::type bkwd_state3; - typedef typename apply2<BackwardOp, bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter4 iterator; - }; - -}; - -template< long N > -struct fold_backward_chunk -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename apply2<ForwardOp, fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename apply2<ForwardOp, fwd_state3, typename iter3::type>::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fold_backward_impl< - ( (N - 4) < 0 ? 0 : N - 4 ) - , iter4 - , Last - , fwd_state4 - , BackwardOp - , ForwardOp - > nested_chunk; - - typedef typename nested_chunk::state bkwd_state4; - typedef typename apply2<BackwardOp, bkwd_state4, typename iter3::type>::type bkwd_state3; - typedef typename apply2<BackwardOp, bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef typename nested_chunk::iterator iterator; - }; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_step; - -template< - typename Last - , typename State - > -struct fold_backward_null_step -{ - typedef Last iterator; - typedef State state; -}; - -template<> -struct fold_backward_chunk< -1 > -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef typename if_< - typename is_same< First,Last >::type - , fold_backward_null_step< Last,State > - , fold_backward_step< First,Last,State,BackwardOp,ForwardOp > - >::type res_; - - typedef typename res_::state state; - typedef typename res_::iterator iterator; - }; - -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_step -{ - typedef fold_backward_chunk< -1 >::template result_< - typename First::next - , Last - , typename apply2<ForwardOp, State, typename First::type>::type - , BackwardOp - , ForwardOp - > nested_step; - - typedef typename apply2<BackwardOp, typename nested_step::state, typename First::type>::type state; - typedef typename nested_step::iterator iterator; -}; - -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl - : fold_backward_chunk<N> - ::template result_< First,Last,State,BackwardOp,ForwardOp > -{ -}; - -} // namespace aux -} // namespace mpl -} // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp index 3888a91..00c2e55 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp @@ -1,56 +1,180 @@ -// preprocessed version of 'boost/mpl/aux_/fold_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration -// forward declaration template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct fold_impl; template< - long N + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; + typedef typename next<iter2>::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4; + typedef typename next<iter3>::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct fold_impl { typedef fold_impl< - -1 - , typename First::next + 4 + , First , Last - , typename apply2<ForwardOp, State, typename First::type>::type + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; - typedef state type; }; template< - long N + typename First , typename Last , typename State , typename ForwardOp - > -struct fold_impl< N,Last,Last,State,ForwardOp > + > +struct fold_impl< -1,First,Last,State,ForwardOp > + : fold_impl< + -1 + , typename next<First>::type + , Last + , typename apply2<ForwardOp,State, typename deref<First>::type>::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; - typedef state type; }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp index 8e4af31..0675a24 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp @@ -1,30 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/full_lambda.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Aleksey Gurtovoy 2001-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) +// -template< - typename T - , typename Tag - , typename Protect = false_ - , typename Arity = int_< aux::template_arity<T>::value > - > -struct lambda_impl -{ - typedef false_ is_le; - typedef T type; -}; +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! -template< - typename T - , typename Tag = void_ - , typename Arity = int_< aux::template_arity<T>::value > - > -struct lambda - : lambda_impl< T,Tag,false_,Arity > -{ -}; +namespace boost { namespace mpl { namespace aux { @@ -45,44 +30,56 @@ struct lambda_or< false,false,false,false,false > } // namespace aux -template< int N, typename Tag, typename Protect > -struct lambda_impl< arg<N>,Tag,Protect,int_<-1> > +template< + typename T + , typename Tag + , typename Arity + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg<N>,Tag, int_< -1 > > { typedef true_ is_le; - typedef arg<N> type; + typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41 + typedef protect<result_> type; }; template< typename F , typename Tag - , typename Protect - > -struct lambda_impl< - bind0<F> - , Tag - , Protect, int_<1> > +struct lambda< + bind0<F> + , Tag + , int_<1> + > { typedef false_ is_le; typedef bind0< F - > type; -}; + > result_; -template< - template< typename P1 > class F - , typename T1 - , typename Tag - > -struct lambda< F<T1>,Tag,int_<1> > - : lambda_impl< F<T1>,Tag,true_,int_<1> > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > @@ -90,33 +87,24 @@ struct le_result1 { typedef F< typename L1::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1 > class F - , typename Tag + typename Tag + , template< typename P1 > class F , typename L1 > -struct le_result1< true_,Tag,false_,F,L1 > +struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > - , typename L1::type - > type; -}; + , typename L1::result_ + > result_; -template< - template< typename P1 > class F - , typename Tag - , typename L1 - > -struct le_result1< true_,Tag,true_,F,L1 > -{ - typedef protect< bind1< - quote1< F,Tag > - , typename L1::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -125,58 +113,50 @@ template< template< typename P1 > class F , typename T1 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1>,Tag,Protect,int_<1 > - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef aux::lambda_or< - l1::is_le::value - > is_le; - - typedef typename aux::le_result1< - typename is_le::type +struct lambda< + F<T1> , Tag - , Protect - , F - , l1 - >::type type; + , int_<1> + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag - , typename Protect - > -struct lambda_impl< - bind1< F,T1 > - , Tag - , Protect, int_<2> > +struct lambda< + bind1< F,T1 > + , Tag + , int_<2> + > { typedef false_ is_le; typedef bind1< F , T1 - > type; -}; + > result_; -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - , typename Tag - > -struct lambda< F<T1,T2>,Tag,int_<2> > - : lambda_impl< F<T1,T2>,Tag,true_,int_<2> > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > @@ -184,33 +164,24 @@ struct le_result2 { typedef F< typename L1::type, typename L2::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true_,Tag,false_,F,L1,L2 > +struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > - , typename L1::type, typename L2::type - > type; -}; + , typename L1::result_, typename L2::result_ + > result_; -template< - template< typename P1, typename P2 > class F - , typename Tag - , typename L1, typename L2 - > -struct le_result2< true_,Tag,true_,F,L1,L2 > -{ - typedef protect< bind2< - quote2< F,Tag > - , typename L1::type, typename L2::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -219,60 +190,55 @@ template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2>,Tag,Protect,int_<2 > - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value - > is_le; - - typedef typename aux::le_result2< - typename is_le::type +struct lambda< + F< T1,T2 > , Tag - , Protect - , F - , l1, l2 - >::type type; + , int_<2> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag - , typename Protect - > -struct lambda_impl< - bind2< F,T1,T2 > - , Tag - , Protect, int_<3> > +struct lambda< + bind2< F,T1,T2 > + , Tag + , int_<3> + > { typedef false_ is_le; typedef bind2< F , T1, T2 - > type; -}; + > result_; -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - , typename Tag - > -struct lambda< F<T1,T2,T3>,Tag,int_<3> > - : lambda_impl< F<T1,T2,T3>,Tag,true_,int_<3> > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > @@ -280,33 +246,24 @@ struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2, typename P3 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true_,Tag,false_,F,L1,L2,L3 > +struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; -template< - template< typename P1, typename P2, typename P3 > class F - , typename Tag - , typename L1, typename L2, typename L3 - > -struct le_result3< true_,Tag,true_,F,L1,L2,L3 > -{ - typedef protect< bind3< - quote3< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -315,61 +272,57 @@ template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3>,Tag,Protect,int_<3 > - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - > is_le; - - typedef typename aux::le_result3< - typename is_le::type +struct lambda< + F< T1,T2,T3 > , Tag - , Protect - , F - , l1, l2, l3 - >::type type; + , int_<3> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag - , typename Protect - > -struct lambda_impl< - bind3< F,T1,T2,T3 > - , Tag - , Protect, int_<4> > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + , int_<4> + > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 - > type; -}; + > result_; -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename T1, typename T2, typename T3, typename T4 - , typename Tag - > -struct lambda< F<T1,T2,T3,T4>,Tag,int_<4> > - : lambda_impl< F<T1,T2,T3,T4>,Tag,true_,int_<4> > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > @@ -378,35 +331,25 @@ struct le_result4 typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename Tag - , typename L1, typename L2, typename L3, typename L4 - > -struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 > -{ - typedef protect< bind4< - quote4< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -415,67 +358,59 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4>,Tag,Protect,int_<4 > - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - typedef lambda_impl< T4,Tag > l4; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - , l4::is_le::value - > is_le; - - typedef typename aux::le_result4< - typename is_le::type +struct lambda< + F< T1,T2,T3,T4 > , Tag - , Protect - , F - , l1, l2, l3, l4 - >::type type; + , int_<4> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag - , typename Protect - > -struct lambda_impl< - bind4< F,T1,T2,T3,T4 > - , Tag - , Protect, int_<5> > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + , int_<5> + > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 - > type; -}; + > result_; -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename T1, typename T2, typename T3, typename T4, typename T5 - , typename Tag - > -struct lambda< F<T1,T2,T3,T4,T5>,Tag,int_<5> > - : lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_,int_<5> > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > @@ -484,43 +419,25 @@ struct le_result5 typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type - > type; + > result_; + + typedef result_ type; }; template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type, typename L5::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename Tag - , typename L1, typename L2, typename L3, typename L4, typename L5 - > -struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 > -{ - typedef protect< bind5< - quote5< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type, typename L5::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -533,100 +450,109 @@ template< class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4,T5>,Tag,Protect,int_<5 > - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - typedef lambda_impl< T4,Tag > l4; - typedef lambda_impl< T5,Tag > l5; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - , l4::is_le::value, l5::is_le::value - > is_le; - - typedef typename aux::le_result5< - typename is_le::type +struct lambda< + F< T1,T2,T3,T4,T5 > , Tag - , Protect - , F - , l1, l2, l3, l4, l5 - >::type type; + , int_<5> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag - , typename Protect - > -struct lambda_impl< - bind5< F,T1,T2,T3,T4,T5 > - , Tag - , Protect, int_<6> > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 - > type; + > result_; + + typedef result_ type; }; -// special case for 'protect' -template< typename T, typename Tag, typename Protect > -struct lambda_impl< protect<T>,Tag,Protect,int_<1> > +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< protect<T>,Tag, int_<1> > { typedef false_ is_le; - typedef protect<T> type; + typedef protect<T> result_; + typedef result_ type; }; -// specializations for main 'bind', 'bind1st' and 'bind2nd' forms +/// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag - , typename Protect - > -struct lambda_impl< - bind< F,T1,T2,T3,T4,T5 > - , Tag - , Protect - , int_<6> > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > { typedef false_ is_le; - typedef bind< F,T1,T2,T3,T4,T5 > type; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; }; template< - typename F, typename T - , typename Tag - , typename Protect + typename F + , typename Tag1 + , typename Tag2 + , typename Arity > -struct lambda_impl< bind1st<F,T>,Tag,Protect,int_<2> > +struct lambda< + lambda< F,Tag1,Arity > + , Tag2 + , int_<3> + > { - typedef false_ is_le; - typedef bind1st< F,T > type; + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef bind1< quote1<aux::template_arity>, typename l1::result_ > arity_; + typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; + typedef aux::le_result3<is_le, Tag2, mpl::lambda, l1, l2, l3> le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; -template< - typename F, typename T - , typename Tag - , typename Protect - > -struct lambda_impl< bind2nd<F,T>,Tag,Protect,int_<2> > -{ - typedef false_ is_le; - typedef bind2nd< F,T > type; -}; +BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/greater.hpp b/include/boost/mpl/aux_/preprocessed/bcc/greater.hpp new file mode 100644 index 0000000..73bbaad --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/greater.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + : greater_impl< + typename greater_tag<N1>::type + , typename greater_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/greater_equal.hpp b/include/boost/mpl/aux_/preprocessed/bcc/greater_equal.hpp new file mode 100644 index 0000000..d52e43e --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/greater_equal.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + : greater_equal_impl< + typename greater_equal_tag<N1>::type + , typename greater_equal_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/inherit.hpp b/include/boost/mpl/aux_/preprocessed/bcc/inherit.hpp new file mode 100644 index 0000000..31ab0dc --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/inherit.hpp @@ -0,0 +1,139 @@ + +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1, typename T2, typename T3, typename T4, typename T5 + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/include/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp b/include/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp index 2d1b5d8..6951795 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp @@ -1,9 +1,16 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_if_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step @@ -55,7 +62,7 @@ struct iter_fold_if_forward_step typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator, State, ForwardOp, mpl::next< Iterator> > impl_; + >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; @@ -72,7 +79,7 @@ struct iter_fold_if_backward_step typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_; + >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; @@ -95,7 +102,7 @@ struct iter_fold_if_impl typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; - + typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< @@ -123,7 +130,4 @@ struct iter_fold_if_impl typedef typename backward_step4::iterator iterator; }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp index dd20784..c25f136 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp @@ -1,56 +1,180 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration -// forward declaration template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl; template< - long N + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename next<iter1>::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename next<iter2>::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename next<iter3>::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl { typedef iter_fold_impl< - -1 - , typename First::next + 4 + , First , Last - , typename apply2< ForwardOp,State,First >::type + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; - typedef state type; }; template< - long N + typename First , typename Last , typename State , typename ForwardOp - > -struct iter_fold_impl< N,Last,Last,State,ForwardOp > + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename next<First>::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; - typedef state type; }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/bcc/lambda_helper.hpp deleted file mode 100644 index 953d826..0000000 --- a/include/boost/mpl/aux_/preprocessed/bcc/lambda_helper.hpp +++ /dev/null @@ -1,120 +0,0 @@ -// preprocessed version of 'boost/mpl/lambda_helper.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { - -template< - template< typename P1 > class F - , typename T1 - > -struct lambda_helper1 -{ - struct rebind - { - static int const arity = 1; - typedef T1 arg1; - - template< typename U1 > struct apply - : F<U1> - { - }; - }; -}; - -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - > -struct lambda_helper2 -{ - struct rebind - { - static int const arity = 2; - typedef T1 arg1; - typedef T2 arg2; - - template< typename U1, typename U2 > struct apply - : F< U1,U2 > - { - }; - }; -}; - -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - > -struct lambda_helper3 -{ - struct rebind - { - static int const arity = 3; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - - template< typename U1, typename U2, typename U3 > struct apply - : F< U1,U2,U3 > - { - }; - }; -}; - -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename T1, typename T2, typename T3, typename T4 - > -struct lambda_helper4 -{ - struct rebind - { - static int const arity = 4; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - typedef T4 arg4; - - template< - typename U1, typename U2, typename U3, typename U4 - > - struct apply - : F< U1,U2,U3,U4 > - { - }; - }; -}; - -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename T1, typename T2, typename T3, typename T4, typename T5 - > -struct lambda_helper5 -{ - struct rebind - { - static int const arity = 5; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - typedef T4 arg4; - typedef T5 arg5; - - template< - typename U1, typename U2, typename U3, typename U4 - , typename U5 - > - struct apply - : F< U1,U2,U3,U4,U5 > - { - }; - }; -}; - -} // namespace mpl -} // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp index 4a02653..76d3f3f 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp @@ -1,182 +1,198 @@ -// preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { -template< int arity_, bool Protect > struct lambda_impl +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ { - template< typename T, typename Tag > struct result_ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; + typedef is_placeholder<T> is_le; }; }; -template<> struct lambda_impl<1, false> +template<> struct lambda_impl< int_<1> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + typedef bind1< - f_ - , arg1 - > type; + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<1, true> +template<> struct lambda_impl< int_<2> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef mpl::protect< bind1< - f_ - , arg1 - > > type; - }; -}; - -template<> struct lambda_impl<2, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; typedef bind2< - f_ - , arg1, arg2 - > type; + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<2, true> +template<> struct lambda_impl< int_<3> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; - typedef mpl::protect< bind2< - f_ - , arg1, arg2 - > > type; - }; -}; - -template<> struct lambda_impl<3, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; typedef bind3< - f_ - , arg1, arg2, arg3 - > type; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<3, true> +template<> struct lambda_impl< int_<4> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; - typedef mpl::protect< bind3< - f_ - , arg1, arg2, arg3 - > > type; - }; -}; - -template<> struct lambda_impl<4, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; typedef bind4< - f_ - , arg1, arg2, arg3, arg4 - > type; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<4, true> +template<> struct lambda_impl< int_<5> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; - typedef mpl::protect< bind4< - f_ - , arg1, arg2, arg3, arg4 - > > type; - }; -}; - -template<> struct lambda_impl<5, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - typedef typename lambda< typename F::arg5, Tag, false >::type arg5; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; typedef bind5< - f_ - , arg1, arg2, arg3, arg4, arg5 - > type; - }; -}; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; -template<> struct lambda_impl<5, true> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - typedef typename lambda< typename F::arg5, Tag, false >::type arg5; - + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; - typedef mpl::protect< bind5< - f_ - , arg1, arg2, arg3, arg4, arg5 - > > type; + typedef typename type_::type type; }; }; @@ -184,19 +200,30 @@ template<> struct lambda_impl<5, true> template< typename T - , typename Tag = void_ - , bool Protect = true + , typename Tag + , typename Protect > struct lambda - : aux::lambda_impl< - ::boost::mpl::aux::template_arity<T>::value +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity<T>::type arity_; + typedef typename aux::lambda_impl<arity_> + ::template result_< T,Tag,Protect > l_; - , Protect + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; - >::template result_< T,Tag > +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le { }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/less.hpp b/include/boost/mpl/aux_/preprocessed/bcc/less.hpp new file mode 100644 index 0000000..75997da --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/less.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + : less_impl< + typename less_tag<N1>::type + , typename less_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/less_equal.hpp b/include/boost/mpl/aux_/preprocessed/bcc/less_equal.hpp new file mode 100644 index 0000000..ed8aae1 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/less_equal.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + : less_equal_impl< + typename less_equal_tag<N1>::type + , typename less_equal_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/list.hpp b/include/boost/mpl/aux_/preprocessed/bcc/list.hpp index 1a89231..4e8ad53 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/list.hpp @@ -1,14 +1,23 @@ -// preprocessed version of 'boost/mpl/list.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T0 = void_, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - , typename T6 = void_, typename T7 = void_, typename T8 = void_ - , typename T9 = void_ + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na > struct list; @@ -16,8 +25,8 @@ template< > struct list< - void_, void_, void_, void_, void_, void_, void_, void_, void_ - , void_ + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : list0< > { @@ -28,7 +37,8 @@ template< typename T0 > struct list< - T0, void_, void_, void_, void_, void_, void_, void_, void_, void_ + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : list1<T0> { @@ -38,7 +48,10 @@ struct list< template< typename T0, typename T1 > -struct list< T0,T1,void_,void_,void_,void_,void_,void_,void_,void_ > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; @@ -47,7 +60,10 @@ struct list< T0,T1,void_,void_,void_,void_,void_,void_,void_,void_ > template< typename T0, typename T1, typename T2 > -struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; @@ -56,7 +72,10 @@ struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > template< typename T0, typename T1, typename T2, typename T3 > -struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; @@ -65,7 +84,10 @@ struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > template< typename T0, typename T1, typename T2, typename T3, typename T4 > -struct list< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; @@ -75,7 +97,10 @@ template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > -struct list< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; @@ -85,7 +110,10 @@ template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > -struct list< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; @@ -95,7 +123,10 @@ template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > -struct list< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; @@ -105,24 +136,188 @@ template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > -struct list< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; -// primary template (not a specialization!) - template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > -struct list +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { - typedef list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > type; + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/list_c.hpp b/include/boost/mpl/aux_/preprocessed/bcc/list_c.hpp index 9f0f872..0b48a7f 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/list_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/list_c.hpp @@ -1,25 +1,34 @@ -// preprocessed version of 'boost/mpl/list_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T - , long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX - , long C9 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T - > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c<T> { @@ -27,12 +36,12 @@ struct list_c< }; template< - typename T - , long C0 + typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { @@ -40,12 +49,12 @@ struct list_c< }; template< - typename T - , long C0, long C1 + typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { @@ -53,12 +62,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2 + typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { @@ -66,12 +75,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3 + typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { @@ -79,12 +88,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3, long C4 + typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { @@ -92,11 +101,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { @@ -104,48 +114,215 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 > -struct list_c< T,C0,C1,C2,C3,C4,C5,C6,LONG_MAX,LONG_MAX,LONG_MAX > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 > -struct list_c< T,C0,C1,C2,C3,C4,C5,C6,C7,LONG_MAX,LONG_MAX > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 > -struct list_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,LONG_MAX > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; -// primary template (not a specialization!) template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 > -struct list_c +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/map.hpp b/include/boost/mpl/aux_/preprocessed/bcc/map.hpp new file mode 100644 index 0000000..1503c72 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/map.hpp @@ -0,0 +1,323 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1<T0> +{ + typedef typename map1<T0>::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/bcc/minus.hpp b/include/boost/mpl/aux_/preprocessed/bcc/minus.hpp new file mode 100644 index 0000000..7439877 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/minus.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag<N1>::type + , typename minus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/modulus.hpp b/include/boost/mpl/aux_/preprocessed/bcc/modulus.hpp new file mode 100644 index 0000000..e99421b --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/modulus.hpp @@ -0,0 +1,97 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + : modulus_impl< + typename modulus_tag<N1>::type + , typename modulus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/not_equal_to.hpp b/include/boost/mpl/aux_/preprocessed/bcc/not_equal_to.hpp new file mode 100644 index 0000000..39af532 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/not_equal_to.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + : not_equal_to_impl< + typename not_equal_to_tag<N1>::type + , typename not_equal_to_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/or.hpp b/include/boost/mpl/aux_/preprocessed/bcc/or.hpp index 517fbdf..31e1aaa 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/or.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/or.hpp @@ -1,5 +1,13 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { @@ -33,8 +41,8 @@ struct or_impl< } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ @@ -48,15 +56,14 @@ struct or_ BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ - , (T1, T2, T3, T4, T5) + , ( T1, T2, T3, T4, T5) ) }; -BOOST_MPL_AUX_VOID_SPEC_EXT( +BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) -}} // namespace boost::mpl - +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/placeholders.hpp b/include/boost/mpl/aux_/preprocessed/bcc/placeholders.hpp index 8c17ad3..4cb7d7d 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/placeholders.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/placeholders.hpp @@ -1,54 +1,78 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Aleksey Gurtovoy 2001-2003 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; -namespace placeholders { -using boost::mpl::_; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_) -// agurt, 17/mar/02: one more placeholder for the last 'apply#' -// specialization +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +}}} +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; -namespace placeholders { -using boost::mpl::_1; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_1) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; -namespace placeholders { -using boost::mpl::_2; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_2) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; -namespace placeholders { -using boost::mpl::_3; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_3) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; -namespace placeholders { -using boost::mpl::_4; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_4) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; -namespace placeholders { -using boost::mpl::_5; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_5) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; -namespace placeholders { -using boost::mpl::_6; -} - -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_6) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +}}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/plus.hpp b/include/boost/mpl/aux_/preprocessed/bcc/plus.hpp new file mode 100644 index 0000000..489dd41 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/plus.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag<N1>::type + , typename plus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/quote.hpp b/include/boost/mpl/aux_/preprocessed/bcc/quote.hpp index 902c44e..e7a7f00 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/quote.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/quote.hpp @@ -1,3 +1,11 @@ -// preprocessed version of 'boost/mpl/quote.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! diff --git a/include/boost/mpl/aux_/preprocessed/bcc/reverse_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/bcc/reverse_fold_impl.hpp new file mode 100644 index 0000000..9f6512a --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/reverse_fold_impl.hpp @@ -0,0 +1,295 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/Attic/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< long N > +struct reverse_fold_chunk; + +template<> struct reverse_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename iter3::type >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename iter3::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename iter3::type >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename iter3::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step; + +template< + typename Last + , typename State + > +struct reverse_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_fold_null_step< Last,State > + , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step +{ + typedef reverse_fold_chunk< -1 >::template result_< + typename next<First>::type + , Last + , typename apply2<ForwardOp,State, typename First::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename First::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl + : reverse_fold_chunk<N> + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/iter_fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/bcc/reverse_iter_fold_impl.hpp similarity index 74% rename from include/boost/mpl/aux_/preprocessed/bcc551/iter_fold_backward_impl.hpp rename to include/boost/mpl/aux_/preprocessed/bcc/reverse_iter_fold_impl.hpp index 02f6ccb..1429a5b 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/iter_fold_backward_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/reverse_iter_fold_impl.hpp @@ -1,11 +1,18 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_backward_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/Attic/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration -// forward declaration template< long N , typename First @@ -13,14 +20,13 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > -struct iter_fold_backward_impl; + > +struct reverse_iter_fold_impl; template< long N > -struct iter_fold_backward_chunk; +struct reverse_iter_fold_chunk; -template<> -struct iter_fold_backward_chunk<0> +template<> struct reverse_iter_fold_chunk<0> { template< typename First @@ -37,11 +43,9 @@ struct iter_fold_backward_chunk<0> typedef bkwd_state0 state; typedef iter0 iterator; }; - }; -template<> -struct iter_fold_backward_chunk<1> +template<> struct reverse_iter_fold_chunk<1> { template< typename First @@ -55,7 +59,7 @@ struct iter_fold_backward_chunk<1> typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef fwd_state1 bkwd_state1; @@ -63,11 +67,9 @@ struct iter_fold_backward_chunk<1> typedef bkwd_state0 state; typedef iter1 iterator; }; - }; -template<> -struct iter_fold_backward_chunk<2> +template<> struct reverse_iter_fold_chunk<2> { template< typename First @@ -81,9 +83,9 @@ struct iter_fold_backward_chunk<2> typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef fwd_state2 bkwd_state2; @@ -94,11 +96,9 @@ struct iter_fold_backward_chunk<2> typedef bkwd_state0 state; typedef iter2 iterator; }; - }; -template<> -struct iter_fold_backward_chunk<3> +template<> struct reverse_iter_fold_chunk<3> { template< typename First @@ -112,11 +112,11 @@ struct iter_fold_backward_chunk<3> typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; + typedef typename next<iter2>::type iter3; typedef fwd_state3 bkwd_state3; @@ -128,11 +128,9 @@ struct iter_fold_backward_chunk<3> typedef bkwd_state0 state; typedef iter3 iterator; }; - }; -template<> -struct iter_fold_backward_chunk<4> +template<> struct reverse_iter_fold_chunk<4> { template< typename First @@ -146,13 +144,13 @@ struct iter_fold_backward_chunk<4> typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; + typedef typename next<iter2>::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; - typedef typename iter3::next iter4; + typedef typename next<iter3>::type iter4; typedef fwd_state4 bkwd_state4; @@ -165,11 +163,10 @@ struct iter_fold_backward_chunk<4> typedef bkwd_state0 state; typedef iter4 iterator; }; - }; -template< long N > -struct iter_fold_backward_chunk +template< long N > +struct reverse_iter_fold_chunk { template< typename First @@ -177,22 +174,22 @@ struct iter_fold_backward_chunk , typename State , typename BackwardOp , typename ForwardOp - > + > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; + typedef typename next<iter2>::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; - typedef typename iter3::next iter4; + typedef typename next<iter3>::type iter4; - typedef iter_fold_backward_impl< + typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last @@ -200,7 +197,7 @@ struct iter_fold_backward_chunk , BackwardOp , ForwardOp > nested_chunk; - + typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; @@ -219,21 +216,21 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > -struct iter_fold_backward_step; + > +struct reverse_iter_fold_step; template< typename Last , typename State > -struct iter_fold_backward_null_step +struct reverse_iter_fold_null_step { typedef Last iterator; typedef State state; }; -template<> -struct iter_fold_backward_chunk< -1 > +template<> +struct reverse_iter_fold_chunk< -1 > { template< typename First @@ -241,19 +238,18 @@ struct iter_fold_backward_chunk< -1 > , typename State , typename BackwardOp , typename ForwardOp - > + > struct result_ { typedef typename if_< typename is_same< First,Last >::type - , iter_fold_backward_null_step< Last,State > - , iter_fold_backward_step< First,Last,State,BackwardOp,ForwardOp > + , reverse_iter_fold_null_step< Last,State > + , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; - }; template< @@ -262,18 +258,23 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > -struct iter_fold_backward_step + > +struct reverse_iter_fold_step { - typedef iter_fold_backward_chunk< -1 >::template result_< - typename First::next + typedef reverse_iter_fold_chunk< -1 >::template result_< + typename next<First>::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; - typedef typename apply2<BackwardOp, typename nested_step::state, First>::type state; + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + typedef typename nested_step::iterator iterator; }; @@ -284,14 +285,11 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > -struct iter_fold_backward_impl - : iter_fold_backward_chunk<N> + > +struct reverse_iter_fold_impl + : reverse_iter_fold_chunk<N> ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/set.hpp b/include/boost/mpl/aux_/preprocessed/bcc/set.hpp new file mode 100644 index 0000000..6c4ae6f --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/set.hpp @@ -0,0 +1,323 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1<T0> +{ + typedef typename set1<T0>::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/bcc/shift_left.hpp b/include/boost/mpl/aux_/preprocessed/bcc/shift_left.hpp new file mode 100644 index 0000000..c11fe41 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/shift_left.hpp @@ -0,0 +1,95 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + : shift_left_impl< + typename shift_left_tag<N1>::type + , typename shift_left_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename Shift > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(Shift)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/shift_right.hpp b/include/boost/mpl/aux_/preprocessed/bcc/shift_right.hpp new file mode 100644 index 0000000..5867998 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/shift_right.hpp @@ -0,0 +1,95 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + : shift_right_impl< + typename shift_right_tag<N1>::type + , typename shift_right_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename Shift > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(Shift)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/bcc/template_arity.hpp index f87f8ba..3303b57 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/template_arity.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/template_arity.hpp @@ -1,5 +1,13 @@ -// preprocessed version of 'boost/mpl/aux_/template_arity.hpp' header -// see the original for copyright information + +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { @@ -7,8 +15,8 @@ template< bool > struct template_arity_impl { template< typename F > struct result_ + : int_< -1 > { - static int const value = -1; }; }; @@ -16,9 +24,8 @@ template<> struct template_arity_impl<true> { template< typename F > struct result_ + : F::arity { - enum { value = F::arity }; - }; }; @@ -29,5 +36,5 @@ struct template_arity { }; -}}} // namespace boost::mpl::aux +}}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/times.hpp b/include/boost/mpl/aux_/preprocessed/bcc/times.hpp new file mode 100644 index 0000000..a6c3949 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/times.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag<N1>::type + , typename times_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/unpack_args.hpp b/include/boost/mpl/aux_/preprocessed/bcc/unpack_args.hpp new file mode 100644 index 0000000..583e7b7 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/unpack_args.hpp @@ -0,0 +1,97 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + { + typedef typename aux::unpack_args_impl< + size<Args>::value + , F + , Args + >::type type; + + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/bcc/vector.hpp b/include/boost/mpl/aux_/preprocessed/bcc/vector.hpp index 35aaadf..bfa9565 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/vector.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/vector.hpp @@ -1,129 +1,323 @@ -// preprocessed version of 'boost/mpl/vector.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T0 = void_, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - , typename T6 = void_, typename T7 = void_, typename T8 = void_ - , typename T9 = void_ + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na > struct vector; template< - + > struct vector< - void_, void_, void_, void_, void_, void_, void_, void_, void_ - , void_ + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : vector0< > { - typedef vector0< > type; + typedef vector0< >::type type; }; template< typename T0 > struct vector< - T0, void_, void_, void_, void_, void_, void_, void_, void_, void_ + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : vector1<T0> { - typedef vector1<T0> type; + typedef typename vector1<T0>::type type; }; template< typename T0, typename T1 > struct vector< - T0, T1, void_, void_, void_, void_, void_, void_, void_, void_ + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : vector2< T0,T1 > { - typedef vector2< T0,T1 > type; + typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > -struct vector< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector3< T0,T1,T2 > { - typedef vector3< T0,T1,T2 > type; + typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > -struct vector< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector4< T0,T1,T2,T3 > { - typedef vector4< T0,T1,T2,T3 > type; + typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > -struct vector< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector5< T0,T1,T2,T3,T4 > { - typedef vector5< T0,T1,T2,T3,T4 > type; + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > -struct vector< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector6< T0,T1,T2,T3,T4,T5 > { - typedef vector6< T0,T1,T2,T3,T4,T5 > type; + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > -struct vector< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector7< T0,T1,T2,T3,T4,T5,T6 > { - typedef vector7< T0,T1,T2,T3,T4,T5,T6 > type; + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > -struct vector< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { - typedef vector8< T0,T1,T2,T3,T4,T5,T6,T7 > type; + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > -struct vector< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { - typedef vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > type; + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; -// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > -struct vector +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { - typedef vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > type; + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/vector_c.hpp b/include/boost/mpl/aux_/preprocessed/bcc/vector_c.hpp index ff6be1a..840c2e1 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/vector_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/vector_c.hpp @@ -1,153 +1,328 @@ -// preprocessed version of 'boost/mpl/vector_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T - , long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX - , long C9 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T - > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c<T> { - typedef vector0_c<T> type; + typedef typename vector0_c<T>::type type; }; template< - typename T - , long C0 + typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T,C0 > { - typedef vector1_c< T,C0 > type; + typedef typename vector1_c< T,C0 >::type type; }; template< - typename T - , long C0, long C1 + typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T,C0,C1 > { - typedef vector2_c< T,C0,C1 > type; + typedef typename vector2_c< T,C0,C1 >::type type; }; template< - typename T - , long C0, long C1, long C2 + typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T,C0,C1,C2 > { - typedef vector3_c< T,C0,C1,C2 > type; + typedef typename vector3_c< T,C0,C1,C2 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3 + typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T,C0,C1,C2,C3 > { - typedef vector4_c< T,C0,C1,C2,C3 > type; + typedef typename vector4_c< T,C0,C1,C2,C3 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4 + typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T,C0,C1,C2,C3,C4 > { - typedef vector5_c< T,C0,C1,C2,C3,C4 > type; + typedef typename vector5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T,C0,C1,C2,C3,C4,C5 > { - typedef vector6_c< T,C0,C1,C2,C3,C4,C5 > type; + typedef typename vector6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T,C0,C1,C2,C3,C4,C5,C6 > { - typedef vector7_c< T,C0,C1,C2,C3,C4,C5,C6 > type; + typedef typename vector7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 > -struct vector_c< T,C0,C1,C2,C3,C4,C5,C6,C7,LONG_MAX,LONG_MAX > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > : vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { - typedef vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > type; + typedef typename vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 > -struct vector_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,LONG_MAX > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { - typedef vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > type; + typedef typename vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; -// primary template (not a specialization!) template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 > -struct vector_c +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { - typedef vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > type; + typedef typename vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename vector11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename vector12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename vector13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename vector14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename vector15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename vector16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename vector17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename vector18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename vector19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename vector20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/advance_backward.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/advance_backward.hpp index 16e576c..26de94c 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/advance_backward.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/advance_backward.hpp @@ -1,9 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/advance_backward.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> @@ -22,7 +28,7 @@ struct advance_backward<1> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; + typedef typename prior<iter0>::type iter1; typedef iter1 type; }; }; @@ -33,8 +39,8 @@ struct advance_backward<2> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; typedef iter2 type; }; }; @@ -45,9 +51,9 @@ struct advance_backward<3> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; - typedef typename iter2::prior iter3; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; + typedef typename prior<iter2>::type iter3; typedef iter3 type; }; }; @@ -58,10 +64,10 @@ struct advance_backward<4> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; - typedef typename iter2::prior iter3; - typedef typename iter3::prior iter4; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; + typedef typename prior<iter2>::type iter3; + typedef typename prior<iter3>::type iter4; typedef iter4 type; }; }; @@ -71,12 +77,21 @@ struct advance_backward { template< typename Iterator > struct apply { - typedef typename apply1< advance_backward<4>,Iterator >::type chunk_result_; - typedef typename apply1<advance_backward<( (N - 4) < 0 ? 0 : N - 4 )>,chunk_result_>::type type; + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/advance_forward.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/advance_forward.hpp index e6840b7..b137cc7 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/advance_forward.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/advance_forward.hpp @@ -1,9 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/advance_forward.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> @@ -22,7 +28,7 @@ struct advance_forward<1> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef iter1 type; }; }; @@ -33,8 +39,8 @@ struct advance_forward<2> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; typedef iter2 type; }; }; @@ -45,9 +51,9 @@ struct advance_forward<3> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; - typedef typename iter2::next iter3; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; + typedef typename next<iter2>::type iter3; typedef iter3 type; }; }; @@ -58,10 +64,10 @@ struct advance_forward<4> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; - typedef typename iter2::next iter3; - typedef typename iter3::next iter4; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; + typedef typename next<iter2>::type iter3; + typedef typename next<iter3>::type iter4; typedef iter4 type; }; }; @@ -71,12 +77,21 @@ struct advance_forward { template< typename Iterator > struct apply { - typedef typename apply1< advance_forward<4>,Iterator >::type chunk_result_; - typedef typename apply1<advance_forward<( (N - 4) < 0 ? 0 : N - 4 )>,chunk_result_>::type type; + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/and.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/and.hpp index 9f6982a..010ad1f 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/and.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/and.hpp @@ -1,5 +1,13 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { @@ -33,8 +41,8 @@ struct and_impl< } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ @@ -48,15 +56,14 @@ struct and_ BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ - , (T1, T2, T3, T4, T5) + , ( T1, T2, T3, T4, T5) ) }; -BOOST_MPL_AUX_VOID_SPEC_EXT( +BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) -}} // namespace boost::mpl - +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/apply.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/apply.hpp index 4bcd50d..e08eacc 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/apply.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/apply.hpp @@ -1,500 +1,161 @@ -// preprocessed version of 'boost/mpl/apply.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename F, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ + typename F > -struct apply; +struct apply0 -template< typename F > -struct apply0 : F + : apply_wrap0< + typename lambda<F>::type + + > { - static int const arity = 1; typedef F arg1; - friend class apply0_rebind; - typedef apply0_rebind rebind; - }; - class apply0_rebind { public: template< typename U1 > struct apply { typedef typename apply0<U1>::type type; - }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) }; template< typename F > -struct apply< F,void_,void_,void_,void_,void_ > +struct apply< F,na,na,na,na,na > : apply0<F> { }; -namespace aux { -template< - int N, typename F, typename T1 - > -struct apply_impl1; -} - -namespace aux { - -template< - typename F, typename T1 - > -struct apply_impl1< - 1 - , F - , T1 - > -{ - typedef typename F::template apply< - T1 - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1 - > -struct apply_impl1< - 2 - , F - , T1 - > -{ - typedef typename F::template apply< - T1 - , void_ - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1 - > -struct apply_impl1< - 3 - , F - , T1 - > -{ - typedef typename F::template apply< - T1 - , void_, void_ - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1 - > -struct apply_impl1< - 4 - , F - , T1 - > -{ - typedef typename F::template apply< - T1 - , void_, void_, void_ - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1 - > -struct apply_impl1< - 5 - , F - , T1 - > -{ - typedef typename F::template apply< - T1 - , void_, void_, void_, void_ - > type; -}; - -} // namespace aux - template< typename F, typename T1 > struct apply1 - : aux::apply_impl1< - ::boost::mpl::aux::arity< F,1 >::value - , F + + : apply_wrap1< + typename lambda<F>::type , T1 - >::type + > { - static int const arity = 2; typedef F arg1; - typedef T1 arg2; - friend class apply1_rebind; - typedef apply1_rebind rebind; - }; - class apply1_rebind { public: template< typename U1, typename U2 > struct apply { typedef typename apply1< U1,U2 >::type type; - }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) }; template< typename F, typename T1 > -struct apply< F,T1,void_,void_,void_,void_ > +struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; -namespace aux { -template< - int N, typename F, typename T1, typename T2 - > -struct apply_impl2; -} - -namespace aux { - -template< - typename F, typename T1, typename T2 - > -struct apply_impl2< - 2 - , F - , T1, T2 - > -{ - typedef typename F::template apply< - T1, T2 - - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1, typename T2 - > -struct apply_impl2< - 3 - , F - , T1, T2 - > -{ - typedef typename F::template apply< - T1, T2 - , void_ - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1, typename T2 - > -struct apply_impl2< - 4 - , F - , T1, T2 - > -{ - typedef typename F::template apply< - T1, T2 - , void_, void_ - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1, typename T2 - > -struct apply_impl2< - 5 - , F - , T1, T2 - > -{ - typedef typename F::template apply< - T1, T2 - , void_, void_, void_ - > type; -}; - -} // namespace aux - template< typename F, typename T1, typename T2 > struct apply2 - : aux::apply_impl2< - ::boost::mpl::aux::arity< F,2 >::value - , F + + : apply_wrap2< + typename lambda<F>::type , T1, T2 - >::type + > { - static int const arity = 3; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - friend class apply2_rebind; - typedef apply2_rebind rebind; - }; - class apply2_rebind { public: template< typename U1, typename U2, typename U3 > struct apply { typedef typename apply2< U1,U2,U3 >::type type; - }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) }; template< typename F, typename T1, typename T2 > -struct apply< F,T1,T2,void_,void_,void_ > +struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; -namespace aux { -template< - int N, typename F, typename T1, typename T2, typename T3 - > -struct apply_impl3; -} - -namespace aux { - -template< - typename F, typename T1, typename T2, typename T3 - > -struct apply_impl3< - 3 - , F - , T1, T2, T3 - > -{ - typedef typename F::template apply< - T1, T2, T3 - - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1, typename T2, typename T3 - > -struct apply_impl3< - 4 - , F - , T1, T2, T3 - > -{ - typedef typename F::template apply< - T1, T2, T3 - , void_ - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1, typename T2, typename T3 - > -struct apply_impl3< - 5 - , F - , T1, T2, T3 - > -{ - typedef typename F::template apply< - T1, T2, T3 - , void_, void_ - > type; -}; - -} // namespace aux - template< typename F, typename T1, typename T2, typename T3 > struct apply3 - : aux::apply_impl3< - ::boost::mpl::aux::arity< F,3 >::value - , F + + : apply_wrap3< + typename lambda<F>::type , T1, T2, T3 - >::type + > { - static int const arity = 4; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - typedef T3 arg4; - friend class apply3_rebind; - typedef apply3_rebind rebind; - }; - class apply3_rebind { public: template< typename U1, typename U2, typename U3, typename U4 > struct apply { typedef typename apply3< U1,U2,U3,U4 >::type type; - }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) }; template< typename F, typename T1, typename T2, typename T3 > -struct apply< F,T1,T2,T3,void_,void_ > +struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; -namespace aux { -template< - int N, typename F, typename T1, typename T2, typename T3, typename T4 - > -struct apply_impl4; -} - -namespace aux { - -template< - typename F, typename T1, typename T2, typename T3, typename T4 - > -struct apply_impl4< - 4 - , F - , T1, T2, T3, T4 - > -{ - typedef typename F::template apply< - T1, T2, T3, T4 - - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1, typename T2, typename T3, typename T4 - > -struct apply_impl4< - 5 - , F - , T1, T2, T3, T4 - > -{ - typedef typename F::template apply< - T1, T2, T3, T4 - , void_ - > type; -}; - -} // namespace aux - template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 - : aux::apply_impl4< - ::boost::mpl::aux::arity< F,4 >::value - , F + + : apply_wrap4< + typename lambda<F>::type , T1, T2, T3, T4 - >::type + > { - static int const arity = 5; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - typedef T3 arg4; - typedef T4 arg5; - friend class apply4_rebind; - typedef apply4_rebind rebind; - }; - class apply4_rebind { public: template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef typename apply4< U1,U2,U3,U4,U5 >::type type; - }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) }; template< typename F, typename T1, typename T2, typename T3, typename T4 > -struct apply< F,T1,T2,T3,T4,void_ > +struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; -namespace aux { -template< - int N, typename F, typename T1, typename T2, typename T3, typename T4 - , typename T5 - > -struct apply_impl5; -} - -namespace aux { - -template< - typename F, typename T1, typename T2, typename T3, typename T4 - , typename T5 - > -struct apply_impl5< - 5 - , F - , T1, T2, T3, T4, T5 - > -{ - typedef typename F::template apply< - T1, T2, T3, T4, T5 - - > type; -}; - -} // namespace aux - template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 - : aux::apply_impl5< - ::boost::mpl::aux::arity< F,5 >::value - , F + + : apply_wrap5< + typename lambda<F>::type , T1, T2, T3, T4, T5 - >::type + > { - static int const arity = 6; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - typedef T3 arg4; - typedef T4 arg5; - typedef T5 arg6; - friend class apply5_rebind; - typedef apply5_rebind rebind; - }; - class apply5_rebind { public: template< typename U1, typename U2, typename U3, typename U4, typename U5, typename U6 > struct apply { typedef typename apply5< U1,U2,U3,U4,U5,U6 >::type type; - }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) }; -// primary template (not a specialization!) +/// primary template (not a specialization!) + template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 @@ -504,6 +165,5 @@ struct apply { }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/apply_fwd.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/apply_fwd.hpp new file mode 100644 index 0000000..bd50b89 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/apply_wrap.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/apply_wrap.hpp new file mode 100644 index 0000000..baeda39 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/apply_wrap.hpp @@ -0,0 +1,456 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + int N, typename F + > +struct apply_wrap_impl0; + +template< + typename F + > +struct apply_wrap_impl0< + 0 + , F + + > +{ + typedef typename F::template apply< + +/// since the defaults are "lost", we have to pass *something* even for nullary +/// metafunction classes + na + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 1 + , F + + > +{ + typedef typename F::template apply< + + na + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 2 + , F + + > +{ + typedef typename F::template apply< + + na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 3 + , F + + > +{ + typedef typename F::template apply< + + na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 4 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 5 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap0 + : apply_wrap_impl0< + ::boost::mpl::aux::arity< F,0 >::value + , F + + >::type +{ +}; + +template< + int N, typename F, typename T1 + > +struct apply_wrap_impl1; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 1 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 2 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 3 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 4 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 5 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap1 + : apply_wrap_impl1< + ::boost::mpl::aux::arity< F,1 >::value + , F + , T1 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2 + > +struct apply_wrap_impl2; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 2 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 3 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 4 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 5 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap2 + : apply_wrap_impl2< + ::boost::mpl::aux::arity< F,2 >::value + , F + , T1, T2 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 3 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 4 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 5 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap3 + : apply_wrap_impl3< + ::boost::mpl::aux::arity< F,3 >::value + , F + , T1, T2, T3 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 4 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 5 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap4 + : apply_wrap_impl4< + ::boost::mpl::aux::arity< F,4 >::value + , F + , T1, T2, T3, T4 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5< + 5 + , F + , T1, T2, T3, T4, T5 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4, T5 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap5 + : apply_wrap_impl5< + ::boost::mpl::aux::arity< F,5 >::value + , F + , T1, T2, T3, T4, T5 + >::type +{ +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/arg.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/arg.hpp index 5df26b5..4e404a6 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/arg.hpp @@ -1,21 +1,30 @@ -// preprocessed version of 'boost/mpl/arg.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-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) +// -template<> struct arg<-1> +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > { static int const value = -1; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -23,15 +32,17 @@ template<> struct arg<1> { static int const value = 1; typedef arg<2> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -39,15 +50,17 @@ template<> struct arg<2> { static int const value = 2; typedef arg<3> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -55,15 +68,17 @@ template<> struct arg<3> { static int const value = 3; typedef arg<4> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -71,15 +86,17 @@ template<> struct arg<4> { static int const value = 4; typedef arg<5> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -87,20 +104,20 @@ template<> struct arg<5> { static int const value = 5; typedef arg<6> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; -BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1, int, arg) - -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp index 5ac97c3..613bac3 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp @@ -1,11 +1,16 @@ -// preprocessed version of 'boost/mpl/bind.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-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) +// -BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) -BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { @@ -18,43 +23,15 @@ struct resolve_bind_arg typedef T type; }; -} // namespace aux -template< typename F, typename T > struct bind1st; -template< typename F, typename T > struct bind2nd; - -namespace aux { - template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > -struct resolve_bind_arg< arg<N>,U1,U2,U3,U4,U5 > +struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 > { - typedef typename apply5<mpl::arg< N>,U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind1st<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind1st< F,T > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind2nd<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind2nd< F,T > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type; }; } // namespace aux -BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) -BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) template< typename F @@ -62,8 +39,8 @@ template< struct bind0 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { @@ -71,7 +48,10 @@ struct bind0 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: - typedef typename apply0<f_>::type type; + typedef typename apply_wrap0< + f_ + >::type type; + }; }; @@ -82,11 +62,11 @@ template< , typename U5 > struct resolve_bind_arg< - bind0<F>,U1, U2, U3, U4, U5 + bind0<F>, U1, U2, U3, U4, U5 > { typedef bind0<F> f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -99,17 +79,21 @@ template< struct bind1 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: - typedef typename apply1< f_,t1 >::type type; + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + }; }; @@ -120,11 +104,11 @@ template< , typename U4, typename U5 > struct resolve_bind_arg< - bind1< F,T1 >,U1, U2, U3, U4, U5 + bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -137,18 +121,22 @@ template< struct bind2 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: - typedef typename apply2< f_,t1,t2 >::type type; + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + }; }; @@ -159,11 +147,11 @@ template< , typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind2< F,T1,T2 >,U1, U2, U3, U4, U5 + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -176,19 +164,23 @@ template< struct bind3 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: - typedef typename apply3< f_,t1,t2,t3 >::type type; + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + }; }; @@ -199,11 +191,11 @@ template< , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind3< F,T1,T2,T3 >,U1, U2, U3, U4, U5 + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -216,20 +208,25 @@ template< struct bind4 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; - typedef typename aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 >::type t4; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: - typedef typename apply4< f_,t1,t2,t3,t4 >::type type; + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + }; }; @@ -240,11 +237,11 @@ template< , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind4< F,T1,T2,T3,T4 >,U1, U2, U3, U4, U5 + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -258,21 +255,26 @@ template< struct bind5 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; - typedef typename aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 >::type t4; - typedef typename aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 >::type t5; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: - typedef typename apply5< f_,t1,t2,t3,t4,t5 >::type type; + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + }; }; @@ -284,45 +286,15 @@ template< , typename U5 > struct resolve_bind_arg< - bind5< F,T1,T2,T3,T4,T5 >,U1, U2, U3, U4, U5 + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) - -template< typename F, typename T > -struct bind1st -{ - template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ - > - struct apply - : apply2< F,T,U > - { - }; -}; - -template< typename F, typename T > -struct bind2nd -{ - template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ - > - struct apply - : apply2< F,U,T > - { - }; -}; - -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/bind.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/bind.hpp index 324e77f..7e00536 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/bind.hpp @@ -1,11 +1,16 @@ -// preprocessed version of 'boost/mpl/bind.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-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) +// -BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) -BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { @@ -24,56 +29,28 @@ template< > struct replace_unnamed_arg { - typedef Arg next_arg; + typedef Arg next; typedef T type; }; template< typename Arg > -struct replace_unnamed_arg< arg<-1>,Arg > +struct replace_unnamed_arg< arg< -1 >, Arg > { - typedef typename Arg::next next_arg; + typedef typename Arg::next next; typedef Arg type; }; -} // namespace aux -template< typename F, typename T > struct bind1st; -template< typename F, typename T > struct bind2nd; - -namespace aux { - template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > -struct resolve_bind_arg< arg<N>,U1,U2,U3,U4,U5 > +struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 > { - typedef typename apply5<mpl::arg< N>,U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind1st<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind1st< F,T > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind2nd<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind2nd< F,T > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type; }; } // namespace aux -BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) -BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) template< typename F @@ -81,19 +58,22 @@ template< struct bind0 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// public: - typedef typename apply0<f_>::type type; + typedef typename apply_wrap0< + f_ + >::type type; + }; }; @@ -104,11 +84,11 @@ template< , typename U5 > struct resolve_bind_arg< - bind0<F>,U1, U2, U3, U4, U5 + bind0<F>, U1, U2, U3, U4, U5 > { typedef bind0<F> f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -121,24 +101,28 @@ template< struct bind1 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// public: - typedef typename apply1< f_,t1 >::type type; + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + }; }; @@ -149,11 +133,11 @@ template< , typename U4, typename U5 > struct resolve_bind_arg< - bind1< F,T1 >,U1, U2, U3, U4, U5 + bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -166,29 +150,33 @@ template< struct bind2 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// public: - typedef typename apply2< f_,t1,t2 >::type type; + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + }; }; @@ -199,11 +187,11 @@ template< , typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind2< F,T1,T2 >,U1, U2, U3, U4, U5 + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -216,34 +204,38 @@ template< struct bind3 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// public: - typedef typename apply3< f_,t1,t2,t3 >::type type; + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + }; }; @@ -254,11 +246,11 @@ template< , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind3< F,T1,T2,T3 >,U1, U2, U3, U4, U5 + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -271,39 +263,44 @@ template< struct bind4 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; - typedef typename r4::next_arg n5; - typedef typename aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 >::type t4; - + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// public: - typedef typename apply4< f_,t1,t2,t3,t4 >::type type; + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + }; }; @@ -314,11 +311,11 @@ template< , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind4< F,T1,T2,T3,T4 >,U1, U2, U3, U4, U5 + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -332,44 +329,49 @@ template< struct bind5 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; - typedef typename r4::next_arg n5; - typedef typename aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 >::type t4; - + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; - typedef typename r5::next_arg n6; - typedef typename aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 >::type t5; - + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// public: - typedef typename apply5< f_,t1,t2,t3,t4,t5 >::type type; + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + }; }; @@ -381,45 +383,15 @@ template< , typename U5 > struct resolve_bind_arg< - bind5< F,T1,T2,T3,T4,T5 >,U1, U2, U3, U4, U5 + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) - -template< typename F, typename T > -struct bind1st -{ - template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ - > - struct apply - : apply2< F,T,U > - { - }; -}; - -template< typename F, typename T > -struct bind2nd -{ - template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ - > - struct apply - : apply2< F,U,T > - { - }; -}; - -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/bind_fwd.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/bind_fwd.hpp new file mode 100644 index 0000000..21e6a93 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/bind_fwd.hpp @@ -0,0 +1,46 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/bitand.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/bitand.hpp new file mode 100644 index 0000000..642f042 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/bitand.hpp @@ -0,0 +1,144 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag<N1>::type + , typename bitand_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/bitor.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/bitor.hpp new file mode 100644 index 0000000..4ccbe89 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/bitor.hpp @@ -0,0 +1,144 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag<N1>::type + , typename bitor_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/bitxor.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/bitxor.hpp new file mode 100644 index 0000000..73b519e --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/bitxor.hpp @@ -0,0 +1,144 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag<N1>::type + , typename bitxor_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/divides.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/divides.hpp new file mode 100644 index 0000000..c963f62 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/divides.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag<N1>::type + , typename divides_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/equal_to.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/equal_to.hpp new file mode 100644 index 0000000..bb051d6 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/equal_to.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + : equal_to_impl< + typename equal_to_tag<N1>::type + , typename equal_to_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/fold_backward_impl.hpp deleted file mode 100644 index b95ff53..0000000 --- a/include/boost/mpl/aux_/preprocessed/bcc551/fold_backward_impl.hpp +++ /dev/null @@ -1,297 +0,0 @@ -// preprocessed version of 'boost/mpl/aux_/fold_backward_impl.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { -namespace aux { - -// forward declaration -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl; - -template< long N > -struct fold_backward_chunk; - -template<> -struct fold_backward_chunk<0> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef fwd_state0 bkwd_state0; - typedef bkwd_state0 state; - typedef iter0 iterator; - }; - -}; - -template<> -struct fold_backward_chunk<1> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - - - typedef fwd_state1 bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - typedef bkwd_state0 state; - typedef iter1 iterator; - }; - -}; - -template<> -struct fold_backward_chunk<2> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - - - typedef fwd_state2 bkwd_state2; - typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter2 iterator; - }; - -}; - -template<> -struct fold_backward_chunk<3> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename apply2<ForwardOp, fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - - - typedef fwd_state3 bkwd_state3; - typedef typename apply2<BackwardOp, bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter3 iterator; - }; - -}; - -template<> -struct fold_backward_chunk<4> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename apply2<ForwardOp, fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename apply2<ForwardOp, fwd_state3, typename iter3::type>::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fwd_state4 bkwd_state4; - typedef typename apply2<BackwardOp, bkwd_state4, typename iter3::type>::type bkwd_state3; - typedef typename apply2<BackwardOp, bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter4 iterator; - }; - -}; - -template< long N > -struct fold_backward_chunk -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename apply2<ForwardOp, fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename apply2<ForwardOp, fwd_state3, typename iter3::type>::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fold_backward_impl< - ( (N - 4) < 0 ? 0 : N - 4 ) - , iter4 - , Last - , fwd_state4 - , BackwardOp - , ForwardOp - > nested_chunk; - - typedef typename nested_chunk::state bkwd_state4; - typedef typename apply2<BackwardOp, bkwd_state4, typename iter3::type>::type bkwd_state3; - typedef typename apply2<BackwardOp, bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef typename nested_chunk::iterator iterator; - }; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_step; - -template< - typename Last - , typename State - > -struct fold_backward_null_step -{ - typedef Last iterator; - typedef State state; -}; - -template<> -struct fold_backward_chunk< -1 > -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef typename if_< - typename is_same< First,Last >::type - , fold_backward_null_step< Last,State > - , fold_backward_step< First,Last,State,BackwardOp,ForwardOp > - >::type res_; - - typedef typename res_::state state; - typedef typename res_::iterator iterator; - }; - -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_step -{ - typedef fold_backward_chunk< -1 >::template result_< - typename First::next - , Last - , typename apply2<ForwardOp, State, typename First::type>::type - , BackwardOp - , ForwardOp - > nested_step; - - typedef typename apply2<BackwardOp, typename nested_step::state, typename First::type>::type state; - typedef typename nested_step::iterator iterator; -}; - -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl - : fold_backward_chunk<N> - ::template result_< First,Last,State,BackwardOp,ForwardOp > -{ -}; - -} // namespace aux -} // namespace mpl -} // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/fold_impl.hpp index 3888a91..00c2e55 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/fold_impl.hpp @@ -1,56 +1,180 @@ -// preprocessed version of 'boost/mpl/aux_/fold_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration -// forward declaration template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct fold_impl; template< - long N + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; + typedef typename next<iter2>::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4; + typedef typename next<iter3>::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct fold_impl { typedef fold_impl< - -1 - , typename First::next + 4 + , First , Last - , typename apply2<ForwardOp, State, typename First::type>::type + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; - typedef state type; }; template< - long N + typename First , typename Last , typename State , typename ForwardOp - > -struct fold_impl< N,Last,Last,State,ForwardOp > + > +struct fold_impl< -1,First,Last,State,ForwardOp > + : fold_impl< + -1 + , typename next<First>::type + , Last + , typename apply2<ForwardOp,State, typename deref<First>::type>::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; - typedef state type; }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp index 8e4af31..0675a24 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp @@ -1,30 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/full_lambda.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Aleksey Gurtovoy 2001-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) +// -template< - typename T - , typename Tag - , typename Protect = false_ - , typename Arity = int_< aux::template_arity<T>::value > - > -struct lambda_impl -{ - typedef false_ is_le; - typedef T type; -}; +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! -template< - typename T - , typename Tag = void_ - , typename Arity = int_< aux::template_arity<T>::value > - > -struct lambda - : lambda_impl< T,Tag,false_,Arity > -{ -}; +namespace boost { namespace mpl { namespace aux { @@ -45,44 +30,56 @@ struct lambda_or< false,false,false,false,false > } // namespace aux -template< int N, typename Tag, typename Protect > -struct lambda_impl< arg<N>,Tag,Protect,int_<-1> > +template< + typename T + , typename Tag + , typename Arity + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg<N>,Tag, int_< -1 > > { typedef true_ is_le; - typedef arg<N> type; + typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41 + typedef protect<result_> type; }; template< typename F , typename Tag - , typename Protect - > -struct lambda_impl< - bind0<F> - , Tag - , Protect, int_<1> > +struct lambda< + bind0<F> + , Tag + , int_<1> + > { typedef false_ is_le; typedef bind0< F - > type; -}; + > result_; -template< - template< typename P1 > class F - , typename T1 - , typename Tag - > -struct lambda< F<T1>,Tag,int_<1> > - : lambda_impl< F<T1>,Tag,true_,int_<1> > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > @@ -90,33 +87,24 @@ struct le_result1 { typedef F< typename L1::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1 > class F - , typename Tag + typename Tag + , template< typename P1 > class F , typename L1 > -struct le_result1< true_,Tag,false_,F,L1 > +struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > - , typename L1::type - > type; -}; + , typename L1::result_ + > result_; -template< - template< typename P1 > class F - , typename Tag - , typename L1 - > -struct le_result1< true_,Tag,true_,F,L1 > -{ - typedef protect< bind1< - quote1< F,Tag > - , typename L1::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -125,58 +113,50 @@ template< template< typename P1 > class F , typename T1 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1>,Tag,Protect,int_<1 > - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef aux::lambda_or< - l1::is_le::value - > is_le; - - typedef typename aux::le_result1< - typename is_le::type +struct lambda< + F<T1> , Tag - , Protect - , F - , l1 - >::type type; + , int_<1> + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag - , typename Protect - > -struct lambda_impl< - bind1< F,T1 > - , Tag - , Protect, int_<2> > +struct lambda< + bind1< F,T1 > + , Tag + , int_<2> + > { typedef false_ is_le; typedef bind1< F , T1 - > type; -}; + > result_; -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - , typename Tag - > -struct lambda< F<T1,T2>,Tag,int_<2> > - : lambda_impl< F<T1,T2>,Tag,true_,int_<2> > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > @@ -184,33 +164,24 @@ struct le_result2 { typedef F< typename L1::type, typename L2::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true_,Tag,false_,F,L1,L2 > +struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > - , typename L1::type, typename L2::type - > type; -}; + , typename L1::result_, typename L2::result_ + > result_; -template< - template< typename P1, typename P2 > class F - , typename Tag - , typename L1, typename L2 - > -struct le_result2< true_,Tag,true_,F,L1,L2 > -{ - typedef protect< bind2< - quote2< F,Tag > - , typename L1::type, typename L2::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -219,60 +190,55 @@ template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2>,Tag,Protect,int_<2 > - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value - > is_le; - - typedef typename aux::le_result2< - typename is_le::type +struct lambda< + F< T1,T2 > , Tag - , Protect - , F - , l1, l2 - >::type type; + , int_<2> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag - , typename Protect - > -struct lambda_impl< - bind2< F,T1,T2 > - , Tag - , Protect, int_<3> > +struct lambda< + bind2< F,T1,T2 > + , Tag + , int_<3> + > { typedef false_ is_le; typedef bind2< F , T1, T2 - > type; -}; + > result_; -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - , typename Tag - > -struct lambda< F<T1,T2,T3>,Tag,int_<3> > - : lambda_impl< F<T1,T2,T3>,Tag,true_,int_<3> > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > @@ -280,33 +246,24 @@ struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2, typename P3 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true_,Tag,false_,F,L1,L2,L3 > +struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; -template< - template< typename P1, typename P2, typename P3 > class F - , typename Tag - , typename L1, typename L2, typename L3 - > -struct le_result3< true_,Tag,true_,F,L1,L2,L3 > -{ - typedef protect< bind3< - quote3< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -315,61 +272,57 @@ template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3>,Tag,Protect,int_<3 > - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - > is_le; - - typedef typename aux::le_result3< - typename is_le::type +struct lambda< + F< T1,T2,T3 > , Tag - , Protect - , F - , l1, l2, l3 - >::type type; + , int_<3> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag - , typename Protect - > -struct lambda_impl< - bind3< F,T1,T2,T3 > - , Tag - , Protect, int_<4> > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + , int_<4> + > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 - > type; -}; + > result_; -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename T1, typename T2, typename T3, typename T4 - , typename Tag - > -struct lambda< F<T1,T2,T3,T4>,Tag,int_<4> > - : lambda_impl< F<T1,T2,T3,T4>,Tag,true_,int_<4> > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > @@ -378,35 +331,25 @@ struct le_result4 typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename Tag - , typename L1, typename L2, typename L3, typename L4 - > -struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 > -{ - typedef protect< bind4< - quote4< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -415,67 +358,59 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4>,Tag,Protect,int_<4 > - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - typedef lambda_impl< T4,Tag > l4; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - , l4::is_le::value - > is_le; - - typedef typename aux::le_result4< - typename is_le::type +struct lambda< + F< T1,T2,T3,T4 > , Tag - , Protect - , F - , l1, l2, l3, l4 - >::type type; + , int_<4> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag - , typename Protect - > -struct lambda_impl< - bind4< F,T1,T2,T3,T4 > - , Tag - , Protect, int_<5> > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + , int_<5> + > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 - > type; -}; + > result_; -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename T1, typename T2, typename T3, typename T4, typename T5 - , typename Tag - > -struct lambda< F<T1,T2,T3,T4,T5>,Tag,int_<5> > - : lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_,int_<5> > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > @@ -484,43 +419,25 @@ struct le_result5 typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type - > type; + > result_; + + typedef result_ type; }; template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type, typename L5::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename Tag - , typename L1, typename L2, typename L3, typename L4, typename L5 - > -struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 > -{ - typedef protect< bind5< - quote5< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type, typename L5::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -533,100 +450,109 @@ template< class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4,T5>,Tag,Protect,int_<5 > - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - typedef lambda_impl< T4,Tag > l4; - typedef lambda_impl< T5,Tag > l5; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - , l4::is_le::value, l5::is_le::value - > is_le; - - typedef typename aux::le_result5< - typename is_le::type +struct lambda< + F< T1,T2,T3,T4,T5 > , Tag - , Protect - , F - , l1, l2, l3, l4, l5 - >::type type; + , int_<5> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag - , typename Protect - > -struct lambda_impl< - bind5< F,T1,T2,T3,T4,T5 > - , Tag - , Protect, int_<6> > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 - > type; + > result_; + + typedef result_ type; }; -// special case for 'protect' -template< typename T, typename Tag, typename Protect > -struct lambda_impl< protect<T>,Tag,Protect,int_<1> > +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< protect<T>,Tag, int_<1> > { typedef false_ is_le; - typedef protect<T> type; + typedef protect<T> result_; + typedef result_ type; }; -// specializations for main 'bind', 'bind1st' and 'bind2nd' forms +/// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag - , typename Protect - > -struct lambda_impl< - bind< F,T1,T2,T3,T4,T5 > - , Tag - , Protect - , int_<6> > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > { typedef false_ is_le; - typedef bind< F,T1,T2,T3,T4,T5 > type; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; }; template< - typename F, typename T - , typename Tag - , typename Protect + typename F + , typename Tag1 + , typename Tag2 + , typename Arity > -struct lambda_impl< bind1st<F,T>,Tag,Protect,int_<2> > +struct lambda< + lambda< F,Tag1,Arity > + , Tag2 + , int_<3> + > { - typedef false_ is_le; - typedef bind1st< F,T > type; + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef bind1< quote1<aux::template_arity>, typename l1::result_ > arity_; + typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; + typedef aux::le_result3<is_le, Tag2, mpl::lambda, l1, l2, l3> le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; -template< - typename F, typename T - , typename Tag - , typename Protect - > -struct lambda_impl< bind2nd<F,T>,Tag,Protect,int_<2> > -{ - typedef false_ is_le; - typedef bind2nd< F,T > type; -}; +BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/greater.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/greater.hpp new file mode 100644 index 0000000..73bbaad --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/greater.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + : greater_impl< + typename greater_tag<N1>::type + , typename greater_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/greater_equal.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/greater_equal.hpp new file mode 100644 index 0000000..d52e43e --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/greater_equal.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + : greater_equal_impl< + typename greater_equal_tag<N1>::type + , typename greater_equal_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/inherit.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/inherit.hpp new file mode 100644 index 0000000..00f31c4 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/inherit.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp index 2d1b5d8..6951795 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp @@ -1,9 +1,16 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_if_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step @@ -55,7 +62,7 @@ struct iter_fold_if_forward_step typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator, State, ForwardOp, mpl::next< Iterator> > impl_; + >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; @@ -72,7 +79,7 @@ struct iter_fold_if_backward_step typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_; + >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; @@ -95,7 +102,7 @@ struct iter_fold_if_impl typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; - + typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< @@ -123,7 +130,4 @@ struct iter_fold_if_impl typedef typename backward_step4::iterator iterator; }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/iter_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/iter_fold_impl.hpp index dd20784..c25f136 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/iter_fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/iter_fold_impl.hpp @@ -1,56 +1,180 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration -// forward declaration template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl; template< - long N + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename next<iter1>::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename next<iter2>::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename next<iter3>::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl { typedef iter_fold_impl< - -1 - , typename First::next + 4 + , First , Last - , typename apply2< ForwardOp,State,First >::type + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; - typedef state type; }; template< - long N + typename First , typename Last , typename State , typename ForwardOp - > -struct iter_fold_impl< N,Last,Last,State,ForwardOp > + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename next<First>::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; - typedef state type; }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/lambda_helper.hpp deleted file mode 100644 index 953d826..0000000 --- a/include/boost/mpl/aux_/preprocessed/bcc551/lambda_helper.hpp +++ /dev/null @@ -1,120 +0,0 @@ -// preprocessed version of 'boost/mpl/lambda_helper.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { - -template< - template< typename P1 > class F - , typename T1 - > -struct lambda_helper1 -{ - struct rebind - { - static int const arity = 1; - typedef T1 arg1; - - template< typename U1 > struct apply - : F<U1> - { - }; - }; -}; - -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - > -struct lambda_helper2 -{ - struct rebind - { - static int const arity = 2; - typedef T1 arg1; - typedef T2 arg2; - - template< typename U1, typename U2 > struct apply - : F< U1,U2 > - { - }; - }; -}; - -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - > -struct lambda_helper3 -{ - struct rebind - { - static int const arity = 3; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - - template< typename U1, typename U2, typename U3 > struct apply - : F< U1,U2,U3 > - { - }; - }; -}; - -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename T1, typename T2, typename T3, typename T4 - > -struct lambda_helper4 -{ - struct rebind - { - static int const arity = 4; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - typedef T4 arg4; - - template< - typename U1, typename U2, typename U3, typename U4 - > - struct apply - : F< U1,U2,U3,U4 > - { - }; - }; -}; - -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename T1, typename T2, typename T3, typename T4, typename T5 - > -struct lambda_helper5 -{ - struct rebind - { - static int const arity = 5; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - typedef T4 arg4; - typedef T5 arg5; - - template< - typename U1, typename U2, typename U3, typename U4 - , typename U5 - > - struct apply - : F< U1,U2,U3,U4,U5 > - { - }; - }; -}; - -} // namespace mpl -} // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp index 4a02653..76d3f3f 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp @@ -1,182 +1,198 @@ -// preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { -template< int arity_, bool Protect > struct lambda_impl +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ { - template< typename T, typename Tag > struct result_ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; + typedef is_placeholder<T> is_le; }; }; -template<> struct lambda_impl<1, false> +template<> struct lambda_impl< int_<1> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + typedef bind1< - f_ - , arg1 - > type; + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<1, true> +template<> struct lambda_impl< int_<2> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef mpl::protect< bind1< - f_ - , arg1 - > > type; - }; -}; - -template<> struct lambda_impl<2, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; typedef bind2< - f_ - , arg1, arg2 - > type; + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<2, true> +template<> struct lambda_impl< int_<3> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; - typedef mpl::protect< bind2< - f_ - , arg1, arg2 - > > type; - }; -}; - -template<> struct lambda_impl<3, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; typedef bind3< - f_ - , arg1, arg2, arg3 - > type; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<3, true> +template<> struct lambda_impl< int_<4> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; - typedef mpl::protect< bind3< - f_ - , arg1, arg2, arg3 - > > type; - }; -}; - -template<> struct lambda_impl<4, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; typedef bind4< - f_ - , arg1, arg2, arg3, arg4 - > type; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<4, true> +template<> struct lambda_impl< int_<5> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; - typedef mpl::protect< bind4< - f_ - , arg1, arg2, arg3, arg4 - > > type; - }; -}; - -template<> struct lambda_impl<5, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - typedef typename lambda< typename F::arg5, Tag, false >::type arg5; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; typedef bind5< - f_ - , arg1, arg2, arg3, arg4, arg5 - > type; - }; -}; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; -template<> struct lambda_impl<5, true> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - typedef typename lambda< typename F::arg5, Tag, false >::type arg5; - + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; - typedef mpl::protect< bind5< - f_ - , arg1, arg2, arg3, arg4, arg5 - > > type; + typedef typename type_::type type; }; }; @@ -184,19 +200,30 @@ template<> struct lambda_impl<5, true> template< typename T - , typename Tag = void_ - , bool Protect = true + , typename Tag + , typename Protect > struct lambda - : aux::lambda_impl< - ::boost::mpl::aux::template_arity<T>::value +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity<T>::type arity_; + typedef typename aux::lambda_impl<arity_> + ::template result_< T,Tag,Protect > l_; - , Protect + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; - >::template result_< T,Tag > +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le { }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/less.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/less.hpp new file mode 100644 index 0000000..75997da --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/less.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + : less_impl< + typename less_tag<N1>::type + , typename less_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/less_equal.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/less_equal.hpp new file mode 100644 index 0000000..ed8aae1 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/less_equal.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + : less_equal_impl< + typename less_equal_tag<N1>::type + , typename less_equal_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/list.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/list.hpp index 1a89231..4e8ad53 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/list.hpp @@ -1,14 +1,23 @@ -// preprocessed version of 'boost/mpl/list.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T0 = void_, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - , typename T6 = void_, typename T7 = void_, typename T8 = void_ - , typename T9 = void_ + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na > struct list; @@ -16,8 +25,8 @@ template< > struct list< - void_, void_, void_, void_, void_, void_, void_, void_, void_ - , void_ + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : list0< > { @@ -28,7 +37,8 @@ template< typename T0 > struct list< - T0, void_, void_, void_, void_, void_, void_, void_, void_, void_ + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : list1<T0> { @@ -38,7 +48,10 @@ struct list< template< typename T0, typename T1 > -struct list< T0,T1,void_,void_,void_,void_,void_,void_,void_,void_ > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; @@ -47,7 +60,10 @@ struct list< T0,T1,void_,void_,void_,void_,void_,void_,void_,void_ > template< typename T0, typename T1, typename T2 > -struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; @@ -56,7 +72,10 @@ struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > template< typename T0, typename T1, typename T2, typename T3 > -struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; @@ -65,7 +84,10 @@ struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > template< typename T0, typename T1, typename T2, typename T3, typename T4 > -struct list< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; @@ -75,7 +97,10 @@ template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > -struct list< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; @@ -85,7 +110,10 @@ template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > -struct list< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; @@ -95,7 +123,10 @@ template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > -struct list< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; @@ -105,24 +136,188 @@ template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > -struct list< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; -// primary template (not a specialization!) - template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > -struct list +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { - typedef list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > type; + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/list_c.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/list_c.hpp index 9f0f872..0b48a7f 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/list_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/list_c.hpp @@ -1,25 +1,34 @@ -// preprocessed version of 'boost/mpl/list_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T - , long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX - , long C9 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T - > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c<T> { @@ -27,12 +36,12 @@ struct list_c< }; template< - typename T - , long C0 + typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { @@ -40,12 +49,12 @@ struct list_c< }; template< - typename T - , long C0, long C1 + typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { @@ -53,12 +62,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2 + typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { @@ -66,12 +75,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3 + typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { @@ -79,12 +88,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3, long C4 + typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { @@ -92,11 +101,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { @@ -104,48 +114,215 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 > -struct list_c< T,C0,C1,C2,C3,C4,C5,C6,LONG_MAX,LONG_MAX,LONG_MAX > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 > -struct list_c< T,C0,C1,C2,C3,C4,C5,C6,C7,LONG_MAX,LONG_MAX > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 > -struct list_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,LONG_MAX > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; -// primary template (not a specialization!) template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 > -struct list_c +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/map.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/map.hpp new file mode 100644 index 0000000..1503c72 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/map.hpp @@ -0,0 +1,323 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1<T0> +{ + typedef typename map1<T0>::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/minus.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/minus.hpp new file mode 100644 index 0000000..7439877 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/minus.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag<N1>::type + , typename minus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/modulus.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/modulus.hpp new file mode 100644 index 0000000..e99421b --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/modulus.hpp @@ -0,0 +1,97 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + : modulus_impl< + typename modulus_tag<N1>::type + , typename modulus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/not_equal_to.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/not_equal_to.hpp new file mode 100644 index 0000000..39af532 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/not_equal_to.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + : not_equal_to_impl< + typename not_equal_to_tag<N1>::type + , typename not_equal_to_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/or.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/or.hpp index 517fbdf..31e1aaa 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/or.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/or.hpp @@ -1,5 +1,13 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { @@ -33,8 +41,8 @@ struct or_impl< } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ @@ -48,15 +56,14 @@ struct or_ BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ - , (T1, T2, T3, T4, T5) + , ( T1, T2, T3, T4, T5) ) }; -BOOST_MPL_AUX_VOID_SPEC_EXT( +BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) -}} // namespace boost::mpl - +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/placeholders.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/placeholders.hpp index 8c17ad3..4cb7d7d 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/placeholders.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/placeholders.hpp @@ -1,54 +1,78 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Aleksey Gurtovoy 2001-2003 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; -namespace placeholders { -using boost::mpl::_; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_) -// agurt, 17/mar/02: one more placeholder for the last 'apply#' -// specialization +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +}}} +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; -namespace placeholders { -using boost::mpl::_1; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_1) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; -namespace placeholders { -using boost::mpl::_2; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_2) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; -namespace placeholders { -using boost::mpl::_3; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_3) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; -namespace placeholders { -using boost::mpl::_4; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_4) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; -namespace placeholders { -using boost::mpl::_5; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_5) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; -namespace placeholders { -using boost::mpl::_6; -} - -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_6) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +}}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/plus.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/plus.hpp new file mode 100644 index 0000000..489dd41 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/plus.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag<N1>::type + , typename plus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/quote.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/quote.hpp index 902c44e..e7a7f00 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/quote.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/quote.hpp @@ -1,3 +1,11 @@ -// preprocessed version of 'boost/mpl/quote.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/reverse_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/reverse_fold_impl.hpp new file mode 100644 index 0000000..9f6512a --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/reverse_fold_impl.hpp @@ -0,0 +1,295 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/Attic/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< long N > +struct reverse_fold_chunk; + +template<> struct reverse_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename iter3::type >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename iter3::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename iter3::type >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename iter3::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step; + +template< + typename Last + , typename State + > +struct reverse_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_fold_null_step< Last,State > + , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step +{ + typedef reverse_fold_chunk< -1 >::template result_< + typename next<First>::type + , Last + , typename apply2<ForwardOp,State, typename First::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename First::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl + : reverse_fold_chunk<N> + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/reverse_iter_fold_impl.hpp similarity index 74% rename from include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_backward_impl.hpp rename to include/boost/mpl/aux_/preprocessed/bcc551/reverse_iter_fold_impl.hpp index 02f6ccb..1429a5b 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_backward_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/reverse_iter_fold_impl.hpp @@ -1,11 +1,18 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_backward_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/Attic/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration -// forward declaration template< long N , typename First @@ -13,14 +20,13 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > -struct iter_fold_backward_impl; + > +struct reverse_iter_fold_impl; template< long N > -struct iter_fold_backward_chunk; +struct reverse_iter_fold_chunk; -template<> -struct iter_fold_backward_chunk<0> +template<> struct reverse_iter_fold_chunk<0> { template< typename First @@ -37,11 +43,9 @@ struct iter_fold_backward_chunk<0> typedef bkwd_state0 state; typedef iter0 iterator; }; - }; -template<> -struct iter_fold_backward_chunk<1> +template<> struct reverse_iter_fold_chunk<1> { template< typename First @@ -55,7 +59,7 @@ struct iter_fold_backward_chunk<1> typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef fwd_state1 bkwd_state1; @@ -63,11 +67,9 @@ struct iter_fold_backward_chunk<1> typedef bkwd_state0 state; typedef iter1 iterator; }; - }; -template<> -struct iter_fold_backward_chunk<2> +template<> struct reverse_iter_fold_chunk<2> { template< typename First @@ -81,9 +83,9 @@ struct iter_fold_backward_chunk<2> typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef fwd_state2 bkwd_state2; @@ -94,11 +96,9 @@ struct iter_fold_backward_chunk<2> typedef bkwd_state0 state; typedef iter2 iterator; }; - }; -template<> -struct iter_fold_backward_chunk<3> +template<> struct reverse_iter_fold_chunk<3> { template< typename First @@ -112,11 +112,11 @@ struct iter_fold_backward_chunk<3> typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; + typedef typename next<iter2>::type iter3; typedef fwd_state3 bkwd_state3; @@ -128,11 +128,9 @@ struct iter_fold_backward_chunk<3> typedef bkwd_state0 state; typedef iter3 iterator; }; - }; -template<> -struct iter_fold_backward_chunk<4> +template<> struct reverse_iter_fold_chunk<4> { template< typename First @@ -146,13 +144,13 @@ struct iter_fold_backward_chunk<4> typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; + typedef typename next<iter2>::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; - typedef typename iter3::next iter4; + typedef typename next<iter3>::type iter4; typedef fwd_state4 bkwd_state4; @@ -165,11 +163,10 @@ struct iter_fold_backward_chunk<4> typedef bkwd_state0 state; typedef iter4 iterator; }; - }; -template< long N > -struct iter_fold_backward_chunk +template< long N > +struct reverse_iter_fold_chunk { template< typename First @@ -177,22 +174,22 @@ struct iter_fold_backward_chunk , typename State , typename BackwardOp , typename ForwardOp - > + > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; + typedef typename next<iter2>::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; - typedef typename iter3::next iter4; + typedef typename next<iter3>::type iter4; - typedef iter_fold_backward_impl< + typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last @@ -200,7 +197,7 @@ struct iter_fold_backward_chunk , BackwardOp , ForwardOp > nested_chunk; - + typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; @@ -219,21 +216,21 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > -struct iter_fold_backward_step; + > +struct reverse_iter_fold_step; template< typename Last , typename State > -struct iter_fold_backward_null_step +struct reverse_iter_fold_null_step { typedef Last iterator; typedef State state; }; -template<> -struct iter_fold_backward_chunk< -1 > +template<> +struct reverse_iter_fold_chunk< -1 > { template< typename First @@ -241,19 +238,18 @@ struct iter_fold_backward_chunk< -1 > , typename State , typename BackwardOp , typename ForwardOp - > + > struct result_ { typedef typename if_< typename is_same< First,Last >::type - , iter_fold_backward_null_step< Last,State > - , iter_fold_backward_step< First,Last,State,BackwardOp,ForwardOp > + , reverse_iter_fold_null_step< Last,State > + , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; - }; template< @@ -262,18 +258,23 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > -struct iter_fold_backward_step + > +struct reverse_iter_fold_step { - typedef iter_fold_backward_chunk< -1 >::template result_< - typename First::next + typedef reverse_iter_fold_chunk< -1 >::template result_< + typename next<First>::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; - typedef typename apply2<BackwardOp, typename nested_step::state, First>::type state; + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + typedef typename nested_step::iterator iterator; }; @@ -284,14 +285,11 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > -struct iter_fold_backward_impl - : iter_fold_backward_chunk<N> + > +struct reverse_iter_fold_impl + : reverse_iter_fold_chunk<N> ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/set.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/set.hpp new file mode 100644 index 0000000..6c4ae6f --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/set.hpp @@ -0,0 +1,323 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1<T0> +{ + typedef typename set1<T0>::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/shift_left.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/shift_left.hpp new file mode 100644 index 0000000..c11fe41 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/shift_left.hpp @@ -0,0 +1,95 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + : shift_left_impl< + typename shift_left_tag<N1>::type + , typename shift_left_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename Shift > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(Shift)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/shift_right.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/shift_right.hpp new file mode 100644 index 0000000..5867998 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/shift_right.hpp @@ -0,0 +1,95 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + : shift_right_impl< + typename shift_right_tag<N1>::type + , typename shift_right_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename Shift > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(Shift)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp index 30b7209..3303b57 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp @@ -1,5 +1,13 @@ -// preprocessed version of 'boost/mpl/aux_/template_arity.hpp' header -// see the original for copyright information + +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { @@ -7,8 +15,8 @@ template< bool > struct template_arity_impl { template< typename F > struct result_ + : int_< -1 > { - static int const value = -1; }; }; @@ -16,9 +24,8 @@ template<> struct template_arity_impl<true> { template< typename F > struct result_ + : F::arity { - static int const value = F::arity; - }; }; @@ -29,5 +36,5 @@ struct template_arity { }; -}}} // namespace boost::mpl::aux +}}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/times.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/times.hpp new file mode 100644 index 0000000..a6c3949 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/times.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag<N1>::type + , typename times_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/unpack_args.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/unpack_args.hpp new file mode 100644 index 0000000..583e7b7 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/unpack_args.hpp @@ -0,0 +1,97 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + { + typedef typename aux::unpack_args_impl< + size<Args>::value + , F + , Args + >::type type; + + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/vector.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/vector.hpp index 35aaadf..bfa9565 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/vector.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/vector.hpp @@ -1,129 +1,323 @@ -// preprocessed version of 'boost/mpl/vector.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T0 = void_, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - , typename T6 = void_, typename T7 = void_, typename T8 = void_ - , typename T9 = void_ + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na > struct vector; template< - + > struct vector< - void_, void_, void_, void_, void_, void_, void_, void_, void_ - , void_ + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : vector0< > { - typedef vector0< > type; + typedef vector0< >::type type; }; template< typename T0 > struct vector< - T0, void_, void_, void_, void_, void_, void_, void_, void_, void_ + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : vector1<T0> { - typedef vector1<T0> type; + typedef typename vector1<T0>::type type; }; template< typename T0, typename T1 > struct vector< - T0, T1, void_, void_, void_, void_, void_, void_, void_, void_ + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : vector2< T0,T1 > { - typedef vector2< T0,T1 > type; + typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > -struct vector< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector3< T0,T1,T2 > { - typedef vector3< T0,T1,T2 > type; + typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > -struct vector< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector4< T0,T1,T2,T3 > { - typedef vector4< T0,T1,T2,T3 > type; + typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > -struct vector< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector5< T0,T1,T2,T3,T4 > { - typedef vector5< T0,T1,T2,T3,T4 > type; + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > -struct vector< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector6< T0,T1,T2,T3,T4,T5 > { - typedef vector6< T0,T1,T2,T3,T4,T5 > type; + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > -struct vector< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector7< T0,T1,T2,T3,T4,T5,T6 > { - typedef vector7< T0,T1,T2,T3,T4,T5,T6 > type; + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > -struct vector< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { - typedef vector8< T0,T1,T2,T3,T4,T5,T6,T7 > type; + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > -struct vector< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { - typedef vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > type; + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; -// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > -struct vector +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { - typedef vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > type; + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/vector_c.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/vector_c.hpp index ff6be1a..840c2e1 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/vector_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/vector_c.hpp @@ -1,153 +1,328 @@ -// preprocessed version of 'boost/mpl/vector_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T - , long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX - , long C9 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T - > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c<T> { - typedef vector0_c<T> type; + typedef typename vector0_c<T>::type type; }; template< - typename T - , long C0 + typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T,C0 > { - typedef vector1_c< T,C0 > type; + typedef typename vector1_c< T,C0 >::type type; }; template< - typename T - , long C0, long C1 + typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T,C0,C1 > { - typedef vector2_c< T,C0,C1 > type; + typedef typename vector2_c< T,C0,C1 >::type type; }; template< - typename T - , long C0, long C1, long C2 + typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T,C0,C1,C2 > { - typedef vector3_c< T,C0,C1,C2 > type; + typedef typename vector3_c< T,C0,C1,C2 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3 + typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T,C0,C1,C2,C3 > { - typedef vector4_c< T,C0,C1,C2,C3 > type; + typedef typename vector4_c< T,C0,C1,C2,C3 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4 + typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T,C0,C1,C2,C3,C4 > { - typedef vector5_c< T,C0,C1,C2,C3,C4 > type; + typedef typename vector5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T,C0,C1,C2,C3,C4,C5 > { - typedef vector6_c< T,C0,C1,C2,C3,C4,C5 > type; + typedef typename vector6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T,C0,C1,C2,C3,C4,C5,C6 > { - typedef vector7_c< T,C0,C1,C2,C3,C4,C5,C6 > type; + typedef typename vector7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 > -struct vector_c< T,C0,C1,C2,C3,C4,C5,C6,C7,LONG_MAX,LONG_MAX > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > : vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { - typedef vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > type; + typedef typename vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 > -struct vector_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,LONG_MAX > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { - typedef vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > type; + typedef typename vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; -// primary template (not a specialization!) template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 > -struct vector_c +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { - typedef vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > type; + typedef typename vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename vector11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename vector12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename vector13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename vector14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename vector15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename vector16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename vector17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename vector18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename vector19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename vector20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/advance_backward.hpp b/include/boost/mpl/aux_/preprocessed/dmc/advance_backward.hpp new file mode 100644 index 0000000..26de94c --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/advance_backward.hpp @@ -0,0 +1,97 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior<iter0>::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; + typedef typename prior<iter2>::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; + typedef typename prior<iter2>::type iter3; + typedef typename prior<iter3>::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/include/boost/mpl/aux_/preprocessed/dmc/advance_forward.hpp b/include/boost/mpl/aux_/preprocessed/dmc/advance_forward.hpp new file mode 100644 index 0000000..b137cc7 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/advance_forward.hpp @@ -0,0 +1,97 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next<iter0>::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; + typedef typename next<iter2>::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; + typedef typename next<iter2>::type iter3; + typedef typename next<iter3>::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff --git a/include/boost/mpl/aux_/preprocessed/dmc/and.hpp b/include/boost/mpl/aux_/preprocessed/dmc/and.hpp new file mode 100644 index 0000000..010ad1f --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/and.hpp @@ -0,0 +1,69 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct and_impl + : false_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct and_impl< true,T1,T2,T3,T4 > + : and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , true_ + > +{ +}; + +template<> +struct and_impl< + true + , true_, true_, true_, true_ + > + : true_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , and_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , and_ + ) + +}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/apply.hpp b/include/boost/mpl/aux_/preprocessed/dmc/apply.hpp new file mode 100644 index 0000000..e08eacc --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/apply.hpp @@ -0,0 +1,169 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda<F>::type + + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) +}; + +template< + typename F + > +struct apply< F,na,na,na,na,na > + : apply0<F> +{ +}; + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda<F>::type + , T1 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) +}; + +template< + typename F, typename T1 + > +struct apply< F,T1,na,na,na,na > + : apply1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda<F>::type + , T1, T2 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) +}; + +template< + typename F, typename T1, typename T2 + > +struct apply< F,T1,T2,na,na,na > + : apply2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda<F>::type + , T1, T2, T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply< F,T1,T2,T3,na,na > + : apply3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda<F>::type + , T1, T2, T3, T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply< F,T1,T2,T3,T4,na > + : apply4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda<F>::type + , T1, T2, T3, T4, T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) +}; + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply + : apply5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/dmc/apply_fwd.hpp b/include/boost/mpl/aux_/preprocessed/dmc/apply_fwd.hpp new file mode 100644 index 0000000..bd50b89 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/dmc/apply_wrap.hpp b/include/boost/mpl/aux_/preprocessed/dmc/apply_wrap.hpp new file mode 100644 index 0000000..47882ad --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/apply_wrap.hpp @@ -0,0 +1,70 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply_wrap0 + + : F::template apply< > +{ +}; + +template< + typename F, typename T1 + > +struct apply_wrap1 + + : F::template apply<T1> +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap2 + + : F::template apply< T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap3 + + : F::template apply< T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap4 + + : F::template apply< T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap5 + + : F::template apply< T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/dmc/arg.hpp b/include/boost/mpl/aux_/preprocessed/dmc/arg.hpp new file mode 100644 index 0000000..4e404a6 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/arg.hpp @@ -0,0 +1,123 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + static int const value = -1; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_ASSERT_NOT((is_na<type>)); + }; +}; + +template<> struct arg<1> +{ + static int const value = 1; + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_ASSERT_NOT((is_na<type>)); + }; +}; + +template<> struct arg<2> +{ + static int const value = 2; + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + BOOST_MPL_ASSERT_NOT((is_na<type>)); + }; +}; + +template<> struct arg<3> +{ + static int const value = 3; + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + BOOST_MPL_ASSERT_NOT((is_na<type>)); + }; +}; + +template<> struct arg<4> +{ + static int const value = 4; + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + BOOST_MPL_ASSERT_NOT((is_na<type>)); + }; +}; + +template<> struct arg<5> +{ + static int const value = 5; + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + BOOST_MPL_ASSERT_NOT((is_na<type>)); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/include/boost/mpl/aux_/preprocessed/dmc/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/dmc/basic_bind.hpp new file mode 100644 index 0000000..050479c --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/basic_bind.hpp @@ -0,0 +1,400 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F, int dummy_ + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0<F>, U1, U2, U3, U4, U5 + > +{ + typedef bind0<F> f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) + +template< + typename F, int dummy_ + > +struct bind< F,na,na,na,na,na > + : bind0<F> +{ +}; + +template< + typename F, typename T1, int dummy_ + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, int dummy_ + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2, int dummy_ + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, int dummy_ + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, int dummy_ + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, int dummy_ + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , int dummy_ + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , int dummy_ + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, int dummy_ + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, int dummy_ + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/dmc/bind.hpp b/include/boost/mpl/aux_/preprocessed/dmc/bind.hpp new file mode 100644 index 0000000..a6257cc --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/bind.hpp @@ -0,0 +1,509 @@ + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg< -1 >, Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +template< + typename F, int dummy_ + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0<F>, U1, U2, U3, U4, U5 + > +{ + typedef bind0<F> f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(1, bind0) + +template< + typename F, int dummy_ + > +struct bind< F,na,na,na,na,na > + : bind0<F> +{ +}; + +template< + typename F, typename T1, int dummy_ + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(2, bind1) + +template< + typename F, typename T1, int dummy_ + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2, int dummy_ + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(3, bind2) + +template< + typename F, typename T1, typename T2, int dummy_ + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, int dummy_ + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(4, bind3) + +template< + typename F, typename T1, typename T2, typename T3, int dummy_ + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , int dummy_ + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(5, bind4) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , int dummy_ + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, int dummy_ + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + /// + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(6, bind5) + +/// primary template (not a specialization!) + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, int dummy_ + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/dmc/bind_fwd.hpp b/include/boost/mpl/aux_/preprocessed/dmc/bind_fwd.hpp new file mode 100644 index 0000000..7679fd5 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/bind_fwd.hpp @@ -0,0 +1,53 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, int dummy_ = 0 + > +struct bind; + +template< + typename F, int dummy_ = 0 + > +struct bind0; + +template< + typename F, typename T1, int dummy_ = 0 + > +struct bind1; + +template< + typename F, typename T1, typename T2, int dummy_ = 0 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3, int dummy_ = 0 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , int dummy_ = 0 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, int dummy_ = 0 + > +struct bind5; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/dmc/bitand.hpp b/include/boost/mpl/aux_/preprocessed/dmc/bitand.hpp new file mode 100644 index 0000000..642f042 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/bitand.hpp @@ -0,0 +1,144 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag<N1>::type + , typename bitand_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/bitor.hpp b/include/boost/mpl/aux_/preprocessed/dmc/bitor.hpp new file mode 100644 index 0000000..4ccbe89 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/bitor.hpp @@ -0,0 +1,144 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag<N1>::type + , typename bitor_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/bitxor.hpp b/include/boost/mpl/aux_/preprocessed/dmc/bitxor.hpp new file mode 100644 index 0000000..73b519e --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/bitxor.hpp @@ -0,0 +1,144 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag<N1>::type + , typename bitxor_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/divides.hpp b/include/boost/mpl/aux_/preprocessed/dmc/divides.hpp new file mode 100644 index 0000000..c963f62 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/divides.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag<N1>::type + , typename divides_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/equal_to.hpp b/include/boost/mpl/aux_/preprocessed/dmc/equal_to.hpp new file mode 100644 index 0000000..bb051d6 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/equal_to.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + : equal_to_impl< + typename equal_to_tag<N1>::type + , typename equal_to_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/dmc/fold_impl.hpp new file mode 100644 index 0000000..00c2e55 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/fold_impl.hpp @@ -0,0 +1,180 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; + typedef typename next<iter2>::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4; + typedef typename next<iter3>::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl +{ + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,First,Last,State,ForwardOp > + : fold_impl< + -1 + , typename next<First>::type + , Last + , typename apply2<ForwardOp,State, typename deref<First>::type>::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/dmc/full_lambda.hpp new file mode 100644 index 0000000..05c487f --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/full_lambda.hpp @@ -0,0 +1,536 @@ + +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg<N>, Tag > +{ + typedef true_ is_le; + typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41 + typedef protect<result_> type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0<F> + , Tag + + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef protect<result_> type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F<T1> + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef protect<result_> type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef protect<result_> type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef protect<result_> type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef protect<result_> type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< protect<T>, Tag > +{ + typedef false_ is_le; + typedef protect<T> result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +BOOST_MPL_AUX_NA_SPEC(2, lambda) + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/dmc/greater.hpp b/include/boost/mpl/aux_/preprocessed/dmc/greater.hpp new file mode 100644 index 0000000..73bbaad --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/greater.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + : greater_impl< + typename greater_tag<N1>::type + , typename greater_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/greater_equal.hpp b/include/boost/mpl/aux_/preprocessed/dmc/greater_equal.hpp new file mode 100644 index 0000000..d52e43e --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/greater_equal.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + : greater_equal_impl< + typename greater_equal_tag<N1>::type + , typename greater_equal_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/inherit.hpp b/include/boost/mpl/aux_/preprocessed/dmc/inherit.hpp new file mode 100644 index 0000000..00f31c4 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/inherit.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/include/boost/mpl/aux_/preprocessed/dmc/iter_fold_if_impl.hpp b/include/boost/mpl/aux_/preprocessed/dmc/iter_fold_if_impl.hpp new file mode 100644 index 0000000..6951795 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/iter_fold_if_impl.hpp @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl<false> +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/iter_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/dmc/iter_fold_impl.hpp new file mode 100644 index 0000000..c25f136 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/iter_fold_impl.hpp @@ -0,0 +1,180 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename next<iter1>::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename next<iter2>::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename next<iter3>::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl +{ + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename next<First>::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/dmc/lambda_no_ctps.hpp new file mode 100644 index 0000000..76d3f3f --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/lambda_no_ctps.hpp @@ -0,0 +1,229 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ + { + typedef T type; + typedef is_placeholder<T> is_le; + }; +}; + +template<> struct lambda_impl< int_<1> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + + typedef bind1< + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<2> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; + + typedef bind2< + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<3> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; + + typedef bind3< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<4> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; + + typedef bind4< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; + }; +}; + +template<> struct lambda_impl< int_<5> > +{ + template< typename F, typename Tag, typename Protect > struct result_ + { + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; + + typedef bind5< + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; + }; +}; + +} // namespace aux + +template< + typename T + , typename Tag + , typename Protect + > +struct lambda +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity<T>::type arity_; + typedef typename aux::lambda_impl<arity_> + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; + +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le +{ +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/dmc/less.hpp b/include/boost/mpl/aux_/preprocessed/dmc/less.hpp new file mode 100644 index 0000000..75997da --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/less.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + : less_impl< + typename less_tag<N1>::type + , typename less_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/less_equal.hpp b/include/boost/mpl/aux_/preprocessed/dmc/less_equal.hpp new file mode 100644 index 0000000..ed8aae1 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/less_equal.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + : less_equal_impl< + typename less_equal_tag<N1>::type + , typename less_equal_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/list.hpp b/include/boost/mpl/aux_/preprocessed/dmc/list.hpp new file mode 100644 index 0000000..4e8ad53 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/list.hpp @@ -0,0 +1,323 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list; + +template< + + > +struct list< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list0< > +{ + typedef list0< >::type type; +}; + +template< + typename T0 + > +struct list< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list1<T0> +{ + typedef typename list1<T0>::type type; +}; + +template< + typename T0, typename T1 + > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list2< T0,T1 > +{ + typedef typename list2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list3< T0,T1,T2 > +{ + typedef typename list3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list4< T0,T1,T2,T3 > +{ + typedef typename list4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list5< T0,T1,T2,T3,T4 > +{ + typedef typename list5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/dmc/list_c.hpp b/include/boost/mpl/aux_/preprocessed/dmc/list_c.hpp new file mode 100644 index 0000000..0b48a7f --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/list_c.hpp @@ -0,0 +1,328 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct list_c; + +template< + typename T + > +struct list_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list0_c<T> +{ + typedef typename list0_c<T>::type type; +}; + +template< + typename T, long C0 + > +struct list_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list1_c< T,C0 > +{ + typedef typename list1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct list_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list2_c< T,C0,C1 > +{ + typedef typename list2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct list_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list3_c< T,C0,C1,C2 > +{ + typedef typename list3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct list_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list4_c< T,C0,C1,C2,C3 > +{ + typedef typename list4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct list_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/dmc/map.hpp b/include/boost/mpl/aux_/preprocessed/dmc/map.hpp new file mode 100644 index 0000000..1503c72 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/map.hpp @@ -0,0 +1,323 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1<T0> +{ + typedef typename map1<T0>::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/dmc/minus.hpp b/include/boost/mpl/aux_/preprocessed/dmc/minus.hpp new file mode 100644 index 0000000..7439877 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/minus.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag<N1>::type + , typename minus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/modulus.hpp b/include/boost/mpl/aux_/preprocessed/dmc/modulus.hpp new file mode 100644 index 0000000..e99421b --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/modulus.hpp @@ -0,0 +1,97 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + : modulus_impl< + typename modulus_tag<N1>::type + , typename modulus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/not_equal_to.hpp b/include/boost/mpl/aux_/preprocessed/dmc/not_equal_to.hpp new file mode 100644 index 0000000..39af532 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/not_equal_to.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + : not_equal_to_impl< + typename not_equal_to_tag<N1>::type + , typename not_equal_to_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/or.hpp b/include/boost/mpl/aux_/preprocessed/dmc/or.hpp new file mode 100644 index 0000000..31e1aaa --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/or.hpp @@ -0,0 +1,69 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct or_impl + : true_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct or_impl< false,T1,T2,T3,T4 > + : or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4 + , false_ + > +{ +}; + +template<> +struct or_impl< + false + , false_, false_, false_, false_ + > + : false_ +{ +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value + , T2, T3, T4, T5 + > + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , or_ + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC2( + 2 + , 5 + , or_ + ) + +}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/placeholders.hpp b/include/boost/mpl/aux_/preprocessed/dmc/placeholders.hpp new file mode 100644 index 0000000..4cb7d7d --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/placeholders.hpp @@ -0,0 +1,78 @@ + +// Copyright Aleksey Gurtovoy 2001-2003 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg< -1 > _; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_) + +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +}}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<1> _1; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_1) + +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<2> _2; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_2) + +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<3> _3; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_3) + +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<4> _4; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_4) + +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<5> _5; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_5) + +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<6> _6; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_6) + +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +}}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/plus.hpp b/include/boost/mpl/aux_/preprocessed/dmc/plus.hpp new file mode 100644 index 0000000..489dd41 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/plus.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag<N1>::type + , typename plus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/quote.hpp b/include/boost/mpl/aux_/preprocessed/dmc/quote.hpp new file mode 100644 index 0000000..d7d0420 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/quote.hpp @@ -0,0 +1,123 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< typename T, bool has_type_ > +struct quote_impl + : T +{ +}; + +template< typename T > +struct quote_impl< T,false > +{ + typedef T type; +}; + +template< + template< typename P1 > class F + , typename Tag = void_ + > +struct quote1 +{ + template< typename U1 > struct apply + + : quote_impl< + F<U1> + , aux::has_type< F<U1> >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2 > class F + , typename Tag = void_ + > +struct quote2 +{ + template< typename U1, typename U2 > struct apply + + : quote_impl< + F< U1,U2 > + , aux::has_type< F< U1,U2 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3 > class F + , typename Tag = void_ + > +struct quote3 +{ + template< typename U1, typename U2, typename U3 > struct apply + + : quote_impl< + F< U1,U2,U3 > + , aux::has_type< F< U1,U2,U3 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename Tag = void_ + > +struct quote4 +{ + template< + typename U1, typename U2, typename U3, typename U4 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4 > + , aux::has_type< F< U1,U2,U3,U4 > >::value + > + + { + }; +}; + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename Tag = void_ + > +struct quote5 +{ + template< + typename U1, typename U2, typename U3, typename U4 + , typename U5 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4,U5 > + , aux::has_type< F< U1,U2,U3,U4,U5 > >::value + > + + { + }; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/dmc/reverse_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/dmc/reverse_fold_impl.hpp new file mode 100644 index 0000000..84c3d9c --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/reverse_fold_impl.hpp @@ -0,0 +1,231 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/Attic/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename iter3::type >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename iter3::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename iter3::type >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename iter3::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_fold_impl< + -1 + , typename next<First>::type + , Last + , typename apply2<ForwardOp,State, typename First::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename First::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/iter_fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/dmc/reverse_iter_fold_impl.hpp similarity index 71% rename from include/boost/mpl/aux_/preprocessed/mwcw/iter_fold_backward_impl.hpp rename to include/boost/mpl/aux_/preprocessed/dmc/reverse_iter_fold_impl.hpp index 39b7fa8..6d7439a 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/iter_fold_backward_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/dmc/reverse_iter_fold_impl.hpp @@ -1,11 +1,18 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_backward_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/Attic/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration -// forward declaration template< long N , typename First @@ -13,8 +20,8 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > -struct iter_fold_backward_impl; + > +struct reverse_iter_fold_impl; template< typename First @@ -23,7 +30,7 @@ template< , typename BackwardOp , typename ForwardOp > -struct iter_fold_backward_impl< 0,First,Last,State,BackwardOp,ForwardOp > +struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; @@ -39,12 +46,12 @@ template< , typename BackwardOp , typename ForwardOp > -struct iter_fold_backward_impl< 1,First,Last,State,BackwardOp,ForwardOp > +struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef fwd_state1 bkwd_state1; @@ -60,14 +67,14 @@ template< , typename BackwardOp , typename ForwardOp > -struct iter_fold_backward_impl< 2,First,Last,State,BackwardOp,ForwardOp > +struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef fwd_state2 bkwd_state2; @@ -86,16 +93,16 @@ template< , typename BackwardOp , typename ForwardOp > -struct iter_fold_backward_impl< 3,First,Last,State,BackwardOp,ForwardOp > +struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; + typedef typename next<iter2>::type iter3; typedef fwd_state3 bkwd_state3; @@ -115,18 +122,18 @@ template< , typename BackwardOp , typename ForwardOp > -struct iter_fold_backward_impl< 4,First,Last,State,BackwardOp,ForwardOp > +struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; + typedef typename next<iter2>::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; - typedef typename iter3::next iter4; + typedef typename next<iter3>::type iter4; typedef fwd_state4 bkwd_state4; @@ -147,22 +154,22 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > -struct iter_fold_backward_impl + > +struct reverse_iter_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; + typedef typename next<iter2>::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; - typedef typename iter3::next iter4; + typedef typename next<iter3>::type iter4; - typedef iter_fold_backward_impl< + typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last @@ -170,7 +177,7 @@ struct iter_fold_backward_impl , BackwardOp , ForwardOp > nested_chunk; - + typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; @@ -188,19 +195,24 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > -struct iter_fold_backward_impl< -1,First,Last,State,BackwardOp,ForwardOp > + > +struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { - typedef iter_fold_backward_impl< + typedef reverse_iter_fold_impl< -1 - , typename First::next + , typename next<First>::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; - typedef typename apply2<BackwardOp, typename nested_step::state, First>::type state; + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + typedef typename nested_step::iterator iterator; }; @@ -209,14 +221,11 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > -struct iter_fold_backward_impl< -1,Last,Last,State,BackwardOp,ForwardOp > + > +struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/set.hpp b/include/boost/mpl/aux_/preprocessed/dmc/set.hpp new file mode 100644 index 0000000..6c4ae6f --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/set.hpp @@ -0,0 +1,323 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1<T0> +{ + typedef typename set1<T0>::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/dmc/shift_left.hpp b/include/boost/mpl/aux_/preprocessed/dmc/shift_left.hpp new file mode 100644 index 0000000..c11fe41 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/shift_left.hpp @@ -0,0 +1,95 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + : shift_left_impl< + typename shift_left_tag<N1>::type + , typename shift_left_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename Shift > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(Shift)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/shift_right.hpp b/include/boost/mpl/aux_/preprocessed/dmc/shift_right.hpp new file mode 100644 index 0000000..5867998 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/shift_right.hpp @@ -0,0 +1,95 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + : shift_right_impl< + typename shift_right_tag<N1>::type + , typename shift_right_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename Shift > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(Shift)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/dmc/template_arity.hpp new file mode 100644 index 0000000..a23fc23 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/template_arity.hpp @@ -0,0 +1,11 @@ + +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! + diff --git a/include/boost/mpl/aux_/preprocessed/dmc/times.hpp b/include/boost/mpl/aux_/preprocessed/dmc/times.hpp new file mode 100644 index 0000000..a6c3949 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/times.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag<N1>::type + , typename times_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/dmc/unpack_args.hpp b/include/boost/mpl/aux_/preprocessed/dmc/unpack_args.hpp new file mode 100644 index 0000000..a971f81 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/unpack_args.hpp @@ -0,0 +1,94 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size<Args>::value,F, Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/dmc/vector.hpp b/include/boost/mpl/aux_/preprocessed/dmc/vector.hpp new file mode 100644 index 0000000..bfa9565 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/vector.hpp @@ -0,0 +1,323 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector; + +template< + + > +struct vector< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct vector< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1<T0> +{ + typedef typename vector1<T0>::type type; +}; + +template< + typename T0, typename T1 + > +struct vector< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/dmc/vector_c.hpp b/include/boost/mpl/aux_/preprocessed/dmc/vector_c.hpp new file mode 100644 index 0000000..840c2e1 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/dmc/vector_c.hpp @@ -0,0 +1,328 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX + > +struct vector_c; + +template< + typename T + > +struct vector_c< + T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector0_c<T> +{ + typedef typename vector0_c<T>::type type; +}; + +template< + typename T, long C0 + > +struct vector_c< + T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector1_c< T,C0 > +{ + typedef typename vector1_c< T,C0 >::type type; +}; + +template< + typename T, long C0, long C1 + > +struct vector_c< + T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector2_c< T,C0,C1 > +{ + typedef typename vector2_c< T,C0,C1 >::type type; +}; + +template< + typename T, long C0, long C1, long C2 + > +struct vector_c< + T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector3_c< T,C0,C1,C2 > +{ + typedef typename vector3_c< T,C0,C1,C2 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3 + > +struct vector_c< + T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector4_c< T,C0,C1,C2,C3 > +{ + typedef typename vector4_c< T,C0,C1,C2,C3 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4 + > +struct vector_c< + T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector5_c< T,C0,C1,C2,C3,C4 > +{ + typedef typename vector5_c< T,C0,C1,C2,C3,C4 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector6_c< T,C0,C1,C2,C3,C4,C5 > +{ + typedef typename vector6_c< T,C0,C1,C2,C3,C4,C5 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > + : vector7_c< T,C0,C1,C2,C3,C4,C5,C6 > +{ + typedef typename vector7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > + : vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > +{ + typedef typename vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > +{ + typedef typename vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > + : vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > +{ + typedef typename vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename vector11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename vector12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename vector13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename vector14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename vector15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename vector16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename vector17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename vector18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename vector19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename vector20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp b/include/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp index bea9b5f..26de94c 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp @@ -1,9 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/advance_backward.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> @@ -22,7 +28,7 @@ struct advance_backward<1> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; + typedef typename prior<iter0>::type iter1; typedef iter1 type; }; }; @@ -33,8 +39,8 @@ struct advance_backward<2> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; typedef iter2 type; }; }; @@ -45,9 +51,9 @@ struct advance_backward<3> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; - typedef typename iter2::prior iter3; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; + typedef typename prior<iter2>::type iter3; typedef iter3 type; }; }; @@ -58,10 +64,10 @@ struct advance_backward<4> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; - typedef typename iter2::prior iter3; - typedef typename iter3::prior iter4; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; + typedef typename prior<iter2>::type iter3; + typedef typename prior<iter3>::type iter4; typedef iter4 type; }; }; @@ -71,12 +77,21 @@ struct advance_backward { template< typename Iterator > struct apply { - typedef typename advance_backward<4>::template apply<Iterator>::type chunk_result_; - typedef typename advance_backward<( (N - 4) < 0 ? 0 : N - 4 )>::template apply<chunk_result_>::type type; + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp b/include/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp index accb46c..b137cc7 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp @@ -1,9 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/advance_forward.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> @@ -22,7 +28,7 @@ struct advance_forward<1> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef iter1 type; }; }; @@ -33,8 +39,8 @@ struct advance_forward<2> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; typedef iter2 type; }; }; @@ -45,9 +51,9 @@ struct advance_forward<3> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; - typedef typename iter2::next iter3; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; + typedef typename next<iter2>::type iter3; typedef iter3 type; }; }; @@ -58,10 +64,10 @@ struct advance_forward<4> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; - typedef typename iter2::next iter3; - typedef typename iter3::next iter4; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; + typedef typename next<iter2>::type iter3; + typedef typename next<iter3>::type iter4; typedef iter4 type; }; }; @@ -71,12 +77,21 @@ struct advance_forward { template< typename Iterator > struct apply { - typedef typename advance_forward<4>::template apply<Iterator>::type chunk_result_; - typedef typename advance_forward<( (N - 4) < 0 ? 0 : N - 4 )>::template apply<chunk_result_>::type type; + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/and.hpp b/include/boost/mpl/aux_/preprocessed/gcc/and.hpp index 9f6982a..010ad1f 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/and.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/and.hpp @@ -1,5 +1,13 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { @@ -33,8 +41,8 @@ struct and_impl< } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ @@ -48,15 +56,14 @@ struct and_ BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ - , (T1, T2, T3, T4, T5) + , ( T1, T2, T3, T4, T5) ) }; -BOOST_MPL_AUX_VOID_SPEC_EXT( +BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) -}} // namespace boost::mpl - +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp b/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp index 9dc3d5c..e08eacc 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp @@ -1,24 +1,37 @@ -// preprocessed version of 'boost/mpl/apply.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename F, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ + typename F > -struct apply; +struct apply0 -template< typename F > -struct apply0 : F + : apply_wrap0< + typename lambda<F>::type + + > { + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) }; template< typename F > -struct apply< F,void_,void_,void_,void_,void_ > +struct apply< F,na,na,na,na,na > : apply0<F> { }; @@ -27,16 +40,23 @@ template< typename F, typename T1 > struct apply1 - : F::template apply< - T1 + + : apply_wrap1< + typename lambda<F>::type + , T1 > { + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) }; template< typename F, typename T1 > -struct apply< F,T1,void_,void_,void_,void_ > +struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; @@ -45,16 +65,23 @@ template< typename F, typename T1, typename T2 > struct apply2 - : F::template apply< - T1, T2 + + : apply_wrap2< + typename lambda<F>::type + , T1, T2 > { + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) }; template< typename F, typename T1, typename T2 > -struct apply< F,T1,T2,void_,void_,void_ > +struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; @@ -63,16 +90,23 @@ template< typename F, typename T1, typename T2, typename T3 > struct apply3 - : F::template apply< - T1, T2, T3 + + : apply_wrap3< + typename lambda<F>::type + , T1, T2, T3 > { + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) }; template< typename F, typename T1, typename T2, typename T3 > -struct apply< F,T1,T2,T3,void_,void_ > +struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; @@ -81,16 +115,23 @@ template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 - : F::template apply< - T1, T2, T3, T4 + + : apply_wrap4< + typename lambda<F>::type + , T1, T2, T3, T4 > { + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) }; template< typename F, typename T1, typename T2, typename T3, typename T4 > -struct apply< F,T1,T2,T3,T4,void_ > +struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; @@ -100,13 +141,21 @@ template< , typename T5 > struct apply5 - : F::template apply< - T1, T2, T3, T4, T5 + + : apply_wrap5< + typename lambda<F>::type + , T1, T2, T3, T4, T5 > { + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) }; -// primary template (not a specialization!) +/// primary template (not a specialization!) + template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 @@ -116,6 +165,5 @@ struct apply { }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp b/include/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp new file mode 100644 index 0000000..bd50b89 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp b/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp new file mode 100644 index 0000000..47882ad --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp @@ -0,0 +1,70 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply_wrap0 + + : F::template apply< > +{ +}; + +template< + typename F, typename T1 + > +struct apply_wrap1 + + : F::template apply<T1> +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap2 + + : F::template apply< T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap3 + + : F::template apply< T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap4 + + : F::template apply< T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap5 + + : F::template apply< T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp b/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp index d7097f8..4e404a6 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp @@ -1,26 +1,30 @@ -// preprocessed version of 'boost/mpl/arg.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-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) +// -template<> struct arg<-1> +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > { static int const value = -1; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -28,20 +32,17 @@ template<> struct arg<1> { static int const value = 1; typedef arg<2> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -49,20 +50,17 @@ template<> struct arg<2> { static int const value = 2; typedef arg<3> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -70,20 +68,17 @@ template<> struct arg<3> { static int const value = 3; typedef arg<4> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -91,20 +86,17 @@ template<> struct arg<4> { static int const value = 4; typedef arg<5> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -112,25 +104,20 @@ template<> struct arg<5> { static int const value = 5; typedef arg<6> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; -BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1, int, arg) - -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/include/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp index 73c4182..355c64b 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp @@ -1,11 +1,16 @@ -// preprocessed version of 'boost/mpl/bind.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-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) +// -BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) -BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { @@ -18,25 +23,12 @@ struct resolve_bind_arg typedef T type; }; -} // namespace aux - -template< - typename F, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - > -struct bind; - -template< typename F, typename T > struct bind1st; -template< typename F, typename T > struct bind2nd; - -namespace aux { - template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > -struct resolve_bind_arg< arg<N>,U1,U2,U3,U4,U5 > +struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 > { - typedef typename mpl::arg<N>::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type; }; template< @@ -44,50 +36,22 @@ template< , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > -struct resolve_bind_arg< bind<F,T1,T2,T3,T4,T5>,U1,U2,U3,U4,U5 > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind1st<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind1st< F,T > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind2nd<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind2nd< F,T > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux -BOOST_MPL_AUX_ARITY_SPEC( - 6 - , bind - ) - -BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) -BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) - template< typename F > struct bind0 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { @@ -95,7 +59,10 @@ struct bind0 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: - typedef typename f_::type type; + typedef typename apply_wrap0< + f_ + >::type type; + }; }; @@ -106,11 +73,11 @@ template< , typename U5 > struct resolve_bind_arg< - bind0<F>,U1, U2, U3, U4, U5 + bind0<F>, U1, U2, U3, U4, U5 > { typedef bind0<F> f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -120,7 +87,7 @@ BOOST_MPL_AUX_ARITY_SPEC(1, bind0) template< typename F > -struct bind< F,void_,void_,void_,void_,void_ > +struct bind< F,na,na,na,na,na > : bind0<F> { }; @@ -131,17 +98,21 @@ template< struct bind1 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: - typedef typename f_::template apply<t1>::type type; + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + }; }; @@ -152,11 +123,11 @@ template< , typename U4, typename U5 > struct resolve_bind_arg< - bind1< F,T1 >,U1, U2, U3, U4, U5 + bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -166,7 +137,7 @@ BOOST_MPL_AUX_ARITY_SPEC(2, bind1) template< typename F, typename T1 > -struct bind< F,T1,void_,void_,void_,void_ > +struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; @@ -177,18 +148,22 @@ template< struct bind2 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: - typedef typename f_::template apply< t1,t2 >::type type; + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + }; }; @@ -199,11 +174,11 @@ template< , typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind2< F,T1,T2 >,U1, U2, U3, U4, U5 + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -213,7 +188,7 @@ BOOST_MPL_AUX_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > -struct bind< F,T1,T2,void_,void_,void_ > +struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; @@ -224,19 +199,23 @@ template< struct bind3 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: - typedef typename f_::template apply< t1,t2,t3 >::type type; + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + }; }; @@ -247,11 +226,11 @@ template< , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind3< F,T1,T2,T3 >,U1, U2, U3, U4, U5 + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -261,7 +240,7 @@ BOOST_MPL_AUX_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > -struct bind< F,T1,T2,T3,void_,void_ > +struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; @@ -272,20 +251,25 @@ template< struct bind4 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; - typedef typename aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 >::type t4; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: - typedef typename f_::template apply< t1,t2,t3,t4 >::type type; + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + }; }; @@ -296,11 +280,11 @@ template< , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind4< F,T1,T2,T3,T4 >,U1, U2, U3, U4, U5 + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -310,7 +294,7 @@ BOOST_MPL_AUX_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > -struct bind< F,T1,T2,T3,T4,void_ > +struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; @@ -322,21 +306,26 @@ template< struct bind5 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; - typedef typename aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 >::type t4; - typedef typename aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 >::type t5; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: - typedef typename f_::template apply< t1,t2,t3,t4,t5 >::type type; + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + }; }; @@ -348,18 +337,18 @@ template< , typename U5 > struct resolve_bind_arg< - bind5< F,T1,T2,T3,T4,T5 >,U1, U2, U3, U4, U5 + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) -// primary template (not a specialization!) +/// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -370,34 +359,76 @@ struct bind { }; -template< typename F, typename T > -struct bind1st +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > { template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply - : F::template apply< T,U > { + private: + typedef mpl::arg<1> n1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; }; }; -template< typename F, typename T > -struct bind2nd +template< + template< typename T1, typename T2, typename T3 > class F, typename Tag + > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct eval_if; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< eval_if,Tag > + , T1, T2, T3 + > { template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply - : F::template apply< U,T > { + private: + typedef mpl::arg<1> n1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef typename eval_if< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; }; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp b/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp index 48ff9a6..9f12c5b 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp @@ -1,11 +1,16 @@ -// preprocessed version of 'boost/mpl/bind.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-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) +// -BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) -BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { @@ -24,38 +29,25 @@ template< > struct replace_unnamed_arg { - typedef Arg next_arg; + typedef Arg next; typedef T type; }; template< typename Arg > -struct replace_unnamed_arg< arg<-1>,Arg > +struct replace_unnamed_arg< arg< -1 >, Arg > { - typedef typename Arg::next next_arg; + typedef typename Arg::next next; typedef Arg type; }; -} // namespace aux - -template< - typename F, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - > -struct bind; - -template< typename F, typename T > struct bind1st; -template< typename F, typename T > struct bind2nd; - -namespace aux { - template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > -struct resolve_bind_arg< arg<N>,U1,U2,U3,U4,U5 > +struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 > { - typedef typename mpl::arg<N>::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type; }; template< @@ -63,61 +55,36 @@ template< , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > -struct resolve_bind_arg< bind<F,T1,T2,T3,T4,T5>,U1,U2,U3,U4,U5 > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind1st<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind1st< F,T > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind2nd<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind2nd< F,T > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux -BOOST_MPL_AUX_ARITY_SPEC( - 6 - , bind - ) - -BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) -BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) - template< typename F > struct bind0 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// public: - typedef typename f_::type type; + typedef typename apply_wrap0< + f_ + >::type type; + }; }; @@ -128,11 +95,11 @@ template< , typename U5 > struct resolve_bind_arg< - bind0<F>,U1, U2, U3, U4, U5 + bind0<F>, U1, U2, U3, U4, U5 > { typedef bind0<F> f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -142,7 +109,7 @@ BOOST_MPL_AUX_ARITY_SPEC(1, bind0) template< typename F > -struct bind< F,void_,void_,void_,void_,void_ > +struct bind< F,na,na,na,na,na > : bind0<F> { }; @@ -153,24 +120,28 @@ template< struct bind1 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// public: - typedef typename f_::template apply<t1>::type type; + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + }; }; @@ -181,11 +152,11 @@ template< , typename U4, typename U5 > struct resolve_bind_arg< - bind1< F,T1 >,U1, U2, U3, U4, U5 + bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -195,7 +166,7 @@ BOOST_MPL_AUX_ARITY_SPEC(2, bind1) template< typename F, typename T1 > -struct bind< F,T1,void_,void_,void_,void_ > +struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; @@ -206,29 +177,33 @@ template< struct bind2 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// public: - typedef typename f_::template apply< t1,t2 >::type type; + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + }; }; @@ -239,11 +214,11 @@ template< , typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind2< F,T1,T2 >,U1, U2, U3, U4, U5 + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -253,7 +228,7 @@ BOOST_MPL_AUX_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > -struct bind< F,T1,T2,void_,void_,void_ > +struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; @@ -264,34 +239,38 @@ template< struct bind3 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// public: - typedef typename f_::template apply< t1,t2,t3 >::type type; + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + }; }; @@ -302,11 +281,11 @@ template< , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind3< F,T1,T2,T3 >,U1, U2, U3, U4, U5 + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -316,7 +295,7 @@ BOOST_MPL_AUX_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > -struct bind< F,T1,T2,T3,void_,void_ > +struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; @@ -327,39 +306,44 @@ template< struct bind4 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; - typedef typename r4::next_arg n5; - typedef typename aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 >::type t4; - + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// public: - typedef typename f_::template apply< t1,t2,t3,t4 >::type type; + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + }; }; @@ -370,11 +354,11 @@ template< , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind4< F,T1,T2,T3,T4 >,U1, U2, U3, U4, U5 + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -384,7 +368,7 @@ BOOST_MPL_AUX_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > -struct bind< F,T1,T2,T3,T4,void_ > +struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; @@ -396,44 +380,49 @@ template< struct bind5 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; - typedef typename r4::next_arg n5; - typedef typename aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 >::type t4; - + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; - typedef typename r5::next_arg n6; - typedef typename aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 >::type t5; - + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// public: - typedef typename f_::template apply< t1,t2,t3,t4,t5 >::type type; + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + }; }; @@ -445,18 +434,18 @@ template< , typename U5 > struct resolve_bind_arg< - bind5< F,T1,T2,T3,T4,T5 >,U1, U2, U3, U4, U5 + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) -// primary template (not a specialization!) +/// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -467,34 +456,100 @@ struct bind { }; -template< typename F, typename T > -struct bind1st +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > { template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply - : F::template apply< T,U > { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; }; }; -template< typename F, typename T > -struct bind2nd +template< + template< typename T1, typename T2, typename T3 > class F, typename Tag + > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct eval_if; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< eval_if,Tag > + , T1, T2, T3 + > { template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply - : F::template apply< U,T > { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef typename eval_if< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; }; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp b/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp new file mode 100644 index 0000000..d80a72b --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp @@ -0,0 +1,52 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct bind; + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/gcc/bitand.hpp b/include/boost/mpl/aux_/preprocessed/gcc/bitand.hpp new file mode 100644 index 0000000..642f042 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/bitand.hpp @@ -0,0 +1,144 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag<N1>::type + , typename bitand_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/bitor.hpp b/include/boost/mpl/aux_/preprocessed/gcc/bitor.hpp new file mode 100644 index 0000000..4ccbe89 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/bitor.hpp @@ -0,0 +1,144 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag<N1>::type + , typename bitor_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp b/include/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp new file mode 100644 index 0000000..73b519e --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp @@ -0,0 +1,144 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag<N1>::type + , typename bitxor_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/divides.hpp b/include/boost/mpl/aux_/preprocessed/gcc/divides.hpp new file mode 100644 index 0000000..c963f62 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/divides.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag<N1>::type + , typename divides_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp b/include/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp new file mode 100644 index 0000000..bb051d6 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + : equal_to_impl< + typename equal_to_tag<N1>::type + , typename equal_to_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/gcc/fold_backward_impl.hpp deleted file mode 100644 index 808774f..0000000 --- a/include/boost/mpl/aux_/preprocessed/gcc/fold_backward_impl.hpp +++ /dev/null @@ -1,223 +0,0 @@ -// preprocessed version of 'boost/mpl/aux_/fold_backward_impl.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { -namespace aux { - -// forward declaration -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< 0,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef fwd_state0 bkwd_state0; - typedef bkwd_state0 state; - typedef iter0 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< 1,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply<fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - - - typedef fwd_state1 bkwd_state1; - typedef typename BackwardOp::template apply<bkwd_state1, typename iter0::type>::type bkwd_state0; - typedef bkwd_state0 state; - typedef iter1 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< 2,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply<fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - - - typedef fwd_state2 bkwd_state2; - typedef typename BackwardOp::template apply<bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename BackwardOp::template apply<bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter2 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< 3,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply<fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply<fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - - - typedef fwd_state3 bkwd_state3; - typedef typename BackwardOp::template apply<bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename BackwardOp::template apply<bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename BackwardOp::template apply<bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter3 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< 4,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply<fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply<fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply<fwd_state3, typename iter3::type>::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fwd_state4 bkwd_state4; - typedef typename BackwardOp::template apply<bkwd_state4, typename iter3::type>::type bkwd_state3; - typedef typename BackwardOp::template apply<bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename BackwardOp::template apply<bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename BackwardOp::template apply<bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter4 iterator; -}; - -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply<fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply<fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply<fwd_state3, typename iter3::type>::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fold_backward_impl< - ( (N - 4) < 0 ? 0 : N - 4 ) - , iter4 - , Last - , fwd_state4 - , BackwardOp - , ForwardOp - > nested_chunk; - - typedef typename nested_chunk::state bkwd_state4; - typedef typename BackwardOp::template apply<bkwd_state4, typename iter3::type>::type bkwd_state3; - typedef typename BackwardOp::template apply<bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename BackwardOp::template apply<bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename BackwardOp::template apply<bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef typename nested_chunk::iterator iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< -1,First,Last,State,BackwardOp,ForwardOp > -{ - typedef fold_backward_impl< - -1 - , typename First::next - , Last - - ,typename ForwardOp::template apply<State, typename First::type>::type - , BackwardOp - , ForwardOp - > nested_step; - - typedef typename BackwardOp::template apply<typename nested_step::state, typename First::type>::type state; - typedef typename nested_step::iterator iterator; -}; - -template< - typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< -1,Last,Last,State,BackwardOp,ForwardOp > -{ - typedef State state; - typedef Last iterator; -}; - -} // namespace aux -} // namespace mpl -} // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp index d1214ec..00c2e55 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp @@ -1,18 +1,25 @@ -// preprocessed version of 'boost/mpl/aux_/fold_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration -// forward declaration template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct fold_impl; template< @@ -39,8 +46,8 @@ struct fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply<state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; typedef state1 state; @@ -57,10 +64,10 @@ struct fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply<state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<state1, typename iter1::type>::type state2; - typedef typename iter1::next iter2; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; typedef state2 state; @@ -77,12 +84,12 @@ struct fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply<state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<state1, typename iter1::type>::type state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply<state2, typename iter2::type>::type state3; - typedef typename iter2::next iter3; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; + typedef typename next<iter2>::type iter3; typedef state3 state; @@ -99,14 +106,14 @@ struct fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply<state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<state1, typename iter1::type>::type state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply<state2, typename iter2::type>::type state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply<state3, typename iter3::type>::type state4; - typedef typename iter3::next iter4; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4; + typedef typename next<iter3>::type iter4; typedef state4 state; @@ -114,12 +121,12 @@ struct fold_impl< 4,First,Last,State,ForwardOp > }; template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct fold_impl { typedef fold_impl< @@ -137,7 +144,7 @@ struct fold_impl , typename chunk_::state , ForwardOp > res_; - + typedef typename res_::state state; typedef typename res_::iterator iterator; }; @@ -147,14 +154,13 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 - , typename First::next + , typename next<First>::type , Last - - ,typename ForwardOp::template apply<State, typename First::type>::type + , typename apply2<ForwardOp,State, typename deref<First>::type>::type , ForwardOp > { @@ -164,14 +170,11 @@ template< typename Last , typename State , typename ForwardOp - > + > struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp index 8e4af31..0675a24 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp @@ -1,30 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/full_lambda.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Aleksey Gurtovoy 2001-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) +// -template< - typename T - , typename Tag - , typename Protect = false_ - , typename Arity = int_< aux::template_arity<T>::value > - > -struct lambda_impl -{ - typedef false_ is_le; - typedef T type; -}; +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! -template< - typename T - , typename Tag = void_ - , typename Arity = int_< aux::template_arity<T>::value > - > -struct lambda - : lambda_impl< T,Tag,false_,Arity > -{ -}; +namespace boost { namespace mpl { namespace aux { @@ -45,44 +30,56 @@ struct lambda_or< false,false,false,false,false > } // namespace aux -template< int N, typename Tag, typename Protect > -struct lambda_impl< arg<N>,Tag,Protect,int_<-1> > +template< + typename T + , typename Tag + , typename Arity + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg<N>,Tag, int_< -1 > > { typedef true_ is_le; - typedef arg<N> type; + typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41 + typedef protect<result_> type; }; template< typename F , typename Tag - , typename Protect - > -struct lambda_impl< - bind0<F> - , Tag - , Protect, int_<1> > +struct lambda< + bind0<F> + , Tag + , int_<1> + > { typedef false_ is_le; typedef bind0< F - > type; -}; + > result_; -template< - template< typename P1 > class F - , typename T1 - , typename Tag - > -struct lambda< F<T1>,Tag,int_<1> > - : lambda_impl< F<T1>,Tag,true_,int_<1> > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > @@ -90,33 +87,24 @@ struct le_result1 { typedef F< typename L1::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1 > class F - , typename Tag + typename Tag + , template< typename P1 > class F , typename L1 > -struct le_result1< true_,Tag,false_,F,L1 > +struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > - , typename L1::type - > type; -}; + , typename L1::result_ + > result_; -template< - template< typename P1 > class F - , typename Tag - , typename L1 - > -struct le_result1< true_,Tag,true_,F,L1 > -{ - typedef protect< bind1< - quote1< F,Tag > - , typename L1::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -125,58 +113,50 @@ template< template< typename P1 > class F , typename T1 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1>,Tag,Protect,int_<1 > - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef aux::lambda_or< - l1::is_le::value - > is_le; - - typedef typename aux::le_result1< - typename is_le::type +struct lambda< + F<T1> , Tag - , Protect - , F - , l1 - >::type type; + , int_<1> + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag - , typename Protect - > -struct lambda_impl< - bind1< F,T1 > - , Tag - , Protect, int_<2> > +struct lambda< + bind1< F,T1 > + , Tag + , int_<2> + > { typedef false_ is_le; typedef bind1< F , T1 - > type; -}; + > result_; -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - , typename Tag - > -struct lambda< F<T1,T2>,Tag,int_<2> > - : lambda_impl< F<T1,T2>,Tag,true_,int_<2> > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > @@ -184,33 +164,24 @@ struct le_result2 { typedef F< typename L1::type, typename L2::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true_,Tag,false_,F,L1,L2 > +struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > - , typename L1::type, typename L2::type - > type; -}; + , typename L1::result_, typename L2::result_ + > result_; -template< - template< typename P1, typename P2 > class F - , typename Tag - , typename L1, typename L2 - > -struct le_result2< true_,Tag,true_,F,L1,L2 > -{ - typedef protect< bind2< - quote2< F,Tag > - , typename L1::type, typename L2::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -219,60 +190,55 @@ template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2>,Tag,Protect,int_<2 > - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value - > is_le; - - typedef typename aux::le_result2< - typename is_le::type +struct lambda< + F< T1,T2 > , Tag - , Protect - , F - , l1, l2 - >::type type; + , int_<2> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag - , typename Protect - > -struct lambda_impl< - bind2< F,T1,T2 > - , Tag - , Protect, int_<3> > +struct lambda< + bind2< F,T1,T2 > + , Tag + , int_<3> + > { typedef false_ is_le; typedef bind2< F , T1, T2 - > type; -}; + > result_; -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - , typename Tag - > -struct lambda< F<T1,T2,T3>,Tag,int_<3> > - : lambda_impl< F<T1,T2,T3>,Tag,true_,int_<3> > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > @@ -280,33 +246,24 @@ struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2, typename P3 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true_,Tag,false_,F,L1,L2,L3 > +struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; -template< - template< typename P1, typename P2, typename P3 > class F - , typename Tag - , typename L1, typename L2, typename L3 - > -struct le_result3< true_,Tag,true_,F,L1,L2,L3 > -{ - typedef protect< bind3< - quote3< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -315,61 +272,57 @@ template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3>,Tag,Protect,int_<3 > - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - > is_le; - - typedef typename aux::le_result3< - typename is_le::type +struct lambda< + F< T1,T2,T3 > , Tag - , Protect - , F - , l1, l2, l3 - >::type type; + , int_<3> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag - , typename Protect - > -struct lambda_impl< - bind3< F,T1,T2,T3 > - , Tag - , Protect, int_<4> > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + , int_<4> + > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 - > type; -}; + > result_; -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename T1, typename T2, typename T3, typename T4 - , typename Tag - > -struct lambda< F<T1,T2,T3,T4>,Tag,int_<4> > - : lambda_impl< F<T1,T2,T3,T4>,Tag,true_,int_<4> > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > @@ -378,35 +331,25 @@ struct le_result4 typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename Tag - , typename L1, typename L2, typename L3, typename L4 - > -struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 > -{ - typedef protect< bind4< - quote4< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -415,67 +358,59 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4>,Tag,Protect,int_<4 > - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - typedef lambda_impl< T4,Tag > l4; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - , l4::is_le::value - > is_le; - - typedef typename aux::le_result4< - typename is_le::type +struct lambda< + F< T1,T2,T3,T4 > , Tag - , Protect - , F - , l1, l2, l3, l4 - >::type type; + , int_<4> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag - , typename Protect - > -struct lambda_impl< - bind4< F,T1,T2,T3,T4 > - , Tag - , Protect, int_<5> > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + , int_<5> + > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 - > type; -}; + > result_; -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename T1, typename T2, typename T3, typename T4, typename T5 - , typename Tag - > -struct lambda< F<T1,T2,T3,T4,T5>,Tag,int_<5> > - : lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_,int_<5> > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > @@ -484,43 +419,25 @@ struct le_result5 typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type - > type; + > result_; + + typedef result_ type; }; template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type, typename L5::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename Tag - , typename L1, typename L2, typename L3, typename L4, typename L5 - > -struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 > -{ - typedef protect< bind5< - quote5< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type, typename L5::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -533,100 +450,109 @@ template< class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4,T5>,Tag,Protect,int_<5 > - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - typedef lambda_impl< T4,Tag > l4; - typedef lambda_impl< T5,Tag > l5; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - , l4::is_le::value, l5::is_le::value - > is_le; - - typedef typename aux::le_result5< - typename is_le::type +struct lambda< + F< T1,T2,T3,T4,T5 > , Tag - , Protect - , F - , l1, l2, l3, l4, l5 - >::type type; + , int_<5> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag - , typename Protect - > -struct lambda_impl< - bind5< F,T1,T2,T3,T4,T5 > - , Tag - , Protect, int_<6> > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 - > type; + > result_; + + typedef result_ type; }; -// special case for 'protect' -template< typename T, typename Tag, typename Protect > -struct lambda_impl< protect<T>,Tag,Protect,int_<1> > +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< protect<T>,Tag, int_<1> > { typedef false_ is_le; - typedef protect<T> type; + typedef protect<T> result_; + typedef result_ type; }; -// specializations for main 'bind', 'bind1st' and 'bind2nd' forms +/// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag - , typename Protect - > -struct lambda_impl< - bind< F,T1,T2,T3,T4,T5 > - , Tag - , Protect - , int_<6> > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > { typedef false_ is_le; - typedef bind< F,T1,T2,T3,T4,T5 > type; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; }; template< - typename F, typename T - , typename Tag - , typename Protect + typename F + , typename Tag1 + , typename Tag2 + , typename Arity > -struct lambda_impl< bind1st<F,T>,Tag,Protect,int_<2> > +struct lambda< + lambda< F,Tag1,Arity > + , Tag2 + , int_<3> + > { - typedef false_ is_le; - typedef bind1st< F,T > type; + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef bind1< quote1<aux::template_arity>, typename l1::result_ > arity_; + typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; + typedef aux::le_result3<is_le, Tag2, mpl::lambda, l1, l2, l3> le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; -template< - typename F, typename T - , typename Tag - , typename Protect - > -struct lambda_impl< bind2nd<F,T>,Tag,Protect,int_<2> > -{ - typedef false_ is_le; - typedef bind2nd< F,T > type; -}; +BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/greater.hpp b/include/boost/mpl/aux_/preprocessed/gcc/greater.hpp new file mode 100644 index 0000000..73bbaad --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/greater.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + : greater_impl< + typename greater_tag<N1>::type + , typename greater_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp b/include/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp new file mode 100644 index 0000000..d52e43e --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + : greater_equal_impl< + typename greater_equal_tag<N1>::type + , typename greater_equal_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/inherit.hpp b/include/boost/mpl/aux_/preprocessed/gcc/inherit.hpp new file mode 100644 index 0000000..00f31c4 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/inherit.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_backward_impl.hpp deleted file mode 100644 index 816de20..0000000 --- a/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_backward_impl.hpp +++ /dev/null @@ -1,222 +0,0 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_backward_impl.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { -namespace aux { - -// forward declaration -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl< 0,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef fwd_state0 bkwd_state0; - typedef bkwd_state0 state; - typedef iter0 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl< 1,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply< fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; - - - typedef fwd_state1 bkwd_state1; - typedef typename BackwardOp::template apply< bkwd_state1,iter0 >::type bkwd_state0; - typedef bkwd_state0 state; - typedef iter1 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl< 2,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply< fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; - - - typedef fwd_state2 bkwd_state2; - typedef typename BackwardOp::template apply< bkwd_state2,iter1 >::type bkwd_state1; - typedef typename BackwardOp::template apply< bkwd_state1,iter0 >::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter2 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl< 3,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply< fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply< fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; - - - typedef fwd_state3 bkwd_state3; - typedef typename BackwardOp::template apply< bkwd_state3,iter2 >::type bkwd_state2; - typedef typename BackwardOp::template apply< bkwd_state2,iter1 >::type bkwd_state1; - typedef typename BackwardOp::template apply< bkwd_state1,iter0 >::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter3 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl< 4,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply< fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply< fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply< fwd_state3,iter3 >::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fwd_state4 bkwd_state4; - typedef typename BackwardOp::template apply< bkwd_state4,iter3 >::type bkwd_state3; - typedef typename BackwardOp::template apply< bkwd_state3,iter2 >::type bkwd_state2; - typedef typename BackwardOp::template apply< bkwd_state2,iter1 >::type bkwd_state1; - typedef typename BackwardOp::template apply< bkwd_state1,iter0 >::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter4 iterator; -}; - -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply< fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply< fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply< fwd_state3,iter3 >::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef iter_fold_backward_impl< - ( (N - 4) < 0 ? 0 : N - 4 ) - , iter4 - , Last - , fwd_state4 - , BackwardOp - , ForwardOp - > nested_chunk; - - typedef typename nested_chunk::state bkwd_state4; - typedef typename BackwardOp::template apply< bkwd_state4,iter3 >::type bkwd_state3; - typedef typename BackwardOp::template apply< bkwd_state3,iter2 >::type bkwd_state2; - typedef typename BackwardOp::template apply< bkwd_state2,iter1 >::type bkwd_state1; - typedef typename BackwardOp::template apply< bkwd_state1,iter0 >::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef typename nested_chunk::iterator iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl< -1,First,Last,State,BackwardOp,ForwardOp > -{ - typedef iter_fold_backward_impl< - -1 - , typename First::next - , Last - , typename ForwardOp::template apply< State,First >::type - , BackwardOp - , ForwardOp - > nested_step; - - typedef typename BackwardOp::template apply<typename nested_step::state, First>::type state; - typedef typename nested_step::iterator iterator; -}; - -template< - typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl< -1,Last,Last,State,BackwardOp,ForwardOp > -{ - typedef State state; - typedef Last iterator; -}; - -} // namespace aux -} // namespace mpl -} // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp b/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp index db74e48..6951795 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp @@ -1,9 +1,16 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_if_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step @@ -23,7 +30,7 @@ struct iter_fold_if_step_impl > struct result_ { - typedef typename StateOp::template apply< State,Iterator >::type state; + typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; @@ -52,10 +59,10 @@ template< > struct iter_fold_if_forward_step { - typedef typename Predicate::template apply< State,Iterator >::type not_last; + typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator, State, ForwardOp, mpl::next< Iterator> > impl_; + >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; @@ -69,10 +76,10 @@ template< > struct iter_fold_if_backward_step { - typedef typename Predicate::template apply< State,Iterator >::type not_last; + typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_; + >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; @@ -95,7 +102,7 @@ struct iter_fold_if_impl typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; - + typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< @@ -123,7 +130,4 @@ struct iter_fold_if_impl typedef typename backward_step4::iterator iterator; }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp index e8dc4ec..c25f136 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp @@ -1,18 +1,25 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration -// forward declaration template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl; template< @@ -39,8 +46,8 @@ struct iter_fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply< state0,iter0 >::type state1; - typedef typename iter0::next iter1; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; typedef state1 state; @@ -57,10 +64,10 @@ struct iter_fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply< state0,iter0 >::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< state1,iter1 >::type state2; - typedef typename iter1::next iter2; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename next<iter1>::type iter2; typedef state2 state; @@ -77,12 +84,12 @@ struct iter_fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply< state0,iter0 >::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< state1,iter1 >::type state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply< state2,iter2 >::type state3; - typedef typename iter2::next iter3; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename next<iter2>::type iter3; typedef state3 state; @@ -99,14 +106,14 @@ struct iter_fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply< state0,iter0 >::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< state1,iter1 >::type state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply< state2,iter2 >::type state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply< state3,iter3 >::type state4; - typedef typename iter3::next iter4; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename next<iter3>::type iter4; typedef state4 state; @@ -114,12 +121,12 @@ struct iter_fold_impl< 4,First,Last,State,ForwardOp > }; template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl { typedef iter_fold_impl< @@ -137,7 +144,7 @@ struct iter_fold_impl , typename chunk_::state , ForwardOp > res_; - + typedef typename res_::state state; typedef typename res_::iterator iterator; }; @@ -147,13 +154,13 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 - , typename First::next + , typename next<First>::type , Last - , typename ForwardOp::template apply< State,First >::type + , typename apply2< ForwardOp,State,First >::type , ForwardOp > { @@ -163,14 +170,11 @@ template< typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/gcc/lambda_helper.hpp deleted file mode 100644 index 953d826..0000000 --- a/include/boost/mpl/aux_/preprocessed/gcc/lambda_helper.hpp +++ /dev/null @@ -1,120 +0,0 @@ -// preprocessed version of 'boost/mpl/lambda_helper.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { - -template< - template< typename P1 > class F - , typename T1 - > -struct lambda_helper1 -{ - struct rebind - { - static int const arity = 1; - typedef T1 arg1; - - template< typename U1 > struct apply - : F<U1> - { - }; - }; -}; - -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - > -struct lambda_helper2 -{ - struct rebind - { - static int const arity = 2; - typedef T1 arg1; - typedef T2 arg2; - - template< typename U1, typename U2 > struct apply - : F< U1,U2 > - { - }; - }; -}; - -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - > -struct lambda_helper3 -{ - struct rebind - { - static int const arity = 3; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - - template< typename U1, typename U2, typename U3 > struct apply - : F< U1,U2,U3 > - { - }; - }; -}; - -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename T1, typename T2, typename T3, typename T4 - > -struct lambda_helper4 -{ - struct rebind - { - static int const arity = 4; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - typedef T4 arg4; - - template< - typename U1, typename U2, typename U3, typename U4 - > - struct apply - : F< U1,U2,U3,U4 > - { - }; - }; -}; - -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename T1, typename T2, typename T3, typename T4, typename T5 - > -struct lambda_helper5 -{ - struct rebind - { - static int const arity = 5; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - typedef T4 arg4; - typedef T5 arg5; - - template< - typename U1, typename U2, typename U3, typename U4 - , typename U5 - > - struct apply - : F< U1,U2,U3,U4,U5 > - { - }; - }; -}; - -} // namespace mpl -} // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp index 4a02653..76d3f3f 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp @@ -1,182 +1,198 @@ -// preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { -template< int arity_, bool Protect > struct lambda_impl +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ { - template< typename T, typename Tag > struct result_ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; + typedef is_placeholder<T> is_le; }; }; -template<> struct lambda_impl<1, false> +template<> struct lambda_impl< int_<1> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + typedef bind1< - f_ - , arg1 - > type; + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<1, true> +template<> struct lambda_impl< int_<2> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef mpl::protect< bind1< - f_ - , arg1 - > > type; - }; -}; - -template<> struct lambda_impl<2, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; typedef bind2< - f_ - , arg1, arg2 - > type; + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<2, true> +template<> struct lambda_impl< int_<3> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; - typedef mpl::protect< bind2< - f_ - , arg1, arg2 - > > type; - }; -}; - -template<> struct lambda_impl<3, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; typedef bind3< - f_ - , arg1, arg2, arg3 - > type; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<3, true> +template<> struct lambda_impl< int_<4> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; - typedef mpl::protect< bind3< - f_ - , arg1, arg2, arg3 - > > type; - }; -}; - -template<> struct lambda_impl<4, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; typedef bind4< - f_ - , arg1, arg2, arg3, arg4 - > type; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<4, true> +template<> struct lambda_impl< int_<5> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; - typedef mpl::protect< bind4< - f_ - , arg1, arg2, arg3, arg4 - > > type; - }; -}; - -template<> struct lambda_impl<5, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - typedef typename lambda< typename F::arg5, Tag, false >::type arg5; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; typedef bind5< - f_ - , arg1, arg2, arg3, arg4, arg5 - > type; - }; -}; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; -template<> struct lambda_impl<5, true> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - typedef typename lambda< typename F::arg5, Tag, false >::type arg5; - + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; - typedef mpl::protect< bind5< - f_ - , arg1, arg2, arg3, arg4, arg5 - > > type; + typedef typename type_::type type; }; }; @@ -184,19 +200,30 @@ template<> struct lambda_impl<5, true> template< typename T - , typename Tag = void_ - , bool Protect = true + , typename Tag + , typename Protect > struct lambda - : aux::lambda_impl< - ::boost::mpl::aux::template_arity<T>::value +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity<T>::type arity_; + typedef typename aux::lambda_impl<arity_> + ::template result_< T,Tag,Protect > l_; - , Protect + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; - >::template result_< T,Tag > +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le { }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/less.hpp b/include/boost/mpl/aux_/preprocessed/gcc/less.hpp new file mode 100644 index 0000000..75997da --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/less.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + : less_impl< + typename less_tag<N1>::type + , typename less_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp b/include/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp new file mode 100644 index 0000000..ed8aae1 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + : less_equal_impl< + typename less_equal_tag<N1>::type + , typename less_equal_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/list.hpp b/include/boost/mpl/aux_/preprocessed/gcc/list.hpp index 1a89231..4e8ad53 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/list.hpp @@ -1,14 +1,23 @@ -// preprocessed version of 'boost/mpl/list.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T0 = void_, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - , typename T6 = void_, typename T7 = void_, typename T8 = void_ - , typename T9 = void_ + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na > struct list; @@ -16,8 +25,8 @@ template< > struct list< - void_, void_, void_, void_, void_, void_, void_, void_, void_ - , void_ + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : list0< > { @@ -28,7 +37,8 @@ template< typename T0 > struct list< - T0, void_, void_, void_, void_, void_, void_, void_, void_, void_ + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : list1<T0> { @@ -38,7 +48,10 @@ struct list< template< typename T0, typename T1 > -struct list< T0,T1,void_,void_,void_,void_,void_,void_,void_,void_ > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; @@ -47,7 +60,10 @@ struct list< T0,T1,void_,void_,void_,void_,void_,void_,void_,void_ > template< typename T0, typename T1, typename T2 > -struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; @@ -56,7 +72,10 @@ struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > template< typename T0, typename T1, typename T2, typename T3 > -struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; @@ -65,7 +84,10 @@ struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > template< typename T0, typename T1, typename T2, typename T3, typename T4 > -struct list< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; @@ -75,7 +97,10 @@ template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > -struct list< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; @@ -85,7 +110,10 @@ template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > -struct list< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; @@ -95,7 +123,10 @@ template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > -struct list< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; @@ -105,24 +136,188 @@ template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > -struct list< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; -// primary template (not a specialization!) - template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > -struct list +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { - typedef list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > type; + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/list_c.hpp b/include/boost/mpl/aux_/preprocessed/gcc/list_c.hpp index 9f0f872..0b48a7f 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/list_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/list_c.hpp @@ -1,25 +1,34 @@ -// preprocessed version of 'boost/mpl/list_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T - , long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX - , long C9 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T - > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c<T> { @@ -27,12 +36,12 @@ struct list_c< }; template< - typename T - , long C0 + typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { @@ -40,12 +49,12 @@ struct list_c< }; template< - typename T - , long C0, long C1 + typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { @@ -53,12 +62,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2 + typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { @@ -66,12 +75,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3 + typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { @@ -79,12 +88,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3, long C4 + typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { @@ -92,11 +101,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { @@ -104,48 +114,215 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 > -struct list_c< T,C0,C1,C2,C3,C4,C5,C6,LONG_MAX,LONG_MAX,LONG_MAX > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 > -struct list_c< T,C0,C1,C2,C3,C4,C5,C6,C7,LONG_MAX,LONG_MAX > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 > -struct list_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,LONG_MAX > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; -// primary template (not a specialization!) template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 > -struct list_c +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/map.hpp b/include/boost/mpl/aux_/preprocessed/gcc/map.hpp new file mode 100644 index 0000000..1503c72 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/map.hpp @@ -0,0 +1,323 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1<T0> +{ + typedef typename map1<T0>::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/gcc/minus.hpp b/include/boost/mpl/aux_/preprocessed/gcc/minus.hpp new file mode 100644 index 0000000..7439877 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/minus.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag<N1>::type + , typename minus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/modulus.hpp b/include/boost/mpl/aux_/preprocessed/gcc/modulus.hpp new file mode 100644 index 0000000..e99421b --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/modulus.hpp @@ -0,0 +1,97 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + : modulus_impl< + typename modulus_tag<N1>::type + , typename modulus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp b/include/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp new file mode 100644 index 0000000..39af532 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + : not_equal_to_impl< + typename not_equal_to_tag<N1>::type + , typename not_equal_to_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/or.hpp b/include/boost/mpl/aux_/preprocessed/gcc/or.hpp index 517fbdf..31e1aaa 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/or.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/or.hpp @@ -1,5 +1,13 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { @@ -33,8 +41,8 @@ struct or_impl< } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ @@ -48,15 +56,14 @@ struct or_ BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ - , (T1, T2, T3, T4, T5) + , ( T1, T2, T3, T4, T5) ) }; -BOOST_MPL_AUX_VOID_SPEC_EXT( +BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) -}} // namespace boost::mpl - +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp b/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp index 8c17ad3..4cb7d7d 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp @@ -1,54 +1,78 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Aleksey Gurtovoy 2001-2003 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; -namespace placeholders { -using boost::mpl::_; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_) -// agurt, 17/mar/02: one more placeholder for the last 'apply#' -// specialization +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +}}} +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; -namespace placeholders { -using boost::mpl::_1; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_1) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; -namespace placeholders { -using boost::mpl::_2; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_2) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; -namespace placeholders { -using boost::mpl::_3; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_3) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; -namespace placeholders { -using boost::mpl::_4; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_4) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; -namespace placeholders { -using boost::mpl::_5; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_5) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; -namespace placeholders { -using boost::mpl::_6; -} - -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_6) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +}}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/plus.hpp b/include/boost/mpl/aux_/preprocessed/gcc/plus.hpp new file mode 100644 index 0000000..489dd41 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/plus.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag<N1>::type + , typename plus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp b/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp index 18a937d..d7d0420 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp @@ -1,12 +1,18 @@ -// preprocessed version of 'boost/mpl/quote.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// -template< typename T, bool has_type_ = aux::has_type<T>::value > +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< typename T, bool has_type_ > struct quote_impl - : T { }; @@ -25,7 +31,10 @@ struct quote1 { template< typename U1 > struct apply - : quote_impl< F<U1> > + : quote_impl< + F<U1> + , aux::has_type< F<U1> >::value + > { }; @@ -39,7 +48,10 @@ struct quote2 { template< typename U1, typename U2 > struct apply - : quote_impl< F<U1,U2> > + : quote_impl< + F< U1,U2 > + , aux::has_type< F< U1,U2 > >::value + > { }; @@ -53,7 +65,10 @@ struct quote3 { template< typename U1, typename U2, typename U3 > struct apply - : quote_impl< F<U1,U2,U3> > + : quote_impl< + F< U1,U2,U3 > + , aux::has_type< F< U1,U2,U3 > >::value + > { }; @@ -70,7 +85,10 @@ struct quote4 > struct apply - : quote_impl< F<U1,U2,U3,U4> > + : quote_impl< + F< U1,U2,U3,U4 > + , aux::has_type< F< U1,U2,U3,U4 > >::value + > { }; @@ -92,12 +110,14 @@ struct quote5 > struct apply - : quote_impl< F<U1,U2,U3,U4,U5> > + : quote_impl< + F< U1,U2,U3,U4,U5 > + , aux::has_type< F< U1,U2,U3,U4,U5 > >::value + > { }; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp new file mode 100644 index 0000000..84c3d9c --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp @@ -0,0 +1,231 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/Attic/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename iter3::type >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename iter3::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename iter3::type >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename iter3::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_fold_impl< + -1 + , typename next<First>::type + , Last + , typename apply2<ForwardOp,State, typename First::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename First::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000..6d7439a --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp @@ -0,0 +1,231 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/Attic/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename next<iter1>::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename next<iter2>::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_iter_fold_impl< + -1 + , typename next<First>::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/set.hpp b/include/boost/mpl/aux_/preprocessed/gcc/set.hpp new file mode 100644 index 0000000..6c4ae6f --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/set.hpp @@ -0,0 +1,323 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1<T0> +{ + typedef typename set1<T0>::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp b/include/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp new file mode 100644 index 0000000..c11fe41 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp @@ -0,0 +1,95 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + : shift_left_impl< + typename shift_left_tag<N1>::type + , typename shift_left_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename Shift > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(Shift)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp b/include/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp new file mode 100644 index 0000000..5867998 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp @@ -0,0 +1,95 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + : shift_right_impl< + typename shift_right_tag<N1>::type + , typename shift_right_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename Shift > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(Shift)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp index e279208..a3bf2db 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp @@ -1,5 +1,13 @@ -// preprocessed version of 'boost/mpl/aux_/template_arity.hpp' header -// see the original for copyright information + +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { @@ -9,45 +17,46 @@ template< int N > struct arity_tag }; template< - int C1, int C2, int C3, int C4, int C5 + int C1, int C2, int C3, int C4, int C5, int C6 > struct max_arity { static int const value = - ( C5 > 0 ? C5 : ( C4 > 0 ? C4 : ( C3 > 0 ? C3 : ( C2 > 0 ? C2 : ( C1 - > 0 ? C1 : -1 ) ) ) ) ) + ( C6 > 0 ? C6 : ( C5 > 0 ? C5 : ( C4 > 0 ? C4 : ( C3 > 0 ? C3 : ( C2 + > 0 ? C2 : ( C1 > 0 ? C1 : -1 ) ) ) ) ) ) ; + }; -arity_tag<0> arity_helper(...); +arity_tag<0>::type arity_helper(...); template< template< typename P1 > class F , typename T1 > typename arity_tag<1>::type -arity_helper(type_wrapper< F<T1> >,arity_tag<1 >); +arity_helper(type_wrapper< F<T1> >, arity_tag<1>); template< template< typename P1, typename P2 > class F , typename T1, typename T2 > typename arity_tag<2>::type -arity_helper(type_wrapper< F<T1,T2> >,arity_tag<2 >); +arity_helper(type_wrapper< F< T1,T2 > >, arity_tag<2>); template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 > typename arity_tag<3>::type -arity_helper(type_wrapper< F<T1,T2,T3> >,arity_tag<3 >); +arity_helper(type_wrapper< F< T1,T2,T3 > >, arity_tag<3>); template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 > typename arity_tag<4>::type -arity_helper(type_wrapper< F<T1,T2,T3,T4> >,arity_tag<4 >); +arity_helper(type_wrapper< F< T1,T2,T3,T4 > >, arity_tag<4>); template< template< @@ -58,25 +67,39 @@ template< , typename T1, typename T2, typename T3, typename T4, typename T5 > typename arity_tag<5>::type -arity_helper(type_wrapper< F<T1,T2,T3,T4,T5> >,arity_tag<5 >); +arity_helper(type_wrapper< F< T1,T2,T3,T4,T5 > >, arity_tag<5>); +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6 + > +typename arity_tag<6>::type +arity_helper(type_wrapper< F< T1,T2,T3,T4,T5,T6 > >, arity_tag<6>); template< typename F, int N > struct template_arity_impl { static int const value = - sizeof(arity_helper(type_wrapper<F>(),arity_tag<N>())) - 1 + sizeof(arity_helper(type_wrapper<F>(), arity_tag<N>())) - 1 ; + }; template< typename F > struct template_arity { static int const value = - ( max_arity< template_arity_impl<F,1 >::value, template_arity_impl< + ( max_arity< template_arity_impl< F,1 >::value, template_arity_impl< F,2 >::value, template_arity_impl< F,3 >::value, template_arity_impl< - F,4 >::value, template_arity_impl< F,5 >::value >::value ) + F,4 >::value, template_arity_impl< F,5 >::value, template_arity_impl< + F,6 >::value >::value ) ; + + typedef int_<value> type; }; -}}} // namespace boost::mpl::aux - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/times.hpp b/include/boost/mpl/aux_/preprocessed/gcc/times.hpp new file mode 100644 index 0000000..a6c3949 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/times.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag<N1>::type + , typename times_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp b/include/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp new file mode 100644 index 0000000..a971f81 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp @@ -0,0 +1,94 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size<Args>::value,F, Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/gcc/vector.hpp b/include/boost/mpl/aux_/preprocessed/gcc/vector.hpp index 35aaadf..bfa9565 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/vector.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/vector.hpp @@ -1,129 +1,323 @@ -// preprocessed version of 'boost/mpl/vector.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T0 = void_, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - , typename T6 = void_, typename T7 = void_, typename T8 = void_ - , typename T9 = void_ + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na > struct vector; template< - + > struct vector< - void_, void_, void_, void_, void_, void_, void_, void_, void_ - , void_ + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : vector0< > { - typedef vector0< > type; + typedef vector0< >::type type; }; template< typename T0 > struct vector< - T0, void_, void_, void_, void_, void_, void_, void_, void_, void_ + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : vector1<T0> { - typedef vector1<T0> type; + typedef typename vector1<T0>::type type; }; template< typename T0, typename T1 > struct vector< - T0, T1, void_, void_, void_, void_, void_, void_, void_, void_ + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : vector2< T0,T1 > { - typedef vector2< T0,T1 > type; + typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > -struct vector< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector3< T0,T1,T2 > { - typedef vector3< T0,T1,T2 > type; + typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > -struct vector< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector4< T0,T1,T2,T3 > { - typedef vector4< T0,T1,T2,T3 > type; + typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > -struct vector< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector5< T0,T1,T2,T3,T4 > { - typedef vector5< T0,T1,T2,T3,T4 > type; + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > -struct vector< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector6< T0,T1,T2,T3,T4,T5 > { - typedef vector6< T0,T1,T2,T3,T4,T5 > type; + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > -struct vector< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector7< T0,T1,T2,T3,T4,T5,T6 > { - typedef vector7< T0,T1,T2,T3,T4,T5,T6 > type; + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > -struct vector< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { - typedef vector8< T0,T1,T2,T3,T4,T5,T6,T7 > type; + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > -struct vector< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { - typedef vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > type; + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; -// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > -struct vector +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { - typedef vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > type; + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp b/include/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp index ff6be1a..840c2e1 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp @@ -1,153 +1,328 @@ -// preprocessed version of 'boost/mpl/vector_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T - , long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX - , long C9 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T - > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c<T> { - typedef vector0_c<T> type; + typedef typename vector0_c<T>::type type; }; template< - typename T - , long C0 + typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T,C0 > { - typedef vector1_c< T,C0 > type; + typedef typename vector1_c< T,C0 >::type type; }; template< - typename T - , long C0, long C1 + typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T,C0,C1 > { - typedef vector2_c< T,C0,C1 > type; + typedef typename vector2_c< T,C0,C1 >::type type; }; template< - typename T - , long C0, long C1, long C2 + typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T,C0,C1,C2 > { - typedef vector3_c< T,C0,C1,C2 > type; + typedef typename vector3_c< T,C0,C1,C2 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3 + typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T,C0,C1,C2,C3 > { - typedef vector4_c< T,C0,C1,C2,C3 > type; + typedef typename vector4_c< T,C0,C1,C2,C3 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4 + typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T,C0,C1,C2,C3,C4 > { - typedef vector5_c< T,C0,C1,C2,C3,C4 > type; + typedef typename vector5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T,C0,C1,C2,C3,C4,C5 > { - typedef vector6_c< T,C0,C1,C2,C3,C4,C5 > type; + typedef typename vector6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T,C0,C1,C2,C3,C4,C5,C6 > { - typedef vector7_c< T,C0,C1,C2,C3,C4,C5,C6 > type; + typedef typename vector7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 > -struct vector_c< T,C0,C1,C2,C3,C4,C5,C6,C7,LONG_MAX,LONG_MAX > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > : vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { - typedef vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > type; + typedef typename vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 > -struct vector_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,LONG_MAX > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { - typedef vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > type; + typedef typename vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; -// primary template (not a specialization!) template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 > -struct vector_c +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { - typedef vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > type; + typedef typename vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename vector11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename vector12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename vector13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename vector14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename vector15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename vector16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename vector17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename vector18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename vector19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename vector20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp index bdc1534..36337c8 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp @@ -1,11 +1,17 @@ -// preprocessed version of 'boost/mpl/aux_/advance_backward.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// -template< nttp_long N > struct advance_backward; +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; template<> struct advance_backward<0> { @@ -15,7 +21,7 @@ struct advance_backward<0> typedef iter0 type; }; - // ETI workaround + /// ETI workaround template<> struct apply<int> { typedef int type; @@ -29,11 +35,11 @@ struct advance_backward<1> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; + typedef typename prior<iter0>::type iter1; typedef iter1 type; }; - // ETI workaround + /// ETI workaround template<> struct apply<int> { typedef int type; @@ -47,12 +53,12 @@ struct advance_backward<2> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; typedef iter2 type; }; - // ETI workaround + /// ETI workaround template<> struct apply<int> { typedef int type; @@ -66,13 +72,13 @@ struct advance_backward<3> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; - typedef typename iter2::prior iter3; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; + typedef typename prior<iter2>::type iter3; typedef iter3 type; }; - // ETI workaround + /// ETI workaround template<> struct apply<int> { typedef int type; @@ -86,14 +92,14 @@ struct advance_backward<4> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; - typedef typename iter2::prior iter3; - typedef typename iter3::prior iter4; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; + typedef typename prior<iter2>::type iter3; + typedef typename prior<iter3>::type iter4; typedef iter4 type; }; - // ETI workaround + /// ETI workaround template<> struct apply<int> { typedef int type; @@ -101,17 +107,26 @@ struct advance_backward<4> }; -template< nttp_long N > +template< long N > struct advance_backward { template< typename Iterator > struct apply { - typedef typename apply1< advance_backward<4>,Iterator >::type chunk_result_; - typedef typename apply1<advance_backward<( (N - 4) < 0 ? 0 : N - 4 )>,chunk_result_>::type type; + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp index 6d1ffda..4ffbe78 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp @@ -1,11 +1,17 @@ -// preprocessed version of 'boost/mpl/aux_/advance_forward.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// -template< nttp_long N > struct advance_forward; +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; template<> struct advance_forward<0> { @@ -15,7 +21,7 @@ struct advance_forward<0> typedef iter0 type; }; - // ETI workaround + /// ETI workaround template<> struct apply<int> { typedef int type; @@ -29,11 +35,11 @@ struct advance_forward<1> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef iter1 type; }; - // ETI workaround + /// ETI workaround template<> struct apply<int> { typedef int type; @@ -47,12 +53,12 @@ struct advance_forward<2> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; typedef iter2 type; }; - // ETI workaround + /// ETI workaround template<> struct apply<int> { typedef int type; @@ -66,13 +72,13 @@ struct advance_forward<3> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; - typedef typename iter2::next iter3; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; + typedef typename next<iter2>::type iter3; typedef iter3 type; }; - // ETI workaround + /// ETI workaround template<> struct apply<int> { typedef int type; @@ -86,14 +92,14 @@ struct advance_forward<4> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; - typedef typename iter2::next iter3; - typedef typename iter3::next iter4; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; + typedef typename next<iter2>::type iter3; + typedef typename next<iter3>::type iter4; typedef iter4 type; }; - // ETI workaround + /// ETI workaround template<> struct apply<int> { typedef int type; @@ -101,17 +107,26 @@ struct advance_forward<4> }; -template< nttp_long N > +template< long N > struct advance_forward { template< typename Iterator > struct apply { - typedef typename apply1< advance_forward<4>,Iterator >::type chunk_result_; - typedef typename apply1<advance_forward<( (N - 4) < 0 ? 0 : N - 4 )>,chunk_result_>::type type; + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/and.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/and.hpp index 3a041a9..555c800 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/and.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/and.hpp @@ -1,10 +1,17 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { - template< bool C_ > struct and_impl { template< @@ -22,12 +29,11 @@ template<> struct and_impl<true> typename T1, typename T2, typename T3, typename T4 > struct result_ - : and_impl< + : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,true_ > { }; - }; template<> @@ -40,13 +46,13 @@ struct and_impl<true> } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ - : aux::and_impl< + : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,T5 > @@ -54,15 +60,14 @@ struct and_ BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ - , (T1, T2, T3, T4, T5) + , ( T1, T2, T3, T4, T5) ) }; -BOOST_MPL_AUX_VOID_SPEC_EXT( +BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) -}} // namespace boost::mpl - +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/apply.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/apply.hpp index 58320d2..a3e2929 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/apply.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/apply.hpp @@ -1,284 +1,166 @@ -// preprocessed version of 'boost/mpl/apply.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 -template< typename F > -struct apply0 : F { - enum { arity = 1 }; typedef F arg1; - friend class apply0_rebind; - typedef apply0_rebind rebind; - }; - class apply0_rebind { public: template< typename U1 > struct apply : apply0<U1> { }; - + typedef typename apply_wrap0< + typename lambda<F>::type + + >::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) }; -// workaround for the ETI bug +/// workaround for ETI bug template<> struct apply0<int> { typedef int type; }; -namespace aux { - -template< typename F> -struct msvc_apply1 -{ - template< bool > struct f_ : F {}; - template<> struct f_<true> - { - template< typename P1 > struct apply - { - }; - }; - - template< typename T1 > struct result_ - : f_< aux::msvc_never_true<F>::value > - ::template apply<T1> - { - }; -}; - -} // namespace aux - template< typename F, typename T1 > struct apply1 + { - typedef typename aux::msvc_apply1<F>::template result_< - T1 - >::type type; - - enum { arity = 2 }; typedef F arg1; - typedef T1 arg2; - friend class apply1_rebind; - typedef apply1_rebind rebind; - }; - class apply1_rebind { public: template< typename U1, typename U2 > struct apply : apply1< U1,U2 > { }; - + typedef typename apply_wrap1< + typename lambda<F>::type + , T1 + >::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) }; -// workaround for ETI bug +/// workaround for ETI bug template<> struct apply1< int,int > { typedef int type; }; -namespace aux { - -template< typename F> -struct msvc_apply2 -{ - template< bool > struct f_ : F {}; - template<> struct f_<true> - { - template< typename P1, typename P2 > struct apply - { - }; - }; - - template< typename T1, typename T2 > struct result_ - : f_< aux::msvc_never_true<F>::value > - ::template apply< T1,T2 > - { - }; -}; - -} // namespace aux - template< typename F, typename T1, typename T2 > struct apply2 + { - typedef typename aux::msvc_apply2<F>::template result_< - T1, T2 - >::type type; - - enum { arity = 3 }; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - friend class apply2_rebind; - typedef apply2_rebind rebind; - }; - class apply2_rebind { public: template< typename U1, typename U2, typename U3 > struct apply : apply2< U1,U2,U3 > { }; - + typedef typename apply_wrap2< + typename lambda<F>::type + , T1, T2 + >::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) }; -// workaround for ETI bug +/// workaround for ETI bug template<> struct apply2< int,int,int > { typedef int type; }; -namespace aux { - -template< typename F> -struct msvc_apply3 -{ - template< bool > struct f_ : F {}; - template<> struct f_<true> - { - template< typename P1, typename P2, typename P3 > struct apply - { - }; - }; - - template< typename T1, typename T2, typename T3 > struct result_ - : f_< aux::msvc_never_true<F>::value > - ::template apply< T1,T2,T3 > - { - }; -}; - -} // namespace aux - template< typename F, typename T1, typename T2, typename T3 > struct apply3 + { - typedef typename aux::msvc_apply3<F>::template result_< - T1, T2, T3 - >::type type; - enum { arity = 4 }; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - typedef T3 arg4; - friend class apply3_rebind; - typedef apply3_rebind rebind; - }; - class apply3_rebind { public: template< typename U1, typename U2, typename U3, typename U4 > struct apply : apply3< U1,U2,U3,U4 > { }; - + typedef typename apply_wrap3< + typename lambda<F>::type + , T1, T2, T3 + >::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) }; -// workaround for ETI bug +/// workaround for ETI bug template<> struct apply3< int,int,int,int > { typedef int type; }; -namespace aux { - -template< typename F> -struct msvc_apply4 -{ - template< bool > struct f_ : F {}; - template<> struct f_<true> - { - template< - typename P1, typename P2, typename P3, typename P4 - > - struct apply - { - }; - }; - - template< - typename T1, typename T2, typename T3, typename T4 - > - struct result_ - : f_< aux::msvc_never_true<F>::value > - ::template apply< T1,T2,T3,T4 > - { - }; -}; - -} // namespace aux - template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 + { - typedef typename aux::msvc_apply4<F>::template result_< - T1, T2, T3, T4 - >::type type; - enum { arity = 5 }; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - typedef T3 arg4; - typedef T4 arg5; - friend class apply4_rebind; - typedef apply4_rebind rebind; - }; - class apply4_rebind { public: template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply : apply4< U1,U2,U3,U4,U5 > { }; - + typedef typename apply_wrap4< + typename lambda<F>::type + , T1, T2, T3, T4 + >::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) }; -// workaround for ETI bug +/// workaround for ETI bug template<> struct apply4< int,int,int,int,int > { typedef int type; }; -namespace aux { - -template< typename F> -struct msvc_apply5 -{ - template< bool > struct f_ : F {}; - template<> struct f_<true> - { - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - struct apply - { - }; - }; - - template< - typename T1, typename T2, typename T3, typename T4 - , typename T5 - > - struct result_ - : f_< aux::msvc_never_true<F>::value > - ::template apply< T1,T2,T3,T4,T5 > - { - }; -}; - -} // namespace aux - template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 + { - typedef typename aux::msvc_apply5<F>::template result_< - T1, T2, T3, T4, T5 - >::type type; - enum { arity = 6 }; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - typedef T3 arg4; - typedef T4 arg5; - typedef T5 arg6; - friend class apply5_rebind; - typedef apply5_rebind rebind; - }; - class apply5_rebind { public: template< typename U1, typename U2, typename U3, typename U4, typename U5, typename U6 > struct apply : apply5< U1,U2,U3,U4,U5,U6 > { }; - + typedef typename apply_wrap5< + typename lambda<F>::type + , T1, T2, T3, T4, T5 + >::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) }; -// workaround for ETI bug +/// workaround for ETI bug template<> struct apply5< int,int,int,int,int,int > { typedef int type; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/apply_fwd.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/apply_fwd.hpp new file mode 100644 index 0000000..a7e0fca --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/apply_fwd.hpp @@ -0,0 +1,46 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/apply_wrap.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/apply_wrap.hpp new file mode 100644 index 0000000..fa76f22 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/apply_wrap.hpp @@ -0,0 +1,247 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< typename F> +struct msvc_apply0 +{ + template< bool > struct f_ : F {}; + template<> struct f_<true> + { + template< typename P = int > struct apply + { + typedef int type; + }; + }; + + template< typename T = int > struct result_ + : f_< aux::msvc_never_true<F>::value > + ::template apply<> + { + }; + +}; + +template< + typename F + > +struct apply_wrap0 +{ + typedef typename msvc_apply0<F>::template result_< + + >::type type; +}; + +/// workaround for ETI bug +template<> +struct apply_wrap0<int> +{ + typedef int type; +}; + +template< typename F> +struct msvc_apply1 +{ + template< bool > struct f_ : F {}; + template<> struct f_<true> + { + template< typename P1 > struct apply + { + typedef int type; + }; + }; + + template< typename T1 > struct result_ + : f_< aux::msvc_never_true<F>::value > + ::template apply<T1> + { + }; +}; + +template< + typename F, typename T1 + > +struct apply_wrap1 +{ + typedef typename msvc_apply1<F>::template result_< + T1 + >::type type; +}; + +/// workaround for ETI bug +template<> +struct apply_wrap1< int,int > +{ + typedef int type; +}; + +template< typename F> +struct msvc_apply2 +{ + template< bool > struct f_ : F {}; + template<> struct f_<true> + { + template< typename P1, typename P2 > struct apply + { + typedef int type; + }; + }; + + template< typename T1, typename T2 > struct result_ + : f_< aux::msvc_never_true<F>::value > + ::template apply< T1,T2 > + { + }; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap2 +{ + typedef typename msvc_apply2<F>::template result_< + T1, T2 + >::type type; +}; + +/// workaround for ETI bug +template<> +struct apply_wrap2< int,int,int > +{ + typedef int type; +}; + +template< typename F> +struct msvc_apply3 +{ + template< bool > struct f_ : F {}; + template<> struct f_<true> + { + template< typename P1, typename P2, typename P3 > struct apply + { + typedef int type; + }; + }; + + template< typename T1, typename T2, typename T3 > struct result_ + : f_< aux::msvc_never_true<F>::value > + ::template apply< T1,T2,T3 > + { + }; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap3 +{ + typedef typename msvc_apply3<F>::template result_< + T1, T2, T3 + >::type type; +}; + +/// workaround for ETI bug +template<> +struct apply_wrap3< int,int,int,int > +{ + typedef int type; +}; + +template< typename F> +struct msvc_apply4 +{ + template< bool > struct f_ : F {}; + template<> struct f_<true> + { + template< + typename P1, typename P2, typename P3, typename P4 + > + struct apply + { + typedef int type; + }; + }; + + template< + typename T1, typename T2, typename T3, typename T4 + > + struct result_ + : f_< aux::msvc_never_true<F>::value > + ::template apply< T1,T2,T3,T4 > + { + }; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap4 +{ + typedef typename msvc_apply4<F>::template result_< + T1, T2, T3, T4 + >::type type; +}; + +/// workaround for ETI bug +template<> +struct apply_wrap4< int,int,int,int,int > +{ + typedef int type; +}; + +template< typename F> +struct msvc_apply5 +{ + template< bool > struct f_ : F {}; + template<> struct f_<true> + { + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + struct apply + { + typedef int type; + }; + }; + + template< + typename T1, typename T2, typename T3, typename T4 + , typename T5 + > + struct result_ + : f_< aux::msvc_never_true<F>::value > + ::template apply< T1,T2,T3,T4,T5 > + { + }; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap5 +{ + typedef typename msvc_apply5<F>::template result_< + T1, T2, T3, T4, T5 + >::type type; +}; + +/// workaround for ETI bug +template<> +struct apply_wrap5< int,int,int,int,int,int > +{ + typedef int type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/arg.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/arg.hpp index d43cf63..6ee1241 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/arg.hpp @@ -1,26 +1,30 @@ -// preprocessed version of 'boost/mpl/arg.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-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) +// -template<> struct arg<-1> +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > { enum { value = -1 }; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; - - private: - enum { nv = !is_void_<type>::value }; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -28,20 +32,17 @@ template<> struct arg<1> { enum { value = 1 }; typedef arg<2> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; - - private: - enum { nv = !is_void_<type>::value }; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -49,20 +50,17 @@ template<> struct arg<2> { enum { value = 2 }; typedef arg<3> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; - - private: - enum { nv = !is_void_<type>::value }; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -70,20 +68,17 @@ template<> struct arg<3> { enum { value = 3 }; typedef arg<4> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; - - private: - enum { nv = !is_void_<type>::value }; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -91,20 +86,17 @@ template<> struct arg<4> { enum { value = 4 }; typedef arg<5> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; - - private: - enum { nv = !is_void_<type>::value }; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -112,25 +104,20 @@ template<> struct arg<5> { enum { value = 5 }; typedef arg<6> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; - - private: - enum { nv = !is_void_<type>::value }; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; -BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1, int, arg) - -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp index 178c985..1d3c0af 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp @@ -1,11 +1,16 @@ -// preprocessed version of 'boost/mpl/bind.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-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) +// -BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) -BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< bool > @@ -30,7 +35,10 @@ struct resolve_arg_impl<true> > struct result_ { - typedef typename apply5< T,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< + T + , U1, U2, U3, U4, U5 + >::type type; }; }; @@ -41,27 +49,19 @@ template< , typename U5 > struct resolve_bind_arg - : resolve_arg_impl< is_bind_template<T >::value > + : resolve_arg_impl< is_bind_template<T>::value > ::template result_< T,U1,U2,U3,U4,U5 > { }; -} // namespace aux -template< typename F, typename T > struct bind1st; -template< typename F, typename T > struct bind2nd; - -namespace aux { -template< nttp_int arity_ > struct bind_impl_chooser; +template< int arity_ > struct bind_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect<T>*); -template< nttp_int N > +template< int N > aux::yes_tag is_bind_helper(arg<N>*); -template< typename F, typename T > aux::yes_tag is_bind_helper(bind1st< F,T >*); -template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*); - template< bool is_ref_ = true > struct is_bind_template_impl { @@ -91,8 +91,6 @@ template< typename T > struct is_bind_template }; } // namespace aux -BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) -BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) template< typename F @@ -100,8 +98,8 @@ template< struct bind0 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { @@ -109,7 +107,10 @@ struct bind0 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: - typedef typename apply0<f_>::type type; + typedef typename apply_wrap0< + f_ + >::type type; + }; }; @@ -131,17 +132,21 @@ template< struct bind1 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: - typedef typename apply1< f_,t1 >::type type; + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + }; }; @@ -163,18 +168,22 @@ template< struct bind2 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: - typedef typename apply2< f_,t1,t2 >::type type; + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + }; }; @@ -196,19 +205,23 @@ template< struct bind3 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: - typedef typename apply3< f_,t1,t2,t3 >::type type; + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + }; }; @@ -230,20 +243,25 @@ template< struct bind4 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; - typedef typename aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 >::type t4; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: - typedef typename apply4< f_,t1,t2,t3,t4 >::type type; + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + }; }; @@ -266,21 +284,26 @@ template< struct bind5 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; - typedef typename aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 >::type t4; - typedef typename aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 >::type t5; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: - typedef typename apply5< f_,t1,t2,t3,t4,t5 >::type type; + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + }; }; @@ -296,35 +319,5 @@ is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) - -template< typename F, typename T > -struct bind1st -{ - template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ - > - struct apply - : apply2< F,T,U > - { - }; -}; - -template< typename F, typename T > -struct bind2nd -{ - template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ - > - struct apply - : apply2< F,U,T > - { - }; -}; - -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/bind.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/bind.hpp index 2d55a6b..0bad8ba 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/bind.hpp @@ -1,11 +1,16 @@ -// preprocessed version of 'boost/mpl/bind.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-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) +// -BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) -BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< bool > @@ -30,7 +35,10 @@ struct resolve_arg_impl<true> > struct result_ { - typedef typename apply5< T,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< + T + , U1, U2, U3, U4, U5 + >::type type; }; }; @@ -41,7 +49,7 @@ template< , typename U5 > struct resolve_bind_arg - : resolve_arg_impl< is_bind_template<T >::value > + : resolve_arg_impl< is_bind_template<T>::value > ::template result_< T,U1,U2,U3,U4,U5 > { }; @@ -51,17 +59,17 @@ struct replace_unnamed_arg_impl { template< typename Arg > struct result_ { - typedef Arg next_arg; + typedef Arg next; typedef T type; }; }; template<> -struct replace_unnamed_arg_impl< arg<-1> > +struct replace_unnamed_arg_impl< arg< -1 > > { template< typename Arg > struct result_ { - typedef typename Arg::next next_arg; + typedef typename next<Arg>::type next; typedef Arg type; }; }; @@ -72,22 +80,14 @@ struct replace_unnamed_arg { }; -} // namespace aux -template< typename F, typename T > struct bind1st; -template< typename F, typename T > struct bind2nd; - -namespace aux { -template< nttp_int arity_ > struct bind_impl_chooser; +template< int arity_ > struct bind_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect<T>*); -template< nttp_int N > +template< int N > aux::yes_tag is_bind_helper(arg<N>*); -template< typename F, typename T > aux::yes_tag is_bind_helper(bind1st< F,T >*); -template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*); - template< bool is_ref_ = true > struct is_bind_template_impl { @@ -117,8 +117,6 @@ template< typename T > struct is_bind_template }; } // namespace aux -BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) -BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) template< typename F @@ -126,19 +124,22 @@ template< struct bind0 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// public: - typedef typename apply0<f_>::type type; + typedef typename apply_wrap0< + f_ + >::type type; + }; }; @@ -160,24 +161,28 @@ template< struct bind1 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// public: - typedef typename apply1< f_,t1 >::type type; + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + }; }; @@ -199,29 +204,33 @@ template< struct bind2 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// public: - typedef typename apply2< f_,t1,t2 >::type type; + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + }; }; @@ -243,34 +252,38 @@ template< struct bind3 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// public: - typedef typename apply3< f_,t1,t2,t3 >::type type; + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + }; }; @@ -292,39 +305,44 @@ template< struct bind4 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; - typedef typename r4::next_arg n5; - typedef typename aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 >::type t4; - + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// public: - typedef typename apply4< f_,t1,t2,t3,t4 >::type type; + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + }; }; @@ -347,44 +365,49 @@ template< struct bind5 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; - typedef typename r4::next_arg n5; - typedef typename aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 >::type t4; - + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; - typedef typename r5::next_arg n6; - typedef typename aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 >::type t5; - + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// public: - typedef typename apply5< f_,t1,t2,t3,t4,t5 >::type type; + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + }; }; @@ -400,35 +423,5 @@ is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) - -template< typename F, typename T > -struct bind1st -{ - template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ - > - struct apply - : apply2< F,T,U > - { - }; -}; - -template< typename F, typename T > -struct bind2nd -{ - template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ - > - struct apply - : apply2< F,U,T > - { - }; -}; - -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/bind_fwd.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/bind_fwd.hpp new file mode 100644 index 0000000..21e6a93 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/bind_fwd.hpp @@ -0,0 +1,46 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/bitand.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/bitand.hpp new file mode 100644 index 0000000..4285109 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/bitand.hpp @@ -0,0 +1,117 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct bitand_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct bitand_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct bitand_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitand_ + : aux::msvc_eti_base< typename apply_wrap2< + bitand_impl< + typename bitand_tag<N1>::type + , typename bitand_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitand_, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, bitand_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct msvc_bitand_impl +{ + enum msvc_wknd { value = (n1 & n2) }; + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::msvc_bitand_impl< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/bitor.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/bitor.hpp new file mode 100644 index 0000000..9d8751c --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/bitor.hpp @@ -0,0 +1,117 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct bitor_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct bitor_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct bitor_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitor_ + : aux::msvc_eti_base< typename apply_wrap2< + bitor_impl< + typename bitor_tag<N1>::type + , typename bitor_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitor_, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, bitor_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct msvc_bitor_impl +{ + enum msvc_wknd { value = (n1 | n2) }; + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::msvc_bitor_impl< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/bitxor.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/bitxor.hpp new file mode 100644 index 0000000..06d75f2 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/bitxor.hpp @@ -0,0 +1,117 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct bitxor_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct bitxor_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct bitxor_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitxor_ + : aux::msvc_eti_base< typename apply_wrap2< + bitxor_impl< + typename bitxor_tag<N1>::type + , typename bitxor_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitxor_, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, bitxor_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct msvc_bitxor_impl +{ + enum msvc_wknd { value = (n1 ^ n2) }; + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::msvc_bitxor_impl< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/divides.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/divides.hpp new file mode 100644 index 0000000..ada935e --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/divides.hpp @@ -0,0 +1,116 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct divides_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct divides_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct divides_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct divides + : aux::msvc_eti_base< typename apply_wrap2< + divides_impl< + typename divides_tag<N1>::type + , typename divides_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, divides, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, divides) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct msvc_divides_impl +{ + enum msvc_wknd { value = (n1 / n2) }; + typedef integral_c< T,value > type; +}; + +} + +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::msvc_divides_impl< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/equal_to.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/equal_to.hpp new file mode 100644 index 0000000..eb292cc --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/equal_to.hpp @@ -0,0 +1,103 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct equal_to_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct equal_to_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct equal_to_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + : aux::msvc_eti_base< typename apply_wrap2< + equal_to_impl< + typename equal_to_tag<N1>::type + , typename equal_to_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + enum { value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + }; + typedef bool_<value> type; + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/fold_backward_impl.hpp deleted file mode 100644 index 79eca3d..0000000 --- a/include/boost/mpl/aux_/preprocessed/msvc60/fold_backward_impl.hpp +++ /dev/null @@ -1,339 +0,0 @@ -// preprocessed version of 'boost/mpl/aux_/fold_backward_impl.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { -namespace aux { - -// forward declaration -template< - nttp_long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl; - -template< nttp_long N > -struct fold_backward_chunk; - -template<> -struct fold_backward_chunk<0> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef fwd_state0 bkwd_state0; - typedef bkwd_state0 state; - typedef iter0 iterator; - }; - - // ETI workaround - template<> struct result_<int, int, int, int, int> - { - typedef int state; - typedef int iterator; - }; - -}; - -template<> -struct fold_backward_chunk<1> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - - - typedef fwd_state1 bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - typedef bkwd_state0 state; - typedef iter1 iterator; - }; - - // ETI workaround - template<> struct result_<int, int, int, int, int> - { - typedef int state; - typedef int iterator; - }; - -}; - -template<> -struct fold_backward_chunk<2> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - - - typedef fwd_state2 bkwd_state2; - typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter2 iterator; - }; - - // ETI workaround - template<> struct result_<int, int, int, int, int> - { - typedef int state; - typedef int iterator; - }; - -}; - -template<> -struct fold_backward_chunk<3> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename apply2<ForwardOp, fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - - - typedef fwd_state3 bkwd_state3; - typedef typename apply2<BackwardOp, bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter3 iterator; - }; - - // ETI workaround - template<> struct result_<int, int, int, int, int> - { - typedef int state; - typedef int iterator; - }; - -}; - -template<> -struct fold_backward_chunk<4> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename apply2<ForwardOp, fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename apply2<ForwardOp, fwd_state3, typename iter3::type>::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fwd_state4 bkwd_state4; - typedef typename apply2<BackwardOp, bkwd_state4, typename iter3::type>::type bkwd_state3; - typedef typename apply2<BackwardOp, bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter4 iterator; - }; - - // ETI workaround - template<> struct result_<int, int, int, int, int> - { - typedef int state; - typedef int iterator; - }; - -}; - -template< nttp_long N > -struct fold_backward_chunk -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename apply2<ForwardOp, fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename apply2<ForwardOp, fwd_state3, typename iter3::type>::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fold_backward_impl< - ( (N - 4) < 0 ? 0 : N - 4 ) - , iter4 - , Last - , fwd_state4 - , BackwardOp - , ForwardOp - > nested_chunk; - - typedef typename nested_chunk::state bkwd_state4; - typedef typename apply2<BackwardOp, bkwd_state4, typename iter3::type>::type bkwd_state3; - typedef typename apply2<BackwardOp, bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef typename nested_chunk::iterator iterator; - }; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_step; - -template< - typename Last - , typename State - > -struct fold_backward_null_step -{ - typedef Last iterator; - typedef State state; -}; - -template<> -struct fold_backward_chunk< -1 > -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef typename if_< - typename is_same< First,Last >::type - , fold_backward_null_step< Last,State > - , fold_backward_step< First,Last,State,BackwardOp,ForwardOp > - >::type res_; - - typedef typename res_::state state; - typedef typename res_::iterator iterator; - }; - - // ETI workaround - template<> struct result_<int, int, int, int, int> - { - typedef int state; - typedef int iterator; - }; - -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_step -{ - typedef fold_backward_chunk< -1 >::template result_< - typename First::next - , Last - , typename apply2<ForwardOp, State, typename First::type>::type - , BackwardOp - , ForwardOp - > nested_step; - - typedef typename apply2<BackwardOp, typename nested_step::state, typename First::type>::type state; - typedef typename nested_step::iterator iterator; -}; - -template< - nttp_long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl - : fold_backward_chunk<N> - ::template result_< First,Last,State,BackwardOp,ForwardOp > -{ -}; - -} // namespace aux -} // namespace mpl -} // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp index ec401c7..cd949cb 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp @@ -1,25 +1,31 @@ -// preprocessed version of 'boost/mpl/aux_/fold_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration -// forward declaration template< - nttp_long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct fold_impl; -template< nttp_long N > +template< int N > struct fold_chunk; -template<> -struct fold_chunk<0> +template<> struct fold_chunk<0> { template< typename First @@ -35,8 +41,8 @@ struct fold_chunk<0> typedef iter0 iterator; }; - // ETI workaround - template<> struct result_<int, int, int, int> + /// ETI workaround + template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; @@ -44,8 +50,7 @@ struct fold_chunk<0> }; -template<> -struct fold_chunk<1> +template<> struct fold_chunk<1> { template< typename First @@ -57,16 +62,16 @@ struct fold_chunk<1> { typedef First iter0; typedef State state0; - typedef typename apply2<ForwardOp, state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; typedef state1 state; typedef iter1 iterator; }; - // ETI workaround - template<> struct result_<int, int, int, int> + /// ETI workaround + template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; @@ -74,8 +79,7 @@ struct fold_chunk<1> }; -template<> -struct fold_chunk<2> +template<> struct fold_chunk<2> { template< typename First @@ -87,18 +91,18 @@ struct fold_chunk<2> { typedef First iter0; typedef State state0; - typedef typename apply2<ForwardOp, state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, state1, typename iter1::type>::type state2; - typedef typename iter1::next iter2; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; typedef state2 state; typedef iter2 iterator; }; - // ETI workaround - template<> struct result_<int, int, int, int> + /// ETI workaround + template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; @@ -106,8 +110,7 @@ struct fold_chunk<2> }; -template<> -struct fold_chunk<3> +template<> struct fold_chunk<3> { template< typename First @@ -119,20 +122,20 @@ struct fold_chunk<3> { typedef First iter0; typedef State state0; - typedef typename apply2<ForwardOp, state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, state1, typename iter1::type>::type state2; - typedef typename iter1::next iter2; - typedef typename apply2<ForwardOp, state2, typename iter2::type>::type state3; - typedef typename iter2::next iter3; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; + typedef typename next<iter2>::type iter3; typedef state3 state; typedef iter3 iterator; }; - // ETI workaround - template<> struct result_<int, int, int, int> + /// ETI workaround + template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; @@ -140,8 +143,7 @@ struct fold_chunk<3> }; -template<> -struct fold_chunk<4> +template<> struct fold_chunk<4> { template< typename First @@ -153,22 +155,22 @@ struct fold_chunk<4> { typedef First iter0; typedef State state0; - typedef typename apply2<ForwardOp, state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, state1, typename iter1::type>::type state2; - typedef typename iter1::next iter2; - typedef typename apply2<ForwardOp, state2, typename iter2::type>::type state3; - typedef typename iter2::next iter3; - typedef typename apply2<ForwardOp, state3, typename iter3::type>::type state4; - typedef typename iter3::next iter4; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4; + typedef typename next<iter3>::type iter4; typedef state4 state; typedef iter4 iterator; }; - // ETI workaround - template<> struct result_<int, int, int, int> + /// ETI workaround + template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; @@ -176,7 +178,7 @@ struct fold_chunk<4> }; -template< nttp_long N > +template< int N > struct fold_chunk { template< @@ -184,7 +186,7 @@ struct fold_chunk , typename Last , typename State , typename ForwardOp - > + > struct result_ { typedef fold_impl< @@ -213,7 +215,7 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct fold_step; template< @@ -226,7 +228,7 @@ struct fold_null_step typedef State state; }; -template<> +template<> struct fold_chunk< -1 > { template< @@ -234,7 +236,7 @@ struct fold_chunk< -1 > , typename Last , typename State , typename ForwardOp - > + > struct result_ { typedef typename if_< @@ -247,8 +249,8 @@ struct fold_chunk< -1 > typedef typename res_::iterator iterator; }; - // ETI workaround - template<> struct result_<int, int, int, int> + /// ETI workaround + template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; @@ -261,13 +263,13 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct fold_step { typedef fold_chunk< -1 >::template result_< - typename First::next + typename next<First>::type , Last - , typename apply2<ForwardOp, State, typename First::type>::type + , typename apply2<ForwardOp,State, typename deref<First>::type>::type , ForwardOp > chunk_; @@ -276,19 +278,16 @@ struct fold_step }; template< - nttp_long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct fold_impl : fold_chunk<N> ::template result_< First,Last,State,ForwardOp > { }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp index 5534ac2..89d946e 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp @@ -1,30 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/full_lambda.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Aleksey Gurtovoy 2001-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) +// -template< - typename T - , typename Tag - , typename Protect = false_ - - > -struct lambda_impl -{ - typedef false_ is_le; - typedef T type; -}; +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! -template< - typename T - , typename Tag = void_ - - > -struct lambda - : lambda_impl< T,Tag,false_ > -{ -}; +namespace boost { namespace mpl { namespace aux { @@ -45,44 +30,56 @@ struct lambda_or< false,false,false,false,false > } // namespace aux -template< int N, typename Tag, typename Protect > -struct lambda_impl< arg<N>,Tag,Protect > +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg<N>, Tag > { typedef true_ is_le; - typedef arg<N> type; + typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41 + typedef protect<result_> type; }; template< typename F , typename Tag - , typename Protect - > -struct lambda_impl< - bind0<F> - , Tag - , Protect > +struct lambda< + bind0<F> + , Tag + + > { typedef false_ is_le; typedef bind0< F - > type; -}; + > result_; -template< - template< typename P1 > class F - , typename T1 - , typename Tag - > -struct lambda< F<T1>,Tag > - : lambda_impl< F<T1>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > @@ -90,33 +87,24 @@ struct le_result1 { typedef F< typename L1::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1 > class F - , typename Tag + typename Tag + , template< typename P1 > class F , typename L1 > -struct le_result1< true_,Tag,false_,F,L1 > +struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > - , typename L1::type - > type; -}; + , typename L1::result_ + > result_; -template< - template< typename P1 > class F - , typename Tag - , typename L1 - > -struct le_result1< true_,Tag,true_,F,L1 > -{ - typedef protect< bind1< - quote1< F,Tag > - , typename L1::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -125,58 +113,50 @@ template< template< typename P1 > class F , typename T1 , typename Tag - , typename Protect > -struct lambda_impl< - F<T1>, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef aux::lambda_or< - l1::is_le::value - > is_le; - - typedef typename aux::le_result1< - typename is_le::type +struct lambda< + F<T1> , Tag - , Protect - , F - , l1 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag - , typename Protect - > -struct lambda_impl< - bind1< F,T1 > - , Tag - , Protect > +struct lambda< + bind1< F,T1 > + , Tag + + > { typedef false_ is_le; typedef bind1< F , T1 - > type; -}; + > result_; -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - , typename Tag - > -struct lambda< F<T1,T2>,Tag > - : lambda_impl< F<T1,T2>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > @@ -184,33 +164,24 @@ struct le_result2 { typedef F< typename L1::type, typename L2::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true_,Tag,false_,F,L1,L2 > +struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > - , typename L1::type, typename L2::type - > type; -}; + , typename L1::result_, typename L2::result_ + > result_; -template< - template< typename P1, typename P2 > class F - , typename Tag - , typename L1, typename L2 - > -struct le_result2< true_,Tag,true_,F,L1,L2 > -{ - typedef protect< bind2< - quote2< F,Tag > - , typename L1::type, typename L2::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -219,60 +190,55 @@ template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value - > is_le; - - typedef typename aux::le_result2< - typename is_le::type +struct lambda< + F< T1,T2 > , Tag - , Protect - , F - , l1, l2 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag - , typename Protect - > -struct lambda_impl< - bind2< F,T1,T2 > - , Tag - , Protect > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > { typedef false_ is_le; typedef bind2< F , T1, T2 - > type; -}; + > result_; -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - , typename Tag - > -struct lambda< F<T1,T2,T3>,Tag > - : lambda_impl< F<T1,T2,T3>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > @@ -280,33 +246,24 @@ struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2, typename P3 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true_,Tag,false_,F,L1,L2,L3 > +struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; -template< - template< typename P1, typename P2, typename P3 > class F - , typename Tag - , typename L1, typename L2, typename L3 - > -struct le_result3< true_,Tag,true_,F,L1,L2,L3 > -{ - typedef protect< bind3< - quote3< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -315,61 +272,57 @@ template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - > is_le; - - typedef typename aux::le_result3< - typename is_le::type +struct lambda< + F< T1,T2,T3 > , Tag - , Protect - , F - , l1, l2, l3 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag - , typename Protect - > -struct lambda_impl< - bind3< F,T1,T2,T3 > - , Tag - , Protect > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 - > type; -}; + > result_; -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename T1, typename T2, typename T3, typename T4 - , typename Tag - > -struct lambda< F<T1,T2,T3,T4>,Tag > - : lambda_impl< F<T1,T2,T3,T4>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > @@ -378,35 +331,25 @@ struct le_result4 typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename Tag - , typename L1, typename L2, typename L3, typename L4 - > -struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 > -{ - typedef protect< bind4< - quote4< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -415,67 +358,59 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - typedef lambda_impl< T4,Tag > l4; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - , l4::is_le::value - > is_le; - - typedef typename aux::le_result4< - typename is_le::type +struct lambda< + F< T1,T2,T3,T4 > , Tag - , Protect - , F - , l1, l2, l3, l4 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag - , typename Protect - > -struct lambda_impl< - bind4< F,T1,T2,T3,T4 > - , Tag - , Protect > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 - > type; -}; + > result_; -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename T1, typename T2, typename T3, typename T4, typename T5 - , typename Tag - > -struct lambda< F<T1,T2,T3,T4,T5>,Tag > - : lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > @@ -484,43 +419,25 @@ struct le_result5 typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type - > type; + > result_; + + typedef result_ type; }; template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type, typename L5::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename Tag - , typename L1, typename L2, typename L3, typename L4, typename L5 - > -struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 > -{ - typedef protect< bind5< - quote5< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type, typename L5::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -533,100 +450,105 @@ template< class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4,T5 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - typedef lambda_impl< T4,Tag > l4; - typedef lambda_impl< T5,Tag > l5; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - , l4::is_le::value, l5::is_le::value - > is_le; - - typedef typename aux::le_result5< - typename is_le::type +struct lambda< + F< T1,T2,T3,T4,T5 > , Tag - , Protect - , F - , l1, l2, l3, l4, l5 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag - , typename Protect - > -struct lambda_impl< - bind5< F,T1,T2,T3,T4,T5 > - , Tag - , Protect > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 - > type; + > result_; + + typedef result_ type; }; -// special case for 'protect' -template< typename T, typename Tag, typename Protect > -struct lambda_impl< protect<T>,Tag,Protect > +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< protect<T>, Tag > { typedef false_ is_le; - typedef protect<T> type; + typedef protect<T> result_; + typedef result_ type; }; -// specializations for main 'bind', 'bind1st' and 'bind2nd' forms +/// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag - , typename Protect - > -struct lambda_impl< - bind< F,T1,T2,T3,T4,T5 > - , Tag - , Protect - > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > { typedef false_ is_le; - typedef bind< F,T1,T2,T3,T4,T5 > type; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; }; +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars + template< - typename F, typename T - , typename Tag - , typename Protect + typename F, typename Tag1, typename Tag2 > -struct lambda_impl< bind1st<F,T>,Tag,Protect > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > { - typedef false_ is_le; - typedef bind1st< F,T > type; + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef aux::le_result2<is_le, Tag2, mpl::lambda, l1, l2> le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; -template< - typename F, typename T - , typename Tag - , typename Protect - > -struct lambda_impl< bind2nd<F,T>,Tag,Protect > -{ - typedef false_ is_le; - typedef bind2nd< F,T > type; -}; +BOOST_MPL_AUX_NA_SPEC(2, lambda) -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/greater.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/greater.hpp new file mode 100644 index 0000000..f646c38 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/greater.hpp @@ -0,0 +1,103 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct greater_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct greater_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct greater_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + : aux::msvc_eti_base< typename apply_wrap2< + greater_impl< + typename greater_tag<N1>::type + , typename greater_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + enum { value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + }; + typedef bool_<value> type; + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/greater_equal.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/greater_equal.hpp new file mode 100644 index 0000000..360a129 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/greater_equal.hpp @@ -0,0 +1,103 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct greater_equal_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct greater_equal_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct greater_equal_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + : aux::msvc_eti_base< typename apply_wrap2< + greater_equal_impl< + typename greater_equal_tag<N1>::type + , typename greater_equal_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + enum { value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + }; + typedef bool_<value> type; + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/inherit.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/inherit.hpp new file mode 100644 index 0000000..233a1ec --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/inherit.hpp @@ -0,0 +1,166 @@ + +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C1, bool C2 > +struct inherit2_impl +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T1, T2 + { + typedef Derived type_; + }; +}; + +template<> +struct inherit2_impl< false,true > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T1 + { + typedef T1 type_; + }; +}; + +template<> +struct inherit2_impl< true,false > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T2 + { + typedef T2 type_; + }; +}; + +template<> +struct inherit2_impl< true,true > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + { + typedef T1 type_; + }; +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : aux::inherit2_impl< + is_empty_base<T1>::value + , is_empty_base<T2>::value + >::template result_< inherit2< T1,T2 >,T1, T2 > +{ + typedef typename inherit2::type_ type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp index 2d1b5d8..6951795 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp @@ -1,9 +1,16 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_if_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step @@ -55,7 +62,7 @@ struct iter_fold_if_forward_step typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator, State, ForwardOp, mpl::next< Iterator> > impl_; + >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; @@ -72,7 +79,7 @@ struct iter_fold_if_backward_step typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_; + >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; @@ -95,7 +102,7 @@ struct iter_fold_if_impl typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; - + typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< @@ -123,7 +130,4 @@ struct iter_fold_if_impl typedef typename backward_step4::iterator iterator; }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp index c0f331d..d93b635 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp @@ -1,25 +1,31 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration -// forward declaration template< - nttp_long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl; -template< nttp_long N > +template< int N > struct iter_fold_chunk; -template<> -struct iter_fold_chunk<0> +template<> struct iter_fold_chunk<0> { template< typename First @@ -35,8 +41,8 @@ struct iter_fold_chunk<0> typedef iter0 iterator; }; - // ETI workaround - template<> struct result_<int, int, int, int> + /// ETI workaround + template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; @@ -44,8 +50,7 @@ struct iter_fold_chunk<0> }; -template<> -struct iter_fold_chunk<1> +template<> struct iter_fold_chunk<1> { template< typename First @@ -58,15 +63,15 @@ struct iter_fold_chunk<1> typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef state1 state; typedef iter1 iterator; }; - // ETI workaround - template<> struct result_<int, int, int, int> + /// ETI workaround + template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; @@ -74,8 +79,7 @@ struct iter_fold_chunk<1> }; -template<> -struct iter_fold_chunk<2> +template<> struct iter_fold_chunk<2> { template< typename First @@ -88,17 +92,17 @@ struct iter_fold_chunk<2> typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef state2 state; typedef iter2 iterator; }; - // ETI workaround - template<> struct result_<int, int, int, int> + /// ETI workaround + template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; @@ -106,8 +110,7 @@ struct iter_fold_chunk<2> }; -template<> -struct iter_fold_chunk<3> +template<> struct iter_fold_chunk<3> { template< typename First @@ -120,19 +123,19 @@ struct iter_fold_chunk<3> typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; - typedef typename iter2::next iter3; + typedef typename next<iter2>::type iter3; typedef state3 state; typedef iter3 iterator; }; - // ETI workaround - template<> struct result_<int, int, int, int> + /// ETI workaround + template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; @@ -140,8 +143,7 @@ struct iter_fold_chunk<3> }; -template<> -struct iter_fold_chunk<4> +template<> struct iter_fold_chunk<4> { template< typename First @@ -154,21 +156,21 @@ struct iter_fold_chunk<4> typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; - typedef typename iter2::next iter3; + typedef typename next<iter2>::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; - typedef typename iter3::next iter4; + typedef typename next<iter3>::type iter4; typedef state4 state; typedef iter4 iterator; }; - // ETI workaround - template<> struct result_<int, int, int, int> + /// ETI workaround + template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; @@ -176,7 +178,7 @@ struct iter_fold_chunk<4> }; -template< nttp_long N > +template< int N > struct iter_fold_chunk { template< @@ -184,7 +186,7 @@ struct iter_fold_chunk , typename Last , typename State , typename ForwardOp - > + > struct result_ { typedef iter_fold_impl< @@ -213,7 +215,7 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_step; template< @@ -226,7 +228,7 @@ struct iter_fold_null_step typedef State state; }; -template<> +template<> struct iter_fold_chunk< -1 > { template< @@ -234,7 +236,7 @@ struct iter_fold_chunk< -1 > , typename Last , typename State , typename ForwardOp - > + > struct result_ { typedef typename if_< @@ -247,8 +249,8 @@ struct iter_fold_chunk< -1 > typedef typename res_::iterator iterator; }; - // ETI workaround - template<> struct result_<int, int, int, int> + /// ETI workaround + template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; @@ -261,11 +263,11 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_step { typedef iter_fold_chunk< -1 >::template result_< - typename First::next + typename next<First>::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp @@ -276,19 +278,16 @@ struct iter_fold_step }; template< - nttp_long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl : iter_fold_chunk<N> ::template result_< First,Last,State,ForwardOp > { }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/lambda_helper.hpp deleted file mode 100644 index 7840f61..0000000 --- a/include/boost/mpl/aux_/preprocessed/msvc60/lambda_helper.hpp +++ /dev/null @@ -1,120 +0,0 @@ -// preprocessed version of 'boost/mpl/lambda_helper.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { - -template< - template< typename P1 > class F - , typename T1 - > -struct lambda_helper1 -{ - struct rebind - { - enum { arity = 1 }; - typedef T1 arg1; - - template< typename U1 > struct apply - : F<U1> - { - }; - }; -}; - -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - > -struct lambda_helper2 -{ - struct rebind - { - enum { arity = 2 }; - typedef T1 arg1; - typedef T2 arg2; - - template< typename U1, typename U2 > struct apply - : F< U1,U2 > - { - }; - }; -}; - -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - > -struct lambda_helper3 -{ - struct rebind - { - enum { arity = 3 }; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - - template< typename U1, typename U2, typename U3 > struct apply - : F< U1,U2,U3 > - { - }; - }; -}; - -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename T1, typename T2, typename T3, typename T4 - > -struct lambda_helper4 -{ - struct rebind - { - enum { arity = 4 }; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - typedef T4 arg4; - - template< - typename U1, typename U2, typename U3, typename U4 - > - struct apply - : F< U1,U2,U3,U4 > - { - }; - }; -}; - -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename T1, typename T2, typename T3, typename T4, typename T5 - > -struct lambda_helper5 -{ - struct rebind - { - enum { arity = 5 }; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - typedef T4 arg4; - typedef T5 arg5; - - template< - typename U1, typename U2, typename U3, typename U4 - , typename U5 - > - struct apply - : F< U1,U2,U3,U4,U5 > - { - }; - }; -}; - -} // namespace mpl -} // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp index 846bf99..76d3f3f 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp @@ -1,182 +1,198 @@ -// preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { -template< nttp_int arity_, bool Protect > struct lambda_impl +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ { - template< typename T, typename Tag > struct result_ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; + typedef is_placeholder<T> is_le; }; }; -template<> struct lambda_impl<1, false> +template<> struct lambda_impl< int_<1> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + typedef bind1< - f_ - , arg1 - > type; + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<1, true> +template<> struct lambda_impl< int_<2> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef mpl::protect< bind1< - f_ - , arg1 - > > type; - }; -}; - -template<> struct lambda_impl<2, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; typedef bind2< - f_ - , arg1, arg2 - > type; + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<2, true> +template<> struct lambda_impl< int_<3> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; - typedef mpl::protect< bind2< - f_ - , arg1, arg2 - > > type; - }; -}; - -template<> struct lambda_impl<3, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; typedef bind3< - f_ - , arg1, arg2, arg3 - > type; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<3, true> +template<> struct lambda_impl< int_<4> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; - typedef mpl::protect< bind3< - f_ - , arg1, arg2, arg3 - > > type; - }; -}; - -template<> struct lambda_impl<4, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; typedef bind4< - f_ - , arg1, arg2, arg3, arg4 - > type; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<4, true> +template<> struct lambda_impl< int_<5> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; - typedef mpl::protect< bind4< - f_ - , arg1, arg2, arg3, arg4 - > > type; - }; -}; - -template<> struct lambda_impl<5, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - typedef typename lambda< typename F::arg5, Tag, false >::type arg5; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; typedef bind5< - f_ - , arg1, arg2, arg3, arg4, arg5 - > type; - }; -}; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; -template<> struct lambda_impl<5, true> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - typedef typename lambda< typename F::arg5, Tag, false >::type arg5; - + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; - typedef mpl::protect< bind5< - f_ - , arg1, arg2, arg3, arg4, arg5 - > > type; + typedef typename type_::type type; }; }; @@ -184,17 +200,30 @@ template<> struct lambda_impl<5, true> template< typename T - , typename Tag = void_ - , bool Protect = true + , typename Tag + , typename Protect > struct lambda { - typedef aux::lambda_impl< - ::boost::mpl::aux::template_arity<T>::value - , bool_<Protect>::value - >::template result_< T,Tag >::type type; + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity<T>::type arity_; + typedef typename aux::lambda_impl<arity_> + ::template result_< T,Tag,Protect > l_; + + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le +{ +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/less.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/less.hpp new file mode 100644 index 0000000..f4b8701 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/less.hpp @@ -0,0 +1,103 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct less_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct less_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct less_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + : aux::msvc_eti_base< typename apply_wrap2< + less_impl< + typename less_tag<N1>::type + , typename less_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + enum { value = + ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > + BOOST_MPL_AUX_VALUE_WKND(N1)::value ) + }; + typedef bool_<value> type; + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/less_equal.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/less_equal.hpp new file mode 100644 index 0000000..c617b8e --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/less_equal.hpp @@ -0,0 +1,103 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct less_equal_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct less_equal_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct less_equal_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + : aux::msvc_eti_base< typename apply_wrap2< + less_equal_impl< + typename less_equal_tag<N1>::type + , typename less_equal_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + enum { value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + }; + typedef bool_<value> type; + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/list.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/list.hpp index 8980b9f..70e20fe 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/list.hpp @@ -1,26 +1,39 @@ -// preprocessed version of 'boost/mpl/list.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + namespace aux { -template< nttp_int N > struct list_impl_chooser; +template< int N > +struct list_chooser; + } namespace aux { template<> -struct list_impl_chooser<0> +struct list_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef typename list0< + typedef list0< >::type type; + }; }; @@ -29,17 +42,20 @@ struct list_impl_chooser<0> namespace aux { template<> -struct list_impl_chooser<1> +struct list_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list1< T0 >::type type; + }; }; @@ -48,17 +64,20 @@ struct list_impl_chooser<1> namespace aux { template<> -struct list_impl_chooser<2> +struct list_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list2< T0, T1 >::type type; + }; }; @@ -67,17 +86,20 @@ struct list_impl_chooser<2> namespace aux { template<> -struct list_impl_chooser<3> +struct list_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list3< T0, T1, T2 >::type type; + }; }; @@ -86,17 +108,20 @@ struct list_impl_chooser<3> namespace aux { template<> -struct list_impl_chooser<4> +struct list_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list4< T0, T1, T2, T3 >::type type; + }; }; @@ -105,17 +130,20 @@ struct list_impl_chooser<4> namespace aux { template<> -struct list_impl_chooser<5> +struct list_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list5< T0, T1, T2, T3, T4 >::type type; + }; }; @@ -124,17 +152,20 @@ struct list_impl_chooser<5> namespace aux { template<> -struct list_impl_chooser<6> +struct list_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list6< T0, T1, T2, T3, T4, T5 >::type type; + }; }; @@ -143,17 +174,20 @@ struct list_impl_chooser<6> namespace aux { template<> -struct list_impl_chooser<7> +struct list_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list7< T0, T1, T2, T3, T4, T5, T6 >::type type; + }; }; @@ -162,17 +196,20 @@ struct list_impl_chooser<7> namespace aux { template<> -struct list_impl_chooser<8> +struct list_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; + }; }; @@ -181,17 +218,20 @@ struct list_impl_chooser<8> namespace aux { template<> -struct list_impl_chooser<9> +struct list_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; + }; }; @@ -200,17 +240,240 @@ struct list_impl_chooser<9> namespace aux { template<> -struct list_impl_chooser<10> +struct list_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + }; }; @@ -225,7 +488,7 @@ struct is_list_arg }; template<> -struct is_list_arg<void_> +struct is_list_arg<na> { enum { value = false }; }; @@ -233,6 +496,8 @@ struct is_list_arg<void_> template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 > struct list_count_args { @@ -241,7 +506,12 @@ struct list_count_args + is_list_arg<T3>::value + is_list_arg<T4>::value + is_list_arg<T5>::value + is_list_arg<T6>::value + is_list_arg<T7>::value + is_list_arg<T8>::value - + is_list_arg<T9>::value + is_list_arg<T10>::value + + is_list_arg<T9>::value + is_list_arg<T10>::value + + is_list_arg<T11>::value + is_list_arg<T12>::value + + is_list_arg<T13>::value + is_list_arg<T14>::value + + is_list_arg<T15>::value + is_list_arg<T16>::value + + is_list_arg<T17>::value + is_list_arg<T18>::value + + is_list_arg<T19>::value + is_list_arg<T20>::value }; }; @@ -249,31 +519,38 @@ struct list_count_args template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list_impl { - typedef aux::list_count_args< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > arg_num_; - typedef typename aux::list_impl_chooser< - arg_num_::value - >::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; + typedef aux::list_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::list_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< - typename T0 = void_, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - , typename T6 = void_, typename T7 = void_, typename T8 = void_ - , typename T9 = void_ + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na > struct list - : aux::list_impl< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type + : aux::list_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type { typedef typename aux::list_impl< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp index 8196ac3..c4f126d 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp @@ -1,29 +1,38 @@ -// preprocessed version of 'boost/mpl/list_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { -template< nttp_int N > struct list_c_impl_chooser; +template< int N > +struct list_c_chooser; + } namespace aux { template<> -struct list_c_impl_chooser<0> +struct list_c_chooser<0> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list0_c< - T + T >::type type; + }; }; @@ -32,19 +41,19 @@ struct list_c_impl_chooser<0> namespace aux { template<> -struct list_c_impl_chooser<1> +struct list_c_chooser<1> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list1_c< T, C0 >::type type; + }; }; @@ -53,19 +62,19 @@ struct list_c_impl_chooser<1> namespace aux { template<> -struct list_c_impl_chooser<2> +struct list_c_chooser<2> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list2_c< T, C0, C1 >::type type; + }; }; @@ -74,19 +83,19 @@ struct list_c_impl_chooser<2> namespace aux { template<> -struct list_c_impl_chooser<3> +struct list_c_chooser<3> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list3_c< T, C0, C1, C2 >::type type; + }; }; @@ -95,19 +104,19 @@ struct list_c_impl_chooser<3> namespace aux { template<> -struct list_c_impl_chooser<4> +struct list_c_chooser<4> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list4_c< T, C0, C1, C2, C3 >::type type; + }; }; @@ -116,19 +125,19 @@ struct list_c_impl_chooser<4> namespace aux { template<> -struct list_c_impl_chooser<5> +struct list_c_chooser<5> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list5_c< T, C0, C1, C2, C3, C4 >::type type; + }; }; @@ -137,19 +146,19 @@ struct list_c_impl_chooser<5> namespace aux { template<> -struct list_c_impl_chooser<6> +struct list_c_chooser<6> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list6_c< T, C0, C1, C2, C3, C4, C5 >::type type; + }; }; @@ -158,19 +167,19 @@ struct list_c_impl_chooser<6> namespace aux { template<> -struct list_c_impl_chooser<7> +struct list_c_chooser<7> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list7_c< T, C0, C1, C2, C3, C4, C5, C6 >::type type; + }; }; @@ -179,19 +188,19 @@ struct list_c_impl_chooser<7> namespace aux { template<> -struct list_c_impl_chooser<8> +struct list_c_chooser<8> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list8_c< T, C0, C1, C2, C3, C4, C5, C6, C7 >::type type; + }; }; @@ -200,19 +209,19 @@ struct list_c_impl_chooser<8> namespace aux { template<> -struct list_c_impl_chooser<9> +struct list_c_chooser<9> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list9_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8 >::type type; + }; }; @@ -221,19 +230,19 @@ struct list_c_impl_chooser<9> namespace aux { template<> -struct list_c_impl_chooser<10> +struct list_c_chooser<10> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list10_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 >::type type; + }; }; @@ -241,7 +250,217 @@ struct list_c_impl_chooser<10> namespace aux { -template< nttp_long T > +template<> +struct list_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list11_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list12_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list13_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > struct is_list_c_arg { enum { value = true }; @@ -254,49 +473,62 @@ struct is_list_c_arg<LONG_MAX> }; template< - nttp_long T1, nttp_long T2, nttp_long T3, nttp_long T4, nttp_long T5 - , nttp_long T6, nttp_long T7, nttp_long T8, nttp_long T9, nttp_long T10 + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 > struct list_c_count_args { enum { value = - is_list_c_arg<T1>::value + is_list_c_arg<T2>::value - + is_list_c_arg<T3>::value + is_list_c_arg<T4>::value - + is_list_c_arg<T5>::value + is_list_c_arg<T6>::value - + is_list_c_arg<T7>::value + is_list_c_arg<T8>::value - + is_list_c_arg<T9>::value + is_list_c_arg<T10>::value + is_list_c_arg<C1>::value + is_list_c_arg<C2>::value + + is_list_c_arg<C3>::value + is_list_c_arg<C4>::value + + is_list_c_arg<C5>::value + is_list_c_arg<C6>::value + + is_list_c_arg<C7>::value + is_list_c_arg<C8>::value + + is_list_c_arg<C9>::value + is_list_c_arg<C10>::value + + is_list_c_arg<C11>::value + is_list_c_arg<C12>::value + + is_list_c_arg<C13>::value + is_list_c_arg<C14>::value + + is_list_c_arg<C15>::value + is_list_c_arg<C16>::value + + is_list_c_arg<C17>::value + is_list_c_arg<C18>::value + + is_list_c_arg<C19>::value + is_list_c_arg<C20>::value }; + }; template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3, nttp_long C4 - , nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8, nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c_impl { - typedef aux::list_c_count_args< C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > arg_num_; - typedef typename aux::list_c_impl_chooser< arg_num_::value > - ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; + typedef aux::list_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::list_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< - typename T - , nttp_long C0 = LONG_MAX, nttp_long C1 = LONG_MAX - , nttp_long C2 = LONG_MAX, nttp_long C3 = LONG_MAX, nttp_long C4 = LONG_MAX - , nttp_long C5 = LONG_MAX, nttp_long C6 = LONG_MAX, nttp_long C7 = LONG_MAX - , nttp_long C8 = LONG_MAX, nttp_long C9 = LONG_MAX + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c - : aux::list_c_impl< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type + : aux::list_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type { typedef typename aux::list_c_impl< - T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/map.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/map.hpp new file mode 100644 index 0000000..0982105 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/map.hpp @@ -0,0 +1,556 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct map_chooser; + +} + +namespace aux { + +template<> +struct map_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef map0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_map_arg +{ + enum { value = true }; +}; + +template<> +struct is_map_arg<na> +{ + enum { value = false }; +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct map_count_args +{ + enum { value = + is_map_arg<T1>::value + is_map_arg<T2>::value + + is_map_arg<T3>::value + is_map_arg<T4>::value + + is_map_arg<T5>::value + is_map_arg<T6>::value + + is_map_arg<T7>::value + is_map_arg<T8>::value + + is_map_arg<T9>::value + is_map_arg<T10>::value + + is_map_arg<T11>::value + is_map_arg<T12>::value + + is_map_arg<T13>::value + is_map_arg<T14>::value + + is_map_arg<T15>::value + is_map_arg<T16>::value + + is_map_arg<T17>::value + is_map_arg<T18>::value + + is_map_arg<T19>::value + is_map_arg<T20>::value + }; + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map_impl +{ + typedef aux::map_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::map_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map + : aux::map_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::map_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/minus.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/minus.hpp new file mode 100644 index 0000000..2bceea4 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/minus.hpp @@ -0,0 +1,116 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct minus_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct minus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct minus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct minus + : aux::msvc_eti_base< typename apply_wrap2< + minus_impl< + typename minus_tag<N1>::type + , typename minus_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, minus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, minus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct msvc_minus_impl +{ + enum msvc_wknd { value = (n1 - n2) }; + typedef integral_c< T,value > type; +}; + +} + +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::msvc_minus_impl< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/modulus.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/modulus.hpp new file mode 100644 index 0000000..36f066f --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/modulus.hpp @@ -0,0 +1,116 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct modulus_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct modulus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct modulus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + : aux::msvc_eti_base< typename apply_wrap2< + modulus_impl< + typename modulus_tag<N1>::type + , typename modulus_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct msvc_modulus_impl +{ + enum msvc_wknd { value = (n1 % n2) }; + typedef integral_c< T,value > type; +}; + +} + +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::msvc_modulus_impl< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/not_equal_to.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/not_equal_to.hpp new file mode 100644 index 0000000..20cec69 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/not_equal_to.hpp @@ -0,0 +1,103 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct not_equal_to_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct not_equal_to_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct not_equal_to_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + : aux::msvc_eti_base< typename apply_wrap2< + not_equal_to_impl< + typename not_equal_to_tag<N1>::type + , typename not_equal_to_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + enum { value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + }; + typedef bool_<value> type; + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/or.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/or.hpp index b59b95f..3f7394e 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/or.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/or.hpp @@ -1,10 +1,17 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { - template< bool C_ > struct or_impl { template< @@ -22,12 +29,11 @@ template<> struct or_impl<false> typename T1, typename T2, typename T3, typename T4 > struct result_ - : or_impl< + : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,false_ > { }; - }; template<> @@ -40,13 +46,13 @@ struct or_impl<false> } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ - : aux::or_impl< + : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,T5 > @@ -54,15 +60,14 @@ struct or_ BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ - , (T1, T2, T3, T4, T5) + , ( T1, T2, T3, T4, T5) ) }; -BOOST_MPL_AUX_VOID_SPEC_EXT( +BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) -}} // namespace boost::mpl - +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/placeholders.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/placeholders.hpp index 8c17ad3..4cb7d7d 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/placeholders.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/placeholders.hpp @@ -1,54 +1,78 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Aleksey Gurtovoy 2001-2003 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; -namespace placeholders { -using boost::mpl::_; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_) -// agurt, 17/mar/02: one more placeholder for the last 'apply#' -// specialization +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +}}} +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; -namespace placeholders { -using boost::mpl::_1; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_1) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; -namespace placeholders { -using boost::mpl::_2; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_2) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; -namespace placeholders { -using boost::mpl::_3; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_3) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; -namespace placeholders { -using boost::mpl::_4; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_4) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; -namespace placeholders { -using boost::mpl::_5; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_5) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; -namespace placeholders { -using boost::mpl::_6; -} - -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_6) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +}}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/plus.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/plus.hpp new file mode 100644 index 0000000..5b8ebde --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/plus.hpp @@ -0,0 +1,116 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct plus_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct plus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct plus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct plus + : aux::msvc_eti_base< typename apply_wrap2< + plus_impl< + typename plus_tag<N1>::type + , typename plus_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, plus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, plus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct msvc_plus_impl +{ + enum msvc_wknd { value = (n1 + n2) }; + typedef integral_c< T,value > type; +}; + +} + +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::msvc_plus_impl< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/quote.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/quote.hpp index 902c44e..e7a7f00 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/quote.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/quote.hpp @@ -1,3 +1,11 @@ -// preprocessed version of 'boost/mpl/quote.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/reverse_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/reverse_fold_impl.hpp new file mode 100644 index 0000000..5e374de --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/reverse_fold_impl.hpp @@ -0,0 +1,343 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/Attic/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< long N > +struct reverse_fold_chunk; + +template<> struct reverse_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct reverse_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct reverse_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct reverse_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template<> struct reverse_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename iter3::type >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename iter3::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template< long N > +struct reverse_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename iter3::type >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename iter3::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step; + +template< + typename Last + , typename State + > +struct reverse_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_fold_null_step< Last,State > + , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; + + /// ETI workaround + template<> struct result_< int,int,int,int,int > + { + typedef int state; + typedef int iterator; + }; + +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step +{ + typedef reverse_fold_chunk< -1 >::template result_< + typename next<First>::type + , Last + , typename apply2<ForwardOp,State, typename First::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename First::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl + : reverse_fold_chunk<N> + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/reverse_iter_fold_impl.hpp similarity index 71% rename from include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_backward_impl.hpp rename to include/boost/mpl/aux_/preprocessed/msvc60/reverse_iter_fold_impl.hpp index 4a743e2..5d1e4e4 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_backward_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/reverse_iter_fold_impl.hpp @@ -1,26 +1,32 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_backward_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/Attic/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration -// forward declaration template< - nttp_long N + long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp - > -struct iter_fold_backward_impl; + > +struct reverse_iter_fold_impl; -template< nttp_long N > -struct iter_fold_backward_chunk; +template< long N > +struct reverse_iter_fold_chunk; -template<> -struct iter_fold_backward_chunk<0> +template<> struct reverse_iter_fold_chunk<0> { template< typename First @@ -38,8 +44,8 @@ struct iter_fold_backward_chunk<0> typedef iter0 iterator; }; - // ETI workaround - template<> struct result_<int, int, int, int, int> + /// ETI workaround + template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; @@ -47,8 +53,7 @@ struct iter_fold_backward_chunk<0> }; -template<> -struct iter_fold_backward_chunk<1> +template<> struct reverse_iter_fold_chunk<1> { template< typename First @@ -62,7 +67,7 @@ struct iter_fold_backward_chunk<1> typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef fwd_state1 bkwd_state1; @@ -71,8 +76,8 @@ struct iter_fold_backward_chunk<1> typedef iter1 iterator; }; - // ETI workaround - template<> struct result_<int, int, int, int, int> + /// ETI workaround + template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; @@ -80,8 +85,7 @@ struct iter_fold_backward_chunk<1> }; -template<> -struct iter_fold_backward_chunk<2> +template<> struct reverse_iter_fold_chunk<2> { template< typename First @@ -95,9 +99,9 @@ struct iter_fold_backward_chunk<2> typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef fwd_state2 bkwd_state2; @@ -109,8 +113,8 @@ struct iter_fold_backward_chunk<2> typedef iter2 iterator; }; - // ETI workaround - template<> struct result_<int, int, int, int, int> + /// ETI workaround + template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; @@ -118,8 +122,7 @@ struct iter_fold_backward_chunk<2> }; -template<> -struct iter_fold_backward_chunk<3> +template<> struct reverse_iter_fold_chunk<3> { template< typename First @@ -133,11 +136,11 @@ struct iter_fold_backward_chunk<3> typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; + typedef typename next<iter2>::type iter3; typedef fwd_state3 bkwd_state3; @@ -150,8 +153,8 @@ struct iter_fold_backward_chunk<3> typedef iter3 iterator; }; - // ETI workaround - template<> struct result_<int, int, int, int, int> + /// ETI workaround + template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; @@ -159,8 +162,7 @@ struct iter_fold_backward_chunk<3> }; -template<> -struct iter_fold_backward_chunk<4> +template<> struct reverse_iter_fold_chunk<4> { template< typename First @@ -174,13 +176,13 @@ struct iter_fold_backward_chunk<4> typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; + typedef typename next<iter2>::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; - typedef typename iter3::next iter4; + typedef typename next<iter3>::type iter4; typedef fwd_state4 bkwd_state4; @@ -194,8 +196,8 @@ struct iter_fold_backward_chunk<4> typedef iter4 iterator; }; - // ETI workaround - template<> struct result_<int, int, int, int, int> + /// ETI workaround + template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; @@ -203,8 +205,8 @@ struct iter_fold_backward_chunk<4> }; -template< nttp_long N > -struct iter_fold_backward_chunk +template< long N > +struct reverse_iter_fold_chunk { template< typename First @@ -212,22 +214,22 @@ struct iter_fold_backward_chunk , typename State , typename BackwardOp , typename ForwardOp - > + > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; + typedef typename next<iter2>::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; - typedef typename iter3::next iter4; + typedef typename next<iter3>::type iter4; - typedef iter_fold_backward_impl< + typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last @@ -235,7 +237,7 @@ struct iter_fold_backward_chunk , BackwardOp , ForwardOp > nested_chunk; - + typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; @@ -254,21 +256,21 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > -struct iter_fold_backward_step; + > +struct reverse_iter_fold_step; template< typename Last , typename State > -struct iter_fold_backward_null_step +struct reverse_iter_fold_null_step { typedef Last iterator; typedef State state; }; -template<> -struct iter_fold_backward_chunk< -1 > +template<> +struct reverse_iter_fold_chunk< -1 > { template< typename First @@ -276,21 +278,21 @@ struct iter_fold_backward_chunk< -1 > , typename State , typename BackwardOp , typename ForwardOp - > + > struct result_ { typedef typename if_< typename is_same< First,Last >::type - , iter_fold_backward_null_step< Last,State > - , iter_fold_backward_step< First,Last,State,BackwardOp,ForwardOp > + , reverse_iter_fold_null_step< Last,State > + , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; - // ETI workaround - template<> struct result_<int, int, int, int, int> + /// ETI workaround + template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; @@ -304,36 +306,38 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > -struct iter_fold_backward_step + > +struct reverse_iter_fold_step { - typedef iter_fold_backward_chunk< -1 >::template result_< - typename First::next + typedef reverse_iter_fold_chunk< -1 >::template result_< + typename next<First>::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; - typedef typename apply2<BackwardOp, typename nested_step::state, First>::type state; + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + typedef typename nested_step::iterator iterator; }; template< - nttp_long N + long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp - > -struct iter_fold_backward_impl - : iter_fold_backward_chunk<N> + > +struct reverse_iter_fold_impl + : reverse_iter_fold_chunk<N> ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/set.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/set.hpp new file mode 100644 index 0000000..531331c --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/set.hpp @@ -0,0 +1,556 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct set_chooser; + +} + +namespace aux { + +template<> +struct set_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef set0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_set_arg +{ + enum { value = true }; +}; + +template<> +struct is_set_arg<na> +{ + enum { value = false }; +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct set_count_args +{ + enum { value = + is_set_arg<T1>::value + is_set_arg<T2>::value + + is_set_arg<T3>::value + is_set_arg<T4>::value + + is_set_arg<T5>::value + is_set_arg<T6>::value + + is_set_arg<T7>::value + is_set_arg<T8>::value + + is_set_arg<T9>::value + is_set_arg<T10>::value + + is_set_arg<T11>::value + is_set_arg<T12>::value + + is_set_arg<T13>::value + is_set_arg<T14>::value + + is_set_arg<T15>::value + is_set_arg<T16>::value + + is_set_arg<T17>::value + is_set_arg<T18>::value + + is_set_arg<T19>::value + is_set_arg<T20>::value + }; + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set_impl +{ + typedef aux::set_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::set_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set + : aux::set_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::set_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/shift_left.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/shift_left.hpp new file mode 100644 index 0000000..37b13ff --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/shift_left.hpp @@ -0,0 +1,116 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct shift_left_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct shift_left_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct shift_left_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + : aux::msvc_eti_base< typename apply_wrap2< + shift_left_impl< + typename shift_left_tag<N1>::type + , typename shift_left_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, typename Shift, T n, Shift s > +struct msvc_shift_left_impl +{ + enum msvc_wknd { value = (n << s) }; + typedef integral_c< T,value > type; +}; + +} + +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename Shift > struct apply + + : aux::msvc_shift_left_impl< + typename N::value_type + , typename Shift::value_type + , N::value + , Shift::value + >::type + + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/shift_right.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/shift_right.hpp new file mode 100644 index 0000000..e58a457 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/shift_right.hpp @@ -0,0 +1,116 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct shift_right_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct shift_right_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct shift_right_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + : aux::msvc_eti_base< typename apply_wrap2< + shift_right_impl< + typename shift_right_tag<N1>::type + , typename shift_right_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, typename Shift, T n, Shift s > +struct msvc_shift_right_impl +{ + enum msvc_wknd { value = (n >> s) }; + typedef integral_c< T,value > type; +}; + +} + +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename Shift > struct apply + + : aux::msvc_shift_right_impl< + typename N::value_type + , typename Shift::value_type + , N::value + , Shift::value + >::type + + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp index 7fc759b..8176698 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp @@ -1,5 +1,13 @@ -// preprocessed version of 'boost/mpl/aux_/template_arity.hpp' header -// see the original for copyright information + +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { @@ -7,8 +15,8 @@ template< bool > struct template_arity_impl { template< typename F > struct result_ + : int_< -1 > { - enum { value = -1 }; }; }; @@ -16,9 +24,8 @@ template<> struct template_arity_impl<true> { template< typename F > struct result_ + : F::arity { - enum { value = F::arity }; - }; }; @@ -31,9 +38,9 @@ struct template_arity template<> struct template_arity<int> + : int_< -1 > { - enum { value = -1 }; }; -}}} // namespace boost::mpl::aux +}}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/times.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/times.hpp new file mode 100644 index 0000000..1ee8f09 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/times.hpp @@ -0,0 +1,116 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct times_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct times_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct times_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct times + : aux::msvc_eti_base< typename apply_wrap2< + times_impl< + typename times_tag<N1>::type + , typename times_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, times, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, times) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct msvc_times_impl +{ + enum msvc_wknd { value = (n1 * n2) }; + typedef integral_c< T,value > type; +}; + +} + +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::msvc_times_impl< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/unpack_args.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/unpack_args.hpp new file mode 100644 index 0000000..f481d79 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/unpack_args.hpp @@ -0,0 +1,109 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl +{ + template< typename F, typename Args > struct apply; +}; + +template<> struct unpack_args_impl<0> +{ + template< typename F, typename Args > struct apply + : apply0< + F + > + { + }; +}; + +template<> struct unpack_args_impl<1> +{ + template< typename F, typename Args > struct apply + : apply1< + F + , typename at_c< Args,0 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<2> +{ + template< typename F, typename Args > struct apply + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<3> +{ + template< typename F, typename Args > struct apply + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<4> +{ + template< typename F, typename Args > struct apply + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<5> +{ + template< typename F, typename Args > struct apply + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > + { + }; +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size<Args>::value > + ::template apply< F,Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/vector.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/vector.hpp index 8739044..c44f09c 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/vector.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/vector.hpp @@ -1,27 +1,39 @@ -// preprocessed version of 'boost/mpl/vector.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { -template< nttp_int N > struct vector_impl_chooser; +template< int N > +struct vector_chooser; + } namespace aux { template<> -struct vector_impl_chooser<0> +struct vector_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef vector0< - - > type; + + >::type type; + }; }; @@ -30,17 +42,20 @@ struct vector_impl_chooser<0> namespace aux { template<> -struct vector_impl_chooser<1> +struct vector_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector1< - T0 - > type; + typedef typename vector1< + T0 + >::type type; + }; }; @@ -49,17 +64,20 @@ struct vector_impl_chooser<1> namespace aux { template<> -struct vector_impl_chooser<2> +struct vector_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector2< - T0, T1 - > type; + typedef typename vector2< + T0, T1 + >::type type; + }; }; @@ -68,17 +86,20 @@ struct vector_impl_chooser<2> namespace aux { template<> -struct vector_impl_chooser<3> +struct vector_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector3< - T0, T1, T2 - > type; + typedef typename vector3< + T0, T1, T2 + >::type type; + }; }; @@ -87,17 +108,20 @@ struct vector_impl_chooser<3> namespace aux { template<> -struct vector_impl_chooser<4> +struct vector_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector4< - T0, T1, T2, T3 - > type; + typedef typename vector4< + T0, T1, T2, T3 + >::type type; + }; }; @@ -106,17 +130,20 @@ struct vector_impl_chooser<4> namespace aux { template<> -struct vector_impl_chooser<5> +struct vector_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector5< - T0, T1, T2, T3, T4 - > type; + typedef typename vector5< + T0, T1, T2, T3, T4 + >::type type; + }; }; @@ -125,17 +152,20 @@ struct vector_impl_chooser<5> namespace aux { template<> -struct vector_impl_chooser<6> +struct vector_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector6< - T0, T1, T2, T3, T4, T5 - > type; + typedef typename vector6< + T0, T1, T2, T3, T4, T5 + >::type type; + }; }; @@ -144,17 +174,20 @@ struct vector_impl_chooser<6> namespace aux { template<> -struct vector_impl_chooser<7> +struct vector_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector7< - T0, T1, T2, T3, T4, T5, T6 - > type; + typedef typename vector7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + }; }; @@ -163,17 +196,20 @@ struct vector_impl_chooser<7> namespace aux { template<> -struct vector_impl_chooser<8> +struct vector_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector8< - T0, T1, T2, T3, T4, T5, T6, T7 - > type; + typedef typename vector8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + }; }; @@ -182,17 +218,20 @@ struct vector_impl_chooser<8> namespace aux { template<> -struct vector_impl_chooser<9> +struct vector_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector9< - T0, T1, T2, T3, T4, T5, T6, T7, T8 - > type; + typedef typename vector9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + }; }; @@ -201,17 +240,240 @@ struct vector_impl_chooser<9> namespace aux { template<> -struct vector_impl_chooser<10> +struct vector_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector10< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 - > type; + typedef typename vector10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + }; }; @@ -226,7 +488,7 @@ struct is_vector_arg }; template<> -struct is_vector_arg<void_> +struct is_vector_arg<na> { enum { value = false }; }; @@ -234,6 +496,8 @@ struct is_vector_arg<void_> template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 > struct vector_count_args { @@ -242,37 +506,51 @@ struct vector_count_args + is_vector_arg<T3>::value + is_vector_arg<T4>::value + is_vector_arg<T5>::value + is_vector_arg<T6>::value + is_vector_arg<T7>::value + is_vector_arg<T8>::value - + is_vector_arg<T9>::value + is_vector_arg<T10>::value + + is_vector_arg<T9>::value + is_vector_arg<T10>::value + + is_vector_arg<T11>::value + is_vector_arg<T12>::value + + is_vector_arg<T13>::value + is_vector_arg<T14>::value + + is_vector_arg<T15>::value + is_vector_arg<T16>::value + + is_vector_arg<T17>::value + is_vector_arg<T18>::value + + is_vector_arg<T19>::value + is_vector_arg<T20>::value }; + }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector_impl { - typedef aux::vector_count_args< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > arg_num_; - typedef typename aux::vector_impl_chooser< arg_num_::value > - ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; + typedef aux::vector_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::vector_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< - typename T0 = void_, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - , typename T6 = void_, typename T7 = void_, typename T8 = void_ - , typename T9 = void_ + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na > struct vector - : aux::vector_impl< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type + : aux::vector_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type { typedef typename aux::vector_impl< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp index dee3e98..5349187 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp @@ -1,29 +1,38 @@ -// preprocessed version of 'boost/mpl/vector_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { -template< nttp_int N > struct vector_c_impl_chooser; +template< int N > +struct vector_c_chooser; + } namespace aux { template<> -struct vector_c_impl_chooser<0> +struct vector_c_chooser<0> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector0_c< - T - > type; + typedef typename vector0_c< + T + >::type type; + }; }; @@ -32,19 +41,19 @@ struct vector_c_impl_chooser<0> namespace aux { template<> -struct vector_c_impl_chooser<1> +struct vector_c_chooser<1> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector1_c< + typedef typename vector1_c< T, C0 - > type; + >::type type; + }; }; @@ -53,19 +62,19 @@ struct vector_c_impl_chooser<1> namespace aux { template<> -struct vector_c_impl_chooser<2> +struct vector_c_chooser<2> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector2_c< + typedef typename vector2_c< T, C0, C1 - > type; + >::type type; + }; }; @@ -74,19 +83,19 @@ struct vector_c_impl_chooser<2> namespace aux { template<> -struct vector_c_impl_chooser<3> +struct vector_c_chooser<3> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector3_c< + typedef typename vector3_c< T, C0, C1, C2 - > type; + >::type type; + }; }; @@ -95,19 +104,19 @@ struct vector_c_impl_chooser<3> namespace aux { template<> -struct vector_c_impl_chooser<4> +struct vector_c_chooser<4> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector4_c< + typedef typename vector4_c< T, C0, C1, C2, C3 - > type; + >::type type; + }; }; @@ -116,19 +125,19 @@ struct vector_c_impl_chooser<4> namespace aux { template<> -struct vector_c_impl_chooser<5> +struct vector_c_chooser<5> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector5_c< + typedef typename vector5_c< T, C0, C1, C2, C3, C4 - > type; + >::type type; + }; }; @@ -137,19 +146,19 @@ struct vector_c_impl_chooser<5> namespace aux { template<> -struct vector_c_impl_chooser<6> +struct vector_c_chooser<6> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector6_c< + typedef typename vector6_c< T, C0, C1, C2, C3, C4, C5 - > type; + >::type type; + }; }; @@ -158,19 +167,19 @@ struct vector_c_impl_chooser<6> namespace aux { template<> -struct vector_c_impl_chooser<7> +struct vector_c_chooser<7> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector7_c< + typedef typename vector7_c< T, C0, C1, C2, C3, C4, C5, C6 - > type; + >::type type; + }; }; @@ -179,19 +188,19 @@ struct vector_c_impl_chooser<7> namespace aux { template<> -struct vector_c_impl_chooser<8> +struct vector_c_chooser<8> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector8_c< + typedef typename vector8_c< T, C0, C1, C2, C3, C4, C5, C6, C7 - > type; + >::type type; + }; }; @@ -200,19 +209,19 @@ struct vector_c_impl_chooser<8> namespace aux { template<> -struct vector_c_impl_chooser<9> +struct vector_c_chooser<9> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector9_c< + typedef typename vector9_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8 - > type; + >::type type; + }; }; @@ -221,19 +230,19 @@ struct vector_c_impl_chooser<9> namespace aux { template<> -struct vector_c_impl_chooser<10> +struct vector_c_chooser<10> { template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 - , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 - , nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector10_c< + typedef typename vector10_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 - > type; + >::type type; + }; }; @@ -241,7 +250,217 @@ struct vector_c_impl_chooser<10> namespace aux { -template< nttp_long T > +template<> +struct vector_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector11_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector12_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector13_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > struct is_vector_c_arg { enum { value = true }; @@ -254,49 +473,62 @@ struct is_vector_c_arg<LONG_MAX> }; template< - nttp_long T1, nttp_long T2, nttp_long T3, nttp_long T4, nttp_long T5 - , nttp_long T6, nttp_long T7, nttp_long T8, nttp_long T9, nttp_long T10 + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 > struct vector_c_count_args { enum { value = - is_vector_c_arg<T1>::value + is_vector_c_arg<T2>::value - + is_vector_c_arg<T3>::value + is_vector_c_arg<T4>::value - + is_vector_c_arg<T5>::value + is_vector_c_arg<T6>::value - + is_vector_c_arg<T7>::value + is_vector_c_arg<T8>::value - + is_vector_c_arg<T9>::value + is_vector_c_arg<T10>::value + is_vector_c_arg<C1>::value + is_vector_c_arg<C2>::value + + is_vector_c_arg<C3>::value + is_vector_c_arg<C4>::value + + is_vector_c_arg<C5>::value + is_vector_c_arg<C6>::value + + is_vector_c_arg<C7>::value + is_vector_c_arg<C8>::value + + is_vector_c_arg<C9>::value + is_vector_c_arg<C10>::value + + is_vector_c_arg<C11>::value + is_vector_c_arg<C12>::value + + is_vector_c_arg<C13>::value + is_vector_c_arg<C14>::value + + is_vector_c_arg<C15>::value + is_vector_c_arg<C16>::value + + is_vector_c_arg<C17>::value + is_vector_c_arg<C18>::value + + is_vector_c_arg<C19>::value + is_vector_c_arg<C20>::value }; + }; template< - typename T - , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3, nttp_long C4 - , nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8, nttp_long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c_impl { - typedef aux::vector_c_count_args< C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > arg_num_; - typedef typename aux::vector_c_impl_chooser< arg_num_::value > - ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; + typedef aux::vector_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::vector_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< - typename T - , nttp_long C0 = LONG_MAX, nttp_long C1 = LONG_MAX - , nttp_long C2 = LONG_MAX, nttp_long C3 = LONG_MAX, nttp_long C4 = LONG_MAX - , nttp_long C5 = LONG_MAX, nttp_long C6 = LONG_MAX, nttp_long C7 = LONG_MAX - , nttp_long C8 = LONG_MAX, nttp_long C9 = LONG_MAX + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX + , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c - : aux::vector_c_impl< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type + : aux::vector_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type { typedef typename aux::vector_c_impl< - T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/advance_backward.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/advance_backward.hpp index 16e576c..26de94c 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/advance_backward.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/advance_backward.hpp @@ -1,9 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/advance_backward.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> @@ -22,7 +28,7 @@ struct advance_backward<1> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; + typedef typename prior<iter0>::type iter1; typedef iter1 type; }; }; @@ -33,8 +39,8 @@ struct advance_backward<2> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; typedef iter2 type; }; }; @@ -45,9 +51,9 @@ struct advance_backward<3> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; - typedef typename iter2::prior iter3; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; + typedef typename prior<iter2>::type iter3; typedef iter3 type; }; }; @@ -58,10 +64,10 @@ struct advance_backward<4> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; - typedef typename iter2::prior iter3; - typedef typename iter3::prior iter4; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; + typedef typename prior<iter2>::type iter3; + typedef typename prior<iter3>::type iter4; typedef iter4 type; }; }; @@ -71,12 +77,21 @@ struct advance_backward { template< typename Iterator > struct apply { - typedef typename apply1< advance_backward<4>,Iterator >::type chunk_result_; - typedef typename apply1<advance_backward<( (N - 4) < 0 ? 0 : N - 4 )>,chunk_result_>::type type; + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/advance_forward.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/advance_forward.hpp index e6840b7..b137cc7 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/advance_forward.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/advance_forward.hpp @@ -1,9 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/advance_forward.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> @@ -22,7 +28,7 @@ struct advance_forward<1> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef iter1 type; }; }; @@ -33,8 +39,8 @@ struct advance_forward<2> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; typedef iter2 type; }; }; @@ -45,9 +51,9 @@ struct advance_forward<3> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; - typedef typename iter2::next iter3; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; + typedef typename next<iter2>::type iter3; typedef iter3 type; }; }; @@ -58,10 +64,10 @@ struct advance_forward<4> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; - typedef typename iter2::next iter3; - typedef typename iter3::next iter4; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; + typedef typename next<iter2>::type iter3; + typedef typename next<iter3>::type iter4; typedef iter4 type; }; }; @@ -71,12 +77,21 @@ struct advance_forward { template< typename Iterator > struct apply { - typedef typename apply1< advance_forward<4>,Iterator >::type chunk_result_; - typedef typename apply1<advance_forward<( (N - 4) < 0 ? 0 : N - 4 )>,chunk_result_>::type type; + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/and.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/and.hpp index 54abda1..e58640a 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/and.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/and.hpp @@ -1,10 +1,17 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { - template< bool C_ > struct and_impl { template< @@ -22,13 +29,13 @@ template<> struct and_impl<true> typename T1, typename T2, typename T3, typename T4 > struct result_ - : and_impl< + : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,true_ > { }; - template<> struct result_<true_, true_, true_, true_> + template<> struct result_< true_,true_,true_,true_ > : true_ { }; @@ -37,13 +44,13 @@ template<> struct and_impl<true> } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ - : aux::and_impl< + : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,T5 > @@ -51,15 +58,14 @@ struct and_ BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ - , (T1, T2, T3, T4, T5) + , ( T1, T2, T3, T4, T5) ) }; -BOOST_MPL_AUX_VOID_SPEC_EXT( +BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) -}} // namespace boost::mpl - +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/apply.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/apply.hpp index 2a560c8..d46d030 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/apply.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/apply.hpp @@ -1,317 +1,160 @@ -// preprocessed version of 'boost/mpl/apply.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// -namespace aux { -template< int arity_ > struct apply_impl_chooser; -} +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! -template< typename F > -struct apply0 : F +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda<F>::type + + > { - enum { arity = 1 }; typedef F arg1; - friend class apply0_rebind; - typedef apply0_rebind rebind; - }; - class apply0_rebind { public: template< typename U1 > struct apply : apply0<U1> { }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) }; -// workaround for the ETI bug +/// workaround for ETI bug template<> struct apply0<int> { typedef int type; }; -namespace aux { - -template<> -struct apply_impl_chooser<0> -{ - template< - typename F, typename T1, typename T2, typename T3, typename T4 - , typename T5 - > - struct result_ - { - typedef apply0< - F - > type; - }; -}; - -} // namespace aux - template< typename F, typename T1 > struct apply1 + + : apply_wrap1< + typename lambda<F>::type + , T1 + > { - typedef typename F::template apply< - T1 - >::type type; - - enum { arity = 2 }; typedef F arg1; - typedef T1 arg2; - friend class apply1_rebind; - typedef apply1_rebind rebind; - }; - class apply1_rebind { public: template< typename U1, typename U2 > struct apply : apply1< U1,U2 > { }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) }; -// workaround for ETI bug +/// workaround for ETI bug template<> struct apply1< int,int > { typedef int type; }; -namespace aux { - -template<> -struct apply_impl_chooser<1> -{ - template< - typename F, typename T1, typename T2, typename T3, typename T4 - , typename T5 - > - struct result_ - { - typedef apply1< - F, T1 - > type; - }; -}; - -} // namespace aux - template< typename F, typename T1, typename T2 > struct apply2 + + : apply_wrap2< + typename lambda<F>::type + , T1, T2 + > { - typedef typename F::template apply< - T1, T2 - >::type type; - enum { arity = 3 }; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - friend class apply2_rebind; - typedef apply2_rebind rebind; - }; - class apply2_rebind { public: template< typename U1, typename U2, typename U3 > struct apply : apply2< U1,U2,U3 > { }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) }; -// workaround for ETI bug +/// workaround for ETI bug template<> struct apply2< int,int,int > { typedef int type; }; -namespace aux { - -template<> -struct apply_impl_chooser<2> -{ - template< - typename F, typename T1, typename T2, typename T3, typename T4 - , typename T5 - > - struct result_ - { - typedef apply2< - F, T1, T2 - > type; - }; -}; - -} // namespace aux - template< typename F, typename T1, typename T2, typename T3 > struct apply3 + + : apply_wrap3< + typename lambda<F>::type + , T1, T2, T3 + > { - typedef typename F::template apply< - T1, T2, T3 - >::type type; - - enum { arity = 4 }; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - typedef T3 arg4; - friend class apply3_rebind; - typedef apply3_rebind rebind; - }; - class apply3_rebind { public: template< typename U1, typename U2, typename U3, typename U4 > struct apply : apply3< U1,U2,U3,U4 > { }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) }; -// workaround for ETI bug +/// workaround for ETI bug template<> struct apply3< int,int,int,int > { typedef int type; }; -namespace aux { - -template<> -struct apply_impl_chooser<3> -{ - template< - typename F, typename T1, typename T2, typename T3, typename T4 - , typename T5 - > - struct result_ - { - typedef apply3< - F, T1, T2, T3 - > type; - }; -}; - -} // namespace aux - template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 + + : apply_wrap4< + typename lambda<F>::type + , T1, T2, T3, T4 + > { - typedef typename F::template apply< - T1, T2, T3, T4 - >::type type; - enum { arity = 5 }; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - typedef T3 arg4; - typedef T4 arg5; - friend class apply4_rebind; - typedef apply4_rebind rebind; - }; - class apply4_rebind { public: template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply : apply4< U1,U2,U3,U4,U5 > { }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) }; -// workaround for ETI bug +/// workaround for ETI bug template<> struct apply4< int,int,int,int,int > { typedef int type; }; -namespace aux { - -template<> -struct apply_impl_chooser<4> -{ - template< - typename F, typename T1, typename T2, typename T3, typename T4 - , typename T5 - > - struct result_ - { - typedef apply4< - F, T1, T2, T3, T4 - > type; - }; -}; - -} // namespace aux - template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 + + : apply_wrap5< + typename lambda<F>::type + , T1, T2, T3, T4, T5 + > { - typedef typename F::template apply< - T1, T2, T3, T4, T5 - >::type type; - enum { arity = 6 }; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - typedef T3 arg4; - typedef T4 arg5; - typedef T5 arg6; - friend class apply5_rebind; - typedef apply5_rebind rebind; - }; - class apply5_rebind { public: template< typename U1, typename U2, typename U3, typename U4, typename U5, typename U6 > struct apply : apply5< U1,U2,U3,U4,U5,U6 > { }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) }; -// workaround for ETI bug +/// workaround for ETI bug template<> struct apply5< int,int,int,int,int,int > { typedef int type; }; -namespace aux { - -template<> -struct apply_impl_chooser<5> -{ - template< - typename F, typename T1, typename T2, typename T3, typename T4 - , typename T5 - > - struct result_ - { - typedef apply5< - F, T1, T2, T3, T4, T5 - > type; - }; -}; - -} // namespace aux - -namespace aux { - -template< typename T > -struct is_apply_arg -{ - enum { value = true }; -}; - -template<> -struct is_apply_arg<void_> -{ - enum { value = false }; -}; - -template< - typename T1, typename T2, typename T3, typename T4, typename T5 - > -struct apply_count_args -{ - enum { value = - is_apply_arg<T1>::value + is_apply_arg<T2>::value - + is_apply_arg<T3>::value + is_apply_arg<T4>::value - + is_apply_arg<T5>::value - }; -}; - -} // namespace aux - -template< - typename F, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - > -struct apply - : aux::apply_impl_chooser< - aux::apply_count_args< T1,T2,T3,T4,T5 >::value - >::template result_< F,T1,T2,T3,T4,T5 >::type -{ -}; - -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/apply_fwd.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/apply_fwd.hpp new file mode 100644 index 0000000..a7e0fca --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/apply_fwd.hpp @@ -0,0 +1,46 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/apply_wrap.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/apply_wrap.hpp new file mode 100644 index 0000000..8e1f559 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/apply_wrap.hpp @@ -0,0 +1,130 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply_wrap0 + +{ + typedef typename F::template apply< + + >::type type; + +}; + +/// workaround for ETI bug +template<> +struct apply_wrap0<int> +{ + typedef int type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap1 + +{ + typedef typename F::template apply< + T1 + >::type type; + +}; + +/// workaround for ETI bug +template<> +struct apply_wrap1< int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap2 + +{ + typedef typename F::template apply< + T1, T2 + >::type type; + +}; + +/// workaround for ETI bug +template<> +struct apply_wrap2< int,int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap3 + +{ + typedef typename F::template apply< + T1, T2, T3 + >::type type; + +}; + +/// workaround for ETI bug +template<> +struct apply_wrap3< int,int,int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap4 + +{ + typedef typename F::template apply< + T1, T2, T3, T4 + >::type type; + +}; + +/// workaround for ETI bug +template<> +struct apply_wrap4< int,int,int,int,int > +{ + typedef int type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap5 + +{ + typedef typename F::template apply< + T1, T2, T3, T4, T5 + >::type type; + +}; + +/// workaround for ETI bug +template<> +struct apply_wrap5< int,int,int,int,int,int > +{ + typedef int type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/arg.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/arg.hpp index d43cf63..6ee1241 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/arg.hpp @@ -1,26 +1,30 @@ -// preprocessed version of 'boost/mpl/arg.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-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) +// -template<> struct arg<-1> +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > { enum { value = -1 }; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; - - private: - enum { nv = !is_void_<type>::value }; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -28,20 +32,17 @@ template<> struct arg<1> { enum { value = 1 }; typedef arg<2> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; - - private: - enum { nv = !is_void_<type>::value }; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -49,20 +50,17 @@ template<> struct arg<2> { enum { value = 2 }; typedef arg<3> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; - - private: - enum { nv = !is_void_<type>::value }; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -70,20 +68,17 @@ template<> struct arg<3> { enum { value = 3 }; typedef arg<4> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; - - private: - enum { nv = !is_void_<type>::value }; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -91,20 +86,17 @@ template<> struct arg<4> { enum { value = 4 }; typedef arg<5> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; - - private: - enum { nv = !is_void_<type>::value }; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -112,25 +104,20 @@ template<> struct arg<5> { enum { value = 5 }; typedef arg<6> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; - - private: - enum { nv = !is_void_<type>::value }; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; -BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1, int, arg) - -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp index 2c94fb0..1d3c0af 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp @@ -1,11 +1,16 @@ -// preprocessed version of 'boost/mpl/bind.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-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) +// -BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) -BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< bool > @@ -30,7 +35,10 @@ struct resolve_arg_impl<true> > struct result_ { - typedef typename apply5< T,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< + T + , U1, U2, U3, U4, U5 + >::type type; }; }; @@ -41,17 +49,12 @@ template< , typename U5 > struct resolve_bind_arg - : resolve_arg_impl< is_bind_template<T >::value > + : resolve_arg_impl< is_bind_template<T>::value > ::template result_< T,U1,U2,U3,U4,U5 > { }; -} // namespace aux -template< typename F, typename T > struct bind1st; -template< typename F, typename T > struct bind2nd; - -namespace aux { -template< int arity_ > struct bind_impl_chooser; +template< int arity_ > struct bind_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect<T>*); @@ -59,9 +62,6 @@ template< typename T > aux::no_tag is_bind_helper(protect<T>*); template< int N > aux::yes_tag is_bind_helper(arg<N>*); -template< typename F, typename T > aux::yes_tag is_bind_helper(bind1st< F,T >*); -template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*); - template< bool is_ref_ = true > struct is_bind_template_impl { @@ -91,8 +91,6 @@ template< typename T > struct is_bind_template }; } // namespace aux -BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) -BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) template< typename F @@ -100,8 +98,8 @@ template< struct bind0 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { @@ -109,7 +107,10 @@ struct bind0 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: - typedef typename apply0<f_>::type type; + typedef typename apply_wrap0< + f_ + >::type type; + }; }; @@ -131,17 +132,21 @@ template< struct bind1 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: - typedef typename apply1< f_,t1 >::type type; + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + }; }; @@ -163,18 +168,22 @@ template< struct bind2 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: - typedef typename apply2< f_,t1,t2 >::type type; + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + }; }; @@ -196,19 +205,23 @@ template< struct bind3 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: - typedef typename apply3< f_,t1,t2,t3 >::type type; + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + }; }; @@ -230,20 +243,25 @@ template< struct bind4 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; - typedef typename aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 >::type t4; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: - typedef typename apply4< f_,t1,t2,t3,t4 >::type type; + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + }; }; @@ -266,21 +284,26 @@ template< struct bind5 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; - typedef typename aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 >::type t4; - typedef typename aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 >::type t5; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: - typedef typename apply5< f_,t1,t2,t3,t4,t5 >::type type; + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + }; }; @@ -296,35 +319,5 @@ is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) - -template< typename F, typename T > -struct bind1st -{ - template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ - > - struct apply - : apply2< F,T,U > - { - }; -}; - -template< typename F, typename T > -struct bind2nd -{ - template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ - > - struct apply - : apply2< F,U,T > - { - }; -}; - -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/bind.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/bind.hpp index c7b7b75..0bad8ba 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/bind.hpp @@ -1,11 +1,16 @@ -// preprocessed version of 'boost/mpl/bind.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-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) +// -BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) -BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< bool > @@ -30,7 +35,10 @@ struct resolve_arg_impl<true> > struct result_ { - typedef typename apply5< T,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< + T + , U1, U2, U3, U4, U5 + >::type type; }; }; @@ -41,7 +49,7 @@ template< , typename U5 > struct resolve_bind_arg - : resolve_arg_impl< is_bind_template<T >::value > + : resolve_arg_impl< is_bind_template<T>::value > ::template result_< T,U1,U2,U3,U4,U5 > { }; @@ -51,17 +59,17 @@ struct replace_unnamed_arg_impl { template< typename Arg > struct result_ { - typedef Arg next_arg; + typedef Arg next; typedef T type; }; }; template<> -struct replace_unnamed_arg_impl< arg<-1> > +struct replace_unnamed_arg_impl< arg< -1 > > { template< typename Arg > struct result_ { - typedef typename Arg::next next_arg; + typedef typename next<Arg>::type next; typedef Arg type; }; }; @@ -72,12 +80,7 @@ struct replace_unnamed_arg { }; -} // namespace aux -template< typename F, typename T > struct bind1st; -template< typename F, typename T > struct bind2nd; - -namespace aux { -template< int arity_ > struct bind_impl_chooser; +template< int arity_ > struct bind_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect<T>*); @@ -85,9 +88,6 @@ template< typename T > aux::no_tag is_bind_helper(protect<T>*); template< int N > aux::yes_tag is_bind_helper(arg<N>*); -template< typename F, typename T > aux::yes_tag is_bind_helper(bind1st< F,T >*); -template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*); - template< bool is_ref_ = true > struct is_bind_template_impl { @@ -117,8 +117,6 @@ template< typename T > struct is_bind_template }; } // namespace aux -BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) -BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) template< typename F @@ -126,19 +124,22 @@ template< struct bind0 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// public: - typedef typename apply0<f_>::type type; + typedef typename apply_wrap0< + f_ + >::type type; + }; }; @@ -160,24 +161,28 @@ template< struct bind1 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// public: - typedef typename apply1< f_,t1 >::type type; + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + }; }; @@ -199,29 +204,33 @@ template< struct bind2 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// public: - typedef typename apply2< f_,t1,t2 >::type type; + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + }; }; @@ -243,34 +252,38 @@ template< struct bind3 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// public: - typedef typename apply3< f_,t1,t2,t3 >::type type; + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + }; }; @@ -292,39 +305,44 @@ template< struct bind4 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; - typedef typename r4::next_arg n5; - typedef typename aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 >::type t4; - + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// public: - typedef typename apply4< f_,t1,t2,t3,t4 >::type type; + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + }; }; @@ -347,44 +365,49 @@ template< struct bind5 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; - typedef typename r4::next_arg n5; - typedef typename aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 >::type t4; - + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; - typedef typename r5::next_arg n6; - typedef typename aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 >::type t5; - + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// public: - typedef typename apply5< f_,t1,t2,t3,t4,t5 >::type type; + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + }; }; @@ -400,35 +423,5 @@ is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) - -template< typename F, typename T > -struct bind1st -{ - template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ - > - struct apply - : apply2< F,T,U > - { - }; -}; - -template< typename F, typename T > -struct bind2nd -{ - template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ - > - struct apply - : apply2< F,U,T > - { - }; -}; - -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/bind_fwd.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/bind_fwd.hpp new file mode 100644 index 0000000..21e6a93 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/bind_fwd.hpp @@ -0,0 +1,46 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/bitand.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/bitand.hpp new file mode 100644 index 0000000..f3ca044 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/bitand.hpp @@ -0,0 +1,117 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct bitand_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct bitand_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct bitand_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct bitand_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitand_ + : aux::msvc_eti_base< typename apply_wrap2< + bitand_impl< + typename bitand_tag<N1>::type + , typename bitand_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitand_, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, bitand_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct msvc_bitand_impl +{ + enum msvc_wknd { value = (n1 & n2) }; + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::msvc_bitand_impl< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/bitor.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/bitor.hpp new file mode 100644 index 0000000..f186187 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/bitor.hpp @@ -0,0 +1,117 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct bitor_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct bitor_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct bitor_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct bitor_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitor_ + : aux::msvc_eti_base< typename apply_wrap2< + bitor_impl< + typename bitor_tag<N1>::type + , typename bitor_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitor_, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, bitor_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct msvc_bitor_impl +{ + enum msvc_wknd { value = (n1 | n2) }; + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::msvc_bitor_impl< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/bitxor.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/bitxor.hpp new file mode 100644 index 0000000..a8ebda0 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/bitxor.hpp @@ -0,0 +1,117 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct bitxor_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct bitxor_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct bitxor_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct bitxor_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitxor_ + : aux::msvc_eti_base< typename apply_wrap2< + bitxor_impl< + typename bitxor_tag<N1>::type + , typename bitxor_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitxor_, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, bitxor_) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct msvc_bitxor_impl +{ + enum msvc_wknd { value = (n1 ^ n2) }; + typedef integral_c< T,value > type; +}; + +} + +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::msvc_bitxor_impl< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/divides.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/divides.hpp new file mode 100644 index 0000000..8260f85 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/divides.hpp @@ -0,0 +1,116 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct divides_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct divides_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct divides_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct divides_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct divides + : aux::msvc_eti_base< typename apply_wrap2< + divides_impl< + typename divides_tag<N1>::type + , typename divides_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, divides, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, divides) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct msvc_divides_impl +{ + enum msvc_wknd { value = (n1 / n2) }; + typedef integral_c< T,value > type; +}; + +} + +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::msvc_divides_impl< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/equal_to.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/equal_to.hpp new file mode 100644 index 0000000..50bb01f --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/equal_to.hpp @@ -0,0 +1,103 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct equal_to_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct equal_to_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct equal_to_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct equal_to_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + : aux::msvc_eti_base< typename apply_wrap2< + equal_to_impl< + typename equal_to_tag<N1>::type + , typename equal_to_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + enum { value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + }; + typedef bool_<value> type; + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/fold_backward_impl.hpp deleted file mode 100644 index b95ff53..0000000 --- a/include/boost/mpl/aux_/preprocessed/msvc70/fold_backward_impl.hpp +++ /dev/null @@ -1,297 +0,0 @@ -// preprocessed version of 'boost/mpl/aux_/fold_backward_impl.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { -namespace aux { - -// forward declaration -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl; - -template< long N > -struct fold_backward_chunk; - -template<> -struct fold_backward_chunk<0> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef fwd_state0 bkwd_state0; - typedef bkwd_state0 state; - typedef iter0 iterator; - }; - -}; - -template<> -struct fold_backward_chunk<1> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - - - typedef fwd_state1 bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - typedef bkwd_state0 state; - typedef iter1 iterator; - }; - -}; - -template<> -struct fold_backward_chunk<2> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - - - typedef fwd_state2 bkwd_state2; - typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter2 iterator; - }; - -}; - -template<> -struct fold_backward_chunk<3> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename apply2<ForwardOp, fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - - - typedef fwd_state3 bkwd_state3; - typedef typename apply2<BackwardOp, bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter3 iterator; - }; - -}; - -template<> -struct fold_backward_chunk<4> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename apply2<ForwardOp, fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename apply2<ForwardOp, fwd_state3, typename iter3::type>::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fwd_state4 bkwd_state4; - typedef typename apply2<BackwardOp, bkwd_state4, typename iter3::type>::type bkwd_state3; - typedef typename apply2<BackwardOp, bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter4 iterator; - }; - -}; - -template< long N > -struct fold_backward_chunk -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename apply2<ForwardOp, fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename apply2<ForwardOp, fwd_state3, typename iter3::type>::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fold_backward_impl< - ( (N - 4) < 0 ? 0 : N - 4 ) - , iter4 - , Last - , fwd_state4 - , BackwardOp - , ForwardOp - > nested_chunk; - - typedef typename nested_chunk::state bkwd_state4; - typedef typename apply2<BackwardOp, bkwd_state4, typename iter3::type>::type bkwd_state3; - typedef typename apply2<BackwardOp, bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef typename nested_chunk::iterator iterator; - }; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_step; - -template< - typename Last - , typename State - > -struct fold_backward_null_step -{ - typedef Last iterator; - typedef State state; -}; - -template<> -struct fold_backward_chunk< -1 > -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef typename if_< - typename is_same< First,Last >::type - , fold_backward_null_step< Last,State > - , fold_backward_step< First,Last,State,BackwardOp,ForwardOp > - >::type res_; - - typedef typename res_::state state; - typedef typename res_::iterator iterator; - }; - -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_step -{ - typedef fold_backward_chunk< -1 >::template result_< - typename First::next - , Last - , typename apply2<ForwardOp, State, typename First::type>::type - , BackwardOp - , ForwardOp - > nested_step; - - typedef typename apply2<BackwardOp, typename nested_step::state, typename First::type>::type state; - typedef typename nested_step::iterator iterator; -}; - -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl - : fold_backward_chunk<N> - ::template result_< First,Last,State,BackwardOp,ForwardOp > -{ -}; - -} // namespace aux -} // namespace mpl -} // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp index e9c22a3..c0aca30 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp @@ -1,25 +1,31 @@ -// preprocessed version of 'boost/mpl/aux_/fold_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration -// forward declaration template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct fold_impl; -template< long N > +template< int N > struct fold_chunk; -template<> -struct fold_chunk<0> +template<> struct fold_chunk<0> { template< typename First @@ -34,11 +40,9 @@ struct fold_chunk<0> typedef state0 state; typedef iter0 iterator; }; - }; -template<> -struct fold_chunk<1> +template<> struct fold_chunk<1> { template< typename First @@ -50,18 +54,16 @@ struct fold_chunk<1> { typedef First iter0; typedef State state0; - typedef typename apply2<ForwardOp, state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; typedef state1 state; typedef iter1 iterator; }; - }; -template<> -struct fold_chunk<2> +template<> struct fold_chunk<2> { template< typename First @@ -73,20 +75,18 @@ struct fold_chunk<2> { typedef First iter0; typedef State state0; - typedef typename apply2<ForwardOp, state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, state1, typename iter1::type>::type state2; - typedef typename iter1::next iter2; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; typedef state2 state; typedef iter2 iterator; }; - }; -template<> -struct fold_chunk<3> +template<> struct fold_chunk<3> { template< typename First @@ -98,22 +98,20 @@ struct fold_chunk<3> { typedef First iter0; typedef State state0; - typedef typename apply2<ForwardOp, state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, state1, typename iter1::type>::type state2; - typedef typename iter1::next iter2; - typedef typename apply2<ForwardOp, state2, typename iter2::type>::type state3; - typedef typename iter2::next iter3; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; + typedef typename next<iter2>::type iter3; typedef state3 state; typedef iter3 iterator; }; - }; -template<> -struct fold_chunk<4> +template<> struct fold_chunk<4> { template< typename First @@ -125,23 +123,22 @@ struct fold_chunk<4> { typedef First iter0; typedef State state0; - typedef typename apply2<ForwardOp, state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, state1, typename iter1::type>::type state2; - typedef typename iter1::next iter2; - typedef typename apply2<ForwardOp, state2, typename iter2::type>::type state3; - typedef typename iter2::next iter3; - typedef typename apply2<ForwardOp, state3, typename iter3::type>::type state4; - typedef typename iter3::next iter4; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4; + typedef typename next<iter3>::type iter4; typedef state4 state; typedef iter4 iterator; }; - }; -template< long N > +template< int N > struct fold_chunk { template< @@ -149,7 +146,7 @@ struct fold_chunk , typename Last , typename State , typename ForwardOp - > + > struct result_ { typedef fold_impl< @@ -178,7 +175,7 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct fold_step; template< @@ -191,7 +188,7 @@ struct fold_null_step typedef State state; }; -template<> +template<> struct fold_chunk< -1 > { template< @@ -199,7 +196,7 @@ struct fold_chunk< -1 > , typename Last , typename State , typename ForwardOp - > + > struct result_ { typedef typename if_< @@ -211,7 +208,6 @@ struct fold_chunk< -1 > typedef typename res_::state state; typedef typename res_::iterator iterator; }; - }; template< @@ -219,13 +215,13 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct fold_step { typedef fold_chunk< -1 >::template result_< - typename First::next + typename next<First>::type , Last - , typename apply2<ForwardOp, State, typename First::type>::type + , typename apply2<ForwardOp,State, typename deref<First>::type>::type , ForwardOp > chunk_; @@ -234,19 +230,16 @@ struct fold_step }; template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct fold_impl : fold_chunk<N> ::template result_< First,Last,State,ForwardOp > { }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp index 5534ac2..89d946e 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp @@ -1,30 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/full_lambda.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Aleksey Gurtovoy 2001-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) +// -template< - typename T - , typename Tag - , typename Protect = false_ - - > -struct lambda_impl -{ - typedef false_ is_le; - typedef T type; -}; +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! -template< - typename T - , typename Tag = void_ - - > -struct lambda - : lambda_impl< T,Tag,false_ > -{ -}; +namespace boost { namespace mpl { namespace aux { @@ -45,44 +30,56 @@ struct lambda_or< false,false,false,false,false > } // namespace aux -template< int N, typename Tag, typename Protect > -struct lambda_impl< arg<N>,Tag,Protect > +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg<N>, Tag > { typedef true_ is_le; - typedef arg<N> type; + typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41 + typedef protect<result_> type; }; template< typename F , typename Tag - , typename Protect - > -struct lambda_impl< - bind0<F> - , Tag - , Protect > +struct lambda< + bind0<F> + , Tag + + > { typedef false_ is_le; typedef bind0< F - > type; -}; + > result_; -template< - template< typename P1 > class F - , typename T1 - , typename Tag - > -struct lambda< F<T1>,Tag > - : lambda_impl< F<T1>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > @@ -90,33 +87,24 @@ struct le_result1 { typedef F< typename L1::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1 > class F - , typename Tag + typename Tag + , template< typename P1 > class F , typename L1 > -struct le_result1< true_,Tag,false_,F,L1 > +struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > - , typename L1::type - > type; -}; + , typename L1::result_ + > result_; -template< - template< typename P1 > class F - , typename Tag - , typename L1 - > -struct le_result1< true_,Tag,true_,F,L1 > -{ - typedef protect< bind1< - quote1< F,Tag > - , typename L1::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -125,58 +113,50 @@ template< template< typename P1 > class F , typename T1 , typename Tag - , typename Protect > -struct lambda_impl< - F<T1>, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef aux::lambda_or< - l1::is_le::value - > is_le; - - typedef typename aux::le_result1< - typename is_le::type +struct lambda< + F<T1> , Tag - , Protect - , F - , l1 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag - , typename Protect - > -struct lambda_impl< - bind1< F,T1 > - , Tag - , Protect > +struct lambda< + bind1< F,T1 > + , Tag + + > { typedef false_ is_le; typedef bind1< F , T1 - > type; -}; + > result_; -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - , typename Tag - > -struct lambda< F<T1,T2>,Tag > - : lambda_impl< F<T1,T2>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > @@ -184,33 +164,24 @@ struct le_result2 { typedef F< typename L1::type, typename L2::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true_,Tag,false_,F,L1,L2 > +struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > - , typename L1::type, typename L2::type - > type; -}; + , typename L1::result_, typename L2::result_ + > result_; -template< - template< typename P1, typename P2 > class F - , typename Tag - , typename L1, typename L2 - > -struct le_result2< true_,Tag,true_,F,L1,L2 > -{ - typedef protect< bind2< - quote2< F,Tag > - , typename L1::type, typename L2::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -219,60 +190,55 @@ template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value - > is_le; - - typedef typename aux::le_result2< - typename is_le::type +struct lambda< + F< T1,T2 > , Tag - , Protect - , F - , l1, l2 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag - , typename Protect - > -struct lambda_impl< - bind2< F,T1,T2 > - , Tag - , Protect > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > { typedef false_ is_le; typedef bind2< F , T1, T2 - > type; -}; + > result_; -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - , typename Tag - > -struct lambda< F<T1,T2,T3>,Tag > - : lambda_impl< F<T1,T2,T3>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > @@ -280,33 +246,24 @@ struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2, typename P3 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true_,Tag,false_,F,L1,L2,L3 > +struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; -template< - template< typename P1, typename P2, typename P3 > class F - , typename Tag - , typename L1, typename L2, typename L3 - > -struct le_result3< true_,Tag,true_,F,L1,L2,L3 > -{ - typedef protect< bind3< - quote3< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -315,61 +272,57 @@ template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - > is_le; - - typedef typename aux::le_result3< - typename is_le::type +struct lambda< + F< T1,T2,T3 > , Tag - , Protect - , F - , l1, l2, l3 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag - , typename Protect - > -struct lambda_impl< - bind3< F,T1,T2,T3 > - , Tag - , Protect > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 - > type; -}; + > result_; -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename T1, typename T2, typename T3, typename T4 - , typename Tag - > -struct lambda< F<T1,T2,T3,T4>,Tag > - : lambda_impl< F<T1,T2,T3,T4>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > @@ -378,35 +331,25 @@ struct le_result4 typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename Tag - , typename L1, typename L2, typename L3, typename L4 - > -struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 > -{ - typedef protect< bind4< - quote4< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -415,67 +358,59 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - typedef lambda_impl< T4,Tag > l4; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - , l4::is_le::value - > is_le; - - typedef typename aux::le_result4< - typename is_le::type +struct lambda< + F< T1,T2,T3,T4 > , Tag - , Protect - , F - , l1, l2, l3, l4 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag - , typename Protect - > -struct lambda_impl< - bind4< F,T1,T2,T3,T4 > - , Tag - , Protect > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 - > type; -}; + > result_; -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename T1, typename T2, typename T3, typename T4, typename T5 - , typename Tag - > -struct lambda< F<T1,T2,T3,T4,T5>,Tag > - : lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > @@ -484,43 +419,25 @@ struct le_result5 typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type - > type; + > result_; + + typedef result_ type; }; template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type, typename L5::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename Tag - , typename L1, typename L2, typename L3, typename L4, typename L5 - > -struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 > -{ - typedef protect< bind5< - quote5< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type, typename L5::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -533,100 +450,105 @@ template< class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4,T5 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - typedef lambda_impl< T4,Tag > l4; - typedef lambda_impl< T5,Tag > l5; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - , l4::is_le::value, l5::is_le::value - > is_le; - - typedef typename aux::le_result5< - typename is_le::type +struct lambda< + F< T1,T2,T3,T4,T5 > , Tag - , Protect - , F - , l1, l2, l3, l4, l5 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag - , typename Protect - > -struct lambda_impl< - bind5< F,T1,T2,T3,T4,T5 > - , Tag - , Protect > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 - > type; + > result_; + + typedef result_ type; }; -// special case for 'protect' -template< typename T, typename Tag, typename Protect > -struct lambda_impl< protect<T>,Tag,Protect > +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< protect<T>, Tag > { typedef false_ is_le; - typedef protect<T> type; + typedef protect<T> result_; + typedef result_ type; }; -// specializations for main 'bind', 'bind1st' and 'bind2nd' forms +/// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag - , typename Protect - > -struct lambda_impl< - bind< F,T1,T2,T3,T4,T5 > - , Tag - , Protect - > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > { typedef false_ is_le; - typedef bind< F,T1,T2,T3,T4,T5 > type; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; }; +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars + template< - typename F, typename T - , typename Tag - , typename Protect + typename F, typename Tag1, typename Tag2 > -struct lambda_impl< bind1st<F,T>,Tag,Protect > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > { - typedef false_ is_le; - typedef bind1st< F,T > type; + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef aux::le_result2<is_le, Tag2, mpl::lambda, l1, l2> le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; -template< - typename F, typename T - , typename Tag - , typename Protect - > -struct lambda_impl< bind2nd<F,T>,Tag,Protect > -{ - typedef false_ is_le; - typedef bind2nd< F,T > type; -}; +BOOST_MPL_AUX_NA_SPEC(2, lambda) -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/greater.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/greater.hpp new file mode 100644 index 0000000..b37a615 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/greater.hpp @@ -0,0 +1,103 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct greater_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct greater_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct greater_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct greater_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + : aux::msvc_eti_base< typename apply_wrap2< + greater_impl< + typename greater_tag<N1>::type + , typename greater_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + enum { value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + }; + typedef bool_<value> type; + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/greater_equal.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/greater_equal.hpp new file mode 100644 index 0000000..ab3da25 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/greater_equal.hpp @@ -0,0 +1,103 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct greater_equal_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct greater_equal_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct greater_equal_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct greater_equal_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + : aux::msvc_eti_base< typename apply_wrap2< + greater_equal_impl< + typename greater_equal_tag<N1>::type + , typename greater_equal_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + enum { value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + }; + typedef bool_<value> type; + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/inherit.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/inherit.hpp new file mode 100644 index 0000000..233a1ec --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/inherit.hpp @@ -0,0 +1,166 @@ + +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C1, bool C2 > +struct inherit2_impl +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T1, T2 + { + typedef Derived type_; + }; +}; + +template<> +struct inherit2_impl< false,true > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T1 + { + typedef T1 type_; + }; +}; + +template<> +struct inherit2_impl< true,false > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T2 + { + typedef T2 type_; + }; +}; + +template<> +struct inherit2_impl< true,true > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + { + typedef T1 type_; + }; +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : aux::inherit2_impl< + is_empty_base<T1>::value + , is_empty_base<T2>::value + >::template result_< inherit2< T1,T2 >,T1, T2 > +{ + typedef typename inherit2::type_ type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp index 2d1b5d8..6951795 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp @@ -1,9 +1,16 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_if_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step @@ -55,7 +62,7 @@ struct iter_fold_if_forward_step typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator, State, ForwardOp, mpl::next< Iterator> > impl_; + >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; @@ -72,7 +79,7 @@ struct iter_fold_if_backward_step typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_; + >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; @@ -95,7 +102,7 @@ struct iter_fold_if_impl typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; - + typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< @@ -123,7 +130,4 @@ struct iter_fold_if_impl typedef typename backward_step4::iterator iterator; }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp index ebf8489..6177d99 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp @@ -1,25 +1,31 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration -// forward declaration template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl; -template< long N > +template< int N > struct iter_fold_chunk; -template<> -struct iter_fold_chunk<0> +template<> struct iter_fold_chunk<0> { template< typename First @@ -34,11 +40,9 @@ struct iter_fold_chunk<0> typedef state0 state; typedef iter0 iterator; }; - }; -template<> -struct iter_fold_chunk<1> +template<> struct iter_fold_chunk<1> { template< typename First @@ -51,17 +55,15 @@ struct iter_fold_chunk<1> typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef state1 state; typedef iter1 iterator; }; - }; -template<> -struct iter_fold_chunk<2> +template<> struct iter_fold_chunk<2> { template< typename First @@ -74,19 +76,17 @@ struct iter_fold_chunk<2> typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef state2 state; typedef iter2 iterator; }; - }; -template<> -struct iter_fold_chunk<3> +template<> struct iter_fold_chunk<3> { template< typename First @@ -99,21 +99,19 @@ struct iter_fold_chunk<3> typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; - typedef typename iter2::next iter3; + typedef typename next<iter2>::type iter3; typedef state3 state; typedef iter3 iterator; }; - }; -template<> -struct iter_fold_chunk<4> +template<> struct iter_fold_chunk<4> { template< typename First @@ -126,22 +124,21 @@ struct iter_fold_chunk<4> typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; - typedef typename iter2::next iter3; + typedef typename next<iter2>::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; - typedef typename iter3::next iter4; + typedef typename next<iter3>::type iter4; typedef state4 state; typedef iter4 iterator; }; - }; -template< long N > +template< int N > struct iter_fold_chunk { template< @@ -149,7 +146,7 @@ struct iter_fold_chunk , typename Last , typename State , typename ForwardOp - > + > struct result_ { typedef iter_fold_impl< @@ -178,7 +175,7 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_step; template< @@ -191,7 +188,7 @@ struct iter_fold_null_step typedef State state; }; -template<> +template<> struct iter_fold_chunk< -1 > { template< @@ -199,7 +196,7 @@ struct iter_fold_chunk< -1 > , typename Last , typename State , typename ForwardOp - > + > struct result_ { typedef typename if_< @@ -211,7 +208,6 @@ struct iter_fold_chunk< -1 > typedef typename res_::state state; typedef typename res_::iterator iterator; }; - }; template< @@ -219,11 +215,11 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_step { typedef iter_fold_chunk< -1 >::template result_< - typename First::next + typename next<First>::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp @@ -234,19 +230,16 @@ struct iter_fold_step }; template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl : iter_fold_chunk<N> ::template result_< First,Last,State,ForwardOp > { }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/lambda_helper.hpp deleted file mode 100644 index 7840f61..0000000 --- a/include/boost/mpl/aux_/preprocessed/msvc70/lambda_helper.hpp +++ /dev/null @@ -1,120 +0,0 @@ -// preprocessed version of 'boost/mpl/lambda_helper.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { - -template< - template< typename P1 > class F - , typename T1 - > -struct lambda_helper1 -{ - struct rebind - { - enum { arity = 1 }; - typedef T1 arg1; - - template< typename U1 > struct apply - : F<U1> - { - }; - }; -}; - -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - > -struct lambda_helper2 -{ - struct rebind - { - enum { arity = 2 }; - typedef T1 arg1; - typedef T2 arg2; - - template< typename U1, typename U2 > struct apply - : F< U1,U2 > - { - }; - }; -}; - -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - > -struct lambda_helper3 -{ - struct rebind - { - enum { arity = 3 }; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - - template< typename U1, typename U2, typename U3 > struct apply - : F< U1,U2,U3 > - { - }; - }; -}; - -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename T1, typename T2, typename T3, typename T4 - > -struct lambda_helper4 -{ - struct rebind - { - enum { arity = 4 }; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - typedef T4 arg4; - - template< - typename U1, typename U2, typename U3, typename U4 - > - struct apply - : F< U1,U2,U3,U4 > - { - }; - }; -}; - -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename T1, typename T2, typename T3, typename T4, typename T5 - > -struct lambda_helper5 -{ - struct rebind - { - enum { arity = 5 }; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - typedef T4 arg4; - typedef T5 arg5; - - template< - typename U1, typename U2, typename U3, typename U4 - , typename U5 - > - struct apply - : F< U1,U2,U3,U4,U5 > - { - }; - }; -}; - -} // namespace mpl -} // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp index 4a02653..76d3f3f 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp @@ -1,182 +1,198 @@ -// preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { -template< int arity_, bool Protect > struct lambda_impl +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ { - template< typename T, typename Tag > struct result_ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; + typedef is_placeholder<T> is_le; }; }; -template<> struct lambda_impl<1, false> +template<> struct lambda_impl< int_<1> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + typedef bind1< - f_ - , arg1 - > type; + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<1, true> +template<> struct lambda_impl< int_<2> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef mpl::protect< bind1< - f_ - , arg1 - > > type; - }; -}; - -template<> struct lambda_impl<2, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; typedef bind2< - f_ - , arg1, arg2 - > type; + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<2, true> +template<> struct lambda_impl< int_<3> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; - typedef mpl::protect< bind2< - f_ - , arg1, arg2 - > > type; - }; -}; - -template<> struct lambda_impl<3, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; typedef bind3< - f_ - , arg1, arg2, arg3 - > type; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<3, true> +template<> struct lambda_impl< int_<4> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; - typedef mpl::protect< bind3< - f_ - , arg1, arg2, arg3 - > > type; - }; -}; - -template<> struct lambda_impl<4, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; typedef bind4< - f_ - , arg1, arg2, arg3, arg4 - > type; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<4, true> +template<> struct lambda_impl< int_<5> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; - typedef mpl::protect< bind4< - f_ - , arg1, arg2, arg3, arg4 - > > type; - }; -}; - -template<> struct lambda_impl<5, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - typedef typename lambda< typename F::arg5, Tag, false >::type arg5; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; typedef bind5< - f_ - , arg1, arg2, arg3, arg4, arg5 - > type; - }; -}; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; -template<> struct lambda_impl<5, true> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - typedef typename lambda< typename F::arg5, Tag, false >::type arg5; - + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; - typedef mpl::protect< bind5< - f_ - , arg1, arg2, arg3, arg4, arg5 - > > type; + typedef typename type_::type type; }; }; @@ -184,19 +200,30 @@ template<> struct lambda_impl<5, true> template< typename T - , typename Tag = void_ - , bool Protect = true + , typename Tag + , typename Protect > struct lambda - : aux::lambda_impl< - ::boost::mpl::aux::template_arity<T>::value +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity<T>::type arity_; + typedef typename aux::lambda_impl<arity_> + ::template result_< T,Tag,Protect > l_; - , Protect + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; - >::template result_< T,Tag > +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le { }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/less.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/less.hpp new file mode 100644 index 0000000..e553b6e --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/less.hpp @@ -0,0 +1,103 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct less_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct less_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct less_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct less_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + : aux::msvc_eti_base< typename apply_wrap2< + less_impl< + typename less_tag<N1>::type + , typename less_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + enum { value = + ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > + BOOST_MPL_AUX_VALUE_WKND(N1)::value ) + }; + typedef bool_<value> type; + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/less_equal.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/less_equal.hpp new file mode 100644 index 0000000..f32c200 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/less_equal.hpp @@ -0,0 +1,103 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct less_equal_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct less_equal_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct less_equal_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct less_equal_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + : aux::msvc_eti_base< typename apply_wrap2< + less_equal_impl< + typename less_equal_tag<N1>::type + , typename less_equal_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + enum { value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + }; + typedef bool_<value> type; + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/list.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/list.hpp index 4adfea8..70e20fe 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/list.hpp @@ -1,26 +1,39 @@ -// preprocessed version of 'boost/mpl/list.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + namespace aux { -template< int N > struct list_impl_chooser; +template< int N > +struct list_chooser; + } namespace aux { template<> -struct list_impl_chooser<0> +struct list_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef typename list0< + typedef list0< >::type type; + }; }; @@ -29,17 +42,20 @@ struct list_impl_chooser<0> namespace aux { template<> -struct list_impl_chooser<1> +struct list_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list1< T0 >::type type; + }; }; @@ -48,17 +64,20 @@ struct list_impl_chooser<1> namespace aux { template<> -struct list_impl_chooser<2> +struct list_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list2< T0, T1 >::type type; + }; }; @@ -67,17 +86,20 @@ struct list_impl_chooser<2> namespace aux { template<> -struct list_impl_chooser<3> +struct list_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list3< T0, T1, T2 >::type type; + }; }; @@ -86,17 +108,20 @@ struct list_impl_chooser<3> namespace aux { template<> -struct list_impl_chooser<4> +struct list_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list4< T0, T1, T2, T3 >::type type; + }; }; @@ -105,17 +130,20 @@ struct list_impl_chooser<4> namespace aux { template<> -struct list_impl_chooser<5> +struct list_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list5< T0, T1, T2, T3, T4 >::type type; + }; }; @@ -124,17 +152,20 @@ struct list_impl_chooser<5> namespace aux { template<> -struct list_impl_chooser<6> +struct list_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list6< T0, T1, T2, T3, T4, T5 >::type type; + }; }; @@ -143,17 +174,20 @@ struct list_impl_chooser<6> namespace aux { template<> -struct list_impl_chooser<7> +struct list_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list7< T0, T1, T2, T3, T4, T5, T6 >::type type; + }; }; @@ -162,17 +196,20 @@ struct list_impl_chooser<7> namespace aux { template<> -struct list_impl_chooser<8> +struct list_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; + }; }; @@ -181,17 +218,20 @@ struct list_impl_chooser<8> namespace aux { template<> -struct list_impl_chooser<9> +struct list_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; + }; }; @@ -200,17 +240,240 @@ struct list_impl_chooser<9> namespace aux { template<> -struct list_impl_chooser<10> +struct list_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + }; }; @@ -225,7 +488,7 @@ struct is_list_arg }; template<> -struct is_list_arg<void_> +struct is_list_arg<na> { enum { value = false }; }; @@ -233,6 +496,8 @@ struct is_list_arg<void_> template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 > struct list_count_args { @@ -241,7 +506,12 @@ struct list_count_args + is_list_arg<T3>::value + is_list_arg<T4>::value + is_list_arg<T5>::value + is_list_arg<T6>::value + is_list_arg<T7>::value + is_list_arg<T8>::value - + is_list_arg<T9>::value + is_list_arg<T10>::value + + is_list_arg<T9>::value + is_list_arg<T10>::value + + is_list_arg<T11>::value + is_list_arg<T12>::value + + is_list_arg<T13>::value + is_list_arg<T14>::value + + is_list_arg<T15>::value + is_list_arg<T16>::value + + is_list_arg<T17>::value + is_list_arg<T18>::value + + is_list_arg<T19>::value + is_list_arg<T20>::value }; }; @@ -249,31 +519,38 @@ struct list_count_args template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list_impl { - typedef aux::list_count_args< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > arg_num_; - typedef typename aux::list_impl_chooser< - arg_num_::value - >::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; + typedef aux::list_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::list_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< - typename T0 = void_, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - , typename T6 = void_, typename T7 = void_, typename T8 = void_ - , typename T9 = void_ + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na > struct list - : aux::list_impl< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type + : aux::list_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type { typedef typename aux::list_impl< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp index e55c56c..c4f126d 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp @@ -1,28 +1,38 @@ -// preprocessed version of 'boost/mpl/list_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { -template< int N > struct list_c_impl_chooser; +template< int N > +struct list_c_chooser; + } namespace aux { template<> -struct list_c_impl_chooser<0> +struct list_c_chooser<0> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list0_c< - T + T >::type type; + }; }; @@ -31,18 +41,19 @@ struct list_c_impl_chooser<0> namespace aux { template<> -struct list_c_impl_chooser<1> +struct list_c_chooser<1> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list1_c< T, C0 >::type type; + }; }; @@ -51,18 +62,19 @@ struct list_c_impl_chooser<1> namespace aux { template<> -struct list_c_impl_chooser<2> +struct list_c_chooser<2> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list2_c< T, C0, C1 >::type type; + }; }; @@ -71,18 +83,19 @@ struct list_c_impl_chooser<2> namespace aux { template<> -struct list_c_impl_chooser<3> +struct list_c_chooser<3> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list3_c< T, C0, C1, C2 >::type type; + }; }; @@ -91,18 +104,19 @@ struct list_c_impl_chooser<3> namespace aux { template<> -struct list_c_impl_chooser<4> +struct list_c_chooser<4> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list4_c< T, C0, C1, C2, C3 >::type type; + }; }; @@ -111,18 +125,19 @@ struct list_c_impl_chooser<4> namespace aux { template<> -struct list_c_impl_chooser<5> +struct list_c_chooser<5> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list5_c< T, C0, C1, C2, C3, C4 >::type type; + }; }; @@ -131,18 +146,19 @@ struct list_c_impl_chooser<5> namespace aux { template<> -struct list_c_impl_chooser<6> +struct list_c_chooser<6> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list6_c< T, C0, C1, C2, C3, C4, C5 >::type type; + }; }; @@ -151,18 +167,19 @@ struct list_c_impl_chooser<6> namespace aux { template<> -struct list_c_impl_chooser<7> +struct list_c_chooser<7> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list7_c< T, C0, C1, C2, C3, C4, C5, C6 >::type type; + }; }; @@ -171,18 +188,19 @@ struct list_c_impl_chooser<7> namespace aux { template<> -struct list_c_impl_chooser<8> +struct list_c_chooser<8> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list8_c< T, C0, C1, C2, C3, C4, C5, C6, C7 >::type type; + }; }; @@ -191,18 +209,19 @@ struct list_c_impl_chooser<8> namespace aux { template<> -struct list_c_impl_chooser<9> +struct list_c_chooser<9> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list9_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8 >::type type; + }; }; @@ -211,18 +230,19 @@ struct list_c_impl_chooser<9> namespace aux { template<> -struct list_c_impl_chooser<10> +struct list_c_chooser<10> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list10_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 >::type type; + }; }; @@ -230,7 +250,217 @@ struct list_c_impl_chooser<10> namespace aux { -template< long T > +template<> +struct list_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list11_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list12_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list13_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > struct is_list_c_arg { enum { value = true }; @@ -243,49 +473,62 @@ struct is_list_c_arg<LONG_MAX> }; template< - long T1, long T2, long T3, long T4, long T5, long T6, long T7, long T8 - , long T9, long T10 + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 > struct list_c_count_args { enum { value = - is_list_c_arg<T1>::value + is_list_c_arg<T2>::value - + is_list_c_arg<T3>::value + is_list_c_arg<T4>::value - + is_list_c_arg<T5>::value + is_list_c_arg<T6>::value - + is_list_c_arg<T7>::value + is_list_c_arg<T8>::value - + is_list_c_arg<T9>::value + is_list_c_arg<T10>::value + is_list_c_arg<C1>::value + is_list_c_arg<C2>::value + + is_list_c_arg<C3>::value + is_list_c_arg<C4>::value + + is_list_c_arg<C5>::value + is_list_c_arg<C6>::value + + is_list_c_arg<C7>::value + is_list_c_arg<C8>::value + + is_list_c_arg<C9>::value + is_list_c_arg<C10>::value + + is_list_c_arg<C11>::value + is_list_c_arg<C12>::value + + is_list_c_arg<C13>::value + is_list_c_arg<C14>::value + + is_list_c_arg<C15>::value + is_list_c_arg<C16>::value + + is_list_c_arg<C17>::value + is_list_c_arg<C18>::value + + is_list_c_arg<C19>::value + is_list_c_arg<C20>::value }; + }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c_impl { - typedef aux::list_c_count_args< C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > arg_num_; - typedef typename aux::list_c_impl_chooser< arg_num_::value > - ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; + typedef aux::list_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::list_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< - typename T - , long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX - , long C9 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c - : aux::list_c_impl< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type + : aux::list_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type { typedef typename aux::list_c_impl< - T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/map.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/map.hpp new file mode 100644 index 0000000..0982105 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/map.hpp @@ -0,0 +1,556 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct map_chooser; + +} + +namespace aux { + +template<> +struct map_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef map0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_map_arg +{ + enum { value = true }; +}; + +template<> +struct is_map_arg<na> +{ + enum { value = false }; +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct map_count_args +{ + enum { value = + is_map_arg<T1>::value + is_map_arg<T2>::value + + is_map_arg<T3>::value + is_map_arg<T4>::value + + is_map_arg<T5>::value + is_map_arg<T6>::value + + is_map_arg<T7>::value + is_map_arg<T8>::value + + is_map_arg<T9>::value + is_map_arg<T10>::value + + is_map_arg<T11>::value + is_map_arg<T12>::value + + is_map_arg<T13>::value + is_map_arg<T14>::value + + is_map_arg<T15>::value + is_map_arg<T16>::value + + is_map_arg<T17>::value + is_map_arg<T18>::value + + is_map_arg<T19>::value + is_map_arg<T20>::value + }; + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map_impl +{ + typedef aux::map_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::map_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map + : aux::map_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::map_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/minus.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/minus.hpp new file mode 100644 index 0000000..6d9bc12 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/minus.hpp @@ -0,0 +1,116 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct minus_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct minus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct minus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct minus_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct minus + : aux::msvc_eti_base< typename apply_wrap2< + minus_impl< + typename minus_tag<N1>::type + , typename minus_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, minus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, minus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct msvc_minus_impl +{ + enum msvc_wknd { value = (n1 - n2) }; + typedef integral_c< T,value > type; +}; + +} + +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::msvc_minus_impl< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/modulus.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/modulus.hpp new file mode 100644 index 0000000..992e497 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/modulus.hpp @@ -0,0 +1,116 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct modulus_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct modulus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct modulus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct modulus_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + : aux::msvc_eti_base< typename apply_wrap2< + modulus_impl< + typename modulus_tag<N1>::type + , typename modulus_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct msvc_modulus_impl +{ + enum msvc_wknd { value = (n1 % n2) }; + typedef integral_c< T,value > type; +}; + +} + +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::msvc_modulus_impl< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/not_equal_to.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/not_equal_to.hpp new file mode 100644 index 0000000..33a1ccd --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/not_equal_to.hpp @@ -0,0 +1,103 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct not_equal_to_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct not_equal_to_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct not_equal_to_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct not_equal_to_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + : aux::msvc_eti_base< typename apply_wrap2< + not_equal_to_impl< + typename not_equal_to_tag<N1>::type + , typename not_equal_to_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + { + enum { value = + ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + }; + typedef bool_<value> type; + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/or.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/or.hpp index cef689e..8d0ba0a 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/or.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/or.hpp @@ -1,10 +1,17 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { - template< bool C_ > struct or_impl { template< @@ -22,13 +29,13 @@ template<> struct or_impl<false> typename T1, typename T2, typename T3, typename T4 > struct result_ - : or_impl< + : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,false_ > { }; - template<> struct result_<false_, false_, false_, false_> + template<> struct result_< false_,false_,false_,false_ > : false_ { }; @@ -37,13 +44,13 @@ template<> struct or_impl<false> } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ - : aux::or_impl< + : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,T5 > @@ -51,15 +58,14 @@ struct or_ BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ - , (T1, T2, T3, T4, T5) + , ( T1, T2, T3, T4, T5) ) }; -BOOST_MPL_AUX_VOID_SPEC_EXT( +BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) -}} // namespace boost::mpl - +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/placeholders.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/placeholders.hpp index 8c17ad3..4cb7d7d 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/placeholders.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/placeholders.hpp @@ -1,54 +1,78 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Aleksey Gurtovoy 2001-2003 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; -namespace placeholders { -using boost::mpl::_; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_) -// agurt, 17/mar/02: one more placeholder for the last 'apply#' -// specialization +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +}}} +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; -namespace placeholders { -using boost::mpl::_1; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_1) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; -namespace placeholders { -using boost::mpl::_2; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_2) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; -namespace placeholders { -using boost::mpl::_3; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_3) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; -namespace placeholders { -using boost::mpl::_4; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_4) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; -namespace placeholders { -using boost::mpl::_5; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_5) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; -namespace placeholders { -using boost::mpl::_6; -} - -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_6) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +}}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/plus.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/plus.hpp new file mode 100644 index 0000000..64974d2 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/plus.hpp @@ -0,0 +1,116 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct plus_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct plus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct plus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct plus_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct plus + : aux::msvc_eti_base< typename apply_wrap2< + plus_impl< + typename plus_tag<N1>::type + , typename plus_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, plus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, plus) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct msvc_plus_impl +{ + enum msvc_wknd { value = (n1 + n2) }; + typedef integral_c< T,value > type; +}; + +} + +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::msvc_plus_impl< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/quote.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/quote.hpp index 9b67617..b85880f 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/quote.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/quote.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/quote.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< bool > struct quote_impl { template< typename T > struct result_ @@ -42,8 +49,8 @@ struct quote2 { template< typename U1, typename U2 > struct apply - : quote_impl< aux::has_type< F<U1,U2> >::value > - ::template result_< F<U1,U2> > + : quote_impl< aux::has_type< F< U1,U2 > >::value > + ::template result_< F< U1,U2 > > { }; @@ -57,8 +64,8 @@ struct quote3 { template< typename U1, typename U2, typename U3 > struct apply - : quote_impl< aux::has_type< F<U1,U2,U3> >::value > - ::template result_< F<U1,U2,U3> > + : quote_impl< aux::has_type< F< U1,U2,U3 > >::value > + ::template result_< F< U1,U2,U3 > > { }; @@ -75,8 +82,8 @@ struct quote4 > struct apply - : quote_impl< aux::has_type< F<U1,U2,U3,U4> >::value > - ::template result_< F<U1,U2,U3,U4> > + : quote_impl< aux::has_type< F< U1,U2,U3,U4 > >::value > + ::template result_< F< U1,U2,U3,U4 > > { }; @@ -98,13 +105,12 @@ struct quote5 > struct apply - : quote_impl< aux::has_type< F<U1,U2,U3,U4,U5> >::value > - ::template result_< F<U1,U2,U3,U4,U5> > + : quote_impl< aux::has_type< F< U1,U2,U3,U4,U5 > >::value > + ::template result_< F< U1,U2,U3,U4,U5 > > { }; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/reverse_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/reverse_fold_impl.hpp new file mode 100644 index 0000000..9f6512a --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/reverse_fold_impl.hpp @@ -0,0 +1,295 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/Attic/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< long N > +struct reverse_fold_chunk; + +template<> struct reverse_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename iter3::type >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename iter3::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename iter3::type >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename iter3::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step; + +template< + typename Last + , typename State + > +struct reverse_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_fold_null_step< Last,State > + , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step +{ + typedef reverse_fold_chunk< -1 >::template result_< + typename next<First>::type + , Last + , typename apply2<ForwardOp,State, typename First::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename First::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl + : reverse_fold_chunk<N> + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/include/boost/mpl/aux_/preprocessed/bcc/iter_fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/reverse_iter_fold_impl.hpp similarity index 74% rename from include/boost/mpl/aux_/preprocessed/bcc/iter_fold_backward_impl.hpp rename to include/boost/mpl/aux_/preprocessed/msvc70/reverse_iter_fold_impl.hpp index 02f6ccb..1429a5b 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/iter_fold_backward_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/reverse_iter_fold_impl.hpp @@ -1,11 +1,18 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_backward_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/Attic/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration -// forward declaration template< long N , typename First @@ -13,14 +20,13 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > -struct iter_fold_backward_impl; + > +struct reverse_iter_fold_impl; template< long N > -struct iter_fold_backward_chunk; +struct reverse_iter_fold_chunk; -template<> -struct iter_fold_backward_chunk<0> +template<> struct reverse_iter_fold_chunk<0> { template< typename First @@ -37,11 +43,9 @@ struct iter_fold_backward_chunk<0> typedef bkwd_state0 state; typedef iter0 iterator; }; - }; -template<> -struct iter_fold_backward_chunk<1> +template<> struct reverse_iter_fold_chunk<1> { template< typename First @@ -55,7 +59,7 @@ struct iter_fold_backward_chunk<1> typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef fwd_state1 bkwd_state1; @@ -63,11 +67,9 @@ struct iter_fold_backward_chunk<1> typedef bkwd_state0 state; typedef iter1 iterator; }; - }; -template<> -struct iter_fold_backward_chunk<2> +template<> struct reverse_iter_fold_chunk<2> { template< typename First @@ -81,9 +83,9 @@ struct iter_fold_backward_chunk<2> typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef fwd_state2 bkwd_state2; @@ -94,11 +96,9 @@ struct iter_fold_backward_chunk<2> typedef bkwd_state0 state; typedef iter2 iterator; }; - }; -template<> -struct iter_fold_backward_chunk<3> +template<> struct reverse_iter_fold_chunk<3> { template< typename First @@ -112,11 +112,11 @@ struct iter_fold_backward_chunk<3> typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; + typedef typename next<iter2>::type iter3; typedef fwd_state3 bkwd_state3; @@ -128,11 +128,9 @@ struct iter_fold_backward_chunk<3> typedef bkwd_state0 state; typedef iter3 iterator; }; - }; -template<> -struct iter_fold_backward_chunk<4> +template<> struct reverse_iter_fold_chunk<4> { template< typename First @@ -146,13 +144,13 @@ struct iter_fold_backward_chunk<4> typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; + typedef typename next<iter2>::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; - typedef typename iter3::next iter4; + typedef typename next<iter3>::type iter4; typedef fwd_state4 bkwd_state4; @@ -165,11 +163,10 @@ struct iter_fold_backward_chunk<4> typedef bkwd_state0 state; typedef iter4 iterator; }; - }; -template< long N > -struct iter_fold_backward_chunk +template< long N > +struct reverse_iter_fold_chunk { template< typename First @@ -177,22 +174,22 @@ struct iter_fold_backward_chunk , typename State , typename BackwardOp , typename ForwardOp - > + > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; + typedef typename next<iter2>::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; - typedef typename iter3::next iter4; + typedef typename next<iter3>::type iter4; - typedef iter_fold_backward_impl< + typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last @@ -200,7 +197,7 @@ struct iter_fold_backward_chunk , BackwardOp , ForwardOp > nested_chunk; - + typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; @@ -219,21 +216,21 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > -struct iter_fold_backward_step; + > +struct reverse_iter_fold_step; template< typename Last , typename State > -struct iter_fold_backward_null_step +struct reverse_iter_fold_null_step { typedef Last iterator; typedef State state; }; -template<> -struct iter_fold_backward_chunk< -1 > +template<> +struct reverse_iter_fold_chunk< -1 > { template< typename First @@ -241,19 +238,18 @@ struct iter_fold_backward_chunk< -1 > , typename State , typename BackwardOp , typename ForwardOp - > + > struct result_ { typedef typename if_< typename is_same< First,Last >::type - , iter_fold_backward_null_step< Last,State > - , iter_fold_backward_step< First,Last,State,BackwardOp,ForwardOp > + , reverse_iter_fold_null_step< Last,State > + , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; - }; template< @@ -262,18 +258,23 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > -struct iter_fold_backward_step + > +struct reverse_iter_fold_step { - typedef iter_fold_backward_chunk< -1 >::template result_< - typename First::next + typedef reverse_iter_fold_chunk< -1 >::template result_< + typename next<First>::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; - typedef typename apply2<BackwardOp, typename nested_step::state, First>::type state; + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + typedef typename nested_step::iterator iterator; }; @@ -284,14 +285,11 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > -struct iter_fold_backward_impl - : iter_fold_backward_chunk<N> + > +struct reverse_iter_fold_impl + : reverse_iter_fold_chunk<N> ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/set.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/set.hpp new file mode 100644 index 0000000..531331c --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/set.hpp @@ -0,0 +1,556 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct set_chooser; + +} + +namespace aux { + +template<> +struct set_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef set0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_set_arg +{ + enum { value = true }; +}; + +template<> +struct is_set_arg<na> +{ + enum { value = false }; +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct set_count_args +{ + enum { value = + is_set_arg<T1>::value + is_set_arg<T2>::value + + is_set_arg<T3>::value + is_set_arg<T4>::value + + is_set_arg<T5>::value + is_set_arg<T6>::value + + is_set_arg<T7>::value + is_set_arg<T8>::value + + is_set_arg<T9>::value + is_set_arg<T10>::value + + is_set_arg<T11>::value + is_set_arg<T12>::value + + is_set_arg<T13>::value + is_set_arg<T14>::value + + is_set_arg<T15>::value + is_set_arg<T16>::value + + is_set_arg<T17>::value + is_set_arg<T18>::value + + is_set_arg<T19>::value + is_set_arg<T20>::value + }; + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set_impl +{ + typedef aux::set_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::set_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set + : aux::set_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::set_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/shift_left.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/shift_left.hpp new file mode 100644 index 0000000..57b8318 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/shift_left.hpp @@ -0,0 +1,116 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct shift_left_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct shift_left_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct shift_left_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct shift_left_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + : aux::msvc_eti_base< typename apply_wrap2< + shift_left_impl< + typename shift_left_tag<N1>::type + , typename shift_left_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, typename Shift, T n, Shift s > +struct msvc_shift_left_impl +{ + enum msvc_wknd { value = (n << s) }; + typedef integral_c< T,value > type; +}; + +} + +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename Shift > struct apply + + : aux::msvc_shift_left_impl< + typename N::value_type + , typename Shift::value_type + , N::value + , Shift::value + >::type + + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/shift_right.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/shift_right.hpp new file mode 100644 index 0000000..a5b7bc3 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/shift_right.hpp @@ -0,0 +1,116 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct shift_right_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct shift_right_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct shift_right_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct shift_right_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + : aux::msvc_eti_base< typename apply_wrap2< + shift_right_impl< + typename shift_right_tag<N1>::type + , typename shift_right_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, typename Shift, T n, Shift s > +struct msvc_shift_right_impl +{ + enum msvc_wknd { value = (n >> s) }; + typedef integral_c< T,value > type; +}; + +} + +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename Shift > struct apply + + : aux::msvc_shift_right_impl< + typename N::value_type + , typename Shift::value_type + , N::value + , Shift::value + >::type + + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp index 7fc759b..8176698 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp @@ -1,5 +1,13 @@ -// preprocessed version of 'boost/mpl/aux_/template_arity.hpp' header -// see the original for copyright information + +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { @@ -7,8 +15,8 @@ template< bool > struct template_arity_impl { template< typename F > struct result_ + : int_< -1 > { - enum { value = -1 }; }; }; @@ -16,9 +24,8 @@ template<> struct template_arity_impl<true> { template< typename F > struct result_ + : F::arity { - enum { value = F::arity }; - }; }; @@ -31,9 +38,9 @@ struct template_arity template<> struct template_arity<int> + : int_< -1 > { - enum { value = -1 }; }; -}}} // namespace boost::mpl::aux +}}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/times.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/times.hpp new file mode 100644 index 0000000..445155a --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/times.hpp @@ -0,0 +1,116 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct times_impl + : if_c< + ( tag1_ > tag2_ ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct times_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template<> struct times_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + enum { value = 0 }; + }; +}; + +template< typename T > struct times_tag + : tag< T,na > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct times + : aux::msvc_eti_base< typename apply_wrap2< + times_impl< + typename times_tag<N1>::type + , typename times_tag<N2>::type + > + , N1 + , N2 + >::type >::type + +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, times, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, times) + +}} + +namespace boost { namespace mpl { + +namespace aux { +template< typename T, T n1, T n2 > +struct msvc_times_impl +{ + enum msvc_wknd { value = (n1 * n2) }; + typedef integral_c< T,value > type; +}; + +} + +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : aux::msvc_times_impl< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , N1::value + , N2::value + >::type + + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/unpack_args.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/unpack_args.hpp new file mode 100644 index 0000000..f481d79 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/unpack_args.hpp @@ -0,0 +1,109 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl +{ + template< typename F, typename Args > struct apply; +}; + +template<> struct unpack_args_impl<0> +{ + template< typename F, typename Args > struct apply + : apply0< + F + > + { + }; +}; + +template<> struct unpack_args_impl<1> +{ + template< typename F, typename Args > struct apply + : apply1< + F + , typename at_c< Args,0 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<2> +{ + template< typename F, typename Args > struct apply + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<3> +{ + template< typename F, typename Args > struct apply + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<4> +{ + template< typename F, typename Args > struct apply + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<5> +{ + template< typename F, typename Args > struct apply + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > + { + }; +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size<Args>::value > + ::template apply< F,Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/vector.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/vector.hpp index f84b9b1..c44f09c 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/vector.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/vector.hpp @@ -1,27 +1,39 @@ -// preprocessed version of 'boost/mpl/vector.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { -template< int N > struct vector_impl_chooser; +template< int N > +struct vector_chooser; + } namespace aux { template<> -struct vector_impl_chooser<0> +struct vector_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef vector0< - - > type; + + >::type type; + }; }; @@ -30,17 +42,20 @@ struct vector_impl_chooser<0> namespace aux { template<> -struct vector_impl_chooser<1> +struct vector_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector1< - T0 - > type; + typedef typename vector1< + T0 + >::type type; + }; }; @@ -49,17 +64,20 @@ struct vector_impl_chooser<1> namespace aux { template<> -struct vector_impl_chooser<2> +struct vector_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector2< - T0, T1 - > type; + typedef typename vector2< + T0, T1 + >::type type; + }; }; @@ -68,17 +86,20 @@ struct vector_impl_chooser<2> namespace aux { template<> -struct vector_impl_chooser<3> +struct vector_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector3< - T0, T1, T2 - > type; + typedef typename vector3< + T0, T1, T2 + >::type type; + }; }; @@ -87,17 +108,20 @@ struct vector_impl_chooser<3> namespace aux { template<> -struct vector_impl_chooser<4> +struct vector_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector4< - T0, T1, T2, T3 - > type; + typedef typename vector4< + T0, T1, T2, T3 + >::type type; + }; }; @@ -106,17 +130,20 @@ struct vector_impl_chooser<4> namespace aux { template<> -struct vector_impl_chooser<5> +struct vector_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector5< - T0, T1, T2, T3, T4 - > type; + typedef typename vector5< + T0, T1, T2, T3, T4 + >::type type; + }; }; @@ -125,17 +152,20 @@ struct vector_impl_chooser<5> namespace aux { template<> -struct vector_impl_chooser<6> +struct vector_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector6< - T0, T1, T2, T3, T4, T5 - > type; + typedef typename vector6< + T0, T1, T2, T3, T4, T5 + >::type type; + }; }; @@ -144,17 +174,20 @@ struct vector_impl_chooser<6> namespace aux { template<> -struct vector_impl_chooser<7> +struct vector_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector7< - T0, T1, T2, T3, T4, T5, T6 - > type; + typedef typename vector7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + }; }; @@ -163,17 +196,20 @@ struct vector_impl_chooser<7> namespace aux { template<> -struct vector_impl_chooser<8> +struct vector_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector8< - T0, T1, T2, T3, T4, T5, T6, T7 - > type; + typedef typename vector8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + }; }; @@ -182,17 +218,20 @@ struct vector_impl_chooser<8> namespace aux { template<> -struct vector_impl_chooser<9> +struct vector_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector9< - T0, T1, T2, T3, T4, T5, T6, T7, T8 - > type; + typedef typename vector9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + }; }; @@ -201,17 +240,240 @@ struct vector_impl_chooser<9> namespace aux { template<> -struct vector_impl_chooser<10> +struct vector_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector10< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 - > type; + typedef typename vector10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + }; }; @@ -226,7 +488,7 @@ struct is_vector_arg }; template<> -struct is_vector_arg<void_> +struct is_vector_arg<na> { enum { value = false }; }; @@ -234,6 +496,8 @@ struct is_vector_arg<void_> template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 > struct vector_count_args { @@ -242,37 +506,51 @@ struct vector_count_args + is_vector_arg<T3>::value + is_vector_arg<T4>::value + is_vector_arg<T5>::value + is_vector_arg<T6>::value + is_vector_arg<T7>::value + is_vector_arg<T8>::value - + is_vector_arg<T9>::value + is_vector_arg<T10>::value + + is_vector_arg<T9>::value + is_vector_arg<T10>::value + + is_vector_arg<T11>::value + is_vector_arg<T12>::value + + is_vector_arg<T13>::value + is_vector_arg<T14>::value + + is_vector_arg<T15>::value + is_vector_arg<T16>::value + + is_vector_arg<T17>::value + is_vector_arg<T18>::value + + is_vector_arg<T19>::value + is_vector_arg<T20>::value }; + }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector_impl { - typedef aux::vector_count_args< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > arg_num_; - typedef typename aux::vector_impl_chooser< arg_num_::value > - ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; + typedef aux::vector_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::vector_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< - typename T0 = void_, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - , typename T6 = void_, typename T7 = void_, typename T8 = void_ - , typename T9 = void_ + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na > struct vector - : aux::vector_impl< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type + : aux::vector_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type { typedef typename aux::vector_impl< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp index 6719f32..5349187 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp @@ -1,28 +1,38 @@ -// preprocessed version of 'boost/mpl/vector_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { -template< int N > struct vector_c_impl_chooser; +template< int N > +struct vector_c_chooser; + } namespace aux { template<> -struct vector_c_impl_chooser<0> +struct vector_c_chooser<0> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector0_c< - T - > type; + typedef typename vector0_c< + T + >::type type; + }; }; @@ -31,18 +41,19 @@ struct vector_c_impl_chooser<0> namespace aux { template<> -struct vector_c_impl_chooser<1> +struct vector_c_chooser<1> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector1_c< + typedef typename vector1_c< T, C0 - > type; + >::type type; + }; }; @@ -51,18 +62,19 @@ struct vector_c_impl_chooser<1> namespace aux { template<> -struct vector_c_impl_chooser<2> +struct vector_c_chooser<2> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector2_c< + typedef typename vector2_c< T, C0, C1 - > type; + >::type type; + }; }; @@ -71,18 +83,19 @@ struct vector_c_impl_chooser<2> namespace aux { template<> -struct vector_c_impl_chooser<3> +struct vector_c_chooser<3> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector3_c< + typedef typename vector3_c< T, C0, C1, C2 - > type; + >::type type; + }; }; @@ -91,18 +104,19 @@ struct vector_c_impl_chooser<3> namespace aux { template<> -struct vector_c_impl_chooser<4> +struct vector_c_chooser<4> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector4_c< + typedef typename vector4_c< T, C0, C1, C2, C3 - > type; + >::type type; + }; }; @@ -111,18 +125,19 @@ struct vector_c_impl_chooser<4> namespace aux { template<> -struct vector_c_impl_chooser<5> +struct vector_c_chooser<5> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector5_c< + typedef typename vector5_c< T, C0, C1, C2, C3, C4 - > type; + >::type type; + }; }; @@ -131,18 +146,19 @@ struct vector_c_impl_chooser<5> namespace aux { template<> -struct vector_c_impl_chooser<6> +struct vector_c_chooser<6> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector6_c< + typedef typename vector6_c< T, C0, C1, C2, C3, C4, C5 - > type; + >::type type; + }; }; @@ -151,18 +167,19 @@ struct vector_c_impl_chooser<6> namespace aux { template<> -struct vector_c_impl_chooser<7> +struct vector_c_chooser<7> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector7_c< + typedef typename vector7_c< T, C0, C1, C2, C3, C4, C5, C6 - > type; + >::type type; + }; }; @@ -171,18 +188,19 @@ struct vector_c_impl_chooser<7> namespace aux { template<> -struct vector_c_impl_chooser<8> +struct vector_c_chooser<8> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector8_c< + typedef typename vector8_c< T, C0, C1, C2, C3, C4, C5, C6, C7 - > type; + >::type type; + }; }; @@ -191,18 +209,19 @@ struct vector_c_impl_chooser<8> namespace aux { template<> -struct vector_c_impl_chooser<9> +struct vector_c_chooser<9> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector9_c< + typedef typename vector9_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8 - > type; + >::type type; + }; }; @@ -211,18 +230,19 @@ struct vector_c_impl_chooser<9> namespace aux { template<> -struct vector_c_impl_chooser<10> +struct vector_c_chooser<10> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector10_c< + typedef typename vector10_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 - > type; + >::type type; + }; }; @@ -230,7 +250,217 @@ struct vector_c_impl_chooser<10> namespace aux { -template< long T > +template<> +struct vector_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector11_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector12_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector13_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > struct is_vector_c_arg { enum { value = true }; @@ -243,49 +473,62 @@ struct is_vector_c_arg<LONG_MAX> }; template< - long T1, long T2, long T3, long T4, long T5, long T6, long T7, long T8 - , long T9, long T10 + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 > struct vector_c_count_args { enum { value = - is_vector_c_arg<T1>::value + is_vector_c_arg<T2>::value - + is_vector_c_arg<T3>::value + is_vector_c_arg<T4>::value - + is_vector_c_arg<T5>::value + is_vector_c_arg<T6>::value - + is_vector_c_arg<T7>::value + is_vector_c_arg<T8>::value - + is_vector_c_arg<T9>::value + is_vector_c_arg<T10>::value + is_vector_c_arg<C1>::value + is_vector_c_arg<C2>::value + + is_vector_c_arg<C3>::value + is_vector_c_arg<C4>::value + + is_vector_c_arg<C5>::value + is_vector_c_arg<C6>::value + + is_vector_c_arg<C7>::value + is_vector_c_arg<C8>::value + + is_vector_c_arg<C9>::value + is_vector_c_arg<C10>::value + + is_vector_c_arg<C11>::value + is_vector_c_arg<C12>::value + + is_vector_c_arg<C13>::value + is_vector_c_arg<C14>::value + + is_vector_c_arg<C15>::value + is_vector_c_arg<C16>::value + + is_vector_c_arg<C17>::value + is_vector_c_arg<C18>::value + + is_vector_c_arg<C19>::value + is_vector_c_arg<C20>::value }; + }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c_impl { - typedef aux::vector_c_count_args< C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > arg_num_; - typedef typename aux::vector_c_impl_chooser< arg_num_::value > - ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; + typedef aux::vector_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::vector_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< - typename T - , long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX - , long C9 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c - : aux::vector_c_impl< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type + : aux::vector_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type { typedef typename aux::vector_c_impl< - T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/advance_backward.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/advance_backward.hpp index 16e576c..26de94c 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/advance_backward.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/advance_backward.hpp @@ -1,9 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/advance_backward.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> @@ -22,7 +28,7 @@ struct advance_backward<1> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; + typedef typename prior<iter0>::type iter1; typedef iter1 type; }; }; @@ -33,8 +39,8 @@ struct advance_backward<2> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; typedef iter2 type; }; }; @@ -45,9 +51,9 @@ struct advance_backward<3> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; - typedef typename iter2::prior iter3; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; + typedef typename prior<iter2>::type iter3; typedef iter3 type; }; }; @@ -58,10 +64,10 @@ struct advance_backward<4> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; - typedef typename iter2::prior iter3; - typedef typename iter3::prior iter4; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; + typedef typename prior<iter2>::type iter3; + typedef typename prior<iter3>::type iter4; typedef iter4 type; }; }; @@ -71,12 +77,21 @@ struct advance_backward { template< typename Iterator > struct apply { - typedef typename apply1< advance_backward<4>,Iterator >::type chunk_result_; - typedef typename apply1<advance_backward<( (N - 4) < 0 ? 0 : N - 4 )>,chunk_result_>::type type; + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/advance_forward.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/advance_forward.hpp index e6840b7..b137cc7 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/advance_forward.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/advance_forward.hpp @@ -1,9 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/advance_forward.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> @@ -22,7 +28,7 @@ struct advance_forward<1> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef iter1 type; }; }; @@ -33,8 +39,8 @@ struct advance_forward<2> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; typedef iter2 type; }; }; @@ -45,9 +51,9 @@ struct advance_forward<3> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; - typedef typename iter2::next iter3; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; + typedef typename next<iter2>::type iter3; typedef iter3 type; }; }; @@ -58,10 +64,10 @@ struct advance_forward<4> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; - typedef typename iter2::next iter3; - typedef typename iter3::next iter4; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; + typedef typename next<iter2>::type iter3; + typedef typename next<iter3>::type iter4; typedef iter4 type; }; }; @@ -71,12 +77,21 @@ struct advance_forward { template< typename Iterator > struct apply { - typedef typename apply1< advance_forward<4>,Iterator >::type chunk_result_; - typedef typename apply1<advance_forward<( (N - 4) < 0 ? 0 : N - 4 )>,chunk_result_>::type type; + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/and.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/and.hpp index 9f6982a..010ad1f 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/and.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/and.hpp @@ -1,5 +1,13 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { @@ -33,8 +41,8 @@ struct and_impl< } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ @@ -48,15 +56,14 @@ struct and_ BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ - , (T1, T2, T3, T4, T5) + , ( T1, T2, T3, T4, T5) ) }; -BOOST_MPL_AUX_VOID_SPEC_EXT( +BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) -}} // namespace boost::mpl - +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/apply.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/apply.hpp index 8f1f6a0..e08eacc 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/apply.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/apply.hpp @@ -1,443 +1,161 @@ -// preprocessed version of 'boost/mpl/apply.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename F, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ + typename F > -struct apply; +struct apply0 -template< typename F > -struct apply0 : F + : apply_wrap0< + typename lambda<F>::type + + > { + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) }; template< typename F > -struct apply< F,void_,void_,void_,void_,void_ > +struct apply< F,na,na,na,na,na > : apply0<F> { }; -namespace aux { -template< - int N, typename F, typename T1 - > -struct apply_impl1; -} - -namespace aux { - -template< - typename F, typename T1 - > -struct apply_impl1< - 1 - , F - , T1 - > -{ - typedef typename F::template apply< - T1 - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1 - > -struct apply_impl1< - 2 - , F - , T1 - > -{ - typedef typename F::template apply< - T1 - , void_ - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1 - > -struct apply_impl1< - 3 - , F - , T1 - > -{ - typedef typename F::template apply< - T1 - , void_, void_ - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1 - > -struct apply_impl1< - 4 - , F - , T1 - > -{ - typedef typename F::template apply< - T1 - , void_, void_, void_ - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1 - > -struct apply_impl1< - 5 - , F - , T1 - > -{ - typedef typename F::template apply< - T1 - , void_, void_, void_, void_ - > type; -}; - -} // namespace aux - template< typename F, typename T1 > struct apply1 - : aux::apply_impl1< - ::boost::mpl::aux::arity< F,1 >::value - , F + + : apply_wrap1< + typename lambda<F>::type , T1 - >::type + > { + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) }; template< typename F, typename T1 > -struct apply< F,T1,void_,void_,void_,void_ > +struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; -namespace aux { -template< - int N, typename F, typename T1, typename T2 - > -struct apply_impl2; -} - -namespace aux { - -template< - typename F, typename T1, typename T2 - > -struct apply_impl2< - 2 - , F - , T1, T2 - > -{ - typedef typename F::template apply< - T1, T2 - - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1, typename T2 - > -struct apply_impl2< - 3 - , F - , T1, T2 - > -{ - typedef typename F::template apply< - T1, T2 - , void_ - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1, typename T2 - > -struct apply_impl2< - 4 - , F - , T1, T2 - > -{ - typedef typename F::template apply< - T1, T2 - , void_, void_ - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1, typename T2 - > -struct apply_impl2< - 5 - , F - , T1, T2 - > -{ - typedef typename F::template apply< - T1, T2 - , void_, void_, void_ - > type; -}; - -} // namespace aux - template< typename F, typename T1, typename T2 > struct apply2 - : aux::apply_impl2< - ::boost::mpl::aux::arity< F,2 >::value - , F + + : apply_wrap2< + typename lambda<F>::type , T1, T2 - >::type + > { + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) }; template< typename F, typename T1, typename T2 > -struct apply< F,T1,T2,void_,void_,void_ > +struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; -namespace aux { -template< - int N, typename F, typename T1, typename T2, typename T3 - > -struct apply_impl3; -} - -namespace aux { - -template< - typename F, typename T1, typename T2, typename T3 - > -struct apply_impl3< - 3 - , F - , T1, T2, T3 - > -{ - typedef typename F::template apply< - T1, T2, T3 - - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1, typename T2, typename T3 - > -struct apply_impl3< - 4 - , F - , T1, T2, T3 - > -{ - typedef typename F::template apply< - T1, T2, T3 - , void_ - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1, typename T2, typename T3 - > -struct apply_impl3< - 5 - , F - , T1, T2, T3 - > -{ - typedef typename F::template apply< - T1, T2, T3 - , void_, void_ - > type; -}; - -} // namespace aux - template< typename F, typename T1, typename T2, typename T3 > struct apply3 - : aux::apply_impl3< - ::boost::mpl::aux::arity< F,3 >::value - , F + + : apply_wrap3< + typename lambda<F>::type , T1, T2, T3 - >::type + > { + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) }; template< typename F, typename T1, typename T2, typename T3 > -struct apply< F,T1,T2,T3,void_,void_ > +struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; -namespace aux { -template< - int N, typename F, typename T1, typename T2, typename T3, typename T4 - > -struct apply_impl4; -} - -namespace aux { - -template< - typename F, typename T1, typename T2, typename T3, typename T4 - > -struct apply_impl4< - 4 - , F - , T1, T2, T3, T4 - > -{ - typedef typename F::template apply< - T1, T2, T3, T4 - - > type; -}; - -} // namespace aux - -namespace aux { - -template< - typename F, typename T1, typename T2, typename T3, typename T4 - > -struct apply_impl4< - 5 - , F - , T1, T2, T3, T4 - > -{ - typedef typename F::template apply< - T1, T2, T3, T4 - , void_ - > type; -}; - -} // namespace aux - template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 - : aux::apply_impl4< - ::boost::mpl::aux::arity< F,4 >::value - , F + + : apply_wrap4< + typename lambda<F>::type , T1, T2, T3, T4 - >::type + > { + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) }; template< typename F, typename T1, typename T2, typename T3, typename T4 > -struct apply< F,T1,T2,T3,T4,void_ > +struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; -namespace aux { -template< - int N, typename F, typename T1, typename T2, typename T3, typename T4 - , typename T5 - > -struct apply_impl5; -} - -namespace aux { - -template< - typename F, typename T1, typename T2, typename T3, typename T4 - , typename T5 - > -struct apply_impl5< - 5 - , F - , T1, T2, T3, T4, T5 - > -{ - typedef typename F::template apply< - T1, T2, T3, T4, T5 - - > type; -}; - -} // namespace aux - template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 - : aux::apply_impl5< - ::boost::mpl::aux::arity< F,5 >::value - , F + + : apply_wrap5< + typename lambda<F>::type , T1, T2, T3, T4, T5 - >::type + > { + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) }; -// primary template (not a specialization!) +/// primary template (not a specialization!) + template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 @@ -447,6 +165,5 @@ struct apply { }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/apply_fwd.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/apply_fwd.hpp new file mode 100644 index 0000000..bd50b89 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/apply_wrap.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/apply_wrap.hpp new file mode 100644 index 0000000..baeda39 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/apply_wrap.hpp @@ -0,0 +1,456 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + int N, typename F + > +struct apply_wrap_impl0; + +template< + typename F + > +struct apply_wrap_impl0< + 0 + , F + + > +{ + typedef typename F::template apply< + +/// since the defaults are "lost", we have to pass *something* even for nullary +/// metafunction classes + na + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 1 + , F + + > +{ + typedef typename F::template apply< + + na + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 2 + , F + + > +{ + typedef typename F::template apply< + + na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 3 + , F + + > +{ + typedef typename F::template apply< + + na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 4 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap_impl0< + 5 + , F + + > +{ + typedef typename F::template apply< + + na, na, na, na, na + + > type; +}; + +template< + typename F + > +struct apply_wrap0 + : apply_wrap_impl0< + ::boost::mpl::aux::arity< F,0 >::value + , F + + >::type +{ +}; + +template< + int N, typename F, typename T1 + > +struct apply_wrap_impl1; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 1 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 2 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 3 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 4 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap_impl1< + 5 + , F + , T1 + > +{ + typedef typename F::template apply< + T1 + , na, na, na, na + + > type; +}; + +template< + typename F, typename T1 + > +struct apply_wrap1 + : apply_wrap_impl1< + ::boost::mpl::aux::arity< F,1 >::value + , F + , T1 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2 + > +struct apply_wrap_impl2; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 2 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 3 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 4 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap_impl2< + 5 + , F + , T1, T2 + > +{ + typedef typename F::template apply< + T1, T2 + + , na, na, na + + > type; +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap2 + : apply_wrap_impl2< + ::boost::mpl::aux::arity< F,2 >::value + , F + , T1, T2 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 3 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 4 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap_impl3< + 5 + , F + , T1, T2, T3 + > +{ + typedef typename F::template apply< + T1, T2, T3 + + , na, na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap3 + : apply_wrap_impl3< + ::boost::mpl::aux::arity< F,3 >::value + , F + , T1, T2, T3 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 4 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap_impl4< + 5 + , F + , T1, T2, T3, T4 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4 + + , na + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap4 + : apply_wrap_impl4< + ::boost::mpl::aux::arity< F,4 >::value + , F + , T1, T2, T3, T4 + >::type +{ +}; + +template< + int N, typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap_impl5< + 5 + , F + , T1, T2, T3, T4, T5 + > +{ + typedef typename F::template apply< + T1, T2, T3, T4, T5 + + > type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap5 + : apply_wrap_impl5< + ::boost::mpl::aux::arity< F,5 >::value + , F + , T1, T2, T3, T4, T5 + >::type +{ +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/arg.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/arg.hpp index d7097f8..4e404a6 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/arg.hpp @@ -1,26 +1,30 @@ -// preprocessed version of 'boost/mpl/arg.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-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) +// -template<> struct arg<-1> +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > { static int const value = -1; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -28,20 +32,17 @@ template<> struct arg<1> { static int const value = 1; typedef arg<2> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -49,20 +50,17 @@ template<> struct arg<2> { static int const value = 2; typedef arg<3> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -70,20 +68,17 @@ template<> struct arg<3> { static int const value = 3; typedef arg<4> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -91,20 +86,17 @@ template<> struct arg<4> { static int const value = 4; typedef arg<5> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -112,25 +104,20 @@ template<> struct arg<5> { static int const value = 5; typedef arg<6> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; -BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1, int, arg) - -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp index cf52e14..355c64b 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp @@ -1,11 +1,16 @@ -// preprocessed version of 'boost/mpl/bind.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-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) +// -BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) -BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { @@ -18,25 +23,12 @@ struct resolve_bind_arg typedef T type; }; -} // namespace aux - -template< - typename F, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - > -struct bind; - -template< typename F, typename T > struct bind1st; -template< typename F, typename T > struct bind2nd; - -namespace aux { - template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > -struct resolve_bind_arg< arg<N>,U1,U2,U3,U4,U5 > +struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 > { - typedef typename apply5<mpl::arg< N>,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type; }; template< @@ -44,50 +36,22 @@ template< , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > -struct resolve_bind_arg< bind<F,T1,T2,T3,T4,T5>,U1,U2,U3,U4,U5 > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind1st<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind1st< F,T > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind2nd<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind2nd< F,T > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux -BOOST_MPL_AUX_ARITY_SPEC( - 6 - , bind - ) - -BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) -BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) - template< typename F > struct bind0 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { @@ -95,7 +59,10 @@ struct bind0 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: - typedef typename apply0<f_>::type type; + typedef typename apply_wrap0< + f_ + >::type type; + }; }; @@ -106,11 +73,11 @@ template< , typename U5 > struct resolve_bind_arg< - bind0<F>,U1, U2, U3, U4, U5 + bind0<F>, U1, U2, U3, U4, U5 > { typedef bind0<F> f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -120,7 +87,7 @@ BOOST_MPL_AUX_ARITY_SPEC(1, bind0) template< typename F > -struct bind< F,void_,void_,void_,void_,void_ > +struct bind< F,na,na,na,na,na > : bind0<F> { }; @@ -131,17 +98,21 @@ template< struct bind1 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: - typedef typename apply1< f_,t1 >::type type; + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + }; }; @@ -152,11 +123,11 @@ template< , typename U4, typename U5 > struct resolve_bind_arg< - bind1< F,T1 >,U1, U2, U3, U4, U5 + bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -166,7 +137,7 @@ BOOST_MPL_AUX_ARITY_SPEC(2, bind1) template< typename F, typename T1 > -struct bind< F,T1,void_,void_,void_,void_ > +struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; @@ -177,18 +148,22 @@ template< struct bind2 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: - typedef typename apply2< f_,t1,t2 >::type type; + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + }; }; @@ -199,11 +174,11 @@ template< , typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind2< F,T1,T2 >,U1, U2, U3, U4, U5 + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -213,7 +188,7 @@ BOOST_MPL_AUX_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > -struct bind< F,T1,T2,void_,void_,void_ > +struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; @@ -224,19 +199,23 @@ template< struct bind3 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: - typedef typename apply3< f_,t1,t2,t3 >::type type; + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + }; }; @@ -247,11 +226,11 @@ template< , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind3< F,T1,T2,T3 >,U1, U2, U3, U4, U5 + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -261,7 +240,7 @@ BOOST_MPL_AUX_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > -struct bind< F,T1,T2,T3,void_,void_ > +struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; @@ -272,20 +251,25 @@ template< struct bind4 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; - typedef typename aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 >::type t4; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: - typedef typename apply4< f_,t1,t2,t3,t4 >::type type; + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + }; }; @@ -296,11 +280,11 @@ template< , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind4< F,T1,T2,T3,T4 >,U1, U2, U3, U4, U5 + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -310,7 +294,7 @@ BOOST_MPL_AUX_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > -struct bind< F,T1,T2,T3,T4,void_ > +struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; @@ -322,21 +306,26 @@ template< struct bind5 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; - typedef typename aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 >::type t4; - typedef typename aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 >::type t5; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: - typedef typename apply5< f_,t1,t2,t3,t4,t5 >::type type; + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + }; }; @@ -348,18 +337,18 @@ template< , typename U5 > struct resolve_bind_arg< - bind5< F,T1,T2,T3,T4,T5 >,U1, U2, U3, U4, U5 + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) -// primary template (not a specialization!) +/// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -370,34 +359,76 @@ struct bind { }; -template< typename F, typename T > -struct bind1st +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > { template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply - : apply2< F,T,U > { + private: + typedef mpl::arg<1> n1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; }; }; -template< typename F, typename T > -struct bind2nd +template< + template< typename T1, typename T2, typename T3 > class F, typename Tag + > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct eval_if; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< eval_if,Tag > + , T1, T2, T3 + > { template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply - : apply2< F,U,T > { + private: + typedef mpl::arg<1> n1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef typename eval_if< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; }; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/bind.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/bind.hpp index d247d68..9f12c5b 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/bind.hpp @@ -1,11 +1,16 @@ -// preprocessed version of 'boost/mpl/bind.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-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) +// -BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) -BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { @@ -24,38 +29,25 @@ template< > struct replace_unnamed_arg { - typedef Arg next_arg; + typedef Arg next; typedef T type; }; template< typename Arg > -struct replace_unnamed_arg< arg<-1>,Arg > +struct replace_unnamed_arg< arg< -1 >, Arg > { - typedef typename Arg::next next_arg; + typedef typename Arg::next next; typedef Arg type; }; -} // namespace aux - -template< - typename F, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - > -struct bind; - -template< typename F, typename T > struct bind1st; -template< typename F, typename T > struct bind2nd; - -namespace aux { - template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > -struct resolve_bind_arg< arg<N>,U1,U2,U3,U4,U5 > +struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 > { - typedef typename apply5<mpl::arg< N>,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type; }; template< @@ -63,61 +55,36 @@ template< , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > -struct resolve_bind_arg< bind<F,T1,T2,T3,T4,T5>,U1,U2,U3,U4,U5 > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind1st<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind1st< F,T > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind2nd<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind2nd< F,T > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux -BOOST_MPL_AUX_ARITY_SPEC( - 6 - , bind - ) - -BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) -BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) - template< typename F > struct bind0 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// public: - typedef typename apply0<f_>::type type; + typedef typename apply_wrap0< + f_ + >::type type; + }; }; @@ -128,11 +95,11 @@ template< , typename U5 > struct resolve_bind_arg< - bind0<F>,U1, U2, U3, U4, U5 + bind0<F>, U1, U2, U3, U4, U5 > { typedef bind0<F> f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -142,7 +109,7 @@ BOOST_MPL_AUX_ARITY_SPEC(1, bind0) template< typename F > -struct bind< F,void_,void_,void_,void_,void_ > +struct bind< F,na,na,na,na,na > : bind0<F> { }; @@ -153,24 +120,28 @@ template< struct bind1 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// public: - typedef typename apply1< f_,t1 >::type type; + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + }; }; @@ -181,11 +152,11 @@ template< , typename U4, typename U5 > struct resolve_bind_arg< - bind1< F,T1 >,U1, U2, U3, U4, U5 + bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -195,7 +166,7 @@ BOOST_MPL_AUX_ARITY_SPEC(2, bind1) template< typename F, typename T1 > -struct bind< F,T1,void_,void_,void_,void_ > +struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; @@ -206,29 +177,33 @@ template< struct bind2 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// public: - typedef typename apply2< f_,t1,t2 >::type type; + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + }; }; @@ -239,11 +214,11 @@ template< , typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind2< F,T1,T2 >,U1, U2, U3, U4, U5 + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -253,7 +228,7 @@ BOOST_MPL_AUX_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > -struct bind< F,T1,T2,void_,void_,void_ > +struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; @@ -264,34 +239,38 @@ template< struct bind3 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// public: - typedef typename apply3< f_,t1,t2,t3 >::type type; + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + }; }; @@ -302,11 +281,11 @@ template< , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind3< F,T1,T2,T3 >,U1, U2, U3, U4, U5 + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -316,7 +295,7 @@ BOOST_MPL_AUX_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > -struct bind< F,T1,T2,T3,void_,void_ > +struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; @@ -327,39 +306,44 @@ template< struct bind4 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; - typedef typename r4::next_arg n5; - typedef typename aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 >::type t4; - + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// public: - typedef typename apply4< f_,t1,t2,t3,t4 >::type type; + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + }; }; @@ -370,11 +354,11 @@ template< , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind4< F,T1,T2,T3,T4 >,U1, U2, U3, U4, U5 + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -384,7 +368,7 @@ BOOST_MPL_AUX_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > -struct bind< F,T1,T2,T3,T4,void_ > +struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; @@ -396,44 +380,49 @@ template< struct bind5 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; - typedef typename r4::next_arg n5; - typedef typename aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 >::type t4; - + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; - typedef typename r5::next_arg n6; - typedef typename aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 >::type t5; - + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// public: - typedef typename apply5< f_,t1,t2,t3,t4,t5 >::type type; + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + }; }; @@ -445,18 +434,18 @@ template< , typename U5 > struct resolve_bind_arg< - bind5< F,T1,T2,T3,T4,T5 >,U1, U2, U3, U4, U5 + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; - typedef typename apply5< f_,U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) -// primary template (not a specialization!) +/// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -467,34 +456,100 @@ struct bind { }; -template< typename F, typename T > -struct bind1st +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > { template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply - : apply2< F,T,U > { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; }; }; -template< typename F, typename T > -struct bind2nd +template< + template< typename T1, typename T2, typename T3 > class F, typename Tag + > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct eval_if; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< eval_if,Tag > + , T1, T2, T3 + > { template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply - : apply2< F,U,T > { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef typename eval_if< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; }; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/bind_fwd.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/bind_fwd.hpp new file mode 100644 index 0000000..d80a72b --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/bind_fwd.hpp @@ -0,0 +1,52 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct bind; + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/bitand.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/bitand.hpp new file mode 100644 index 0000000..642f042 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/bitand.hpp @@ -0,0 +1,144 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag<N1>::type + , typename bitand_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/bitor.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/bitor.hpp new file mode 100644 index 0000000..4ccbe89 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/bitor.hpp @@ -0,0 +1,144 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag<N1>::type + , typename bitor_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/bitxor.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/bitxor.hpp new file mode 100644 index 0000000..73b519e --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/bitxor.hpp @@ -0,0 +1,144 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag<N1>::type + , typename bitxor_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/divides.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/divides.hpp new file mode 100644 index 0000000..c963f62 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/divides.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag<N1>::type + , typename divides_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/equal_to.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/equal_to.hpp new file mode 100644 index 0000000..bb051d6 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/equal_to.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + : equal_to_impl< + typename equal_to_tag<N1>::type + , typename equal_to_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/fold_backward_impl.hpp deleted file mode 100644 index b80ee15..0000000 --- a/include/boost/mpl/aux_/preprocessed/mwcw/fold_backward_impl.hpp +++ /dev/null @@ -1,222 +0,0 @@ -// preprocessed version of 'boost/mpl/aux_/fold_backward_impl.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { -namespace aux { - -// forward declaration -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< 0,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef fwd_state0 bkwd_state0; - typedef bkwd_state0 state; - typedef iter0 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< 1,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - - - typedef fwd_state1 bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - typedef bkwd_state0 state; - typedef iter1 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< 2,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - - - typedef fwd_state2 bkwd_state2; - typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter2 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< 3,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename apply2<ForwardOp, fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - - - typedef fwd_state3 bkwd_state3; - typedef typename apply2<BackwardOp, bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter3 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< 4,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename apply2<ForwardOp, fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename apply2<ForwardOp, fwd_state3, typename iter3::type>::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fwd_state4 bkwd_state4; - typedef typename apply2<BackwardOp, bkwd_state4, typename iter3::type>::type bkwd_state3; - typedef typename apply2<BackwardOp, bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter4 iterator; -}; - -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename apply2<ForwardOp, fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename apply2<ForwardOp, fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename apply2<ForwardOp, fwd_state3, typename iter3::type>::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fold_backward_impl< - ( (N - 4) < 0 ? 0 : N - 4 ) - , iter4 - , Last - , fwd_state4 - , BackwardOp - , ForwardOp - > nested_chunk; - - typedef typename nested_chunk::state bkwd_state4; - typedef typename apply2<BackwardOp, bkwd_state4, typename iter3::type>::type bkwd_state3; - typedef typename apply2<BackwardOp, bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename apply2<BackwardOp, bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename apply2<BackwardOp, bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef typename nested_chunk::iterator iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< -1,First,Last,State,BackwardOp,ForwardOp > -{ - typedef fold_backward_impl< - -1 - , typename First::next - , Last - , typename apply2<ForwardOp, State, typename First::type>::type - , BackwardOp - , ForwardOp - > nested_step; - - typedef typename apply2<BackwardOp, typename nested_step::state, typename First::type>::type state; - typedef typename nested_step::iterator iterator; -}; - -template< - typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< -1,Last,Last,State,BackwardOp,ForwardOp > -{ - typedef State state; - typedef Last iterator; -}; - -} // namespace aux -} // namespace mpl -} // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/fold_impl.hpp index df34c8d..00c2e55 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/fold_impl.hpp @@ -1,18 +1,25 @@ -// preprocessed version of 'boost/mpl/aux_/fold_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration -// forward declaration template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct fold_impl; template< @@ -39,8 +46,8 @@ struct fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename apply2<ForwardOp, state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; typedef state1 state; @@ -57,10 +64,10 @@ struct fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename apply2<ForwardOp, state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, state1, typename iter1::type>::type state2; - typedef typename iter1::next iter2; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; typedef state2 state; @@ -77,12 +84,12 @@ struct fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename apply2<ForwardOp, state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, state1, typename iter1::type>::type state2; - typedef typename iter1::next iter2; - typedef typename apply2<ForwardOp, state2, typename iter2::type>::type state3; - typedef typename iter2::next iter3; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; + typedef typename next<iter2>::type iter3; typedef state3 state; @@ -99,14 +106,14 @@ struct fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename apply2<ForwardOp, state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; - typedef typename apply2<ForwardOp, state1, typename iter1::type>::type state2; - typedef typename iter1::next iter2; - typedef typename apply2<ForwardOp, state2, typename iter2::type>::type state3; - typedef typename iter2::next iter3; - typedef typename apply2<ForwardOp, state3, typename iter3::type>::type state4; - typedef typename iter3::next iter4; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4; + typedef typename next<iter3>::type iter4; typedef state4 state; @@ -114,12 +121,12 @@ struct fold_impl< 4,First,Last,State,ForwardOp > }; template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct fold_impl { typedef fold_impl< @@ -137,7 +144,7 @@ struct fold_impl , typename chunk_::state , ForwardOp > res_; - + typedef typename res_::state state; typedef typename res_::iterator iterator; }; @@ -147,13 +154,13 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 - , typename First::next + , typename next<First>::type , Last - , typename apply2<ForwardOp, State, typename First::type>::type + , typename apply2<ForwardOp,State, typename deref<First>::type>::type , ForwardOp > { @@ -163,14 +170,11 @@ template< typename Last , typename State , typename ForwardOp - > + > struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp index 5534ac2..89d946e 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp @@ -1,30 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/full_lambda.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Aleksey Gurtovoy 2001-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) +// -template< - typename T - , typename Tag - , typename Protect = false_ - - > -struct lambda_impl -{ - typedef false_ is_le; - typedef T type; -}; +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! -template< - typename T - , typename Tag = void_ - - > -struct lambda - : lambda_impl< T,Tag,false_ > -{ -}; +namespace boost { namespace mpl { namespace aux { @@ -45,44 +30,56 @@ struct lambda_or< false,false,false,false,false > } // namespace aux -template< int N, typename Tag, typename Protect > -struct lambda_impl< arg<N>,Tag,Protect > +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg<N>, Tag > { typedef true_ is_le; - typedef arg<N> type; + typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41 + typedef protect<result_> type; }; template< typename F , typename Tag - , typename Protect - > -struct lambda_impl< - bind0<F> - , Tag - , Protect > +struct lambda< + bind0<F> + , Tag + + > { typedef false_ is_le; typedef bind0< F - > type; -}; + > result_; -template< - template< typename P1 > class F - , typename T1 - , typename Tag - > -struct lambda< F<T1>,Tag > - : lambda_impl< F<T1>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > @@ -90,33 +87,24 @@ struct le_result1 { typedef F< typename L1::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1 > class F - , typename Tag + typename Tag + , template< typename P1 > class F , typename L1 > -struct le_result1< true_,Tag,false_,F,L1 > +struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > - , typename L1::type - > type; -}; + , typename L1::result_ + > result_; -template< - template< typename P1 > class F - , typename Tag - , typename L1 - > -struct le_result1< true_,Tag,true_,F,L1 > -{ - typedef protect< bind1< - quote1< F,Tag > - , typename L1::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -125,58 +113,50 @@ template< template< typename P1 > class F , typename T1 , typename Tag - , typename Protect > -struct lambda_impl< - F<T1>, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef aux::lambda_or< - l1::is_le::value - > is_le; - - typedef typename aux::le_result1< - typename is_le::type +struct lambda< + F<T1> , Tag - , Protect - , F - , l1 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag - , typename Protect - > -struct lambda_impl< - bind1< F,T1 > - , Tag - , Protect > +struct lambda< + bind1< F,T1 > + , Tag + + > { typedef false_ is_le; typedef bind1< F , T1 - > type; -}; + > result_; -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - , typename Tag - > -struct lambda< F<T1,T2>,Tag > - : lambda_impl< F<T1,T2>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > @@ -184,33 +164,24 @@ struct le_result2 { typedef F< typename L1::type, typename L2::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true_,Tag,false_,F,L1,L2 > +struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > - , typename L1::type, typename L2::type - > type; -}; + , typename L1::result_, typename L2::result_ + > result_; -template< - template< typename P1, typename P2 > class F - , typename Tag - , typename L1, typename L2 - > -struct le_result2< true_,Tag,true_,F,L1,L2 > -{ - typedef protect< bind2< - quote2< F,Tag > - , typename L1::type, typename L2::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -219,60 +190,55 @@ template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value - > is_le; - - typedef typename aux::le_result2< - typename is_le::type +struct lambda< + F< T1,T2 > , Tag - , Protect - , F - , l1, l2 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag - , typename Protect - > -struct lambda_impl< - bind2< F,T1,T2 > - , Tag - , Protect > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > { typedef false_ is_le; typedef bind2< F , T1, T2 - > type; -}; + > result_; -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - , typename Tag - > -struct lambda< F<T1,T2,T3>,Tag > - : lambda_impl< F<T1,T2,T3>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > @@ -280,33 +246,24 @@ struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2, typename P3 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true_,Tag,false_,F,L1,L2,L3 > +struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; -template< - template< typename P1, typename P2, typename P3 > class F - , typename Tag - , typename L1, typename L2, typename L3 - > -struct le_result3< true_,Tag,true_,F,L1,L2,L3 > -{ - typedef protect< bind3< - quote3< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -315,61 +272,57 @@ template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - > is_le; - - typedef typename aux::le_result3< - typename is_le::type +struct lambda< + F< T1,T2,T3 > , Tag - , Protect - , F - , l1, l2, l3 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag - , typename Protect - > -struct lambda_impl< - bind3< F,T1,T2,T3 > - , Tag - , Protect > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 - > type; -}; + > result_; -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename T1, typename T2, typename T3, typename T4 - , typename Tag - > -struct lambda< F<T1,T2,T3,T4>,Tag > - : lambda_impl< F<T1,T2,T3,T4>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > @@ -378,35 +331,25 @@ struct le_result4 typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename Tag - , typename L1, typename L2, typename L3, typename L4 - > -struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 > -{ - typedef protect< bind4< - quote4< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -415,67 +358,59 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - typedef lambda_impl< T4,Tag > l4; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - , l4::is_le::value - > is_le; - - typedef typename aux::le_result4< - typename is_le::type +struct lambda< + F< T1,T2,T3,T4 > , Tag - , Protect - , F - , l1, l2, l3, l4 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag - , typename Protect - > -struct lambda_impl< - bind4< F,T1,T2,T3,T4 > - , Tag - , Protect > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 - > type; -}; + > result_; -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename T1, typename T2, typename T3, typename T4, typename T5 - , typename Tag - > -struct lambda< F<T1,T2,T3,T4,T5>,Tag > - : lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > @@ -484,43 +419,25 @@ struct le_result5 typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type - > type; + > result_; + + typedef result_ type; }; template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type, typename L5::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename Tag - , typename L1, typename L2, typename L3, typename L4, typename L5 - > -struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 > -{ - typedef protect< bind5< - quote5< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type, typename L5::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -533,100 +450,105 @@ template< class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4,T5 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - typedef lambda_impl< T4,Tag > l4; - typedef lambda_impl< T5,Tag > l5; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - , l4::is_le::value, l5::is_le::value - > is_le; - - typedef typename aux::le_result5< - typename is_le::type +struct lambda< + F< T1,T2,T3,T4,T5 > , Tag - , Protect - , F - , l1, l2, l3, l4, l5 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag - , typename Protect - > -struct lambda_impl< - bind5< F,T1,T2,T3,T4,T5 > - , Tag - , Protect > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 - > type; + > result_; + + typedef result_ type; }; -// special case for 'protect' -template< typename T, typename Tag, typename Protect > -struct lambda_impl< protect<T>,Tag,Protect > +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< protect<T>, Tag > { typedef false_ is_le; - typedef protect<T> type; + typedef protect<T> result_; + typedef result_ type; }; -// specializations for main 'bind', 'bind1st' and 'bind2nd' forms +/// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag - , typename Protect - > -struct lambda_impl< - bind< F,T1,T2,T3,T4,T5 > - , Tag - , Protect - > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > { typedef false_ is_le; - typedef bind< F,T1,T2,T3,T4,T5 > type; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; }; +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars + template< - typename F, typename T - , typename Tag - , typename Protect + typename F, typename Tag1, typename Tag2 > -struct lambda_impl< bind1st<F,T>,Tag,Protect > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > { - typedef false_ is_le; - typedef bind1st< F,T > type; + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef aux::le_result2<is_le, Tag2, mpl::lambda, l1, l2> le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; -template< - typename F, typename T - , typename Tag - , typename Protect - > -struct lambda_impl< bind2nd<F,T>,Tag,Protect > -{ - typedef false_ is_le; - typedef bind2nd< F,T > type; -}; +BOOST_MPL_AUX_NA_SPEC(2, lambda) -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/greater.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/greater.hpp new file mode 100644 index 0000000..73bbaad --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/greater.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + : greater_impl< + typename greater_tag<N1>::type + , typename greater_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/greater_equal.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/greater_equal.hpp new file mode 100644 index 0000000..d52e43e --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/greater_equal.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + : greater_equal_impl< + typename greater_equal_tag<N1>::type + , typename greater_equal_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/inherit.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/inherit.hpp new file mode 100644 index 0000000..00f31c4 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/inherit.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp index 2d1b5d8..6951795 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp @@ -1,9 +1,16 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_if_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step @@ -55,7 +62,7 @@ struct iter_fold_if_forward_step typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator, State, ForwardOp, mpl::next< Iterator> > impl_; + >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; @@ -72,7 +79,7 @@ struct iter_fold_if_backward_step typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_; + >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; @@ -95,7 +102,7 @@ struct iter_fold_if_impl typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; - + typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< @@ -123,7 +130,4 @@ struct iter_fold_if_impl typedef typename backward_step4::iterator iterator; }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/iter_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/iter_fold_impl.hpp index 2a316af..c25f136 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/iter_fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/iter_fold_impl.hpp @@ -1,18 +1,25 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration -// forward declaration template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl; template< @@ -40,7 +47,7 @@ struct iter_fold_impl< 1,First,Last,State,ForwardOp > typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef state1 state; @@ -58,9 +65,9 @@ struct iter_fold_impl< 2,First,Last,State,ForwardOp > typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef state2 state; @@ -78,11 +85,11 @@ struct iter_fold_impl< 3,First,Last,State,ForwardOp > typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; - typedef typename iter2::next iter3; + typedef typename next<iter2>::type iter3; typedef state3 state; @@ -100,13 +107,13 @@ struct iter_fold_impl< 4,First,Last,State,ForwardOp > typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; - typedef typename iter1::next iter2; + typedef typename next<iter1>::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; - typedef typename iter2::next iter3; + typedef typename next<iter2>::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; - typedef typename iter3::next iter4; + typedef typename next<iter3>::type iter4; typedef state4 state; @@ -114,12 +121,12 @@ struct iter_fold_impl< 4,First,Last,State,ForwardOp > }; template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl { typedef iter_fold_impl< @@ -137,7 +144,7 @@ struct iter_fold_impl , typename chunk_::state , ForwardOp > res_; - + typedef typename res_::state state; typedef typename res_::iterator iterator; }; @@ -147,11 +154,11 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 - , typename First::next + , typename next<First>::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp @@ -163,14 +170,11 @@ template< typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/lambda_helper.hpp deleted file mode 100644 index 953d826..0000000 --- a/include/boost/mpl/aux_/preprocessed/mwcw/lambda_helper.hpp +++ /dev/null @@ -1,120 +0,0 @@ -// preprocessed version of 'boost/mpl/lambda_helper.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { - -template< - template< typename P1 > class F - , typename T1 - > -struct lambda_helper1 -{ - struct rebind - { - static int const arity = 1; - typedef T1 arg1; - - template< typename U1 > struct apply - : F<U1> - { - }; - }; -}; - -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - > -struct lambda_helper2 -{ - struct rebind - { - static int const arity = 2; - typedef T1 arg1; - typedef T2 arg2; - - template< typename U1, typename U2 > struct apply - : F< U1,U2 > - { - }; - }; -}; - -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - > -struct lambda_helper3 -{ - struct rebind - { - static int const arity = 3; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - - template< typename U1, typename U2, typename U3 > struct apply - : F< U1,U2,U3 > - { - }; - }; -}; - -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename T1, typename T2, typename T3, typename T4 - > -struct lambda_helper4 -{ - struct rebind - { - static int const arity = 4; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - typedef T4 arg4; - - template< - typename U1, typename U2, typename U3, typename U4 - > - struct apply - : F< U1,U2,U3,U4 > - { - }; - }; -}; - -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename T1, typename T2, typename T3, typename T4, typename T5 - > -struct lambda_helper5 -{ - struct rebind - { - static int const arity = 5; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - typedef T4 arg4; - typedef T5 arg5; - - template< - typename U1, typename U2, typename U3, typename U4 - , typename U5 - > - struct apply - : F< U1,U2,U3,U4,U5 > - { - }; - }; -}; - -} // namespace mpl -} // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp index 4a02653..76d3f3f 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp @@ -1,182 +1,198 @@ -// preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { -template< int arity_, bool Protect > struct lambda_impl +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ { - template< typename T, typename Tag > struct result_ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; + typedef is_placeholder<T> is_le; }; }; -template<> struct lambda_impl<1, false> +template<> struct lambda_impl< int_<1> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + typedef bind1< - f_ - , arg1 - > type; + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<1, true> +template<> struct lambda_impl< int_<2> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef mpl::protect< bind1< - f_ - , arg1 - > > type; - }; -}; - -template<> struct lambda_impl<2, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; typedef bind2< - f_ - , arg1, arg2 - > type; + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<2, true> +template<> struct lambda_impl< int_<3> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; - typedef mpl::protect< bind2< - f_ - , arg1, arg2 - > > type; - }; -}; - -template<> struct lambda_impl<3, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; typedef bind3< - f_ - , arg1, arg2, arg3 - > type; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<3, true> +template<> struct lambda_impl< int_<4> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; - typedef mpl::protect< bind3< - f_ - , arg1, arg2, arg3 - > > type; - }; -}; - -template<> struct lambda_impl<4, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; typedef bind4< - f_ - , arg1, arg2, arg3, arg4 - > type; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<4, true> +template<> struct lambda_impl< int_<5> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; - typedef mpl::protect< bind4< - f_ - , arg1, arg2, arg3, arg4 - > > type; - }; -}; - -template<> struct lambda_impl<5, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - typedef typename lambda< typename F::arg5, Tag, false >::type arg5; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; typedef bind5< - f_ - , arg1, arg2, arg3, arg4, arg5 - > type; - }; -}; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; -template<> struct lambda_impl<5, true> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - typedef typename lambda< typename F::arg5, Tag, false >::type arg5; - + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; - typedef mpl::protect< bind5< - f_ - , arg1, arg2, arg3, arg4, arg5 - > > type; + typedef typename type_::type type; }; }; @@ -184,19 +200,30 @@ template<> struct lambda_impl<5, true> template< typename T - , typename Tag = void_ - , bool Protect = true + , typename Tag + , typename Protect > struct lambda - : aux::lambda_impl< - ::boost::mpl::aux::template_arity<T>::value +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity<T>::type arity_; + typedef typename aux::lambda_impl<arity_> + ::template result_< T,Tag,Protect > l_; - , Protect + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; - >::template result_< T,Tag > +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le { }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/less.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/less.hpp new file mode 100644 index 0000000..75997da --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/less.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + : less_impl< + typename less_tag<N1>::type + , typename less_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/less_equal.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/less_equal.hpp new file mode 100644 index 0000000..ed8aae1 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/less_equal.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + : less_equal_impl< + typename less_equal_tag<N1>::type + , typename less_equal_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/list.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/list.hpp index 1a89231..4e8ad53 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/list.hpp @@ -1,14 +1,23 @@ -// preprocessed version of 'boost/mpl/list.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T0 = void_, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - , typename T6 = void_, typename T7 = void_, typename T8 = void_ - , typename T9 = void_ + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na > struct list; @@ -16,8 +25,8 @@ template< > struct list< - void_, void_, void_, void_, void_, void_, void_, void_, void_ - , void_ + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : list0< > { @@ -28,7 +37,8 @@ template< typename T0 > struct list< - T0, void_, void_, void_, void_, void_, void_, void_, void_, void_ + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : list1<T0> { @@ -38,7 +48,10 @@ struct list< template< typename T0, typename T1 > -struct list< T0,T1,void_,void_,void_,void_,void_,void_,void_,void_ > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; @@ -47,7 +60,10 @@ struct list< T0,T1,void_,void_,void_,void_,void_,void_,void_,void_ > template< typename T0, typename T1, typename T2 > -struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; @@ -56,7 +72,10 @@ struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > template< typename T0, typename T1, typename T2, typename T3 > -struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; @@ -65,7 +84,10 @@ struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > template< typename T0, typename T1, typename T2, typename T3, typename T4 > -struct list< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; @@ -75,7 +97,10 @@ template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > -struct list< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; @@ -85,7 +110,10 @@ template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > -struct list< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; @@ -95,7 +123,10 @@ template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > -struct list< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; @@ -105,24 +136,188 @@ template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > -struct list< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; -// primary template (not a specialization!) - template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > -struct list +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { - typedef list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > type; + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/list_c.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/list_c.hpp index 9f0f872..0b48a7f 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/list_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/list_c.hpp @@ -1,25 +1,34 @@ -// preprocessed version of 'boost/mpl/list_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T - , long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX - , long C9 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T - > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c<T> { @@ -27,12 +36,12 @@ struct list_c< }; template< - typename T - , long C0 + typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { @@ -40,12 +49,12 @@ struct list_c< }; template< - typename T - , long C0, long C1 + typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { @@ -53,12 +62,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2 + typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { @@ -66,12 +75,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3 + typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { @@ -79,12 +88,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3, long C4 + typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { @@ -92,11 +101,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { @@ -104,48 +114,215 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 > -struct list_c< T,C0,C1,C2,C3,C4,C5,C6,LONG_MAX,LONG_MAX,LONG_MAX > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 > -struct list_c< T,C0,C1,C2,C3,C4,C5,C6,C7,LONG_MAX,LONG_MAX > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 > -struct list_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,LONG_MAX > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; -// primary template (not a specialization!) template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 > -struct list_c +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/map.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/map.hpp new file mode 100644 index 0000000..1503c72 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/map.hpp @@ -0,0 +1,323 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1<T0> +{ + typedef typename map1<T0>::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/minus.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/minus.hpp new file mode 100644 index 0000000..7439877 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/minus.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag<N1>::type + , typename minus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/modulus.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/modulus.hpp new file mode 100644 index 0000000..e99421b --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/modulus.hpp @@ -0,0 +1,97 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + : modulus_impl< + typename modulus_tag<N1>::type + , typename modulus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/not_equal_to.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/not_equal_to.hpp new file mode 100644 index 0000000..39af532 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/not_equal_to.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + : not_equal_to_impl< + typename not_equal_to_tag<N1>::type + , typename not_equal_to_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/or.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/or.hpp index 517fbdf..31e1aaa 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/or.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/or.hpp @@ -1,5 +1,13 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { @@ -33,8 +41,8 @@ struct or_impl< } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ @@ -48,15 +56,14 @@ struct or_ BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ - , (T1, T2, T3, T4, T5) + , ( T1, T2, T3, T4, T5) ) }; -BOOST_MPL_AUX_VOID_SPEC_EXT( +BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) -}} // namespace boost::mpl - +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/placeholders.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/placeholders.hpp index 8c17ad3..4cb7d7d 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/placeholders.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/placeholders.hpp @@ -1,54 +1,78 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Aleksey Gurtovoy 2001-2003 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; -namespace placeholders { -using boost::mpl::_; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_) -// agurt, 17/mar/02: one more placeholder for the last 'apply#' -// specialization +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +}}} +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; -namespace placeholders { -using boost::mpl::_1; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_1) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; -namespace placeholders { -using boost::mpl::_2; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_2) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; -namespace placeholders { -using boost::mpl::_3; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_3) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; -namespace placeholders { -using boost::mpl::_4; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_4) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; -namespace placeholders { -using boost::mpl::_5; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_5) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; -namespace placeholders { -using boost::mpl::_6; -} - -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_6) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +}}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/plus.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/plus.hpp new file mode 100644 index 0000000..489dd41 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/plus.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag<N1>::type + , typename plus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/quote.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/quote.hpp index 18a937d..d7d0420 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/quote.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/quote.hpp @@ -1,12 +1,18 @@ -// preprocessed version of 'boost/mpl/quote.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// -template< typename T, bool has_type_ = aux::has_type<T>::value > +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< typename T, bool has_type_ > struct quote_impl - : T { }; @@ -25,7 +31,10 @@ struct quote1 { template< typename U1 > struct apply - : quote_impl< F<U1> > + : quote_impl< + F<U1> + , aux::has_type< F<U1> >::value + > { }; @@ -39,7 +48,10 @@ struct quote2 { template< typename U1, typename U2 > struct apply - : quote_impl< F<U1,U2> > + : quote_impl< + F< U1,U2 > + , aux::has_type< F< U1,U2 > >::value + > { }; @@ -53,7 +65,10 @@ struct quote3 { template< typename U1, typename U2, typename U3 > struct apply - : quote_impl< F<U1,U2,U3> > + : quote_impl< + F< U1,U2,U3 > + , aux::has_type< F< U1,U2,U3 > >::value + > { }; @@ -70,7 +85,10 @@ struct quote4 > struct apply - : quote_impl< F<U1,U2,U3,U4> > + : quote_impl< + F< U1,U2,U3,U4 > + , aux::has_type< F< U1,U2,U3,U4 > >::value + > { }; @@ -92,12 +110,14 @@ struct quote5 > struct apply - : quote_impl< F<U1,U2,U3,U4,U5> > + : quote_impl< + F< U1,U2,U3,U4,U5 > + , aux::has_type< F< U1,U2,U3,U4,U5 > >::value + > { }; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/reverse_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/reverse_fold_impl.hpp new file mode 100644 index 0000000..84c3d9c --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/reverse_fold_impl.hpp @@ -0,0 +1,231 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/Attic/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename iter3::type >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename iter3::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename iter3::type >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename iter3::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_fold_impl< + -1 + , typename next<First>::type + , Last + , typename apply2<ForwardOp,State, typename First::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename First::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/reverse_iter_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000..6d7439a --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/reverse_iter_fold_impl.hpp @@ -0,0 +1,231 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/Attic/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename next<iter1>::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename next<iter2>::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_iter_fold_impl< + -1 + , typename next<First>::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/set.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/set.hpp new file mode 100644 index 0000000..6c4ae6f --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/set.hpp @@ -0,0 +1,323 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1<T0> +{ + typedef typename set1<T0>::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/shift_left.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/shift_left.hpp new file mode 100644 index 0000000..c11fe41 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/shift_left.hpp @@ -0,0 +1,95 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + : shift_left_impl< + typename shift_left_tag<N1>::type + , typename shift_left_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename Shift > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(Shift)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/shift_right.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/shift_right.hpp new file mode 100644 index 0000000..5867998 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/shift_right.hpp @@ -0,0 +1,95 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + : shift_right_impl< + typename shift_right_tag<N1>::type + , typename shift_right_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename Shift > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(Shift)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp index f884bb3..a23fc23 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp @@ -1,3 +1,11 @@ -// preprocessed version of 'boost/mpl/aux_/template_arity.hpp' header -// see the original for copyright information + +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/times.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/times.hpp new file mode 100644 index 0000000..a6c3949 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/times.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag<N1>::type + , typename times_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/unpack_args.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/unpack_args.hpp new file mode 100644 index 0000000..a971f81 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/unpack_args.hpp @@ -0,0 +1,94 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size<Args>::value,F, Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/vector.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/vector.hpp index 35aaadf..bfa9565 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/vector.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/vector.hpp @@ -1,129 +1,323 @@ -// preprocessed version of 'boost/mpl/vector.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T0 = void_, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - , typename T6 = void_, typename T7 = void_, typename T8 = void_ - , typename T9 = void_ + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na > struct vector; template< - + > struct vector< - void_, void_, void_, void_, void_, void_, void_, void_, void_ - , void_ + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : vector0< > { - typedef vector0< > type; + typedef vector0< >::type type; }; template< typename T0 > struct vector< - T0, void_, void_, void_, void_, void_, void_, void_, void_, void_ + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : vector1<T0> { - typedef vector1<T0> type; + typedef typename vector1<T0>::type type; }; template< typename T0, typename T1 > struct vector< - T0, T1, void_, void_, void_, void_, void_, void_, void_, void_ + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : vector2< T0,T1 > { - typedef vector2< T0,T1 > type; + typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > -struct vector< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector3< T0,T1,T2 > { - typedef vector3< T0,T1,T2 > type; + typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > -struct vector< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector4< T0,T1,T2,T3 > { - typedef vector4< T0,T1,T2,T3 > type; + typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > -struct vector< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector5< T0,T1,T2,T3,T4 > { - typedef vector5< T0,T1,T2,T3,T4 > type; + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > -struct vector< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector6< T0,T1,T2,T3,T4,T5 > { - typedef vector6< T0,T1,T2,T3,T4,T5 > type; + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > -struct vector< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector7< T0,T1,T2,T3,T4,T5,T6 > { - typedef vector7< T0,T1,T2,T3,T4,T5,T6 > type; + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > -struct vector< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { - typedef vector8< T0,T1,T2,T3,T4,T5,T6,T7 > type; + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > -struct vector< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { - typedef vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > type; + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; -// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > -struct vector +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { - typedef vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > type; + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/vector_c.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/vector_c.hpp index ff6be1a..840c2e1 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/vector_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/vector_c.hpp @@ -1,153 +1,328 @@ -// preprocessed version of 'boost/mpl/vector_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T - , long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX - , long C9 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T - > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c<T> { - typedef vector0_c<T> type; + typedef typename vector0_c<T>::type type; }; template< - typename T - , long C0 + typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T,C0 > { - typedef vector1_c< T,C0 > type; + typedef typename vector1_c< T,C0 >::type type; }; template< - typename T - , long C0, long C1 + typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T,C0,C1 > { - typedef vector2_c< T,C0,C1 > type; + typedef typename vector2_c< T,C0,C1 >::type type; }; template< - typename T - , long C0, long C1, long C2 + typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T,C0,C1,C2 > { - typedef vector3_c< T,C0,C1,C2 > type; + typedef typename vector3_c< T,C0,C1,C2 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3 + typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T,C0,C1,C2,C3 > { - typedef vector4_c< T,C0,C1,C2,C3 > type; + typedef typename vector4_c< T,C0,C1,C2,C3 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4 + typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T,C0,C1,C2,C3,C4 > { - typedef vector5_c< T,C0,C1,C2,C3,C4 > type; + typedef typename vector5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T,C0,C1,C2,C3,C4,C5 > { - typedef vector6_c< T,C0,C1,C2,C3,C4,C5 > type; + typedef typename vector6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T,C0,C1,C2,C3,C4,C5,C6 > { - typedef vector7_c< T,C0,C1,C2,C3,C4,C5,C6 > type; + typedef typename vector7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 > -struct vector_c< T,C0,C1,C2,C3,C4,C5,C6,C7,LONG_MAX,LONG_MAX > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > : vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { - typedef vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > type; + typedef typename vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 > -struct vector_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,LONG_MAX > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { - typedef vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > type; + typedef typename vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; -// primary template (not a specialization!) template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 > -struct vector_c +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { - typedef vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > type; + typedef typename vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename vector11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename vector12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename vector13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename vector14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename vector15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename vector16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename vector17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename vector18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename vector19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename vector20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp index bea9b5f..26de94c 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp @@ -1,9 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/advance_backward.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> @@ -22,7 +28,7 @@ struct advance_backward<1> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; + typedef typename prior<iter0>::type iter1; typedef iter1 type; }; }; @@ -33,8 +39,8 @@ struct advance_backward<2> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; typedef iter2 type; }; }; @@ -45,9 +51,9 @@ struct advance_backward<3> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; - typedef typename iter2::prior iter3; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; + typedef typename prior<iter2>::type iter3; typedef iter3 type; }; }; @@ -58,10 +64,10 @@ struct advance_backward<4> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; - typedef typename iter2::prior iter3; - typedef typename iter3::prior iter4; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; + typedef typename prior<iter2>::type iter3; + typedef typename prior<iter3>::type iter4; typedef iter4 type; }; }; @@ -71,12 +77,21 @@ struct advance_backward { template< typename Iterator > struct apply { - typedef typename advance_backward<4>::template apply<Iterator>::type chunk_result_; - typedef typename advance_backward<( (N - 4) < 0 ? 0 : N - 4 )>::template apply<chunk_result_>::type type; + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp index accb46c..b137cc7 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp @@ -1,9 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/advance_forward.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> @@ -22,7 +28,7 @@ struct advance_forward<1> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef iter1 type; }; }; @@ -33,8 +39,8 @@ struct advance_forward<2> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; typedef iter2 type; }; }; @@ -45,9 +51,9 @@ struct advance_forward<3> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; - typedef typename iter2::next iter3; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; + typedef typename next<iter2>::type iter3; typedef iter3 type; }; }; @@ -58,10 +64,10 @@ struct advance_forward<4> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; - typedef typename iter2::next iter3; - typedef typename iter3::next iter4; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; + typedef typename next<iter2>::type iter3; + typedef typename next<iter3>::type iter4; typedef iter4 type; }; }; @@ -71,12 +77,21 @@ struct advance_forward { template< typename Iterator > struct apply { - typedef typename advance_forward<4>::template apply<Iterator>::type chunk_result_; - typedef typename advance_forward<( (N - 4) < 0 ? 0 : N - 4 )>::template apply<chunk_result_>::type type; + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/and.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/and.hpp index 3a041a9..555c800 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/and.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/and.hpp @@ -1,10 +1,17 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { - template< bool C_ > struct and_impl { template< @@ -22,12 +29,11 @@ template<> struct and_impl<true> typename T1, typename T2, typename T3, typename T4 > struct result_ - : and_impl< + : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,true_ > { }; - }; template<> @@ -40,13 +46,13 @@ struct and_impl<true> } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ - : aux::and_impl< + : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,T5 > @@ -54,15 +60,14 @@ struct and_ BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ - , (T1, T2, T3, T4, T5) + , ( T1, T2, T3, T4, T5) ) }; -BOOST_MPL_AUX_VOID_SPEC_EXT( +BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) -}} // namespace boost::mpl - +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp index 12f7018..763e1d7 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp @@ -1,28 +1,37 @@ -// preprocessed version of 'boost/mpl/apply.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// -namespace aux { -template< int arity_ > struct apply_impl_chooser; -} +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! -template< typename F > -struct apply0 : F +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda<F>::type + + > { - static int const arity = 1; typedef F arg1; - friend class apply0_rebind; - typedef apply0_rebind rebind; - }; - class apply0_rebind { public: template< typename U1 > struct apply : apply0<U1> { }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) }; namespace aux { template<> -struct apply_impl_chooser<0> +struct apply_chooser<0> { template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -31,7 +40,7 @@ struct apply_impl_chooser<0> struct result_ { typedef apply0< - F + F > type; }; }; @@ -42,23 +51,23 @@ template< typename F, typename T1 > struct apply1 - : F::template apply< - T1 + + : apply_wrap1< + typename lambda<F>::type + , T1 > { - static int const arity = 2; typedef F arg1; - typedef T1 arg2; - friend class apply1_rebind; - typedef apply1_rebind rebind; - }; - class apply1_rebind { public: template< typename U1, typename U2 > struct apply : apply1< U1,U2 > { }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) }; namespace aux { template<> -struct apply_impl_chooser<1> +struct apply_chooser<1> { template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -78,24 +87,23 @@ template< typename F, typename T1, typename T2 > struct apply2 - : F::template apply< - T1, T2 + + : apply_wrap2< + typename lambda<F>::type + , T1, T2 > { - static int const arity = 3; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - friend class apply2_rebind; - typedef apply2_rebind rebind; - }; - class apply2_rebind { public: template< typename U1, typename U2, typename U3 > struct apply : apply2< U1,U2,U3 > { }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) }; namespace aux { template<> -struct apply_impl_chooser<2> +struct apply_chooser<2> { template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -115,25 +123,23 @@ template< typename F, typename T1, typename T2, typename T3 > struct apply3 - : F::template apply< - T1, T2, T3 + + : apply_wrap3< + typename lambda<F>::type + , T1, T2, T3 > { - static int const arity = 4; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - typedef T3 arg4; - friend class apply3_rebind; - typedef apply3_rebind rebind; - }; - class apply3_rebind { public: template< typename U1, typename U2, typename U3, typename U4 > struct apply : apply3< U1,U2,U3,U4 > { }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) }; namespace aux { template<> -struct apply_impl_chooser<3> +struct apply_chooser<3> { template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -153,26 +159,23 @@ template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 - : F::template apply< - T1, T2, T3, T4 + + : apply_wrap4< + typename lambda<F>::type + , T1, T2, T3, T4 > { - static int const arity = 5; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - typedef T3 arg4; - typedef T4 arg5; - friend class apply4_rebind; - typedef apply4_rebind rebind; - }; - class apply4_rebind { public: template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply : apply4< U1,U2,U3,U4,U5 > { }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) }; namespace aux { template<> -struct apply_impl_chooser<4> +struct apply_chooser<4> { template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -193,27 +196,23 @@ template< , typename T5 > struct apply5 - : F::template apply< - T1, T2, T3, T4, T5 + + : apply_wrap5< + typename lambda<F>::type + , T1, T2, T3, T4, T5 > { - static int const arity = 6; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - typedef T3 arg4; - typedef T4 arg5; - typedef T5 arg6; - friend class apply5_rebind; - typedef apply5_rebind rebind; - }; - class apply5_rebind { public: template< typename U1, typename U2, typename U3, typename U4, typename U5, typename U6 > struct apply : apply5< U1,U2,U3,U4,U5,U6 > { }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) }; namespace aux { template<> -struct apply_impl_chooser<5> +struct apply_chooser<5> { template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -238,7 +237,7 @@ struct is_apply_arg }; template<> -struct is_apply_arg<void_> +struct is_apply_arg<na> { static bool const value = false; }; @@ -253,21 +252,21 @@ struct apply_count_args + is_apply_arg<T3>::value + is_apply_arg<T4>::value + is_apply_arg<T5>::value ; + }; -} // namespace aux +} template< - typename F, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na > struct apply - : aux::apply_impl_chooser< + : aux::apply_chooser< aux::apply_count_args< T1,T2,T3,T4,T5 >::value >::template result_< F,T1,T2,T3,T4,T5 >::type { }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp new file mode 100644 index 0000000..4870abe --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp @@ -0,0 +1,50 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< BOOST_AUX_NTTP_DECL(int, arity_) > struct apply_chooser; +} + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp new file mode 100644 index 0000000..47882ad --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp @@ -0,0 +1,70 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply_wrap0 + + : F::template apply< > +{ +}; + +template< + typename F, typename T1 + > +struct apply_wrap1 + + : F::template apply<T1> +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap2 + + : F::template apply< T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap3 + + : F::template apply< T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap4 + + : F::template apply< T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap5 + + : F::template apply< T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp index d7097f8..4e404a6 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp @@ -1,26 +1,30 @@ -// preprocessed version of 'boost/mpl/arg.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-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) +// -template<> struct arg<-1> +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > { static int const value = -1; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -28,20 +32,17 @@ template<> struct arg<1> { static int const value = 1; typedef arg<2> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -49,20 +50,17 @@ template<> struct arg<2> { static int const value = 2; typedef arg<3> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -70,20 +68,17 @@ template<> struct arg<3> { static int const value = 3; typedef arg<4> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -91,20 +86,17 @@ template<> struct arg<4> { static int const value = 4; typedef arg<5> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -112,25 +104,20 @@ template<> struct arg<5> { static int const value = 5; typedef arg<6> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; -BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1, int, arg) - -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp index 7633a27..0860c33 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp @@ -1,11 +1,16 @@ -// preprocessed version of 'boost/mpl/bind.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-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) +// -BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) -BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< bool > @@ -30,7 +35,10 @@ struct resolve_arg_impl<true> > struct result_ { - typedef typename T::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< + T + , U1, U2, U3, U4, U5 + >::type type; }; }; @@ -41,24 +49,12 @@ template< , typename U5 > struct resolve_bind_arg - : resolve_arg_impl< is_bind_template<T >::value > + : resolve_arg_impl< is_bind_template<T>::value > ::template result_< T,U1,U2,U3,U4,U5 > { }; -} // namespace aux - -template< - typename F, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - > -struct bind; - -template< typename F, typename T > struct bind1st; -template< typename F, typename T > struct bind2nd; - -namespace aux { -template< int arity_ > struct bind_impl_chooser; +template< int arity_ > struct bind_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect<T>*); @@ -72,9 +68,6 @@ aux::yes_tag is_bind_helper(bind< F,T1,T2,T3,T4,T5 >*); template< int N > aux::yes_tag is_bind_helper(arg<N>*); -template< typename F, typename T > aux::yes_tag is_bind_helper(bind1st< F,T >*); -template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*); - template< bool is_ref_ = true > struct is_bind_template_impl { @@ -105,22 +98,14 @@ template< typename T > struct is_bind_template } // namespace aux -BOOST_MPL_AUX_ARITY_SPEC( - 6 - , bind - ) - -BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) -BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) - template< typename F > struct bind0 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { @@ -128,7 +113,10 @@ struct bind0 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: - typedef typename f_::type type; + typedef typename apply_wrap0< + f_ + >::type type; + }; }; @@ -147,7 +135,7 @@ BOOST_MPL_AUX_ARITY_SPEC(1, bind0) namespace aux { template<> -struct bind_impl_chooser<0> +struct bind_chooser<0> { template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -167,17 +155,21 @@ template< struct bind1 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: - typedef typename f_::template apply<t1>::type type; + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + }; }; @@ -196,7 +188,7 @@ BOOST_MPL_AUX_ARITY_SPEC(2, bind1) namespace aux { template<> -struct bind_impl_chooser<1> +struct bind_chooser<1> { template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -216,18 +208,22 @@ template< struct bind2 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: - typedef typename f_::template apply< t1,t2 >::type type; + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + }; }; @@ -246,7 +242,7 @@ BOOST_MPL_AUX_ARITY_SPEC(3, bind2) namespace aux { template<> -struct bind_impl_chooser<2> +struct bind_chooser<2> { template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -266,19 +262,23 @@ template< struct bind3 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: - typedef typename f_::template apply< t1,t2,t3 >::type type; + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + }; }; @@ -297,7 +297,7 @@ BOOST_MPL_AUX_ARITY_SPEC(4, bind3) namespace aux { template<> -struct bind_impl_chooser<3> +struct bind_chooser<3> { template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -317,20 +317,25 @@ template< struct bind4 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; - typedef typename aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 >::type t4; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: - typedef typename f_::template apply< t1,t2,t3,t4 >::type type; + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + }; }; @@ -349,7 +354,7 @@ BOOST_MPL_AUX_ARITY_SPEC(5, bind4) namespace aux { template<> -struct bind_impl_chooser<4> +struct bind_chooser<4> { template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -370,21 +375,26 @@ template< struct bind5 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; - typedef typename aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 >::type t4; - typedef typename aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 >::type t5; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: - typedef typename f_::template apply< t1,t2,t3,t4,t5 >::type type; + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + }; }; @@ -404,7 +414,7 @@ BOOST_MPL_AUX_ARITY_SPEC(6, bind5) namespace aux { template<> -struct bind_impl_chooser<5> +struct bind_chooser<5> { template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -427,7 +437,7 @@ struct is_bind_arg }; template<> -struct is_bind_arg<void_> +struct is_bind_arg<na> { static bool const value = false; }; @@ -452,40 +462,15 @@ template< , typename T5 > struct bind - : aux::bind_impl_chooser< + : aux::bind_chooser< aux::bind_count_args< T1,T2,T3,T4,T5 >::value >::template result_< F,T1,T2,T3,T4,T5 >::type { }; -template< typename F, typename T > -struct bind1st -{ - template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ - > - struct apply - : F::template apply< T,U > - { - }; -}; - -template< typename F, typename T > -struct bind2nd -{ - template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ - > - struct apply - : F::template apply< U,T > - { - }; -}; - -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_ARITY_SPEC( + 6 + , bind + ) +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp index 927f386..9a47ab1 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp @@ -1,11 +1,16 @@ -// preprocessed version of 'boost/mpl/bind.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-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) +// -BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) -BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< bool > @@ -30,7 +35,10 @@ struct resolve_arg_impl<true> > struct result_ { - typedef typename T::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< + T + , U1, U2, U3, U4, U5 + >::type type; }; }; @@ -41,7 +49,7 @@ template< , typename U5 > struct resolve_bind_arg - : resolve_arg_impl< is_bind_template<T >::value > + : resolve_arg_impl< is_bind_template<T>::value > ::template result_< T,U1,U2,U3,U4,U5 > { }; @@ -51,17 +59,17 @@ struct replace_unnamed_arg_impl { template< typename Arg > struct result_ { - typedef Arg next_arg; + typedef Arg next; typedef T type; }; }; template<> -struct replace_unnamed_arg_impl< arg<-1> > +struct replace_unnamed_arg_impl< arg< -1 > > { template< typename Arg > struct result_ { - typedef typename Arg::next next_arg; + typedef typename next<Arg>::type next; typedef Arg type; }; }; @@ -72,19 +80,7 @@ struct replace_unnamed_arg { }; -} // namespace aux - -template< - typename F, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - > -struct bind; - -template< typename F, typename T > struct bind1st; -template< typename F, typename T > struct bind2nd; - -namespace aux { -template< int arity_ > struct bind_impl_chooser; +template< int arity_ > struct bind_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect<T>*); @@ -98,9 +94,6 @@ aux::yes_tag is_bind_helper(bind< F,T1,T2,T3,T4,T5 >*); template< int N > aux::yes_tag is_bind_helper(arg<N>*); -template< typename F, typename T > aux::yes_tag is_bind_helper(bind1st< F,T >*); -template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*); - template< bool is_ref_ = true > struct is_bind_template_impl { @@ -131,33 +124,28 @@ template< typename T > struct is_bind_template } // namespace aux -BOOST_MPL_AUX_ARITY_SPEC( - 6 - , bind - ) - -BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) -BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) - template< typename F > struct bind0 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// public: - typedef typename f_::type type; + typedef typename apply_wrap0< + f_ + >::type type; + }; }; @@ -176,7 +164,7 @@ BOOST_MPL_AUX_ARITY_SPEC(1, bind0) namespace aux { template<> -struct bind_impl_chooser<0> +struct bind_chooser<0> { template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -196,24 +184,28 @@ template< struct bind1 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// public: - typedef typename f_::template apply<t1>::type type; + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + }; }; @@ -232,7 +224,7 @@ BOOST_MPL_AUX_ARITY_SPEC(2, bind1) namespace aux { template<> -struct bind_impl_chooser<1> +struct bind_chooser<1> { template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -252,29 +244,33 @@ template< struct bind2 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// public: - typedef typename f_::template apply< t1,t2 >::type type; + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + }; }; @@ -293,7 +289,7 @@ BOOST_MPL_AUX_ARITY_SPEC(3, bind2) namespace aux { template<> -struct bind_impl_chooser<2> +struct bind_chooser<2> { template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -313,34 +309,38 @@ template< struct bind3 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// public: - typedef typename f_::template apply< t1,t2,t3 >::type type; + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + }; }; @@ -359,7 +359,7 @@ BOOST_MPL_AUX_ARITY_SPEC(4, bind3) namespace aux { template<> -struct bind_impl_chooser<3> +struct bind_chooser<3> { template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -379,39 +379,44 @@ template< struct bind4 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; - typedef typename r4::next_arg n5; - typedef typename aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 >::type t4; - + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// public: - typedef typename f_::template apply< t1,t2,t3,t4 >::type type; + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + }; }; @@ -430,7 +435,7 @@ BOOST_MPL_AUX_ARITY_SPEC(5, bind4) namespace aux { template<> -struct bind_impl_chooser<4> +struct bind_chooser<4> { template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -451,44 +456,49 @@ template< struct bind5 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; - typedef typename r4::next_arg n5; - typedef typename aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 >::type t4; - + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; - typedef typename r5::next_arg n6; - typedef typename aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 >::type t5; - + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// public: - typedef typename f_::template apply< t1,t2,t3,t4,t5 >::type type; + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + }; }; @@ -508,7 +518,7 @@ BOOST_MPL_AUX_ARITY_SPEC(6, bind5) namespace aux { template<> -struct bind_impl_chooser<5> +struct bind_chooser<5> { template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -531,7 +541,7 @@ struct is_bind_arg }; template<> -struct is_bind_arg<void_> +struct is_bind_arg<na> { static bool const value = false; }; @@ -556,40 +566,15 @@ template< , typename T5 > struct bind - : aux::bind_impl_chooser< + : aux::bind_chooser< aux::bind_count_args< T1,T2,T3,T4,T5 >::value >::template result_< F,T1,T2,T3,T4,T5 >::type { }; -template< typename F, typename T > -struct bind1st -{ - template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ - > - struct apply - : F::template apply< T,U > - { - }; -}; - -template< typename F, typename T > -struct bind2nd -{ - template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ - > - struct apply - : F::template apply< U,T > - { - }; -}; - -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_ARITY_SPEC( + 6 + , bind + ) +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp new file mode 100644 index 0000000..d80a72b --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp @@ -0,0 +1,52 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct bind; + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp new file mode 100644 index 0000000..d004083 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp @@ -0,0 +1,98 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct bitand_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct bitand_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitand_ + : bitand_impl< + typename bitand_tag<N1>::type + , typename bitand_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitand_, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp new file mode 100644 index 0000000..e9cc382 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp @@ -0,0 +1,98 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct bitor_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct bitor_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitor_ + : bitor_impl< + typename bitor_tag<N1>::type + , typename bitor_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitor_, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp new file mode 100644 index 0000000..a879cb8 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp @@ -0,0 +1,98 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct bitxor_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct bitxor_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct bitxor_ + : bitxor_impl< + typename bitxor_tag<N1>::type + , typename bitxor_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitxor_, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp new file mode 100644 index 0000000..0f33c6c --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp @@ -0,0 +1,97 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct divides_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct divides_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct divides + : divides_impl< + typename divides_tag<N1>::type + , typename divides_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, divides, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp new file mode 100644 index 0000000..b30e1f3 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct equal_to_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct equal_to_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + : equal_to_impl< + typename equal_to_tag<N1>::type + , typename equal_to_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/fold_backward_impl.hpp deleted file mode 100644 index 87ff2fc..0000000 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/fold_backward_impl.hpp +++ /dev/null @@ -1,298 +0,0 @@ -// preprocessed version of 'boost/mpl/aux_/fold_backward_impl.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { -namespace aux { - -// forward declaration -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl; - -template< long N > -struct fold_backward_chunk; - -template<> -struct fold_backward_chunk<0> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef fwd_state0 bkwd_state0; - typedef bkwd_state0 state; - typedef iter0 iterator; - }; - -}; - -template<> -struct fold_backward_chunk<1> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply<fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - - - typedef fwd_state1 bkwd_state1; - typedef typename BackwardOp::template apply<bkwd_state1, typename iter0::type>::type bkwd_state0; - typedef bkwd_state0 state; - typedef iter1 iterator; - }; - -}; - -template<> -struct fold_backward_chunk<2> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply<fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - - - typedef fwd_state2 bkwd_state2; - typedef typename BackwardOp::template apply<bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename BackwardOp::template apply<bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter2 iterator; - }; - -}; - -template<> -struct fold_backward_chunk<3> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply<fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply<fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - - - typedef fwd_state3 bkwd_state3; - typedef typename BackwardOp::template apply<bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename BackwardOp::template apply<bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename BackwardOp::template apply<bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter3 iterator; - }; - -}; - -template<> -struct fold_backward_chunk<4> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply<fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply<fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply<fwd_state3, typename iter3::type>::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fwd_state4 bkwd_state4; - typedef typename BackwardOp::template apply<bkwd_state4, typename iter3::type>::type bkwd_state3; - typedef typename BackwardOp::template apply<bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename BackwardOp::template apply<bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename BackwardOp::template apply<bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter4 iterator; - }; - -}; - -template< long N > -struct fold_backward_chunk -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply<fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply<fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply<fwd_state3, typename iter3::type>::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fold_backward_impl< - ( (N - 4) < 0 ? 0 : N - 4 ) - , iter4 - , Last - , fwd_state4 - , BackwardOp - , ForwardOp - > nested_chunk; - - typedef typename nested_chunk::state bkwd_state4; - typedef typename BackwardOp::template apply<bkwd_state4, typename iter3::type>::type bkwd_state3; - typedef typename BackwardOp::template apply<bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename BackwardOp::template apply<bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename BackwardOp::template apply<bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef typename nested_chunk::iterator iterator; - }; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_step; - -template< - typename Last - , typename State - > -struct fold_backward_null_step -{ - typedef Last iterator; - typedef State state; -}; - -template<> -struct fold_backward_chunk< -1 > -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef typename if_< - typename is_same< First,Last >::type - , fold_backward_null_step< Last,State > - , fold_backward_step< First,Last,State,BackwardOp,ForwardOp > - >::type res_; - - typedef typename res_::state state; - typedef typename res_::iterator iterator; - }; - -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_step -{ - typedef fold_backward_chunk< -1 >::template result_< - typename First::next - , Last - - ,typename ForwardOp::template apply<State, typename First::type>::type - , BackwardOp - , ForwardOp - > nested_step; - - typedef typename BackwardOp::template apply<typename nested_step::state, typename First::type>::type state; - typedef typename nested_step::iterator iterator; -}; - -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl - : fold_backward_chunk<N> - ::template result_< First,Last,State,BackwardOp,ForwardOp > -{ -}; - -} // namespace aux -} // namespace mpl -} // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp index cff26e6..c0aca30 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp @@ -1,25 +1,31 @@ -// preprocessed version of 'boost/mpl/aux_/fold_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration -// forward declaration template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct fold_impl; -template< long N > +template< int N > struct fold_chunk; -template<> -struct fold_chunk<0> +template<> struct fold_chunk<0> { template< typename First @@ -34,11 +40,9 @@ struct fold_chunk<0> typedef state0 state; typedef iter0 iterator; }; - }; -template<> -struct fold_chunk<1> +template<> struct fold_chunk<1> { template< typename First @@ -50,18 +54,16 @@ struct fold_chunk<1> { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply<state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; typedef state1 state; typedef iter1 iterator; }; - }; -template<> -struct fold_chunk<2> +template<> struct fold_chunk<2> { template< typename First @@ -73,20 +75,18 @@ struct fold_chunk<2> { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply<state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<state1, typename iter1::type>::type state2; - typedef typename iter1::next iter2; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; typedef state2 state; typedef iter2 iterator; }; - }; -template<> -struct fold_chunk<3> +template<> struct fold_chunk<3> { template< typename First @@ -98,22 +98,20 @@ struct fold_chunk<3> { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply<state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<state1, typename iter1::type>::type state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply<state2, typename iter2::type>::type state3; - typedef typename iter2::next iter3; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; + typedef typename next<iter2>::type iter3; typedef state3 state; typedef iter3 iterator; }; - }; -template<> -struct fold_chunk<4> +template<> struct fold_chunk<4> { template< typename First @@ -125,23 +123,22 @@ struct fold_chunk<4> { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply<state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<state1, typename iter1::type>::type state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply<state2, typename iter2::type>::type state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply<state3, typename iter3::type>::type state4; - typedef typename iter3::next iter4; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4; + typedef typename next<iter3>::type iter4; typedef state4 state; typedef iter4 iterator; }; - }; -template< long N > +template< int N > struct fold_chunk { template< @@ -149,7 +146,7 @@ struct fold_chunk , typename Last , typename State , typename ForwardOp - > + > struct result_ { typedef fold_impl< @@ -178,7 +175,7 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct fold_step; template< @@ -191,7 +188,7 @@ struct fold_null_step typedef State state; }; -template<> +template<> struct fold_chunk< -1 > { template< @@ -199,7 +196,7 @@ struct fold_chunk< -1 > , typename Last , typename State , typename ForwardOp - > + > struct result_ { typedef typename if_< @@ -211,7 +208,6 @@ struct fold_chunk< -1 > typedef typename res_::state state; typedef typename res_::iterator iterator; }; - }; template< @@ -219,14 +215,13 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct fold_step { typedef fold_chunk< -1 >::template result_< - typename First::next + typename next<First>::type , Last - - ,typename ForwardOp::template apply<State, typename First::type>::type + , typename apply2<ForwardOp,State, typename deref<First>::type>::type , ForwardOp > chunk_; @@ -235,19 +230,16 @@ struct fold_step }; template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct fold_impl : fold_chunk<N> ::template result_< First,Last,State,ForwardOp > { }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp index 5534ac2..89d946e 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp @@ -1,30 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/full_lambda.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Aleksey Gurtovoy 2001-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) +// -template< - typename T - , typename Tag - , typename Protect = false_ - - > -struct lambda_impl -{ - typedef false_ is_le; - typedef T type; -}; +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! -template< - typename T - , typename Tag = void_ - - > -struct lambda - : lambda_impl< T,Tag,false_ > -{ -}; +namespace boost { namespace mpl { namespace aux { @@ -45,44 +30,56 @@ struct lambda_or< false,false,false,false,false > } // namespace aux -template< int N, typename Tag, typename Protect > -struct lambda_impl< arg<N>,Tag,Protect > +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg<N>, Tag > { typedef true_ is_le; - typedef arg<N> type; + typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41 + typedef protect<result_> type; }; template< typename F , typename Tag - , typename Protect - > -struct lambda_impl< - bind0<F> - , Tag - , Protect > +struct lambda< + bind0<F> + , Tag + + > { typedef false_ is_le; typedef bind0< F - > type; -}; + > result_; -template< - template< typename P1 > class F - , typename T1 - , typename Tag - > -struct lambda< F<T1>,Tag > - : lambda_impl< F<T1>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > @@ -90,33 +87,24 @@ struct le_result1 { typedef F< typename L1::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1 > class F - , typename Tag + typename Tag + , template< typename P1 > class F , typename L1 > -struct le_result1< true_,Tag,false_,F,L1 > +struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > - , typename L1::type - > type; -}; + , typename L1::result_ + > result_; -template< - template< typename P1 > class F - , typename Tag - , typename L1 - > -struct le_result1< true_,Tag,true_,F,L1 > -{ - typedef protect< bind1< - quote1< F,Tag > - , typename L1::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -125,58 +113,50 @@ template< template< typename P1 > class F , typename T1 , typename Tag - , typename Protect > -struct lambda_impl< - F<T1>, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef aux::lambda_or< - l1::is_le::value - > is_le; - - typedef typename aux::le_result1< - typename is_le::type +struct lambda< + F<T1> , Tag - , Protect - , F - , l1 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag - , typename Protect - > -struct lambda_impl< - bind1< F,T1 > - , Tag - , Protect > +struct lambda< + bind1< F,T1 > + , Tag + + > { typedef false_ is_le; typedef bind1< F , T1 - > type; -}; + > result_; -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - , typename Tag - > -struct lambda< F<T1,T2>,Tag > - : lambda_impl< F<T1,T2>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > @@ -184,33 +164,24 @@ struct le_result2 { typedef F< typename L1::type, typename L2::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true_,Tag,false_,F,L1,L2 > +struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > - , typename L1::type, typename L2::type - > type; -}; + , typename L1::result_, typename L2::result_ + > result_; -template< - template< typename P1, typename P2 > class F - , typename Tag - , typename L1, typename L2 - > -struct le_result2< true_,Tag,true_,F,L1,L2 > -{ - typedef protect< bind2< - quote2< F,Tag > - , typename L1::type, typename L2::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -219,60 +190,55 @@ template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value - > is_le; - - typedef typename aux::le_result2< - typename is_le::type +struct lambda< + F< T1,T2 > , Tag - , Protect - , F - , l1, l2 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag - , typename Protect - > -struct lambda_impl< - bind2< F,T1,T2 > - , Tag - , Protect > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > { typedef false_ is_le; typedef bind2< F , T1, T2 - > type; -}; + > result_; -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - , typename Tag - > -struct lambda< F<T1,T2,T3>,Tag > - : lambda_impl< F<T1,T2,T3>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > @@ -280,33 +246,24 @@ struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2, typename P3 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true_,Tag,false_,F,L1,L2,L3 > +struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; -template< - template< typename P1, typename P2, typename P3 > class F - , typename Tag - , typename L1, typename L2, typename L3 - > -struct le_result3< true_,Tag,true_,F,L1,L2,L3 > -{ - typedef protect< bind3< - quote3< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -315,61 +272,57 @@ template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - > is_le; - - typedef typename aux::le_result3< - typename is_le::type +struct lambda< + F< T1,T2,T3 > , Tag - , Protect - , F - , l1, l2, l3 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag - , typename Protect - > -struct lambda_impl< - bind3< F,T1,T2,T3 > - , Tag - , Protect > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 - > type; -}; + > result_; -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename T1, typename T2, typename T3, typename T4 - , typename Tag - > -struct lambda< F<T1,T2,T3,T4>,Tag > - : lambda_impl< F<T1,T2,T3,T4>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > @@ -378,35 +331,25 @@ struct le_result4 typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename Tag - , typename L1, typename L2, typename L3, typename L4 - > -struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 > -{ - typedef protect< bind4< - quote4< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -415,67 +358,59 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - typedef lambda_impl< T4,Tag > l4; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - , l4::is_le::value - > is_le; - - typedef typename aux::le_result4< - typename is_le::type +struct lambda< + F< T1,T2,T3,T4 > , Tag - , Protect - , F - , l1, l2, l3, l4 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag - , typename Protect - > -struct lambda_impl< - bind4< F,T1,T2,T3,T4 > - , Tag - , Protect > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 - > type; -}; + > result_; -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename T1, typename T2, typename T3, typename T4, typename T5 - , typename Tag - > -struct lambda< F<T1,T2,T3,T4,T5>,Tag > - : lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > @@ -484,43 +419,25 @@ struct le_result5 typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type - > type; + > result_; + + typedef result_ type; }; template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type, typename L5::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename Tag - , typename L1, typename L2, typename L3, typename L4, typename L5 - > -struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 > -{ - typedef protect< bind5< - quote5< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type, typename L5::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -533,100 +450,105 @@ template< class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4,T5 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - typedef lambda_impl< T4,Tag > l4; - typedef lambda_impl< T5,Tag > l5; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - , l4::is_le::value, l5::is_le::value - > is_le; - - typedef typename aux::le_result5< - typename is_le::type +struct lambda< + F< T1,T2,T3,T4,T5 > , Tag - , Protect - , F - , l1, l2, l3, l4, l5 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag - , typename Protect - > -struct lambda_impl< - bind5< F,T1,T2,T3,T4,T5 > - , Tag - , Protect > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 - > type; + > result_; + + typedef result_ type; }; -// special case for 'protect' -template< typename T, typename Tag, typename Protect > -struct lambda_impl< protect<T>,Tag,Protect > +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< protect<T>, Tag > { typedef false_ is_le; - typedef protect<T> type; + typedef protect<T> result_; + typedef result_ type; }; -// specializations for main 'bind', 'bind1st' and 'bind2nd' forms +/// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag - , typename Protect - > -struct lambda_impl< - bind< F,T1,T2,T3,T4,T5 > - , Tag - , Protect - > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > { typedef false_ is_le; - typedef bind< F,T1,T2,T3,T4,T5 > type; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; }; +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars + template< - typename F, typename T - , typename Tag - , typename Protect + typename F, typename Tag1, typename Tag2 > -struct lambda_impl< bind1st<F,T>,Tag,Protect > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > { - typedef false_ is_le; - typedef bind1st< F,T > type; + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef aux::le_result2<is_le, Tag2, mpl::lambda, l1, l2> le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; -template< - typename F, typename T - , typename Tag - , typename Protect - > -struct lambda_impl< bind2nd<F,T>,Tag,Protect > -{ - typedef false_ is_le; - typedef bind2nd< F,T > type; -}; +BOOST_MPL_AUX_NA_SPEC(2, lambda) -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp new file mode 100644 index 0000000..f2f25f7 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct greater_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct greater_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + : greater_impl< + typename greater_tag<N1>::type + , typename greater_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp new file mode 100644 index 0000000..c13fcb8 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct greater_equal_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct greater_equal_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + : greater_equal_impl< + typename greater_equal_tag<N1>::type + , typename greater_equal_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp new file mode 100644 index 0000000..233a1ec --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp @@ -0,0 +1,166 @@ + +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< bool C1, bool C2 > +struct inherit2_impl +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T1, T2 + { + typedef Derived type_; + }; +}; + +template<> +struct inherit2_impl< false,true > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T1 + { + typedef T1 type_; + }; +}; + +template<> +struct inherit2_impl< true,false > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + : T2 + { + typedef T2 type_; + }; +}; + +template<> +struct inherit2_impl< true,true > +{ + template< typename Derived, typename T1, typename T2 > struct result_ + { + typedef T1 type_; + }; +}; + +} // namespace aux + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : aux::inherit2_impl< + is_empty_base<T1>::value + , is_empty_base<T2>::value + >::template result_< inherit2< T1,T2 >,T1, T2 > +{ + typedef typename inherit2::type_ type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_backward_impl.hpp deleted file mode 100644 index c9ff2ca..0000000 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_backward_impl.hpp +++ /dev/null @@ -1,297 +0,0 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_backward_impl.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { -namespace aux { - -// forward declaration -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl; - -template< long N > -struct iter_fold_backward_chunk; - -template<> -struct iter_fold_backward_chunk<0> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef fwd_state0 bkwd_state0; - typedef bkwd_state0 state; - typedef iter0 iterator; - }; - -}; - -template<> -struct iter_fold_backward_chunk<1> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply< fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; - - - typedef fwd_state1 bkwd_state1; - typedef typename BackwardOp::template apply< bkwd_state1,iter0 >::type bkwd_state0; - typedef bkwd_state0 state; - typedef iter1 iterator; - }; - -}; - -template<> -struct iter_fold_backward_chunk<2> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply< fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; - - - typedef fwd_state2 bkwd_state2; - typedef typename BackwardOp::template apply< bkwd_state2,iter1 >::type bkwd_state1; - typedef typename BackwardOp::template apply< bkwd_state1,iter0 >::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter2 iterator; - }; - -}; - -template<> -struct iter_fold_backward_chunk<3> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply< fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply< fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; - - - typedef fwd_state3 bkwd_state3; - typedef typename BackwardOp::template apply< bkwd_state3,iter2 >::type bkwd_state2; - typedef typename BackwardOp::template apply< bkwd_state2,iter1 >::type bkwd_state1; - typedef typename BackwardOp::template apply< bkwd_state1,iter0 >::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter3 iterator; - }; - -}; - -template<> -struct iter_fold_backward_chunk<4> -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply< fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply< fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply< fwd_state3,iter3 >::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fwd_state4 bkwd_state4; - typedef typename BackwardOp::template apply< bkwd_state4,iter3 >::type bkwd_state3; - typedef typename BackwardOp::template apply< bkwd_state3,iter2 >::type bkwd_state2; - typedef typename BackwardOp::template apply< bkwd_state2,iter1 >::type bkwd_state1; - typedef typename BackwardOp::template apply< bkwd_state1,iter0 >::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter4 iterator; - }; - -}; - -template< long N > -struct iter_fold_backward_chunk -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply< fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply< fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply< fwd_state3,iter3 >::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef iter_fold_backward_impl< - ( (N - 4) < 0 ? 0 : N - 4 ) - , iter4 - , Last - , fwd_state4 - , BackwardOp - , ForwardOp - > nested_chunk; - - typedef typename nested_chunk::state bkwd_state4; - typedef typename BackwardOp::template apply< bkwd_state4,iter3 >::type bkwd_state3; - typedef typename BackwardOp::template apply< bkwd_state3,iter2 >::type bkwd_state2; - typedef typename BackwardOp::template apply< bkwd_state2,iter1 >::type bkwd_state1; - typedef typename BackwardOp::template apply< bkwd_state1,iter0 >::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef typename nested_chunk::iterator iterator; - }; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_step; - -template< - typename Last - , typename State - > -struct iter_fold_backward_null_step -{ - typedef Last iterator; - typedef State state; -}; - -template<> -struct iter_fold_backward_chunk< -1 > -{ - template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > - struct result_ - { - typedef typename if_< - typename is_same< First,Last >::type - , iter_fold_backward_null_step< Last,State > - , iter_fold_backward_step< First,Last,State,BackwardOp,ForwardOp > - >::type res_; - - typedef typename res_::state state; - typedef typename res_::iterator iterator; - }; - -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_step -{ - typedef iter_fold_backward_chunk< -1 >::template result_< - typename First::next - , Last - , typename ForwardOp::template apply< State,First >::type - , BackwardOp - , ForwardOp - > nested_step; - - typedef typename BackwardOp::template apply<typename nested_step::state, First>::type state; - typedef typename nested_step::iterator iterator; -}; - -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl - : iter_fold_backward_chunk<N> - ::template result_< First,Last,State,BackwardOp,ForwardOp > -{ -}; - -} // namespace aux -} // namespace mpl -} // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp index db74e48..6951795 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp @@ -1,9 +1,16 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_if_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step @@ -23,7 +30,7 @@ struct iter_fold_if_step_impl > struct result_ { - typedef typename StateOp::template apply< State,Iterator >::type state; + typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; @@ -52,10 +59,10 @@ template< > struct iter_fold_if_forward_step { - typedef typename Predicate::template apply< State,Iterator >::type not_last; + typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator, State, ForwardOp, mpl::next< Iterator> > impl_; + >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; @@ -69,10 +76,10 @@ template< > struct iter_fold_if_backward_step { - typedef typename Predicate::template apply< State,Iterator >::type not_last; + typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_; + >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; @@ -95,7 +102,7 @@ struct iter_fold_if_impl typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; - + typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< @@ -123,7 +130,4 @@ struct iter_fold_if_impl typedef typename backward_step4::iterator iterator; }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp index b78025d..6177d99 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp @@ -1,25 +1,31 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration -// forward declaration template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl; -template< long N > +template< int N > struct iter_fold_chunk; -template<> -struct iter_fold_chunk<0> +template<> struct iter_fold_chunk<0> { template< typename First @@ -34,11 +40,9 @@ struct iter_fold_chunk<0> typedef state0 state; typedef iter0 iterator; }; - }; -template<> -struct iter_fold_chunk<1> +template<> struct iter_fold_chunk<1> { template< typename First @@ -50,18 +54,16 @@ struct iter_fold_chunk<1> { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply< state0,iter0 >::type state1; - typedef typename iter0::next iter1; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; typedef state1 state; typedef iter1 iterator; }; - }; -template<> -struct iter_fold_chunk<2> +template<> struct iter_fold_chunk<2> { template< typename First @@ -73,20 +75,18 @@ struct iter_fold_chunk<2> { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply< state0,iter0 >::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< state1,iter1 >::type state2; - typedef typename iter1::next iter2; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename next<iter1>::type iter2; typedef state2 state; typedef iter2 iterator; }; - }; -template<> -struct iter_fold_chunk<3> +template<> struct iter_fold_chunk<3> { template< typename First @@ -98,22 +98,20 @@ struct iter_fold_chunk<3> { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply< state0,iter0 >::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< state1,iter1 >::type state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply< state2,iter2 >::type state3; - typedef typename iter2::next iter3; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename next<iter2>::type iter3; typedef state3 state; typedef iter3 iterator; }; - }; -template<> -struct iter_fold_chunk<4> +template<> struct iter_fold_chunk<4> { template< typename First @@ -125,23 +123,22 @@ struct iter_fold_chunk<4> { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply< state0,iter0 >::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< state1,iter1 >::type state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply< state2,iter2 >::type state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply< state3,iter3 >::type state4; - typedef typename iter3::next iter4; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename next<iter3>::type iter4; typedef state4 state; typedef iter4 iterator; }; - }; -template< long N > +template< int N > struct iter_fold_chunk { template< @@ -149,7 +146,7 @@ struct iter_fold_chunk , typename Last , typename State , typename ForwardOp - > + > struct result_ { typedef iter_fold_impl< @@ -178,7 +175,7 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_step; template< @@ -191,7 +188,7 @@ struct iter_fold_null_step typedef State state; }; -template<> +template<> struct iter_fold_chunk< -1 > { template< @@ -199,7 +196,7 @@ struct iter_fold_chunk< -1 > , typename Last , typename State , typename ForwardOp - > + > struct result_ { typedef typename if_< @@ -211,7 +208,6 @@ struct iter_fold_chunk< -1 > typedef typename res_::state state; typedef typename res_::iterator iterator; }; - }; template< @@ -219,13 +215,13 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_step { typedef iter_fold_chunk< -1 >::template result_< - typename First::next + typename next<First>::type , Last - , typename ForwardOp::template apply< State,First >::type + , typename apply2< ForwardOp,State,First >::type , ForwardOp > chunk_; @@ -234,19 +230,16 @@ struct iter_fold_step }; template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl : iter_fold_chunk<N> ::template result_< First,Last,State,ForwardOp > { }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/lambda_helper.hpp deleted file mode 100644 index 953d826..0000000 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/lambda_helper.hpp +++ /dev/null @@ -1,120 +0,0 @@ -// preprocessed version of 'boost/mpl/lambda_helper.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { - -template< - template< typename P1 > class F - , typename T1 - > -struct lambda_helper1 -{ - struct rebind - { - static int const arity = 1; - typedef T1 arg1; - - template< typename U1 > struct apply - : F<U1> - { - }; - }; -}; - -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - > -struct lambda_helper2 -{ - struct rebind - { - static int const arity = 2; - typedef T1 arg1; - typedef T2 arg2; - - template< typename U1, typename U2 > struct apply - : F< U1,U2 > - { - }; - }; -}; - -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - > -struct lambda_helper3 -{ - struct rebind - { - static int const arity = 3; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - - template< typename U1, typename U2, typename U3 > struct apply - : F< U1,U2,U3 > - { - }; - }; -}; - -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename T1, typename T2, typename T3, typename T4 - > -struct lambda_helper4 -{ - struct rebind - { - static int const arity = 4; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - typedef T4 arg4; - - template< - typename U1, typename U2, typename U3, typename U4 - > - struct apply - : F< U1,U2,U3,U4 > - { - }; - }; -}; - -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename T1, typename T2, typename T3, typename T4, typename T5 - > -struct lambda_helper5 -{ - struct rebind - { - static int const arity = 5; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - typedef T4 arg4; - typedef T5 arg5; - - template< - typename U1, typename U2, typename U3, typename U4 - , typename U5 - > - struct apply - : F< U1,U2,U3,U4,U5 > - { - }; - }; -}; - -} // namespace mpl -} // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp index 4a02653..76d3f3f 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp @@ -1,182 +1,198 @@ -// preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { -template< int arity_, bool Protect > struct lambda_impl +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ { - template< typename T, typename Tag > struct result_ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; + typedef is_placeholder<T> is_le; }; }; -template<> struct lambda_impl<1, false> +template<> struct lambda_impl< int_<1> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + typedef bind1< - f_ - , arg1 - > type; + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<1, true> +template<> struct lambda_impl< int_<2> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef mpl::protect< bind1< - f_ - , arg1 - > > type; - }; -}; - -template<> struct lambda_impl<2, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; typedef bind2< - f_ - , arg1, arg2 - > type; + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<2, true> +template<> struct lambda_impl< int_<3> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; - typedef mpl::protect< bind2< - f_ - , arg1, arg2 - > > type; - }; -}; - -template<> struct lambda_impl<3, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; typedef bind3< - f_ - , arg1, arg2, arg3 - > type; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<3, true> +template<> struct lambda_impl< int_<4> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; - typedef mpl::protect< bind3< - f_ - , arg1, arg2, arg3 - > > type; - }; -}; - -template<> struct lambda_impl<4, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; typedef bind4< - f_ - , arg1, arg2, arg3, arg4 - > type; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<4, true> +template<> struct lambda_impl< int_<5> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; - typedef mpl::protect< bind4< - f_ - , arg1, arg2, arg3, arg4 - > > type; - }; -}; - -template<> struct lambda_impl<5, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - typedef typename lambda< typename F::arg5, Tag, false >::type arg5; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; typedef bind5< - f_ - , arg1, arg2, arg3, arg4, arg5 - > type; - }; -}; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; -template<> struct lambda_impl<5, true> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - typedef typename lambda< typename F::arg5, Tag, false >::type arg5; - + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; - typedef mpl::protect< bind5< - f_ - , arg1, arg2, arg3, arg4, arg5 - > > type; + typedef typename type_::type type; }; }; @@ -184,19 +200,30 @@ template<> struct lambda_impl<5, true> template< typename T - , typename Tag = void_ - , bool Protect = true + , typename Tag + , typename Protect > struct lambda - : aux::lambda_impl< - ::boost::mpl::aux::template_arity<T>::value +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity<T>::type arity_; + typedef typename aux::lambda_impl<arity_> + ::template result_< T,Tag,Protect > l_; - , Protect + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; - >::template result_< T,Tag > +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le { }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/less.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/less.hpp new file mode 100644 index 0000000..69689ac --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/less.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct less_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct less_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + : less_impl< + typename less_tag<N1>::type + , typename less_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp new file mode 100644 index 0000000..5018dcb --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct less_equal_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct less_equal_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + : less_equal_impl< + typename less_equal_tag<N1>::type + , typename less_equal_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/list.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/list.hpp index 5879ab9..ed2e8bc 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/list.hpp @@ -1,26 +1,39 @@ -// preprocessed version of 'boost/mpl/list.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + namespace aux { -template< int N > struct list_impl_chooser; +template< int N > +struct list_chooser; + } namespace aux { template<> -struct list_impl_chooser<0> +struct list_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef typename list0< + typedef list0< >::type type; + }; }; @@ -29,17 +42,20 @@ struct list_impl_chooser<0> namespace aux { template<> -struct list_impl_chooser<1> +struct list_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list1< T0 >::type type; + }; }; @@ -48,17 +64,20 @@ struct list_impl_chooser<1> namespace aux { template<> -struct list_impl_chooser<2> +struct list_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list2< T0, T1 >::type type; + }; }; @@ -67,17 +86,20 @@ struct list_impl_chooser<2> namespace aux { template<> -struct list_impl_chooser<3> +struct list_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list3< T0, T1, T2 >::type type; + }; }; @@ -86,17 +108,20 @@ struct list_impl_chooser<3> namespace aux { template<> -struct list_impl_chooser<4> +struct list_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list4< T0, T1, T2, T3 >::type type; + }; }; @@ -105,17 +130,20 @@ struct list_impl_chooser<4> namespace aux { template<> -struct list_impl_chooser<5> +struct list_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list5< T0, T1, T2, T3, T4 >::type type; + }; }; @@ -124,17 +152,20 @@ struct list_impl_chooser<5> namespace aux { template<> -struct list_impl_chooser<6> +struct list_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list6< T0, T1, T2, T3, T4, T5 >::type type; + }; }; @@ -143,17 +174,20 @@ struct list_impl_chooser<6> namespace aux { template<> -struct list_impl_chooser<7> +struct list_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list7< T0, T1, T2, T3, T4, T5, T6 >::type type; + }; }; @@ -162,17 +196,20 @@ struct list_impl_chooser<7> namespace aux { template<> -struct list_impl_chooser<8> +struct list_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; + }; }; @@ -181,17 +218,20 @@ struct list_impl_chooser<8> namespace aux { template<> -struct list_impl_chooser<9> +struct list_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; + }; }; @@ -200,17 +240,240 @@ struct list_impl_chooser<9> namespace aux { template<> -struct list_impl_chooser<10> +struct list_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + }; }; @@ -225,7 +488,7 @@ struct is_list_arg }; template<> -struct is_list_arg<void_> +struct is_list_arg<na> { static bool const value = false; }; @@ -233,6 +496,8 @@ struct is_list_arg<void_> template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 > struct list_count_args { @@ -241,7 +506,12 @@ struct list_count_args + is_list_arg<T3>::value + is_list_arg<T4>::value + is_list_arg<T5>::value + is_list_arg<T6>::value + is_list_arg<T7>::value + is_list_arg<T8>::value - + is_list_arg<T9>::value + is_list_arg<T10>::value + + is_list_arg<T9>::value + is_list_arg<T10>::value + + is_list_arg<T11>::value + is_list_arg<T12>::value + + is_list_arg<T13>::value + is_list_arg<T14>::value + + is_list_arg<T15>::value + is_list_arg<T16>::value + + is_list_arg<T17>::value + is_list_arg<T18>::value + + is_list_arg<T19>::value + is_list_arg<T20>::value ; }; @@ -249,31 +519,38 @@ struct list_count_args template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list_impl { - typedef aux::list_count_args< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > arg_num_; - typedef typename aux::list_impl_chooser< - arg_num_::value - >::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; + typedef aux::list_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::list_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< - typename T0 = void_, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - , typename T6 = void_, typename T7 = void_, typename T8 = void_ - , typename T9 = void_ + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na > struct list - : aux::list_impl< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type + : aux::list_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type { typedef typename aux::list_impl< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp index 28b2615..3580528 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp @@ -1,28 +1,38 @@ -// preprocessed version of 'boost/mpl/list_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { -template< int N > struct list_c_impl_chooser; +template< int N > +struct list_c_chooser; + } namespace aux { template<> -struct list_c_impl_chooser<0> +struct list_c_chooser<0> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list0_c< - T + T >::type type; + }; }; @@ -31,18 +41,19 @@ struct list_c_impl_chooser<0> namespace aux { template<> -struct list_c_impl_chooser<1> +struct list_c_chooser<1> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list1_c< T, C0 >::type type; + }; }; @@ -51,18 +62,19 @@ struct list_c_impl_chooser<1> namespace aux { template<> -struct list_c_impl_chooser<2> +struct list_c_chooser<2> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list2_c< T, C0, C1 >::type type; + }; }; @@ -71,18 +83,19 @@ struct list_c_impl_chooser<2> namespace aux { template<> -struct list_c_impl_chooser<3> +struct list_c_chooser<3> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list3_c< T, C0, C1, C2 >::type type; + }; }; @@ -91,18 +104,19 @@ struct list_c_impl_chooser<3> namespace aux { template<> -struct list_c_impl_chooser<4> +struct list_c_chooser<4> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list4_c< T, C0, C1, C2, C3 >::type type; + }; }; @@ -111,18 +125,19 @@ struct list_c_impl_chooser<4> namespace aux { template<> -struct list_c_impl_chooser<5> +struct list_c_chooser<5> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list5_c< T, C0, C1, C2, C3, C4 >::type type; + }; }; @@ -131,18 +146,19 @@ struct list_c_impl_chooser<5> namespace aux { template<> -struct list_c_impl_chooser<6> +struct list_c_chooser<6> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list6_c< T, C0, C1, C2, C3, C4, C5 >::type type; + }; }; @@ -151,18 +167,19 @@ struct list_c_impl_chooser<6> namespace aux { template<> -struct list_c_impl_chooser<7> +struct list_c_chooser<7> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list7_c< T, C0, C1, C2, C3, C4, C5, C6 >::type type; + }; }; @@ -171,18 +188,19 @@ struct list_c_impl_chooser<7> namespace aux { template<> -struct list_c_impl_chooser<8> +struct list_c_chooser<8> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list8_c< T, C0, C1, C2, C3, C4, C5, C6, C7 >::type type; + }; }; @@ -191,18 +209,19 @@ struct list_c_impl_chooser<8> namespace aux { template<> -struct list_c_impl_chooser<9> +struct list_c_chooser<9> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list9_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8 >::type type; + }; }; @@ -211,18 +230,19 @@ struct list_c_impl_chooser<9> namespace aux { template<> -struct list_c_impl_chooser<10> +struct list_c_chooser<10> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list10_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 >::type type; + }; }; @@ -230,7 +250,217 @@ struct list_c_impl_chooser<10> namespace aux { -template< long T > +template<> +struct list_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list11_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list12_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list13_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct list_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > struct is_list_c_arg { static bool const value = true; @@ -243,49 +473,62 @@ struct is_list_c_arg<LONG_MAX> }; template< - long T1, long T2, long T3, long T4, long T5, long T6, long T7, long T8 - , long T9, long T10 + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 > struct list_c_count_args { static int const value = - is_list_c_arg<T1>::value + is_list_c_arg<T2>::value - + is_list_c_arg<T3>::value + is_list_c_arg<T4>::value - + is_list_c_arg<T5>::value + is_list_c_arg<T6>::value - + is_list_c_arg<T7>::value + is_list_c_arg<T8>::value - + is_list_c_arg<T9>::value + is_list_c_arg<T10>::value + is_list_c_arg<C1>::value + is_list_c_arg<C2>::value + + is_list_c_arg<C3>::value + is_list_c_arg<C4>::value + + is_list_c_arg<C5>::value + is_list_c_arg<C6>::value + + is_list_c_arg<C7>::value + is_list_c_arg<C8>::value + + is_list_c_arg<C9>::value + is_list_c_arg<C10>::value + + is_list_c_arg<C11>::value + is_list_c_arg<C12>::value + + is_list_c_arg<C13>::value + is_list_c_arg<C14>::value + + is_list_c_arg<C15>::value + is_list_c_arg<C16>::value + + is_list_c_arg<C17>::value + is_list_c_arg<C18>::value + + is_list_c_arg<C19>::value + is_list_c_arg<C20>::value ; + }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c_impl { - typedef aux::list_c_count_args< C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > arg_num_; - typedef typename aux::list_c_impl_chooser< arg_num_::value > - ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; + typedef aux::list_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::list_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< - typename T - , long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX - , long C9 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c - : aux::list_c_impl< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type + : aux::list_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type { typedef typename aux::list_c_impl< - T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/map.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/map.hpp new file mode 100644 index 0000000..baaf8cb --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/map.hpp @@ -0,0 +1,556 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct map_chooser; + +} + +namespace aux { + +template<> +struct map_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef map0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct map_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_map_arg +{ + static bool const value = true; +}; + +template<> +struct is_map_arg<na> +{ + static bool const value = false; +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct map_count_args +{ + static int const value = + is_map_arg<T1>::value + is_map_arg<T2>::value + + is_map_arg<T3>::value + is_map_arg<T4>::value + + is_map_arg<T5>::value + is_map_arg<T6>::value + + is_map_arg<T7>::value + is_map_arg<T8>::value + + is_map_arg<T9>::value + is_map_arg<T10>::value + + is_map_arg<T11>::value + is_map_arg<T12>::value + + is_map_arg<T13>::value + is_map_arg<T14>::value + + is_map_arg<T15>::value + is_map_arg<T16>::value + + is_map_arg<T17>::value + is_map_arg<T18>::value + + is_map_arg<T19>::value + is_map_arg<T20>::value + ; + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map_impl +{ + typedef aux::map_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::map_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map + : aux::map_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::map_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp new file mode 100644 index 0000000..226bb21 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp @@ -0,0 +1,97 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct minus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct minus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct minus + : minus_impl< + typename minus_tag<N1>::type + , typename minus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, minus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp new file mode 100644 index 0000000..965383b --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp @@ -0,0 +1,97 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct modulus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct modulus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + : modulus_impl< + typename modulus_tag<N1>::type + , typename modulus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp new file mode 100644 index 0000000..a0ce6e1 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct not_equal_to_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct not_equal_to_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + : not_equal_to_impl< + typename not_equal_to_tag<N1>::type + , typename not_equal_to_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/or.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/or.hpp index b59b95f..3f7394e 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/or.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/or.hpp @@ -1,10 +1,17 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { - template< bool C_ > struct or_impl { template< @@ -22,12 +29,11 @@ template<> struct or_impl<false> typename T1, typename T2, typename T3, typename T4 > struct result_ - : or_impl< + : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,false_ > { }; - }; template<> @@ -40,13 +46,13 @@ struct or_impl<false> } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ - : aux::or_impl< + : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,T5 > @@ -54,15 +60,14 @@ struct or_ BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ - , (T1, T2, T3, T4, T5) + , ( T1, T2, T3, T4, T5) ) }; -BOOST_MPL_AUX_VOID_SPEC_EXT( +BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) -}} // namespace boost::mpl - +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp index 8c17ad3..4cb7d7d 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp @@ -1,54 +1,78 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Aleksey Gurtovoy 2001-2003 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; -namespace placeholders { -using boost::mpl::_; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_) -// agurt, 17/mar/02: one more placeholder for the last 'apply#' -// specialization +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +}}} +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; -namespace placeholders { -using boost::mpl::_1; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_1) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; -namespace placeholders { -using boost::mpl::_2; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_2) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; -namespace placeholders { -using boost::mpl::_3; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_3) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; -namespace placeholders { -using boost::mpl::_4; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_4) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; -namespace placeholders { -using boost::mpl::_5; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_5) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; -namespace placeholders { -using boost::mpl::_6; -} - -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_6) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +}}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp new file mode 100644 index 0000000..4a56b78 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp @@ -0,0 +1,97 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct plus_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct plus_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct plus + : plus_impl< + typename plus_tag<N1>::type + , typename plus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, plus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp index 9b67617..b85880f 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/quote.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< bool > struct quote_impl { template< typename T > struct result_ @@ -42,8 +49,8 @@ struct quote2 { template< typename U1, typename U2 > struct apply - : quote_impl< aux::has_type< F<U1,U2> >::value > - ::template result_< F<U1,U2> > + : quote_impl< aux::has_type< F< U1,U2 > >::value > + ::template result_< F< U1,U2 > > { }; @@ -57,8 +64,8 @@ struct quote3 { template< typename U1, typename U2, typename U3 > struct apply - : quote_impl< aux::has_type< F<U1,U2,U3> >::value > - ::template result_< F<U1,U2,U3> > + : quote_impl< aux::has_type< F< U1,U2,U3 > >::value > + ::template result_< F< U1,U2,U3 > > { }; @@ -75,8 +82,8 @@ struct quote4 > struct apply - : quote_impl< aux::has_type< F<U1,U2,U3,U4> >::value > - ::template result_< F<U1,U2,U3,U4> > + : quote_impl< aux::has_type< F< U1,U2,U3,U4 > >::value > + ::template result_< F< U1,U2,U3,U4 > > { }; @@ -98,13 +105,12 @@ struct quote5 > struct apply - : quote_impl< aux::has_type< F<U1,U2,U3,U4,U5> >::value > - ::template result_< F<U1,U2,U3,U4,U5> > + : quote_impl< aux::has_type< F< U1,U2,U3,U4,U5 > >::value > + ::template result_< F< U1,U2,U3,U4,U5 > > { }; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp new file mode 100644 index 0000000..9f6512a --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp @@ -0,0 +1,295 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/Attic/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< long N > +struct reverse_fold_chunk; + +template<> struct reverse_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename iter3::type >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename iter3::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename iter3::type >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename iter3::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step; + +template< + typename Last + , typename State + > +struct reverse_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_fold_null_step< Last,State > + , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_step +{ + typedef reverse_fold_chunk< -1 >::template result_< + typename next<First>::type + , Last + , typename apply2<ForwardOp,State, typename First::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename First::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl + : reverse_fold_chunk<N> + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000..1429a5b --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp @@ -0,0 +1,295 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/Attic/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< long N > +struct reverse_iter_fold_chunk; + +template<> struct reverse_iter_fold_chunk<0> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<2> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename next<iter1>::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<3> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename next<iter2>::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; + }; +}; + +template<> struct reverse_iter_fold_chunk<4> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; + }; +}; + +template< long N > +struct reverse_iter_fold_chunk +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step; + +template< + typename Last + , typename State + > +struct reverse_iter_fold_null_step +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct reverse_iter_fold_chunk< -1 > +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same< First,Last >::type + , reverse_iter_fold_null_step< Last,State > + , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_step +{ + typedef reverse_iter_fold_chunk< -1 >::template result_< + typename next<First>::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl + : reverse_iter_fold_chunk<N> + ::template result_< First,Last,State,BackwardOp,ForwardOp > +{ +}; + +}}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/set.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/set.hpp new file mode 100644 index 0000000..980875e --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/set.hpp @@ -0,0 +1,556 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { +template< int N > +struct set_chooser; + +} + +namespace aux { + +template<> +struct set_chooser<0> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef set0< + + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<1> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set1< + T0 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<2> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set2< + T0, T1 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<3> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set3< + T0, T1, T2 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<4> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set4< + T0, T1, T2, T3 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<5> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set5< + T0, T1, T2, T3, T4 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<6> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set6< + T0, T1, T2, T3, T4, T5 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<7> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<8> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<9> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<10> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct set_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< typename T > +struct is_set_arg +{ + static bool const value = true; +}; + +template<> +struct is_set_arg<na> +{ + static bool const value = false; +}; + +template< + typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 + > +struct set_count_args +{ + static int const value = + is_set_arg<T1>::value + is_set_arg<T2>::value + + is_set_arg<T3>::value + is_set_arg<T4>::value + + is_set_arg<T5>::value + is_set_arg<T6>::value + + is_set_arg<T7>::value + is_set_arg<T8>::value + + is_set_arg<T9>::value + is_set_arg<T10>::value + + is_set_arg<T11>::value + is_set_arg<T12>::value + + is_set_arg<T13>::value + is_set_arg<T14>::value + + is_set_arg<T15>::value + is_set_arg<T16>::value + + is_set_arg<T17>::value + is_set_arg<T18>::value + + is_set_arg<T19>::value + is_set_arg<T20>::value + ; + +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set_impl +{ + typedef aux::set_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::set_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +} // namespace aux + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set + : aux::set_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type +{ + typedef typename aux::set_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp new file mode 100644 index 0000000..57435e5 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp @@ -0,0 +1,95 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct shift_left_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct shift_left_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + : shift_left_impl< + typename shift_left_tag<N1>::type + , typename shift_left_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename Shift > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(Shift)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp new file mode 100644 index 0000000..51538c9 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp @@ -0,0 +1,95 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct shift_right_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct shift_right_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + : shift_right_impl< + typename shift_right_tag<N1>::type + , typename shift_right_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename Shift > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(Shift)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp index 30b7209..3303b57 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp @@ -1,5 +1,13 @@ -// preprocessed version of 'boost/mpl/aux_/template_arity.hpp' header -// see the original for copyright information + +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { @@ -7,8 +15,8 @@ template< bool > struct template_arity_impl { template< typename F > struct result_ + : int_< -1 > { - static int const value = -1; }; }; @@ -16,9 +24,8 @@ template<> struct template_arity_impl<true> { template< typename F > struct result_ + : F::arity { - static int const value = F::arity; - }; }; @@ -29,5 +36,5 @@ struct template_arity { }; -}}} // namespace boost::mpl::aux +}}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/times.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/times.hpp new file mode 100644 index 0000000..327fd42 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/times.hpp @@ -0,0 +1,97 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct times_impl< na,integral_c_tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template<> struct times_impl< integral_c_tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct times + : times_impl< + typename times_tag<N1>::type + , typename times_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, times, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp new file mode 100644 index 0000000..f481d79 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp @@ -0,0 +1,109 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl +{ + template< typename F, typename Args > struct apply; +}; + +template<> struct unpack_args_impl<0> +{ + template< typename F, typename Args > struct apply + : apply0< + F + > + { + }; +}; + +template<> struct unpack_args_impl<1> +{ + template< typename F, typename Args > struct apply + : apply1< + F + , typename at_c< Args,0 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<2> +{ + template< typename F, typename Args > struct apply + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<3> +{ + template< typename F, typename Args > struct apply + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<4> +{ + template< typename F, typename Args > struct apply + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > + { + }; +}; + +template<> struct unpack_args_impl<5> +{ + template< typename F, typename Args > struct apply + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > + { + }; +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size<Args>::value > + ::template apply< F,Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp index 5963415..9c89828 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp @@ -1,27 +1,39 @@ -// preprocessed version of 'boost/mpl/vector.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { -template< int N > struct vector_impl_chooser; +template< int N > +struct vector_chooser; + } namespace aux { template<> -struct vector_impl_chooser<0> +struct vector_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef vector0< - - > type; + + >::type type; + }; }; @@ -30,17 +42,20 @@ struct vector_impl_chooser<0> namespace aux { template<> -struct vector_impl_chooser<1> +struct vector_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector1< - T0 - > type; + typedef typename vector1< + T0 + >::type type; + }; }; @@ -49,17 +64,20 @@ struct vector_impl_chooser<1> namespace aux { template<> -struct vector_impl_chooser<2> +struct vector_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector2< - T0, T1 - > type; + typedef typename vector2< + T0, T1 + >::type type; + }; }; @@ -68,17 +86,20 @@ struct vector_impl_chooser<2> namespace aux { template<> -struct vector_impl_chooser<3> +struct vector_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector3< - T0, T1, T2 - > type; + typedef typename vector3< + T0, T1, T2 + >::type type; + }; }; @@ -87,17 +108,20 @@ struct vector_impl_chooser<3> namespace aux { template<> -struct vector_impl_chooser<4> +struct vector_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector4< - T0, T1, T2, T3 - > type; + typedef typename vector4< + T0, T1, T2, T3 + >::type type; + }; }; @@ -106,17 +130,20 @@ struct vector_impl_chooser<4> namespace aux { template<> -struct vector_impl_chooser<5> +struct vector_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector5< - T0, T1, T2, T3, T4 - > type; + typedef typename vector5< + T0, T1, T2, T3, T4 + >::type type; + }; }; @@ -125,17 +152,20 @@ struct vector_impl_chooser<5> namespace aux { template<> -struct vector_impl_chooser<6> +struct vector_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector6< - T0, T1, T2, T3, T4, T5 - > type; + typedef typename vector6< + T0, T1, T2, T3, T4, T5 + >::type type; + }; }; @@ -144,17 +174,20 @@ struct vector_impl_chooser<6> namespace aux { template<> -struct vector_impl_chooser<7> +struct vector_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector7< - T0, T1, T2, T3, T4, T5, T6 - > type; + typedef typename vector7< + T0, T1, T2, T3, T4, T5, T6 + >::type type; + }; }; @@ -163,17 +196,20 @@ struct vector_impl_chooser<7> namespace aux { template<> -struct vector_impl_chooser<8> +struct vector_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector8< - T0, T1, T2, T3, T4, T5, T6, T7 - > type; + typedef typename vector8< + T0, T1, T2, T3, T4, T5, T6, T7 + >::type type; + }; }; @@ -182,17 +218,20 @@ struct vector_impl_chooser<8> namespace aux { template<> -struct vector_impl_chooser<9> +struct vector_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector9< - T0, T1, T2, T3, T4, T5, T6, T7, T8 - > type; + typedef typename vector9< + T0, T1, T2, T3, T4, T5, T6, T7, T8 + >::type type; + }; }; @@ -201,17 +240,240 @@ struct vector_impl_chooser<9> namespace aux { template<> -struct vector_impl_chooser<10> +struct vector_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { - typedef vector10< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 - > type; + typedef typename vector10< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<11> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector11< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<12> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector12< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<13> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector13< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<14> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector14< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<15> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<16> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<17> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<18> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<19> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_chooser<20> +{ + template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > + struct result_ + { + typedef typename vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type type; + }; }; @@ -226,7 +488,7 @@ struct is_vector_arg }; template<> -struct is_vector_arg<void_> +struct is_vector_arg<na> { static bool const value = false; }; @@ -234,6 +496,8 @@ struct is_vector_arg<void_> template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 + , typename T11, typename T12, typename T13, typename T14, typename T15 + , typename T16, typename T17, typename T18, typename T19, typename T20 > struct vector_count_args { @@ -242,37 +506,51 @@ struct vector_count_args + is_vector_arg<T3>::value + is_vector_arg<T4>::value + is_vector_arg<T5>::value + is_vector_arg<T6>::value + is_vector_arg<T7>::value + is_vector_arg<T8>::value - + is_vector_arg<T9>::value + is_vector_arg<T10>::value + + is_vector_arg<T9>::value + is_vector_arg<T10>::value + + is_vector_arg<T11>::value + is_vector_arg<T12>::value + + is_vector_arg<T13>::value + is_vector_arg<T14>::value + + is_vector_arg<T15>::value + is_vector_arg<T16>::value + + is_vector_arg<T17>::value + is_vector_arg<T18>::value + + is_vector_arg<T19>::value + is_vector_arg<T20>::value ; + }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector_impl { - typedef aux::vector_count_args< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > arg_num_; - typedef typename aux::vector_impl_chooser< arg_num_::value > - ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; + typedef aux::vector_count_args< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + > arg_num_; + + typedef typename aux::vector_chooser< arg_num_::value > + ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< - typename T0 = void_, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - , typename T6 = void_, typename T7 = void_, typename T8 = void_ - , typename T9 = void_ + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na > struct vector - : aux::vector_impl< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type + : aux::vector_impl< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 + >::type { typedef typename aux::vector_impl< - T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp index 10d08b3..e355f55 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp @@ -1,28 +1,38 @@ -// preprocessed version of 'boost/mpl/vector_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { -template< int N > struct vector_c_impl_chooser; +template< int N > +struct vector_c_chooser; + } namespace aux { template<> -struct vector_c_impl_chooser<0> +struct vector_c_chooser<0> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector0_c< - T - > type; + typedef typename vector0_c< + T + >::type type; + }; }; @@ -31,18 +41,19 @@ struct vector_c_impl_chooser<0> namespace aux { template<> -struct vector_c_impl_chooser<1> +struct vector_c_chooser<1> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector1_c< + typedef typename vector1_c< T, C0 - > type; + >::type type; + }; }; @@ -51,18 +62,19 @@ struct vector_c_impl_chooser<1> namespace aux { template<> -struct vector_c_impl_chooser<2> +struct vector_c_chooser<2> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector2_c< + typedef typename vector2_c< T, C0, C1 - > type; + >::type type; + }; }; @@ -71,18 +83,19 @@ struct vector_c_impl_chooser<2> namespace aux { template<> -struct vector_c_impl_chooser<3> +struct vector_c_chooser<3> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector3_c< + typedef typename vector3_c< T, C0, C1, C2 - > type; + >::type type; + }; }; @@ -91,18 +104,19 @@ struct vector_c_impl_chooser<3> namespace aux { template<> -struct vector_c_impl_chooser<4> +struct vector_c_chooser<4> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector4_c< + typedef typename vector4_c< T, C0, C1, C2, C3 - > type; + >::type type; + }; }; @@ -111,18 +125,19 @@ struct vector_c_impl_chooser<4> namespace aux { template<> -struct vector_c_impl_chooser<5> +struct vector_c_chooser<5> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector5_c< + typedef typename vector5_c< T, C0, C1, C2, C3, C4 - > type; + >::type type; + }; }; @@ -131,18 +146,19 @@ struct vector_c_impl_chooser<5> namespace aux { template<> -struct vector_c_impl_chooser<6> +struct vector_c_chooser<6> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector6_c< + typedef typename vector6_c< T, C0, C1, C2, C3, C4, C5 - > type; + >::type type; + }; }; @@ -151,18 +167,19 @@ struct vector_c_impl_chooser<6> namespace aux { template<> -struct vector_c_impl_chooser<7> +struct vector_c_chooser<7> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector7_c< + typedef typename vector7_c< T, C0, C1, C2, C3, C4, C5, C6 - > type; + >::type type; + }; }; @@ -171,18 +188,19 @@ struct vector_c_impl_chooser<7> namespace aux { template<> -struct vector_c_impl_chooser<8> +struct vector_c_chooser<8> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector8_c< + typedef typename vector8_c< T, C0, C1, C2, C3, C4, C5, C6, C7 - > type; + >::type type; + }; }; @@ -191,18 +209,19 @@ struct vector_c_impl_chooser<8> namespace aux { template<> -struct vector_c_impl_chooser<9> +struct vector_c_chooser<9> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector9_c< + typedef typename vector9_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8 - > type; + >::type type; + }; }; @@ -211,18 +230,19 @@ struct vector_c_impl_chooser<9> namespace aux { template<> -struct vector_c_impl_chooser<10> +struct vector_c_chooser<10> { template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { - typedef vector10_c< + typedef typename vector10_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 - > type; + >::type type; + }; }; @@ -230,7 +250,217 @@ struct vector_c_impl_chooser<10> namespace aux { -template< long T > +template<> +struct vector_c_chooser<11> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector11_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<12> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector12_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<13> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector13_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<14> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<15> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<16> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<17> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<18> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<19> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template<> +struct vector_c_chooser<20> +{ + template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > + struct result_ + { + typedef typename vector20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type type; + + }; +}; + +} // namespace aux + +namespace aux { + +template< long C > struct is_vector_c_arg { static bool const value = true; @@ -243,49 +473,62 @@ struct is_vector_c_arg<LONG_MAX> }; template< - long T1, long T2, long T3, long T4, long T5, long T6, long T7, long T8 - , long T9, long T10 + long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 + , long C9, long C10, long C11, long C12, long C13, long C14, long C15 + , long C16, long C17, long C18, long C19, long C20 > struct vector_c_count_args { static int const value = - is_vector_c_arg<T1>::value + is_vector_c_arg<T2>::value - + is_vector_c_arg<T3>::value + is_vector_c_arg<T4>::value - + is_vector_c_arg<T5>::value + is_vector_c_arg<T6>::value - + is_vector_c_arg<T7>::value + is_vector_c_arg<T8>::value - + is_vector_c_arg<T9>::value + is_vector_c_arg<T10>::value + is_vector_c_arg<C1>::value + is_vector_c_arg<C2>::value + + is_vector_c_arg<C3>::value + is_vector_c_arg<C4>::value + + is_vector_c_arg<C5>::value + is_vector_c_arg<C6>::value + + is_vector_c_arg<C7>::value + is_vector_c_arg<C8>::value + + is_vector_c_arg<C9>::value + is_vector_c_arg<C10>::value + + is_vector_c_arg<C11>::value + is_vector_c_arg<C12>::value + + is_vector_c_arg<C13>::value + is_vector_c_arg<C14>::value + + is_vector_c_arg<C15>::value + is_vector_c_arg<C16>::value + + is_vector_c_arg<C17>::value + is_vector_c_arg<C18>::value + + is_vector_c_arg<C19>::value + is_vector_c_arg<C20>::value ; + }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c_impl { - typedef aux::vector_c_count_args< C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > arg_num_; - typedef typename aux::vector_c_impl_chooser< arg_num_::value > - ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; + typedef aux::vector_c_count_args< + C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + > arg_num_; + + typedef typename aux::vector_c_chooser< arg_num_::value > + ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< - typename T - , long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX - , long C9 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c - : aux::vector_c_impl< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type + : aux::vector_c_impl< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 + >::type { typedef typename aux::vector_c_impl< - T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp index bea9b5f..26de94c 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp @@ -1,9 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/advance_backward.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> @@ -22,7 +28,7 @@ struct advance_backward<1> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; + typedef typename prior<iter0>::type iter1; typedef iter1 type; }; }; @@ -33,8 +39,8 @@ struct advance_backward<2> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; typedef iter2 type; }; }; @@ -45,9 +51,9 @@ struct advance_backward<3> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; - typedef typename iter2::prior iter3; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; + typedef typename prior<iter2>::type iter3; typedef iter3 type; }; }; @@ -58,10 +64,10 @@ struct advance_backward<4> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; - typedef typename iter2::prior iter3; - typedef typename iter3::prior iter4; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; + typedef typename prior<iter2>::type iter3; + typedef typename prior<iter3>::type iter4; typedef iter4 type; }; }; @@ -71,12 +77,21 @@ struct advance_backward { template< typename Iterator > struct apply { - typedef typename advance_backward<4>::template apply<Iterator>::type chunk_result_; - typedef typename advance_backward<( (N - 4) < 0 ? 0 : N - 4 )>::template apply<chunk_result_>::type type; + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp index accb46c..b137cc7 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp @@ -1,9 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/advance_forward.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> @@ -22,7 +28,7 @@ struct advance_forward<1> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef iter1 type; }; }; @@ -33,8 +39,8 @@ struct advance_forward<2> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; typedef iter2 type; }; }; @@ -45,9 +51,9 @@ struct advance_forward<3> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; - typedef typename iter2::next iter3; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; + typedef typename next<iter2>::type iter3; typedef iter3 type; }; }; @@ -58,10 +64,10 @@ struct advance_forward<4> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; - typedef typename iter2::next iter3; - typedef typename iter3::next iter4; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; + typedef typename next<iter2>::type iter3; + typedef typename next<iter3>::type iter4; typedef iter4 type; }; }; @@ -71,12 +77,21 @@ struct advance_forward { template< typename Iterator > struct apply { - typedef typename advance_forward<4>::template apply<Iterator>::type chunk_result_; - typedef typename advance_forward<( (N - 4) < 0 ? 0 : N - 4 )>::template apply<chunk_result_>::type type; + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/and.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/and.hpp index 9f6982a..010ad1f 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/and.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/and.hpp @@ -1,5 +1,13 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { @@ -33,8 +41,8 @@ struct and_impl< } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ @@ -48,15 +56,14 @@ struct and_ BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ - , (T1, T2, T3, T4, T5) + , ( T1, T2, T3, T4, T5) ) }; -BOOST_MPL_AUX_VOID_SPEC_EXT( +BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) -}} // namespace boost::mpl - +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp index 255387f..e08eacc 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp @@ -1,30 +1,37 @@ -// preprocessed version of 'boost/mpl/apply.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename F, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ + typename F > -struct apply; +struct apply0 -template< typename F > -struct apply0 : F + : apply_wrap0< + typename lambda<F>::type + + > { - static int const arity = 1; typedef F arg1; - friend class apply0_rebind; - typedef apply0_rebind rebind; - }; - class apply0_rebind { public: template< typename U1 > struct apply : apply0<U1> { }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 1 + , apply0 + , (F ) + ) }; template< typename F > -struct apply< F,void_,void_,void_,void_,void_ > +struct apply< F,na,na,na,na,na > : apply0<F> { }; @@ -33,23 +40,23 @@ template< typename F, typename T1 > struct apply1 - : F::template apply< - T1 + + : apply_wrap1< + typename lambda<F>::type + , T1 > { - static int const arity = 2; typedef F arg1; - typedef T1 arg2; - friend class apply1_rebind; - typedef apply1_rebind rebind; - }; - class apply1_rebind { public: template< typename U1, typename U2 > struct apply : apply1< U1,U2 > { }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 2 + , apply1 + , (F, T1) + ) }; template< typename F, typename T1 > -struct apply< F,T1,void_,void_,void_,void_ > +struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; @@ -58,24 +65,23 @@ template< typename F, typename T1, typename T2 > struct apply2 - : F::template apply< - T1, T2 + + : apply_wrap2< + typename lambda<F>::type + , T1, T2 > { - static int const arity = 3; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - friend class apply2_rebind; - typedef apply2_rebind rebind; - }; - class apply2_rebind { public: template< typename U1, typename U2, typename U3 > struct apply : apply2< U1,U2,U3 > { }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , apply2 + , (F, T1, T2) + ) }; template< typename F, typename T1, typename T2 > -struct apply< F,T1,T2,void_,void_,void_ > +struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; @@ -84,25 +90,23 @@ template< typename F, typename T1, typename T2, typename T3 > struct apply3 - : F::template apply< - T1, T2, T3 + + : apply_wrap3< + typename lambda<F>::type + , T1, T2, T3 > { - static int const arity = 4; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - typedef T3 arg4; - friend class apply3_rebind; - typedef apply3_rebind rebind; - }; - class apply3_rebind { public: template< typename U1, typename U2, typename U3, typename U4 > struct apply : apply3< U1,U2,U3,U4 > { }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , apply3 + , (F, T1, T2, T3) + ) }; template< typename F, typename T1, typename T2, typename T3 > -struct apply< F,T1,T2,T3,void_,void_ > +struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; @@ -111,26 +115,23 @@ template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 - : F::template apply< - T1, T2, T3, T4 + + : apply_wrap4< + typename lambda<F>::type + , T1, T2, T3, T4 > { - static int const arity = 5; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - typedef T3 arg4; - typedef T4 arg5; - friend class apply4_rebind; - typedef apply4_rebind rebind; - }; - class apply4_rebind { public: template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply : apply4< U1,U2,U3,U4,U5 > { }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , apply4 + , (F, T1, T2, T3, T4) + ) }; template< typename F, typename T1, typename T2, typename T3, typename T4 > -struct apply< F,T1,T2,T3,T4,void_ > +struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; @@ -140,24 +141,21 @@ template< , typename T5 > struct apply5 - : F::template apply< - T1, T2, T3, T4, T5 + + : apply_wrap5< + typename lambda<F>::type + , T1, T2, T3, T4, T5 > { - static int const arity = 6; typedef F arg1; - typedef T1 arg2; - typedef T2 arg3; - typedef T3 arg4; - typedef T4 arg5; - typedef T5 arg6; - friend class apply5_rebind; - typedef apply5_rebind rebind; - }; - class apply5_rebind { public: template< typename U1, typename U2, typename U3, typename U4, typename U5, typename U6 > struct apply : apply5< U1,U2,U3,U4,U5,U6 > { }; - + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 6 + , apply5 + , (F, T1, T2, T3, T4, T5) + ) }; -// primary template (not a specialization!) +/// primary template (not a specialization!) + template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 @@ -167,6 +165,5 @@ struct apply { }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp new file mode 100644 index 0000000..bd50b89 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp new file mode 100644 index 0000000..47882ad --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp @@ -0,0 +1,70 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply_wrap0 + + : F::template apply< > +{ +}; + +template< + typename F, typename T1 + > +struct apply_wrap1 + + : F::template apply<T1> +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap2 + + : F::template apply< T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap3 + + : F::template apply< T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap4 + + : F::template apply< T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap5 + + : F::template apply< T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp index d7097f8..4e404a6 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp @@ -1,26 +1,30 @@ -// preprocessed version of 'boost/mpl/arg.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-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) +// -template<> struct arg<-1> +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > { static int const value = -1; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -28,20 +32,17 @@ template<> struct arg<1> { static int const value = 1; typedef arg<2> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -49,20 +50,17 @@ template<> struct arg<2> { static int const value = 2; typedef arg<3> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -70,20 +68,17 @@ template<> struct arg<3> { static int const value = 3; typedef arg<4> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -91,20 +86,17 @@ template<> struct arg<4> { static int const value = 4; typedef arg<5> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -112,25 +104,20 @@ template<> struct arg<5> { static int const value = 5; typedef arg<6> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; -BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1, int, arg) - -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp index d86e51b..ba0f264 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp @@ -1,8 +1,16 @@ -// preprocessed version of 'boost/mpl/bind.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { @@ -15,25 +23,12 @@ struct resolve_bind_arg typedef T type; }; -} // namespace aux - -template< - typename F, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - > -struct bind; - -template< typename F, typename T > struct bind1st; -template< typename F, typename T > struct bind2nd; - -namespace aux { - template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > -struct resolve_bind_arg< arg<N>,U1,U2,U3,U4,U5 > +struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 > { - typedef typename mpl::arg<N>::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type; }; template< @@ -41,50 +36,22 @@ template< , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > -struct resolve_bind_arg< bind<F,T1,T2,T3,T4,T5>,U1,U2,U3,U4,U5 > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind1st<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind1st< F,T > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind2nd<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind2nd< F,T > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux -BOOST_MPL_AUX_ARITY_SPEC( - 6 - , bind - ) - -BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) -BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) - template< typename F > struct bind0 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { @@ -92,7 +59,10 @@ struct bind0 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: - typedef typename f_::type type; + typedef typename apply_wrap0< + f_ + >::type type; + }; }; @@ -103,11 +73,11 @@ template< , typename U5 > struct resolve_bind_arg< - bind0<F>,U1, U2, U3, U4, U5 + bind0<F>, U1, U2, U3, U4, U5 > { typedef bind0<F> f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -117,7 +87,7 @@ BOOST_MPL_AUX_ARITY_SPEC(1, bind0) template< typename F > -struct bind< F,void_,void_,void_,void_,void_ > +struct bind< F,na,na,na,na,na > : bind0<F> { }; @@ -128,17 +98,21 @@ template< struct bind1 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: - typedef typename f_::template apply<t1>::type type; + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + }; }; @@ -149,11 +123,11 @@ template< , typename U4, typename U5 > struct resolve_bind_arg< - bind1< F,T1 >,U1, U2, U3, U4, U5 + bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -163,7 +137,7 @@ BOOST_MPL_AUX_ARITY_SPEC(2, bind1) template< typename F, typename T1 > -struct bind< F,T1,void_,void_,void_,void_ > +struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; @@ -174,18 +148,22 @@ template< struct bind2 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: - typedef typename f_::template apply< t1,t2 >::type type; + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + }; }; @@ -196,11 +174,11 @@ template< , typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind2< F,T1,T2 >,U1, U2, U3, U4, U5 + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -210,7 +188,7 @@ BOOST_MPL_AUX_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > -struct bind< F,T1,T2,void_,void_,void_ > +struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; @@ -221,19 +199,23 @@ template< struct bind3 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: - typedef typename f_::template apply< t1,t2,t3 >::type type; + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + }; }; @@ -244,11 +226,11 @@ template< , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind3< F,T1,T2,T3 >,U1, U2, U3, U4, U5 + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -258,7 +240,7 @@ BOOST_MPL_AUX_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > -struct bind< F,T1,T2,T3,void_,void_ > +struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; @@ -269,20 +251,25 @@ template< struct bind4 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; - typedef typename aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 >::type t4; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: - typedef typename f_::template apply< t1,t2,t3,t4 >::type type; + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + }; }; @@ -293,11 +280,11 @@ template< , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind4< F,T1,T2,T3,T4 >,U1, U2, U3, U4, U5 + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -307,7 +294,7 @@ BOOST_MPL_AUX_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > -struct bind< F,T1,T2,T3,T4,void_ > +struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; @@ -319,21 +306,26 @@ template< struct bind5 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; - typedef typename aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 >::type t4; - typedef typename aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 >::type t5; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: - typedef typename f_::template apply< t1,t2,t3,t4,t5 >::type type; + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + }; }; @@ -345,18 +337,19 @@ template< , typename U5 > struct resolve_bind_arg< - bind5< F,T1,T2,T3,T4,T5 >,U1, U2, U3, U4, U5 + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) -// primary template (not a specialization!) +/// primary template (not a specialization!) + template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 @@ -366,34 +359,5 @@ struct bind { }; -template< typename F, typename T > -struct bind1st -{ - template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ - > - struct apply - : F::template apply< T,U > - { - }; -}; - -template< typename F, typename T > -struct bind2nd -{ - template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ - > - struct apply - : F::template apply< U,T > - { - }; -}; - -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp index 20db753..b9776d2 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp @@ -1,8 +1,16 @@ -// preprocessed version of 'boost/mpl/bind.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { @@ -21,38 +29,25 @@ template< > struct replace_unnamed_arg { - typedef Arg next_arg; + typedef Arg next; typedef T type; }; template< typename Arg > -struct replace_unnamed_arg< arg<-1>,Arg > +struct replace_unnamed_arg< arg< -1 >, Arg > { - typedef typename Arg::next next_arg; + typedef typename Arg::next next; typedef Arg type; }; -} // namespace aux - -template< - typename F, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - > -struct bind; - -template< typename F, typename T > struct bind1st; -template< typename F, typename T > struct bind2nd; - -namespace aux { - template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > -struct resolve_bind_arg< arg<N>,U1,U2,U3,U4,U5 > +struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 > { - typedef typename mpl::arg<N>::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type; }; template< @@ -60,61 +55,36 @@ template< , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > -struct resolve_bind_arg< bind<F,T1,T2,T3,T4,T5>,U1,U2,U3,U4,U5 > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind1st<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind1st< F,T > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind2nd<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind2nd< F,T > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux -BOOST_MPL_AUX_ARITY_SPEC( - 6 - , bind - ) - -BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) -BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) - template< typename F > struct bind0 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// public: - typedef typename f_::type type; + typedef typename apply_wrap0< + f_ + >::type type; + }; }; @@ -125,11 +95,11 @@ template< , typename U5 > struct resolve_bind_arg< - bind0<F>,U1, U2, U3, U4, U5 + bind0<F>, U1, U2, U3, U4, U5 > { typedef bind0<F> f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -139,7 +109,7 @@ BOOST_MPL_AUX_ARITY_SPEC(1, bind0) template< typename F > -struct bind< F,void_,void_,void_,void_,void_ > +struct bind< F,na,na,na,na,na > : bind0<F> { }; @@ -150,24 +120,28 @@ template< struct bind1 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// public: - typedef typename f_::template apply<t1>::type type; + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + }; }; @@ -178,11 +152,11 @@ template< , typename U4, typename U5 > struct resolve_bind_arg< - bind1< F,T1 >,U1, U2, U3, U4, U5 + bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -192,7 +166,7 @@ BOOST_MPL_AUX_ARITY_SPEC(2, bind1) template< typename F, typename T1 > -struct bind< F,T1,void_,void_,void_,void_ > +struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; @@ -203,29 +177,33 @@ template< struct bind2 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// public: - typedef typename f_::template apply< t1,t2 >::type type; + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + }; }; @@ -236,11 +214,11 @@ template< , typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind2< F,T1,T2 >,U1, U2, U3, U4, U5 + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -250,7 +228,7 @@ BOOST_MPL_AUX_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > -struct bind< F,T1,T2,void_,void_,void_ > +struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; @@ -261,34 +239,38 @@ template< struct bind3 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// public: - typedef typename f_::template apply< t1,t2,t3 >::type type; + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + }; }; @@ -299,11 +281,11 @@ template< , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind3< F,T1,T2,T3 >,U1, U2, U3, U4, U5 + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -313,7 +295,7 @@ BOOST_MPL_AUX_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > -struct bind< F,T1,T2,T3,void_,void_ > +struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; @@ -324,39 +306,44 @@ template< struct bind4 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; - typedef typename r4::next_arg n5; - typedef typename aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 >::type t4; - + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// public: - typedef typename f_::template apply< t1,t2,t3,t4 >::type type; + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + }; }; @@ -367,11 +354,11 @@ template< , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind4< F,T1,T2,T3,T4 >,U1, U2, U3, U4, U5 + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -381,7 +368,7 @@ BOOST_MPL_AUX_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > -struct bind< F,T1,T2,T3,T4,void_ > +struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; @@ -393,44 +380,49 @@ template< struct bind5 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; - typedef typename r4::next_arg n5; - typedef typename aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 >::type t4; - + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; - typedef typename r5::next_arg n6; - typedef typename aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 >::type t5; - + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// public: - typedef typename f_::template apply< t1,t2,t3,t4,t5 >::type type; + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + }; }; @@ -442,18 +434,19 @@ template< , typename U5 > struct resolve_bind_arg< - bind5< F,T1,T2,T3,T4,T5 >,U1, U2, U3, U4, U5 + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) -// primary template (not a specialization!) +/// primary template (not a specialization!) + template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 @@ -463,34 +456,5 @@ struct bind { }; -template< typename F, typename T > -struct bind1st -{ - template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ - > - struct apply - : F::template apply< T,U > - { - }; -}; - -template< typename F, typename T > -struct bind2nd -{ - template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ - > - struct apply - : F::template apply< U,T > - { - }; -}; - -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp new file mode 100644 index 0000000..d80a72b --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp @@ -0,0 +1,52 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct bind; + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp new file mode 100644 index 0000000..642f042 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp @@ -0,0 +1,144 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitand_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag<N1>::type + , typename bitand_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp new file mode 100644 index 0000000..4ccbe89 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp @@ -0,0 +1,144 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag<N1>::type + , typename bitor_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp new file mode 100644 index 0000000..73b519e --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp @@ -0,0 +1,144 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , bitxor_ + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag<N1>::type + , typename bitxor_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp new file mode 100644 index 0000000..c963f62 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , divides + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag<N1>::type + , typename divides_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp new file mode 100644 index 0000000..bb051d6 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + : equal_to_impl< + typename equal_to_tag<N1>::type + , typename equal_to_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/fold_backward_impl.hpp deleted file mode 100644 index 808774f..0000000 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/fold_backward_impl.hpp +++ /dev/null @@ -1,223 +0,0 @@ -// preprocessed version of 'boost/mpl/aux_/fold_backward_impl.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { -namespace aux { - -// forward declaration -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< 0,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef fwd_state0 bkwd_state0; - typedef bkwd_state0 state; - typedef iter0 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< 1,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply<fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - - - typedef fwd_state1 bkwd_state1; - typedef typename BackwardOp::template apply<bkwd_state1, typename iter0::type>::type bkwd_state0; - typedef bkwd_state0 state; - typedef iter1 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< 2,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply<fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - - - typedef fwd_state2 bkwd_state2; - typedef typename BackwardOp::template apply<bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename BackwardOp::template apply<bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter2 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< 3,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply<fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply<fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - - - typedef fwd_state3 bkwd_state3; - typedef typename BackwardOp::template apply<bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename BackwardOp::template apply<bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename BackwardOp::template apply<bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter3 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< 4,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply<fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply<fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply<fwd_state3, typename iter3::type>::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fwd_state4 bkwd_state4; - typedef typename BackwardOp::template apply<bkwd_state4, typename iter3::type>::type bkwd_state3; - typedef typename BackwardOp::template apply<bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename BackwardOp::template apply<bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename BackwardOp::template apply<bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter4 iterator; -}; - -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply<fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply<fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply<fwd_state3, typename iter3::type>::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fold_backward_impl< - ( (N - 4) < 0 ? 0 : N - 4 ) - , iter4 - , Last - , fwd_state4 - , BackwardOp - , ForwardOp - > nested_chunk; - - typedef typename nested_chunk::state bkwd_state4; - typedef typename BackwardOp::template apply<bkwd_state4, typename iter3::type>::type bkwd_state3; - typedef typename BackwardOp::template apply<bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename BackwardOp::template apply<bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename BackwardOp::template apply<bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef typename nested_chunk::iterator iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< -1,First,Last,State,BackwardOp,ForwardOp > -{ - typedef fold_backward_impl< - -1 - , typename First::next - , Last - - ,typename ForwardOp::template apply<State, typename First::type>::type - , BackwardOp - , ForwardOp - > nested_step; - - typedef typename BackwardOp::template apply<typename nested_step::state, typename First::type>::type state; - typedef typename nested_step::iterator iterator; -}; - -template< - typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< -1,Last,Last,State,BackwardOp,ForwardOp > -{ - typedef State state; - typedef Last iterator; -}; - -} // namespace aux -} // namespace mpl -} // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp index d1214ec..00c2e55 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp @@ -1,18 +1,25 @@ -// preprocessed version of 'boost/mpl/aux_/fold_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration -// forward declaration template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct fold_impl; template< @@ -39,8 +46,8 @@ struct fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply<state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; typedef state1 state; @@ -57,10 +64,10 @@ struct fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply<state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<state1, typename iter1::type>::type state2; - typedef typename iter1::next iter2; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; typedef state2 state; @@ -77,12 +84,12 @@ struct fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply<state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<state1, typename iter1::type>::type state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply<state2, typename iter2::type>::type state3; - typedef typename iter2::next iter3; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; + typedef typename next<iter2>::type iter3; typedef state3 state; @@ -99,14 +106,14 @@ struct fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply<state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<state1, typename iter1::type>::type state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply<state2, typename iter2::type>::type state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply<state3, typename iter3::type>::type state4; - typedef typename iter3::next iter4; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4; + typedef typename next<iter3>::type iter4; typedef state4 state; @@ -114,12 +121,12 @@ struct fold_impl< 4,First,Last,State,ForwardOp > }; template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct fold_impl { typedef fold_impl< @@ -137,7 +144,7 @@ struct fold_impl , typename chunk_::state , ForwardOp > res_; - + typedef typename res_::state state; typedef typename res_::iterator iterator; }; @@ -147,14 +154,13 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 - , typename First::next + , typename next<First>::type , Last - - ,typename ForwardOp::template apply<State, typename First::type>::type + , typename apply2<ForwardOp,State, typename deref<First>::type>::type , ForwardOp > { @@ -164,14 +170,11 @@ template< typename Last , typename State , typename ForwardOp - > + > struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp index 5534ac2..89d946e 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp @@ -1,30 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/full_lambda.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Aleksey Gurtovoy 2001-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) +// -template< - typename T - , typename Tag - , typename Protect = false_ - - > -struct lambda_impl -{ - typedef false_ is_le; - typedef T type; -}; +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! -template< - typename T - , typename Tag = void_ - - > -struct lambda - : lambda_impl< T,Tag,false_ > -{ -}; +namespace boost { namespace mpl { namespace aux { @@ -45,44 +30,56 @@ struct lambda_or< false,false,false,false,false > } // namespace aux -template< int N, typename Tag, typename Protect > -struct lambda_impl< arg<N>,Tag,Protect > +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg<N>, Tag > { typedef true_ is_le; - typedef arg<N> type; + typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41 + typedef protect<result_> type; }; template< typename F , typename Tag - , typename Protect - > -struct lambda_impl< - bind0<F> - , Tag - , Protect > +struct lambda< + bind0<F> + , Tag + + > { typedef false_ is_le; typedef bind0< F - > type; -}; + > result_; -template< - template< typename P1 > class F - , typename T1 - , typename Tag - > -struct lambda< F<T1>,Tag > - : lambda_impl< F<T1>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > @@ -90,33 +87,24 @@ struct le_result1 { typedef F< typename L1::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1 > class F - , typename Tag + typename Tag + , template< typename P1 > class F , typename L1 > -struct le_result1< true_,Tag,false_,F,L1 > +struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > - , typename L1::type - > type; -}; + , typename L1::result_ + > result_; -template< - template< typename P1 > class F - , typename Tag - , typename L1 - > -struct le_result1< true_,Tag,true_,F,L1 > -{ - typedef protect< bind1< - quote1< F,Tag > - , typename L1::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -125,58 +113,50 @@ template< template< typename P1 > class F , typename T1 , typename Tag - , typename Protect > -struct lambda_impl< - F<T1>, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef aux::lambda_or< - l1::is_le::value - > is_le; - - typedef typename aux::le_result1< - typename is_le::type +struct lambda< + F<T1> , Tag - , Protect - , F - , l1 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag - , typename Protect - > -struct lambda_impl< - bind1< F,T1 > - , Tag - , Protect > +struct lambda< + bind1< F,T1 > + , Tag + + > { typedef false_ is_le; typedef bind1< F , T1 - > type; -}; + > result_; -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - , typename Tag - > -struct lambda< F<T1,T2>,Tag > - : lambda_impl< F<T1,T2>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > @@ -184,33 +164,24 @@ struct le_result2 { typedef F< typename L1::type, typename L2::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true_,Tag,false_,F,L1,L2 > +struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > - , typename L1::type, typename L2::type - > type; -}; + , typename L1::result_, typename L2::result_ + > result_; -template< - template< typename P1, typename P2 > class F - , typename Tag - , typename L1, typename L2 - > -struct le_result2< true_,Tag,true_,F,L1,L2 > -{ - typedef protect< bind2< - quote2< F,Tag > - , typename L1::type, typename L2::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -219,60 +190,55 @@ template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value - > is_le; - - typedef typename aux::le_result2< - typename is_le::type +struct lambda< + F< T1,T2 > , Tag - , Protect - , F - , l1, l2 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag - , typename Protect - > -struct lambda_impl< - bind2< F,T1,T2 > - , Tag - , Protect > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > { typedef false_ is_le; typedef bind2< F , T1, T2 - > type; -}; + > result_; -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - , typename Tag - > -struct lambda< F<T1,T2,T3>,Tag > - : lambda_impl< F<T1,T2,T3>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > @@ -280,33 +246,24 @@ struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2, typename P3 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true_,Tag,false_,F,L1,L2,L3 > +struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; -template< - template< typename P1, typename P2, typename P3 > class F - , typename Tag - , typename L1, typename L2, typename L3 - > -struct le_result3< true_,Tag,true_,F,L1,L2,L3 > -{ - typedef protect< bind3< - quote3< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -315,61 +272,57 @@ template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - > is_le; - - typedef typename aux::le_result3< - typename is_le::type +struct lambda< + F< T1,T2,T3 > , Tag - , Protect - , F - , l1, l2, l3 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag - , typename Protect - > -struct lambda_impl< - bind3< F,T1,T2,T3 > - , Tag - , Protect > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 - > type; -}; + > result_; -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename T1, typename T2, typename T3, typename T4 - , typename Tag - > -struct lambda< F<T1,T2,T3,T4>,Tag > - : lambda_impl< F<T1,T2,T3,T4>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > @@ -378,35 +331,25 @@ struct le_result4 typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type - > type; + > result_; + + typedef result_ type; }; template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename Tag - , typename L1, typename L2, typename L3, typename L4 - > -struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 > -{ - typedef protect< bind4< - quote4< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -415,67 +358,59 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - typedef lambda_impl< T4,Tag > l4; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - , l4::is_le::value - > is_le; - - typedef typename aux::le_result4< - typename is_le::type +struct lambda< + F< T1,T2,T3,T4 > , Tag - , Protect - , F - , l1, l2, l3, l4 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag - , typename Protect - > -struct lambda_impl< - bind4< F,T1,T2,T3,T4 > - , Tag - , Protect > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 - > type; -}; + > result_; -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename T1, typename T2, typename T3, typename T4, typename T5 - , typename Tag - > -struct lambda< F<T1,T2,T3,T4,T5>,Tag > - : lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > @@ -484,43 +419,25 @@ struct le_result5 typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type - > type; + > result_; + + typedef result_ type; }; template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename Tag + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type, typename L5::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename Tag - , typename L1, typename L2, typename L3, typename L4, typename L5 - > -struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 > -{ - typedef protect< bind5< - quote5< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type, typename L5::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -533,100 +450,105 @@ template< class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4,T5 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - typedef lambda_impl< T4,Tag > l4; - typedef lambda_impl< T5,Tag > l5; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - , l4::is_le::value, l5::is_le::value - > is_le; - - typedef typename aux::le_result5< - typename is_le::type +struct lambda< + F< T1,T2,T3,T4,T5 > , Tag - , Protect - , F - , l1, l2, l3, l4, l5 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag - , typename Protect - > -struct lambda_impl< - bind5< F,T1,T2,T3,T4,T5 > - , Tag - , Protect > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 - > type; + > result_; + + typedef result_ type; }; -// special case for 'protect' -template< typename T, typename Tag, typename Protect > -struct lambda_impl< protect<T>,Tag,Protect > +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< protect<T>, Tag > { typedef false_ is_le; - typedef protect<T> type; + typedef protect<T> result_; + typedef result_ type; }; -// specializations for main 'bind', 'bind1st' and 'bind2nd' forms +/// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag - , typename Protect - > -struct lambda_impl< - bind< F,T1,T2,T3,T4,T5 > - , Tag - , Protect - > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > { typedef false_ is_le; - typedef bind< F,T1,T2,T3,T4,T5 > type; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; }; +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars + template< - typename F, typename T - , typename Tag - , typename Protect + typename F, typename Tag1, typename Tag2 > -struct lambda_impl< bind1st<F,T>,Tag,Protect > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > { - typedef false_ is_le; - typedef bind1st< F,T > type; + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef aux::le_result2<is_le, Tag2, mpl::lambda, l1, l2> le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; -template< - typename F, typename T - , typename Tag - , typename Protect - > -struct lambda_impl< bind2nd<F,T>,Tag,Protect > -{ - typedef false_ is_le; - typedef bind2nd< F,T > type; -}; +BOOST_MPL_AUX_NA_SPEC(2, lambda) -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp new file mode 100644 index 0000000..73bbaad --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + : greater_impl< + typename greater_tag<N1>::type + , typename greater_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp new file mode 100644 index 0000000..d52e43e --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + : greater_equal_impl< + typename greater_equal_tag<N1>::type + , typename greater_equal_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp new file mode 100644 index 0000000..00f31c4 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp @@ -0,0 +1,141 @@ + +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 3 + , inherit3 + , ( T1, T2, T3) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , inherit4 + , ( T1, T2, T3, T4) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , inherit5 + , ( T1, T2, T3, T4, T5) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_backward_impl.hpp deleted file mode 100644 index 816de20..0000000 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_backward_impl.hpp +++ /dev/null @@ -1,222 +0,0 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_backward_impl.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { -namespace aux { - -// forward declaration -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl< 0,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef fwd_state0 bkwd_state0; - typedef bkwd_state0 state; - typedef iter0 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl< 1,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply< fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; - - - typedef fwd_state1 bkwd_state1; - typedef typename BackwardOp::template apply< bkwd_state1,iter0 >::type bkwd_state0; - typedef bkwd_state0 state; - typedef iter1 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl< 2,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply< fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; - - - typedef fwd_state2 bkwd_state2; - typedef typename BackwardOp::template apply< bkwd_state2,iter1 >::type bkwd_state1; - typedef typename BackwardOp::template apply< bkwd_state1,iter0 >::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter2 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl< 3,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply< fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply< fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; - - - typedef fwd_state3 bkwd_state3; - typedef typename BackwardOp::template apply< bkwd_state3,iter2 >::type bkwd_state2; - typedef typename BackwardOp::template apply< bkwd_state2,iter1 >::type bkwd_state1; - typedef typename BackwardOp::template apply< bkwd_state1,iter0 >::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter3 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl< 4,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply< fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply< fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply< fwd_state3,iter3 >::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fwd_state4 bkwd_state4; - typedef typename BackwardOp::template apply< bkwd_state4,iter3 >::type bkwd_state3; - typedef typename BackwardOp::template apply< bkwd_state3,iter2 >::type bkwd_state2; - typedef typename BackwardOp::template apply< bkwd_state2,iter1 >::type bkwd_state1; - typedef typename BackwardOp::template apply< bkwd_state1,iter0 >::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter4 iterator; -}; - -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply< fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply< fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply< fwd_state3,iter3 >::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef iter_fold_backward_impl< - ( (N - 4) < 0 ? 0 : N - 4 ) - , iter4 - , Last - , fwd_state4 - , BackwardOp - , ForwardOp - > nested_chunk; - - typedef typename nested_chunk::state bkwd_state4; - typedef typename BackwardOp::template apply< bkwd_state4,iter3 >::type bkwd_state3; - typedef typename BackwardOp::template apply< bkwd_state3,iter2 >::type bkwd_state2; - typedef typename BackwardOp::template apply< bkwd_state2,iter1 >::type bkwd_state1; - typedef typename BackwardOp::template apply< bkwd_state1,iter0 >::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef typename nested_chunk::iterator iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl< -1,First,Last,State,BackwardOp,ForwardOp > -{ - typedef iter_fold_backward_impl< - -1 - , typename First::next - , Last - , typename ForwardOp::template apply< State,First >::type - , BackwardOp - , ForwardOp - > nested_step; - - typedef typename BackwardOp::template apply<typename nested_step::state, First>::type state; - typedef typename nested_step::iterator iterator; -}; - -template< - typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl< -1,Last,Last,State,BackwardOp,ForwardOp > -{ - typedef State state; - typedef Last iterator; -}; - -} // namespace aux -} // namespace mpl -} // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp index db74e48..6951795 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp @@ -1,9 +1,16 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_if_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step @@ -23,7 +30,7 @@ struct iter_fold_if_step_impl > struct result_ { - typedef typename StateOp::template apply< State,Iterator >::type state; + typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; @@ -52,10 +59,10 @@ template< > struct iter_fold_if_forward_step { - typedef typename Predicate::template apply< State,Iterator >::type not_last; + typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator, State, ForwardOp, mpl::next< Iterator> > impl_; + >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; @@ -69,10 +76,10 @@ template< > struct iter_fold_if_backward_step { - typedef typename Predicate::template apply< State,Iterator >::type not_last; + typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_; + >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; @@ -95,7 +102,7 @@ struct iter_fold_if_impl typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; - + typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< @@ -123,7 +130,4 @@ struct iter_fold_if_impl typedef typename backward_step4::iterator iterator; }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp index e8dc4ec..c25f136 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp @@ -1,18 +1,25 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration -// forward declaration template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl; template< @@ -39,8 +46,8 @@ struct iter_fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply< state0,iter0 >::type state1; - typedef typename iter0::next iter1; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; typedef state1 state; @@ -57,10 +64,10 @@ struct iter_fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply< state0,iter0 >::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< state1,iter1 >::type state2; - typedef typename iter1::next iter2; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename next<iter1>::type iter2; typedef state2 state; @@ -77,12 +84,12 @@ struct iter_fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply< state0,iter0 >::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< state1,iter1 >::type state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply< state2,iter2 >::type state3; - typedef typename iter2::next iter3; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename next<iter2>::type iter3; typedef state3 state; @@ -99,14 +106,14 @@ struct iter_fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply< state0,iter0 >::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< state1,iter1 >::type state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply< state2,iter2 >::type state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply< state3,iter3 >::type state4; - typedef typename iter3::next iter4; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename next<iter3>::type iter4; typedef state4 state; @@ -114,12 +121,12 @@ struct iter_fold_impl< 4,First,Last,State,ForwardOp > }; template< - long N + int N , typename First , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl { typedef iter_fold_impl< @@ -137,7 +144,7 @@ struct iter_fold_impl , typename chunk_::state , ForwardOp > res_; - + typedef typename res_::state state; typedef typename res_::iterator iterator; }; @@ -147,13 +154,13 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 - , typename First::next + , typename next<First>::type , Last - , typename ForwardOp::template apply< State,First >::type + , typename apply2< ForwardOp,State,First >::type , ForwardOp > { @@ -163,14 +170,11 @@ template< typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; -} // namespace aux -} // namespace mpl -} // namespace boost - +}}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/lambda_helper.hpp deleted file mode 100644 index 953d826..0000000 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/lambda_helper.hpp +++ /dev/null @@ -1,120 +0,0 @@ -// preprocessed version of 'boost/mpl/lambda_helper.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { - -template< - template< typename P1 > class F - , typename T1 - > -struct lambda_helper1 -{ - struct rebind - { - static int const arity = 1; - typedef T1 arg1; - - template< typename U1 > struct apply - : F<U1> - { - }; - }; -}; - -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - > -struct lambda_helper2 -{ - struct rebind - { - static int const arity = 2; - typedef T1 arg1; - typedef T2 arg2; - - template< typename U1, typename U2 > struct apply - : F< U1,U2 > - { - }; - }; -}; - -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - > -struct lambda_helper3 -{ - struct rebind - { - static int const arity = 3; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - - template< typename U1, typename U2, typename U3 > struct apply - : F< U1,U2,U3 > - { - }; - }; -}; - -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename T1, typename T2, typename T3, typename T4 - > -struct lambda_helper4 -{ - struct rebind - { - static int const arity = 4; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - typedef T4 arg4; - - template< - typename U1, typename U2, typename U3, typename U4 - > - struct apply - : F< U1,U2,U3,U4 > - { - }; - }; -}; - -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename T1, typename T2, typename T3, typename T4, typename T5 - > -struct lambda_helper5 -{ - struct rebind - { - static int const arity = 5; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - typedef T4 arg4; - typedef T5 arg5; - - template< - typename U1, typename U2, typename U3, typename U4 - , typename U5 - > - struct apply - : F< U1,U2,U3,U4,U5 > - { - }; - }; -}; - -} // namespace mpl -} // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp index 4a02653..76d3f3f 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp @@ -1,182 +1,198 @@ -// preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { -template< int arity_, bool Protect > struct lambda_impl +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ { - template< typename T, typename Tag > struct result_ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; + typedef is_placeholder<T> is_le; }; }; -template<> struct lambda_impl<1, false> +template<> struct lambda_impl< int_<1> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + typedef bind1< - f_ - , arg1 - > type; + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<1, true> +template<> struct lambda_impl< int_<2> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef mpl::protect< bind1< - f_ - , arg1 - > > type; - }; -}; - -template<> struct lambda_impl<2, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; typedef bind2< - f_ - , arg1, arg2 - > type; + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<2, true> +template<> struct lambda_impl< int_<3> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; - typedef mpl::protect< bind2< - f_ - , arg1, arg2 - > > type; - }; -}; - -template<> struct lambda_impl<3, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; typedef bind3< - f_ - , arg1, arg2, arg3 - > type; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<3, true> +template<> struct lambda_impl< int_<4> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; - typedef mpl::protect< bind3< - f_ - , arg1, arg2, arg3 - > > type; - }; -}; - -template<> struct lambda_impl<4, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; typedef bind4< - f_ - , arg1, arg2, arg3, arg4 - > type; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<4, true> +template<> struct lambda_impl< int_<5> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; - typedef mpl::protect< bind4< - f_ - , arg1, arg2, arg3, arg4 - > > type; - }; -}; - -template<> struct lambda_impl<5, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - typedef typename lambda< typename F::arg5, Tag, false >::type arg5; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; typedef bind5< - f_ - , arg1, arg2, arg3, arg4, arg5 - > type; - }; -}; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; -template<> struct lambda_impl<5, true> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - typedef typename lambda< typename F::arg5, Tag, false >::type arg5; - + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; - typedef mpl::protect< bind5< - f_ - , arg1, arg2, arg3, arg4, arg5 - > > type; + typedef typename type_::type type; }; }; @@ -184,19 +200,30 @@ template<> struct lambda_impl<5, true> template< typename T - , typename Tag = void_ - , bool Protect = true + , typename Tag + , typename Protect > struct lambda - : aux::lambda_impl< - ::boost::mpl::aux::template_arity<T>::value +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity<T>::type arity_; + typedef typename aux::lambda_impl<arity_> + ::template result_< T,Tag,Protect > l_; - , Protect + typedef typename l_::type type; + typedef typename l_::is_le is_le; + BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) +}; - >::template result_< T,Tag > +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le { }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/less.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/less.hpp new file mode 100644 index 0000000..75997da --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/less.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + : less_impl< + typename less_tag<N1>::type + , typename less_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp new file mode 100644 index 0000000..ed8aae1 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + : less_equal_impl< + typename less_equal_tag<N1>::type + , typename less_equal_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/list.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/list.hpp index 853ff61..4e8ad53 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/list.hpp @@ -1,129 +1,323 @@ -// preprocessed version of 'boost/mpl/list.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T0 = void_, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - , typename T6 = void_, typename T7 = void_, typename T8 = void_ - , typename T9 = void_ + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na > struct list; template< - + > struct list< - void_, void_, void_, void_, void_, void_, void_, void_, void_ - , void_ + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : list0< > { - typedef list0< > type; + typedef list0< >::type type; }; template< typename T0 > struct list< - T0, void_, void_, void_, void_, void_, void_, void_, void_, void_ + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : list1<T0> { - typedef list1<T0> type; + typedef typename list1<T0>::type type; }; template< typename T0, typename T1 > struct list< - T0, T1, void_, void_, void_, void_, void_, void_, void_, void_ + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : list2< T0,T1 > { - typedef list2< T0,T1 > type; + typedef typename list2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > -struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list3< T0,T1,T2 > { - typedef list3< T0,T1,T2 > type; + typedef typename list3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > -struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list4< T0,T1,T2,T3 > { - typedef list4< T0,T1,T2,T3 > type; + typedef typename list4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > -struct list< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list5< T0,T1,T2,T3,T4 > { - typedef list5< T0,T1,T2,T3,T4 > type; + typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > -struct list< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list6< T0,T1,T2,T3,T4,T5 > { - typedef list6< T0,T1,T2,T3,T4,T5 > type; + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > -struct list< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list7< T0,T1,T2,T3,T4,T5,T6 > { - typedef list7< T0,T1,T2,T3,T4,T5,T6 > type; + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > -struct list< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { - typedef list8< T0,T1,T2,T3,T4,T5,T6,T7 > type; + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > -struct list< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { - typedef list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > type; + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; -// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > -struct list +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { - typedef list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > type; + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp index 9f0f872..0b48a7f 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp @@ -1,25 +1,34 @@ -// preprocessed version of 'boost/mpl/list_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T - , long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX - , long C9 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T - > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c<T> { @@ -27,12 +36,12 @@ struct list_c< }; template< - typename T - , long C0 + typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { @@ -40,12 +49,12 @@ struct list_c< }; template< - typename T - , long C0, long C1 + typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { @@ -53,12 +62,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2 + typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { @@ -66,12 +75,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3 + typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { @@ -79,12 +88,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3, long C4 + typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { @@ -92,11 +101,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { @@ -104,48 +114,215 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 > -struct list_c< T,C0,C1,C2,C3,C4,C5,C6,LONG_MAX,LONG_MAX,LONG_MAX > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 > -struct list_c< T,C0,C1,C2,C3,C4,C5,C6,C7,LONG_MAX,LONG_MAX > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 > -struct list_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,LONG_MAX > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; -// primary template (not a specialization!) template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 > -struct list_c +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/map.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/map.hpp new file mode 100644 index 0000000..1503c72 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/map.hpp @@ -0,0 +1,323 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1<T0> +{ + typedef typename map1<T0>::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp new file mode 100644 index 0000000..7439877 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , minus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag<N1>::type + , typename minus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp new file mode 100644 index 0000000..e99421b --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp @@ -0,0 +1,97 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + : modulus_impl< + typename modulus_tag<N1>::type + , typename modulus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp new file mode 100644 index 0000000..39af532 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp @@ -0,0 +1,91 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + : not_equal_to_impl< + typename not_equal_to_tag<N1>::type + , typename not_equal_to_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/or.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/or.hpp index 517fbdf..31e1aaa 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/or.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/or.hpp @@ -1,5 +1,13 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { @@ -33,8 +41,8 @@ struct or_impl< } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ @@ -48,15 +56,14 @@ struct or_ BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ - , (T1, T2, T3, T4, T5) + , ( T1, T2, T3, T4, T5) ) }; -BOOST_MPL_AUX_VOID_SPEC_EXT( +BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) -}} // namespace boost::mpl - +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp index 8c17ad3..4cb7d7d 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp @@ -1,54 +1,78 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Aleksey Gurtovoy 2001-2003 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; -namespace placeholders { -using boost::mpl::_; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_) -// agurt, 17/mar/02: one more placeholder for the last 'apply#' -// specialization +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +}}} +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; -namespace placeholders { -using boost::mpl::_1; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_1) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; -namespace placeholders { -using boost::mpl::_2; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_2) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; -namespace placeholders { -using boost::mpl::_3; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_3) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; -namespace placeholders { -using boost::mpl::_4; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_4) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; -namespace placeholders { -using boost::mpl::_5; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_5) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; -namespace placeholders { -using boost::mpl::_6; -} - -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_6) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +}}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp new file mode 100644 index 0000000..489dd41 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , plus + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag<N1>::type + , typename plus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp index 902c44e..e7a7f00 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp @@ -1,3 +1,11 @@ -// preprocessed version of 'boost/mpl/quote.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp new file mode 100644 index 0000000..84c3d9c --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp @@ -0,0 +1,231 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/Attic/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename iter3::type >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename iter3::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename iter3::type >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename iter3::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_fold_impl< + -1 + , typename next<First>::type + , Last + , typename apply2<ForwardOp,State, typename First::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename First::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000..6d7439a --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp @@ -0,0 +1,231 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/Attic/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename next<iter1>::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename next<iter2>::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_iter_fold_impl< + -1 + , typename next<First>::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/set.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/set.hpp new file mode 100644 index 0000000..6c4ae6f --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/set.hpp @@ -0,0 +1,323 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1<T0> +{ + typedef typename set1<T0>::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp new file mode 100644 index 0000000..c11fe41 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp @@ -0,0 +1,95 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + : shift_left_impl< + typename shift_left_tag<N1>::type + , typename shift_left_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename Shift > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(Shift)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp new file mode 100644 index 0000000..5867998 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp @@ -0,0 +1,95 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + : shift_right_impl< + typename shift_right_tag<N1>::type + , typename shift_right_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename Shift > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(Shift)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp index 30b7209..3303b57 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp @@ -1,5 +1,13 @@ -// preprocessed version of 'boost/mpl/aux_/template_arity.hpp' header -// see the original for copyright information + +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { @@ -7,8 +15,8 @@ template< bool > struct template_arity_impl { template< typename F > struct result_ + : int_< -1 > { - static int const value = -1; }; }; @@ -16,9 +24,8 @@ template<> struct template_arity_impl<true> { template< typename F > struct result_ + : F::arity { - static int const value = F::arity; - }; }; @@ -29,5 +36,5 @@ struct template_arity { }; -}}} // namespace boost::mpl::aux +}}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/times.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/times.hpp new file mode 100644 index 0000000..a6c3949 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/times.hpp @@ -0,0 +1,143 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 5 + , times + , ( N1, N2, N3, N4, N5 ) + ) +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag<N1>::type + , typename times_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp new file mode 100644 index 0000000..a971f81 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp @@ -0,0 +1,94 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size<Args>::value,F, Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp index 35aaadf..bfa9565 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp @@ -1,129 +1,323 @@ -// preprocessed version of 'boost/mpl/vector.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T0 = void_, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - , typename T6 = void_, typename T7 = void_, typename T8 = void_ - , typename T9 = void_ + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na > struct vector; template< - + > struct vector< - void_, void_, void_, void_, void_, void_, void_, void_, void_ - , void_ + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : vector0< > { - typedef vector0< > type; + typedef vector0< >::type type; }; template< typename T0 > struct vector< - T0, void_, void_, void_, void_, void_, void_, void_, void_, void_ + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : vector1<T0> { - typedef vector1<T0> type; + typedef typename vector1<T0>::type type; }; template< typename T0, typename T1 > struct vector< - T0, T1, void_, void_, void_, void_, void_, void_, void_, void_ + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : vector2< T0,T1 > { - typedef vector2< T0,T1 > type; + typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > -struct vector< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector3< T0,T1,T2 > { - typedef vector3< T0,T1,T2 > type; + typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > -struct vector< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector4< T0,T1,T2,T3 > { - typedef vector4< T0,T1,T2,T3 > type; + typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > -struct vector< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector5< T0,T1,T2,T3,T4 > { - typedef vector5< T0,T1,T2,T3,T4 > type; + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > -struct vector< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector6< T0,T1,T2,T3,T4,T5 > { - typedef vector6< T0,T1,T2,T3,T4,T5 > type; + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > -struct vector< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector7< T0,T1,T2,T3,T4,T5,T6 > { - typedef vector7< T0,T1,T2,T3,T4,T5,T6 > type; + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > -struct vector< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { - typedef vector8< T0,T1,T2,T3,T4,T5,T6,T7 > type; + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > -struct vector< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { - typedef vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > type; + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; -// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > -struct vector +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { - typedef vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > type; + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp index ff6be1a..840c2e1 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp @@ -1,153 +1,328 @@ -// preprocessed version of 'boost/mpl/vector_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T - , long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX - , long C9 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T - > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c<T> { - typedef vector0_c<T> type; + typedef typename vector0_c<T>::type type; }; template< - typename T - , long C0 + typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T,C0 > { - typedef vector1_c< T,C0 > type; + typedef typename vector1_c< T,C0 >::type type; }; template< - typename T - , long C0, long C1 + typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T,C0,C1 > { - typedef vector2_c< T,C0,C1 > type; + typedef typename vector2_c< T,C0,C1 >::type type; }; template< - typename T - , long C0, long C1, long C2 + typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T,C0,C1,C2 > { - typedef vector3_c< T,C0,C1,C2 > type; + typedef typename vector3_c< T,C0,C1,C2 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3 + typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T,C0,C1,C2,C3 > { - typedef vector4_c< T,C0,C1,C2,C3 > type; + typedef typename vector4_c< T,C0,C1,C2,C3 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4 + typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T,C0,C1,C2,C3,C4 > { - typedef vector5_c< T,C0,C1,C2,C3,C4 > type; + typedef typename vector5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T,C0,C1,C2,C3,C4,C5 > { - typedef vector6_c< T,C0,C1,C2,C3,C4,C5 > type; + typedef typename vector6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T,C0,C1,C2,C3,C4,C5,C6 > { - typedef vector7_c< T,C0,C1,C2,C3,C4,C5,C6 > type; + typedef typename vector7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 > -struct vector_c< T,C0,C1,C2,C3,C4,C5,C6,C7,LONG_MAX,LONG_MAX > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > : vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { - typedef vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > type; + typedef typename vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 > -struct vector_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,LONG_MAX > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { - typedef vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > type; + typedef typename vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; -// primary template (not a specialization!) template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 > -struct vector_c +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { - typedef vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > type; + typedef typename vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename vector11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename vector12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename vector13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename vector14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename vector15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename vector16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename vector17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename vector18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename vector19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename vector20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp b/include/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp index bea9b5f..26de94c 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp @@ -1,9 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/advance_backward.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> @@ -22,7 +28,7 @@ struct advance_backward<1> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; + typedef typename prior<iter0>::type iter1; typedef iter1 type; }; }; @@ -33,8 +39,8 @@ struct advance_backward<2> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; typedef iter2 type; }; }; @@ -45,9 +51,9 @@ struct advance_backward<3> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; - typedef typename iter2::prior iter3; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; + typedef typename prior<iter2>::type iter3; typedef iter3 type; }; }; @@ -58,10 +64,10 @@ struct advance_backward<4> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::prior iter1; - typedef typename iter1::prior iter2; - typedef typename iter2::prior iter3; - typedef typename iter3::prior iter4; + typedef typename prior<iter0>::type iter1; + typedef typename prior<iter1>::type iter2; + typedef typename prior<iter2>::type iter3; + typedef typename prior<iter3>::type iter4; typedef iter4 type; }; }; @@ -71,12 +77,21 @@ struct advance_backward { template< typename Iterator > struct apply { - typedef typename advance_backward<4>::template apply<Iterator>::type chunk_result_; - typedef typename advance_backward<( (N - 4) < 0 ? 0 : N - 4 )>::template apply<chunk_result_>::type type; + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp b/include/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp index accb46c..b137cc7 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp @@ -1,9 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/advance_forward.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> @@ -22,7 +28,7 @@ struct advance_forward<1> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; + typedef typename next<iter0>::type iter1; typedef iter1 type; }; }; @@ -33,8 +39,8 @@ struct advance_forward<2> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; typedef iter2 type; }; }; @@ -45,9 +51,9 @@ struct advance_forward<3> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; - typedef typename iter2::next iter3; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; + typedef typename next<iter2>::type iter3; typedef iter3 type; }; }; @@ -58,10 +64,10 @@ struct advance_forward<4> template< typename Iterator > struct apply { typedef Iterator iter0; - typedef typename iter0::next iter1; - typedef typename iter1::next iter2; - typedef typename iter2::next iter3; - typedef typename iter3::next iter4; + typedef typename next<iter0>::type iter1; + typedef typename next<iter1>::type iter2; + typedef typename next<iter2>::type iter3; + typedef typename next<iter3>::type iter4; typedef iter4 type; }; }; @@ -71,12 +77,21 @@ struct advance_forward { template< typename Iterator > struct apply { - typedef typename advance_forward<4>::template apply<Iterator>::type chunk_result_; - typedef typename advance_forward<( (N - 4) < 0 ? 0 : N - 4 )>::template apply<chunk_result_>::type type; + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; }; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/and.hpp b/include/boost/mpl/aux_/preprocessed/plain/and.hpp index acfa690..163913f 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/and.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/and.hpp @@ -1,5 +1,13 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/and.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { @@ -33,8 +41,8 @@ struct and_impl< } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ @@ -45,17 +53,12 @@ struct and_ > { - BOOST_MPL_AUX_LAMBDA_SUPPORT( - 5 - , and_ - , (T1, T2, T3, T4, T5) - ) }; -BOOST_MPL_AUX_VOID_SPEC_EXT( +BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) -}} // namespace boost::mpl +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/apply.hpp b/include/boost/mpl/aux_/preprocessed/plain/apply.hpp index aa8e22b..89d9e4b 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/apply.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/apply.hpp @@ -1,24 +1,32 @@ -// preprocessed version of 'boost/mpl/apply.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/apply.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename F, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ + typename F > -struct apply; +struct apply0 -template< typename F > -struct apply0 : F + : apply_wrap0< + typename lambda<F>::type + + > { }; template< typename F > -struct apply< F,void_,void_,void_,void_,void_ > +struct apply< F,na,na,na,na,na > : apply0<F> { }; @@ -27,8 +35,10 @@ template< typename F, typename T1 > struct apply1 - : F::template apply< - T1 + + : apply_wrap1< + typename lambda<F>::type + , T1 > { }; @@ -36,7 +46,7 @@ struct apply1 template< typename F, typename T1 > -struct apply< F,T1,void_,void_,void_,void_ > +struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; @@ -45,8 +55,10 @@ template< typename F, typename T1, typename T2 > struct apply2 - : F::template apply< - T1, T2 + + : apply_wrap2< + typename lambda<F>::type + , T1, T2 > { }; @@ -54,7 +66,7 @@ struct apply2 template< typename F, typename T1, typename T2 > -struct apply< F,T1,T2,void_,void_,void_ > +struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; @@ -63,8 +75,10 @@ template< typename F, typename T1, typename T2, typename T3 > struct apply3 - : F::template apply< - T1, T2, T3 + + : apply_wrap3< + typename lambda<F>::type + , T1, T2, T3 > { }; @@ -72,7 +86,7 @@ struct apply3 template< typename F, typename T1, typename T2, typename T3 > -struct apply< F,T1,T2,T3,void_,void_ > +struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; @@ -81,8 +95,10 @@ template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 - : F::template apply< - T1, T2, T3, T4 + + : apply_wrap4< + typename lambda<F>::type + , T1, T2, T3, T4 > { }; @@ -90,7 +106,7 @@ struct apply4 template< typename F, typename T1, typename T2, typename T3, typename T4 > -struct apply< F,T1,T2,T3,T4,void_ > +struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; @@ -100,13 +116,15 @@ template< , typename T5 > struct apply5 - : F::template apply< - T1, T2, T3, T4, T5 + + : apply_wrap5< + typename lambda<F>::type + , T1, T2, T3, T4, T5 > { }; -// primary template (not a specialization!) +/// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -117,6 +135,5 @@ struct apply { }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp b/include/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp new file mode 100644 index 0000000..bd50b89 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp @@ -0,0 +1,52 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp b/include/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp new file mode 100644 index 0000000..47882ad --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp @@ -0,0 +1,70 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + > +struct apply_wrap0 + + : F::template apply< > +{ +}; + +template< + typename F, typename T1 + > +struct apply_wrap1 + + : F::template apply<T1> +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply_wrap2 + + : F::template apply< T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap3 + + : F::template apply< T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap4 + + : F::template apply< T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap5 + + : F::template apply< T1,T2,T3,T4,T5 > +{ +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/plain/arg.hpp b/include/boost/mpl/aux_/preprocessed/plain/arg.hpp index d7097f8..4e404a6 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/arg.hpp @@ -1,26 +1,30 @@ -// preprocessed version of 'boost/mpl/arg.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-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) +// -template<> struct arg<-1> +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > { static int const value = -1; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -28,20 +32,17 @@ template<> struct arg<1> { static int const value = 1; typedef arg<2> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -49,20 +50,17 @@ template<> struct arg<2> { static int const value = 2; typedef arg<3> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -70,20 +68,17 @@ template<> struct arg<3> { static int const value = 3; typedef arg<4> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -91,20 +86,17 @@ template<> struct arg<4> { static int const value = 4; typedef arg<5> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; @@ -112,25 +104,20 @@ template<> struct arg<5> { static int const value = 5; typedef arg<6> next; - BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; - - private: - static bool const nv = !is_void_<type>::value; - BOOST_STATIC_ASSERT(nv); - + BOOST_MPL_ASSERT_NOT((is_na<type>)); }; }; -BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1, int, arg) - -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff --git a/include/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp index 73c4182..355c64b 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp @@ -1,11 +1,16 @@ -// preprocessed version of 'boost/mpl/bind.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-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) +// -BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) -BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { @@ -18,25 +23,12 @@ struct resolve_bind_arg typedef T type; }; -} // namespace aux - -template< - typename F, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - > -struct bind; - -template< typename F, typename T > struct bind1st; -template< typename F, typename T > struct bind2nd; - -namespace aux { - template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > -struct resolve_bind_arg< arg<N>,U1,U2,U3,U4,U5 > +struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 > { - typedef typename mpl::arg<N>::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type; }; template< @@ -44,50 +36,22 @@ template< , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > -struct resolve_bind_arg< bind<F,T1,T2,T3,T4,T5>,U1,U2,U3,U4,U5 > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind1st<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind1st< F,T > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind2nd<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind2nd< F,T > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux -BOOST_MPL_AUX_ARITY_SPEC( - 6 - , bind - ) - -BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) -BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) - template< typename F > struct bind0 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { @@ -95,7 +59,10 @@ struct bind0 typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: - typedef typename f_::type type; + typedef typename apply_wrap0< + f_ + >::type type; + }; }; @@ -106,11 +73,11 @@ template< , typename U5 > struct resolve_bind_arg< - bind0<F>,U1, U2, U3, U4, U5 + bind0<F>, U1, U2, U3, U4, U5 > { typedef bind0<F> f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -120,7 +87,7 @@ BOOST_MPL_AUX_ARITY_SPEC(1, bind0) template< typename F > -struct bind< F,void_,void_,void_,void_,void_ > +struct bind< F,na,na,na,na,na > : bind0<F> { }; @@ -131,17 +98,21 @@ template< struct bind1 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: - typedef typename f_::template apply<t1>::type type; + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + }; }; @@ -152,11 +123,11 @@ template< , typename U4, typename U5 > struct resolve_bind_arg< - bind1< F,T1 >,U1, U2, U3, U4, U5 + bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -166,7 +137,7 @@ BOOST_MPL_AUX_ARITY_SPEC(2, bind1) template< typename F, typename T1 > -struct bind< F,T1,void_,void_,void_,void_ > +struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; @@ -177,18 +148,22 @@ template< struct bind2 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: - typedef typename f_::template apply< t1,t2 >::type type; + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + }; }; @@ -199,11 +174,11 @@ template< , typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind2< F,T1,T2 >,U1, U2, U3, U4, U5 + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -213,7 +188,7 @@ BOOST_MPL_AUX_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > -struct bind< F,T1,T2,void_,void_,void_ > +struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; @@ -224,19 +199,23 @@ template< struct bind3 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: - typedef typename f_::template apply< t1,t2,t3 >::type type; + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + }; }; @@ -247,11 +226,11 @@ template< , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind3< F,T1,T2,T3 >,U1, U2, U3, U4, U5 + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -261,7 +240,7 @@ BOOST_MPL_AUX_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > -struct bind< F,T1,T2,T3,void_,void_ > +struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; @@ -272,20 +251,25 @@ template< struct bind4 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; - typedef typename aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 >::type t4; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: - typedef typename f_::template apply< t1,t2,t3,t4 >::type type; + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + }; }; @@ -296,11 +280,11 @@ template< , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind4< F,T1,T2,T3,T4 >,U1, U2, U3, U4, U5 + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -310,7 +294,7 @@ BOOST_MPL_AUX_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > -struct bind< F,T1,T2,T3,T4,void_ > +struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; @@ -322,21 +306,26 @@ template< struct bind5 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; - typedef typename aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 >::type t1; - typedef typename aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 >::type t2; - typedef typename aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 >::type t3; - typedef typename aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 >::type t4; - typedef typename aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 >::type t5; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; + typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: - typedef typename f_::template apply< t1,t2,t3,t4,t5 >::type type; + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + }; }; @@ -348,18 +337,18 @@ template< , typename U5 > struct resolve_bind_arg< - bind5< F,T1,T2,T3,T4,T5 >,U1, U2, U3, U4, U5 + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) -// primary template (not a specialization!) +/// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -370,34 +359,76 @@ struct bind { }; -template< typename F, typename T > -struct bind1st +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > { template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply - : F::template apply< T,U > { + private: + typedef mpl::arg<1> n1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; }; }; -template< typename F, typename T > -struct bind2nd +template< + template< typename T1, typename T2, typename T3 > class F, typename Tag + > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct eval_if; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< eval_if,Tag > + , T1, T2, T3 + > { template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply - : F::template apply< U,T > { + private: + typedef mpl::arg<1> n1; + typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; + typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; + typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; + typedef typename eval_if< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; }; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/bind.hpp b/include/boost/mpl/aux_/preprocessed/plain/bind.hpp index 48ff9a6..9f12c5b 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/bind.hpp @@ -1,11 +1,16 @@ -// preprocessed version of 'boost/mpl/bind.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-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) +// -BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) -BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +// Preprocessed version of "boost/mpl/bind.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { @@ -24,38 +29,25 @@ template< > struct replace_unnamed_arg { - typedef Arg next_arg; + typedef Arg next; typedef T type; }; template< typename Arg > -struct replace_unnamed_arg< arg<-1>,Arg > +struct replace_unnamed_arg< arg< -1 >, Arg > { - typedef typename Arg::next next_arg; + typedef typename Arg::next next; typedef Arg type; }; -} // namespace aux - -template< - typename F, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - > -struct bind; - -template< typename F, typename T > struct bind1st; -template< typename F, typename T > struct bind2nd; - -namespace aux { - template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > -struct resolve_bind_arg< arg<N>,U1,U2,U3,U4,U5 > +struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 > { - typedef typename mpl::arg<N>::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type; }; template< @@ -63,61 +55,36 @@ template< , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > -struct resolve_bind_arg< bind<F,T1,T2,T3,T4,T5>,U1,U2,U3,U4,U5 > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind1st<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind1st< F,T > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; -}; - -template< - typename F, typename T, typename U1, typename U2, typename U3 - , typename U4, typename U5 - > -struct resolve_bind_arg< bind2nd<F,T>,U1,U2,U3,U4,U5 > -{ - typedef bind2nd< F,T > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux -BOOST_MPL_AUX_ARITY_SPEC( - 6 - , bind - ) - -BOOST_MPL_AUX_ARITY_SPEC(2, bind1st) -BOOST_MPL_AUX_ARITY_SPEC(2, bind2nd) - template< typename F > struct bind0 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// public: - typedef typename f_::type type; + typedef typename apply_wrap0< + f_ + >::type type; + }; }; @@ -128,11 +95,11 @@ template< , typename U5 > struct resolve_bind_arg< - bind0<F>,U1, U2, U3, U4, U5 + bind0<F>, U1, U2, U3, U4, U5 > { typedef bind0<F> f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -142,7 +109,7 @@ BOOST_MPL_AUX_ARITY_SPEC(1, bind0) template< typename F > -struct bind< F,void_,void_,void_,void_,void_ > +struct bind< F,na,na,na,na,na > : bind0<F> { }; @@ -153,24 +120,28 @@ template< struct bind1 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// public: - typedef typename f_::template apply<t1>::type type; + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + }; }; @@ -181,11 +152,11 @@ template< , typename U4, typename U5 > struct resolve_bind_arg< - bind1< F,T1 >,U1, U2, U3, U4, U5 + bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -195,7 +166,7 @@ BOOST_MPL_AUX_ARITY_SPEC(2, bind1) template< typename F, typename T1 > -struct bind< F,T1,void_,void_,void_,void_ > +struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; @@ -206,29 +177,33 @@ template< struct bind2 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// public: - typedef typename f_::template apply< t1,t2 >::type type; + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + }; }; @@ -239,11 +214,11 @@ template< , typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind2< F,T1,T2 >,U1, U2, U3, U4, U5 + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -253,7 +228,7 @@ BOOST_MPL_AUX_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > -struct bind< F,T1,T2,void_,void_,void_ > +struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; @@ -264,34 +239,38 @@ template< struct bind3 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// public: - typedef typename f_::template apply< t1,t2,t3 >::type type; + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + }; }; @@ -302,11 +281,11 @@ template< , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind3< F,T1,T2,T3 >,U1, U2, U3, U4, U5 + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -316,7 +295,7 @@ BOOST_MPL_AUX_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > -struct bind< F,T1,T2,T3,void_,void_ > +struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; @@ -327,39 +306,44 @@ template< struct bind4 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; - typedef typename r4::next_arg n5; - typedef typename aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 >::type t4; - + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// public: - typedef typename f_::template apply< t1,t2,t3,t4 >::type type; + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + }; }; @@ -370,11 +354,11 @@ template< , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< - bind4< F,T1,T2,T3,T4 >,U1, U2, U3, U4, U5 + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux @@ -384,7 +368,7 @@ BOOST_MPL_AUX_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > -struct bind< F,T1,T2,T3,T4,void_ > +struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; @@ -396,44 +380,49 @@ template< struct bind5 { template< - typename U1 = void_, typename U2 = void_, typename U3 = void_ - , typename U4 = void_, typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply { private: - typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; + typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; - + /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 >::type t1; - + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 >::type t2; - + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 >::type t3; - + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; - typedef typename r4::next_arg n5; - typedef typename aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 >::type t4; - + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; - typedef typename r5::next_arg n6; - typedef typename aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 >::type t5; - + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + /// public: - typedef typename f_::template apply< t1,t2,t3,t4,t5 >::type type; + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + }; }; @@ -445,18 +434,18 @@ template< , typename U5 > struct resolve_bind_arg< - bind5< F,T1,T2,T3,T4,T5 >,U1, U2, U3, U4, U5 + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; - typedef typename f_::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) -// primary template (not a specialization!) +/// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 @@ -467,34 +456,100 @@ struct bind { }; -template< typename F, typename T > -struct bind1st +/// if_/eval_if specializations +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > { template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply - : F::template apply< T,U > { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; }; }; -template< typename F, typename T > -struct bind2nd +template< + template< typename T1, typename T2, typename T3 > class F, typename Tag + > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct eval_if; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< eval_if,Tag > + , T1, T2, T3 + > { template< - typename U - , typename U2 = void_, typename U3 = void_, typename U4 = void_ - , typename U5 = void_ + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na > struct apply - : F::template apply< U,T > { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + /// + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + /// + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + /// + typedef typename eval_if< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; }; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp b/include/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp new file mode 100644 index 0000000..d80a72b --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp @@ -0,0 +1,52 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/bind_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct bind; + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/plain/bitand.hpp b/include/boost/mpl/aux_/preprocessed/plain/bitand.hpp new file mode 100644 index 0000000..3ddc7a6 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/bitand.hpp @@ -0,0 +1,139 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitand.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitand_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitand_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitand_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitand_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitand_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitand_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitand_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitand_ + : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> +{ +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitand_< N1,N2,N3,N4,na > + + : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitand_< N1,N2,N3,na,na > + + : bitand_< bitand_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitand_< N1,N2,na,na,na > + : bitand_impl< + typename bitand_tag<N1>::type + , typename bitand_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitand_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitand_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/bitor.hpp b/include/boost/mpl/aux_/preprocessed/plain/bitor.hpp new file mode 100644 index 0000000..cfc831d --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/bitor.hpp @@ -0,0 +1,139 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitor_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitor_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitor_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitor_ + : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> +{ +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitor_< N1,N2,N3,N4,na > + + : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitor_< N1,N2,N3,na,na > + + : bitor_< bitor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitor_< N1,N2,na,na,na > + : bitor_impl< + typename bitor_tag<N1>::type + , typename bitor_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/bitxor.hpp b/include/boost/mpl/aux_/preprocessed/plain/bitxor.hpp new file mode 100644 index 0000000..27875f1 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/bitxor.hpp @@ -0,0 +1,139 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/bitxor.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct bitxor_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< bitxor_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< bitxor_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct bitxor_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitxor_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct bitxor_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct bitxor_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct bitxor_ + : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> +{ +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct bitxor_< N1,N2,N3,N4,na > + + : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct bitxor_< N1,N2,N3,na,na > + + : bitxor_< bitxor_< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct bitxor_< N1,N2,na,na,na > + : bitxor_impl< + typename bitxor_tag<N1>::type + , typename bitxor_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , bitxor_ + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) + +}} + +namespace boost { namespace mpl { +template<> +struct bitxor_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/divides.hpp b/include/boost/mpl/aux_/preprocessed/plain/divides.hpp new file mode 100644 index 0000000..927db3f --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/divides.hpp @@ -0,0 +1,138 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/divides.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct divides_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< divides_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< divides_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct divides_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct divides_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct divides_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct divides_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct divides + : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> +{ +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct divides< N1,N2,N3,N4,na > + + : divides< divides< divides< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct divides< N1,N2,N3,na,na > + + : divides< divides< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct divides< N1,N2,na,na,na > + : divides_impl< + typename divides_tag<N1>::type + , typename divides_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , divides + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) + +}} + +namespace boost { namespace mpl { +template<> +struct divides_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/equal_to.hpp b/include/boost/mpl/aux_/preprocessed/plain/equal_to.hpp new file mode 100644 index 0000000..f1d26e9 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/equal_to.hpp @@ -0,0 +1,89 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct equal_to + : equal_to_impl< + typename equal_to_tag<N1>::type + , typename equal_to_tag<N2>::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/plain/fold_backward_impl.hpp deleted file mode 100644 index 032cfec..0000000 --- a/include/boost/mpl/aux_/preprocessed/plain/fold_backward_impl.hpp +++ /dev/null @@ -1,223 +0,0 @@ -// preprocessed version of 'boost/mpl/aux_/fold_backward_impl.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { -namespace aux { - -// forward declaration - -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< 0,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef fwd_state0 bkwd_state0; - typedef bkwd_state0 state; - typedef iter0 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< 1,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply<fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - - - typedef fwd_state1 bkwd_state1; - typedef typename BackwardOp::template apply<bkwd_state1, typename iter0::type>::type bkwd_state0; - typedef bkwd_state0 state; - typedef iter1 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< 2,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply<fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - - - typedef fwd_state2 bkwd_state2; - typedef typename BackwardOp::template apply<bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename BackwardOp::template apply<bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter2 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< 3,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply<fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply<fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - - - typedef fwd_state3 bkwd_state3; - typedef typename BackwardOp::template apply<bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename BackwardOp::template apply<bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename BackwardOp::template apply<bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter3 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< 4,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply<fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply<fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply<fwd_state3, typename iter3::type>::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fwd_state4 bkwd_state4; - typedef typename BackwardOp::template apply<bkwd_state4, typename iter3::type>::type bkwd_state3; - typedef typename BackwardOp::template apply<bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename BackwardOp::template apply<bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename BackwardOp::template apply<bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter4 iterator; -}; - -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply<fwd_state0, typename iter0::type>::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<fwd_state1, typename iter1::type>::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply<fwd_state2, typename iter2::type>::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply<fwd_state3, typename iter3::type>::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fold_backward_impl< - ( (N - 4) < 0 ? 0 : N - 4 ) - , iter4 - , Last - , fwd_state4 - , BackwardOp - , ForwardOp - > nested_chunk; - - typedef typename nested_chunk::state bkwd_state4; - typedef typename BackwardOp::template apply<bkwd_state4, typename iter3::type>::type bkwd_state3; - typedef typename BackwardOp::template apply<bkwd_state3, typename iter2::type>::type bkwd_state2; - typedef typename BackwardOp::template apply<bkwd_state2, typename iter1::type>::type bkwd_state1; - typedef typename BackwardOp::template apply<bkwd_state1, typename iter0::type>::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef typename nested_chunk::iterator iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< -1,First,Last,State,BackwardOp,ForwardOp > -{ - typedef fold_backward_impl< - -1 - , typename First::next - , Last - - ,typename ForwardOp::template apply<State, typename First::type>::type - , BackwardOp - , ForwardOp - > nested_step; - - typedef typename BackwardOp::template apply<typename nested_step::state, typename First::type>::type state; - typedef typename nested_step::iterator iterator; -}; - -template< - typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct fold_backward_impl< -1,Last,Last,State,BackwardOp,ForwardOp > -{ - typedef State state; - typedef Last iterator; -}; - -} // namespace aux -} // namespace mpl -} // namespace boost diff --git a/include/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp index b35cdf8..00c2e55 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp @@ -1,14 +1,20 @@ -// preprocessed version of 'boost/mpl/aux_/fold_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// -// forward declaration +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration template< - long N + int N , typename First , typename Last , typename State @@ -40,8 +46,8 @@ struct fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply<state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; typedef state1 state; @@ -58,10 +64,10 @@ struct fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply<state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<state1, typename iter1::type>::type state2; - typedef typename iter1::next iter2; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; typedef state2 state; @@ -78,12 +84,12 @@ struct fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply<state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<state1, typename iter1::type>::type state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply<state2, typename iter2::type>::type state3; - typedef typename iter2::next iter3; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; + typedef typename next<iter2>::type iter3; typedef state3 state; @@ -100,14 +106,14 @@ struct fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply<state0, typename iter0::type>::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply<state1, typename iter1::type>::type state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply<state2, typename iter2::type>::type state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply<state3, typename iter3::type>::type state4; - typedef typename iter3::next iter4; + typedef typename apply2< ForwardOp, state0, typename deref<iter0>::type >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref<iter1>::type >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref<iter2>::type >::type state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref<iter3>::type >::type state4; + typedef typename next<iter3>::type iter4; typedef state4 state; @@ -115,7 +121,7 @@ struct fold_impl< 4,First,Last,State,ForwardOp > }; template< - long N + int N , typename First , typename Last , typename State @@ -152,10 +158,9 @@ template< struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 - , typename First::next + , typename next<First>::type , Last - - ,typename ForwardOp::template apply<State, typename First::type>::type + , typename apply2<ForwardOp,State, typename deref<First>::type>::type , ForwardOp > { @@ -172,6 +177,4 @@ struct fold_impl< -1,Last,Last,State,ForwardOp > typedef Last iterator; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp index 60844fb..89d946e 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp @@ -1,30 +1,15 @@ -// preprocessed version of 'boost/mpl/aux_/full_lambda.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Aleksey Gurtovoy 2001-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) +// -template< - typename T - , typename Tag - , typename Protect = false_ - - > -struct lambda_impl -{ - typedef false_ is_le; - typedef T type; -}; +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! -template< - typename T - , typename Tag = void_ - - > -struct lambda - : lambda_impl< T,Tag,false_ > -{ -}; +namespace boost { namespace mpl { namespace aux { @@ -45,44 +30,56 @@ struct lambda_or< false,false,false,false,false > } // namespace aux -template< int N, typename Tag, typename Protect > -struct lambda_impl< arg<N>,Tag,Protect > +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg<N>, Tag > { typedef true_ is_le; - typedef mpl::arg<N> type; + typedef mpl::arg<N> result_; // qualified for the sake of MIPSpro 7.41 + typedef protect<result_> type; }; template< typename F , typename Tag - , typename Protect - > -struct lambda_impl< - bind0<F> - , Tag - , Protect > +struct lambda< + bind0<F> + , Tag + + > { typedef false_ is_le; typedef bind0< F - > type; -}; + > result_; -template< - template< typename P1 > class F - , typename T1 - , typename Tag - > -struct lambda< F<T1>,Tag > - : lambda_impl< F<T1>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > @@ -90,33 +87,24 @@ struct le_result1 { typedef F< typename L1::type - > type; + > result_; + + typedef result_ type; }; template< - typename Tag - , template< typename P1 > class F - , typename L1 - > -struct le_result1< true_,Tag,false_,F,L1 > + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > - , typename L1::type - > type; -}; + , typename L1::result_ + > result_; -template< - typename Tag - , template< typename P1 > class F - , typename L1 - > -struct le_result1< true_,Tag,true_,F,L1 > -{ - typedef protect< bind1< - quote1< F,Tag > - , typename L1::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -125,58 +113,50 @@ template< template< typename P1 > class F , typename T1 , typename Tag - , typename Protect > -struct lambda_impl< - F<T1>, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef aux::lambda_or< - l1::is_le::value - > is_le; - - typedef typename aux::le_result1< - typename is_le::type +struct lambda< + F<T1> , Tag - , Protect - , F - , l1 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag - , typename Protect - > -struct lambda_impl< - bind1< F,T1 > - , Tag - , Protect > +struct lambda< + bind1< F,T1 > + , Tag + + > { typedef false_ is_le; typedef bind1< F , T1 - > type; -}; + > result_; -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - , typename Tag - > -struct lambda< F<T1,T2>,Tag > - : lambda_impl< F<T1,T2>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > @@ -184,7 +164,9 @@ struct le_result2 { typedef F< typename L1::type, typename L2::type - > type; + > result_; + + typedef result_ type; }; template< @@ -192,25 +174,14 @@ template< , template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true_,Tag,false_,F,L1,L2 > +struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > - , typename L1::type, typename L2::type - > type; -}; + , typename L1::result_, typename L2::result_ + > result_; -template< - typename Tag - , template< typename P1, typename P2 > class F - , typename L1, typename L2 - > -struct le_result2< true_,Tag,true_,F,L1,L2 > -{ - typedef protect< bind2< - quote2< F,Tag > - , typename L1::type, typename L2::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -219,60 +190,55 @@ template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value - > is_le; - - typedef typename aux::le_result2< - typename is_le::type +struct lambda< + F< T1,T2 > , Tag - , Protect - , F - , l1, l2 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag - , typename Protect - > -struct lambda_impl< - bind2< F,T1,T2 > - , Tag - , Protect > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > { typedef false_ is_le; typedef bind2< F , T1, T2 - > type; -}; + > result_; -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - , typename Tag - > -struct lambda< F<T1,T2,T3>,Tag > - : lambda_impl< F<T1,T2,T3>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > @@ -280,7 +246,9 @@ struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type - > type; + > result_; + + typedef result_ type; }; template< @@ -288,25 +256,14 @@ template< , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true_,Tag,false_,F,L1,L2,L3 > +struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; -template< - typename Tag - , template< typename P1, typename P2, typename P3 > class F - , typename L1, typename L2, typename L3 - > -struct le_result3< true_,Tag,true_,F,L1,L2,L3 > -{ - typedef protect< bind3< - quote3< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -315,61 +272,57 @@ template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - > is_le; - - typedef typename aux::le_result3< - typename is_le::type +struct lambda< + F< T1,T2,T3 > , Tag - , Protect - , F - , l1, l2, l3 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag - , typename Protect - > -struct lambda_impl< - bind3< F,T1,T2,T3 > - , Tag - , Protect > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 - > type; -}; + > result_; -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename T1, typename T2, typename T3, typename T4 - , typename Tag - > -struct lambda< F<T1,T2,T3,T4>,Tag > - : lambda_impl< F<T1,T2,T3,T4>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > @@ -378,7 +331,9 @@ struct le_result4 typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type - > type; + > result_; + + typedef result_ type; }; template< @@ -386,27 +341,15 @@ template< , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true_,Tag,false_,F,L1,L2,L3,L4 > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; -template< - typename Tag - , template< typename P1, typename P2, typename P3, typename P4 > class F - , typename L1, typename L2, typename L3, typename L4 - > -struct le_result4< true_,Tag,true_,F,L1,L2,L3,L4 > -{ - typedef protect< bind4< - quote4< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -415,67 +358,59 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - typedef lambda_impl< T4,Tag > l4; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - , l4::is_le::value - > is_le; - - typedef typename aux::le_result4< - typename is_le::type +struct lambda< + F< T1,T2,T3,T4 > , Tag - , Protect - , F - , l1, l2, l3, l4 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag - , typename Protect - > -struct lambda_impl< - bind4< F,T1,T2,T3,T4 > - , Tag - , Protect > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 - > type; -}; + > result_; -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename T1, typename T2, typename T3, typename T4, typename T5 - , typename Tag - > -struct lambda< F<T1,T2,T3,T4,T5>,Tag > - : lambda_impl< F<T1,T2,T3,T4,T5>,Tag,true_ > -{ + typedef result_ type; }; namespace aux { template< - typename IsLE, typename Tag, typename Protect + typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > @@ -484,43 +419,25 @@ struct le_result5 typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type - > type; + > result_; + + typedef result_ type; }; template< typename Tag - , template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true_,Tag,false_,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type, typename L5::type - > type; -}; + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; -template< - typename Tag - , template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename L1, typename L2, typename L3, typename L4, typename L5 - > -struct le_result5< true_,Tag,true_,F,L1,L2,L3,L4,L5 > -{ - typedef protect< bind5< - quote5< F,Tag > - , typename L1::type, typename L2::type, typename L3::type - , typename L4::type, typename L5::type - > > type; + typedef protect<result_> type; }; } // namespace aux @@ -533,100 +450,105 @@ template< class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag - , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4,T5 >, Tag, Protect - > -{ - typedef lambda_impl< T1,Tag > l1; - typedef lambda_impl< T2,Tag > l2; - typedef lambda_impl< T3,Tag > l3; - typedef lambda_impl< T4,Tag > l4; - typedef lambda_impl< T5,Tag > l5; - - typedef aux::lambda_or< - l1::is_le::value, l2::is_le::value, l3::is_le::value - , l4::is_le::value, l5::is_le::value - > is_le; - - typedef typename aux::le_result5< - typename is_le::type +struct lambda< + F< T1,T2,T3,T4,T5 > , Tag - , Protect - , F - , l1, l2, l3, l4, l5 - >::type type; + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag - , typename Protect - > -struct lambda_impl< - bind5< F,T1,T2,T3,T4,T5 > - , Tag - , Protect > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 - > type; + > result_; + + typedef result_ type; }; -// special case for 'protect' -template< typename T, typename Tag, typename Protect > -struct lambda_impl< protect<T>,Tag,Protect > +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< protect<T>, Tag > { typedef false_ is_le; - typedef protect<T> type; + typedef protect<T> result_; + typedef result_ type; }; -// specializations for main 'bind', 'bind1st' and 'bind2nd' forms +/// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag - , typename Protect - > -struct lambda_impl< - bind< F,T1,T2,T3,T4,T5 > - , Tag - , Protect - > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > { typedef false_ is_le; - typedef bind< F,T1,T2,T3,T4,T5 > type; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; }; +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars + template< - typename F, typename T - , typename Tag - , typename Protect + typename F, typename Tag1, typename Tag2 > -struct lambda_impl< bind1st<F,T>,Tag,Protect > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > { - typedef false_ is_le; - typedef bind1st< F,T > type; + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef aux::le_result2<is_le, Tag2, mpl::lambda, l1, l2> le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; }; -template< - typename F, typename T - , typename Tag - , typename Protect - > -struct lambda_impl< bind2nd<F,T>,Tag,Protect > -{ - typedef false_ is_le; - typedef bind2nd< F,T > type; -}; +BOOST_MPL_AUX_NA_SPEC(2, lambda) -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/greater.hpp b/include/boost/mpl/aux_/preprocessed/plain/greater.hpp new file mode 100644 index 0000000..4621d5c --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/greater.hpp @@ -0,0 +1,89 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/greater.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater + : greater_impl< + typename greater_tag<N1>::type + , typename greater_tag<N2>::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp b/include/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp new file mode 100644 index 0000000..9cee01b --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp @@ -0,0 +1,89 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/greater_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct greater_equal + : greater_equal_impl< + typename greater_equal_tag<N1>::type + , typename greater_equal_tag<N2>::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/inherit.hpp b/include/boost/mpl/aux_/preprocessed/plain/inherit.hpp new file mode 100644 index 0000000..8b34e71 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/inherit.hpp @@ -0,0 +1,125 @@ + +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/inherit.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) + > +struct inherit2 + : T1, T2 +{ + typedef inherit2 type; +}; + +template< typename T1 > +struct inherit2< T1,empty_base > +{ + typedef T1 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) +}; + +template< typename T2 > +struct inherit2< empty_base,T2 > +{ + typedef T2 type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) +}; + +template<> +struct inherit2< empty_base,empty_base > +{ + typedef empty_base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, inherit2) + +template< + typename T1 = na, typename T2 = na, typename T3 = na + > +struct inherit3 + : inherit2< + typename inherit2< + T1, T2 + >::type + , T3 + > +{ +}; + +BOOST_MPL_AUX_NA_SPEC(3, inherit3) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + > +struct inherit4 + : inherit2< + typename inherit3< + T1, T2, T3 + >::type + , T4 + > +{ +}; + +BOOST_MPL_AUX_NA_SPEC(4, inherit4) + +template< + typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na + , typename T5 = na + > +struct inherit5 + : inherit2< + typename inherit4< + T1, T2, T3, T4 + >::type + , T5 + > +{ +}; + +BOOST_MPL_AUX_NA_SPEC(5, inherit5) + +/// primary template + +template< + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + > +struct inherit + : inherit5< T1,T2,T3,T4,T5 > +{ +}; + +template<> +struct inherit< na,na,na,na,na > +{ + template< + + typename T1 = empty_base, typename T2 = empty_base + , typename T3 = empty_base, typename T4 = empty_base + , typename T5 = empty_base + + > + struct apply + : inherit< T1,T2,T3,T4,T5 > + { + }; +}; + +BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) +}} + diff --git a/include/boost/mpl/aux_/preprocessed/plain/iter_fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/plain/iter_fold_backward_impl.hpp deleted file mode 100644 index b45db27..0000000 --- a/include/boost/mpl/aux_/preprocessed/plain/iter_fold_backward_impl.hpp +++ /dev/null @@ -1,222 +0,0 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_backward_impl.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { -namespace aux { - -// forward declaration - -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl< 0,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef fwd_state0 bkwd_state0; - typedef bkwd_state0 state; - typedef iter0 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl< 1,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply< fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; - - - typedef fwd_state1 bkwd_state1; - typedef typename BackwardOp::template apply< bkwd_state1,iter0 >::type bkwd_state0; - typedef bkwd_state0 state; - typedef iter1 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl< 2,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply< fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; - - - typedef fwd_state2 bkwd_state2; - typedef typename BackwardOp::template apply< bkwd_state2,iter1 >::type bkwd_state1; - typedef typename BackwardOp::template apply< bkwd_state1,iter0 >::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter2 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl< 3,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply< fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply< fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; - - - typedef fwd_state3 bkwd_state3; - typedef typename BackwardOp::template apply< bkwd_state3,iter2 >::type bkwd_state2; - typedef typename BackwardOp::template apply< bkwd_state2,iter1 >::type bkwd_state1; - typedef typename BackwardOp::template apply< bkwd_state1,iter0 >::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter3 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl< 4,First,Last,State,BackwardOp,ForwardOp > -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply< fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply< fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply< fwd_state3,iter3 >::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef fwd_state4 bkwd_state4; - typedef typename BackwardOp::template apply< bkwd_state4,iter3 >::type bkwd_state3; - typedef typename BackwardOp::template apply< bkwd_state3,iter2 >::type bkwd_state2; - typedef typename BackwardOp::template apply< bkwd_state2,iter1 >::type bkwd_state1; - typedef typename BackwardOp::template apply< bkwd_state1,iter0 >::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef iter4 iterator; -}; - -template< - long N - , typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl -{ - typedef First iter0; - typedef State fwd_state0; - typedef typename ForwardOp::template apply< fwd_state0,iter0 >::type fwd_state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< fwd_state1,iter1 >::type fwd_state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply< fwd_state2,iter2 >::type fwd_state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply< fwd_state3,iter3 >::type fwd_state4; - typedef typename iter3::next iter4; - - - typedef iter_fold_backward_impl< - ( (N - 4) < 0 ? 0 : N - 4 ) - , iter4 - , Last - , fwd_state4 - , BackwardOp - , ForwardOp - > nested_chunk; - - typedef typename nested_chunk::state bkwd_state4; - typedef typename BackwardOp::template apply< bkwd_state4,iter3 >::type bkwd_state3; - typedef typename BackwardOp::template apply< bkwd_state3,iter2 >::type bkwd_state2; - typedef typename BackwardOp::template apply< bkwd_state2,iter1 >::type bkwd_state1; - typedef typename BackwardOp::template apply< bkwd_state1,iter0 >::type bkwd_state0; - - - typedef bkwd_state0 state; - typedef typename nested_chunk::iterator iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl< -1,First,Last,State,BackwardOp,ForwardOp > -{ - typedef iter_fold_backward_impl< - -1 - , typename First::next - , Last - , typename ForwardOp::template apply< State,First >::type - , BackwardOp - , ForwardOp - > nested_step; - - typedef typename BackwardOp::template apply<typename nested_step::state, First>::type state; - typedef typename nested_step::iterator iterator; -}; - -template< - typename Last - , typename State - , typename BackwardOp - , typename ForwardOp - > -struct iter_fold_backward_impl< -1,Last,Last,State,BackwardOp,ForwardOp > -{ - typedef State state; - typedef Last iterator; -}; - -} // namespace aux -} // namespace mpl -} // namespace boost diff --git a/include/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp b/include/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp index 00e13ef..6951795 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp @@ -1,9 +1,16 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_if_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step @@ -23,7 +30,7 @@ struct iter_fold_if_step_impl > struct result_ { - typedef typename StateOp::template apply< State,Iterator >::type state; + typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; @@ -52,10 +59,10 @@ template< > struct iter_fold_if_forward_step { - typedef typename Predicate::template apply< State,Iterator >::type not_last; + typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator, State, ForwardOp, mpl::next< Iterator> > impl_; + >::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; @@ -69,10 +76,10 @@ template< > struct iter_fold_if_backward_step { - typedef typename Predicate::template apply< State,Iterator >::type not_last; + typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator,State,BackwardOp,identity<Iterator> > impl_; + >::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; @@ -123,6 +130,4 @@ struct iter_fold_if_impl typedef typename backward_step4::iterator iterator; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp index d4fe975..c25f136 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp @@ -1,14 +1,20 @@ -// preprocessed version of 'boost/mpl/aux_/iter_fold_impl.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { -namespace aux { +// 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) +// -// forward declaration +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration template< - long N + int N , typename First , typename Last , typename State @@ -40,8 +46,8 @@ struct iter_fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply< state0,iter0 >::type state1; - typedef typename iter0::next iter1; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; typedef state1 state; @@ -58,10 +64,10 @@ struct iter_fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply< state0,iter0 >::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< state1,iter1 >::type state2; - typedef typename iter1::next iter2; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename next<iter1>::type iter2; typedef state2 state; @@ -78,12 +84,12 @@ struct iter_fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply< state0,iter0 >::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< state1,iter1 >::type state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply< state2,iter2 >::type state3; - typedef typename iter2::next iter3; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename next<iter2>::type iter3; typedef state3 state; @@ -100,14 +106,14 @@ struct iter_fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; - typedef typename ForwardOp::template apply< state0,iter0 >::type state1; - typedef typename iter0::next iter1; - typedef typename ForwardOp::template apply< state1,iter1 >::type state2; - typedef typename iter1::next iter2; - typedef typename ForwardOp::template apply< state2,iter2 >::type state3; - typedef typename iter2::next iter3; - typedef typename ForwardOp::template apply< state3,iter3 >::type state4; - typedef typename iter3::next iter4; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename next<iter3>::type iter4; typedef state4 state; @@ -115,7 +121,7 @@ struct iter_fold_impl< 4,First,Last,State,ForwardOp > }; template< - long N + int N , typename First , typename Last , typename State @@ -152,9 +158,9 @@ template< struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 - , typename First::next + , typename next<First>::type , Last - , typename ForwardOp::template apply< State,First >::type + , typename apply2< ForwardOp,State,First >::type , ForwardOp > { @@ -171,6 +177,4 @@ struct iter_fold_impl< -1,Last,Last,State,ForwardOp > typedef Last iterator; }; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/plain/lambda_helper.hpp deleted file mode 100644 index 953d826..0000000 --- a/include/boost/mpl/aux_/preprocessed/plain/lambda_helper.hpp +++ /dev/null @@ -1,120 +0,0 @@ -// preprocessed version of 'boost/mpl/lambda_helper.hpp' header -// see the original for copyright information - -namespace boost { -namespace mpl { - -template< - template< typename P1 > class F - , typename T1 - > -struct lambda_helper1 -{ - struct rebind - { - static int const arity = 1; - typedef T1 arg1; - - template< typename U1 > struct apply - : F<U1> - { - }; - }; -}; - -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - > -struct lambda_helper2 -{ - struct rebind - { - static int const arity = 2; - typedef T1 arg1; - typedef T2 arg2; - - template< typename U1, typename U2 > struct apply - : F< U1,U2 > - { - }; - }; -}; - -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - > -struct lambda_helper3 -{ - struct rebind - { - static int const arity = 3; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - - template< typename U1, typename U2, typename U3 > struct apply - : F< U1,U2,U3 > - { - }; - }; -}; - -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename T1, typename T2, typename T3, typename T4 - > -struct lambda_helper4 -{ - struct rebind - { - static int const arity = 4; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - typedef T4 arg4; - - template< - typename U1, typename U2, typename U3, typename U4 - > - struct apply - : F< U1,U2,U3,U4 > - { - }; - }; -}; - -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename T1, typename T2, typename T3, typename T4, typename T5 - > -struct lambda_helper5 -{ - struct rebind - { - static int const arity = 5; - typedef T1 arg1; - typedef T2 arg2; - typedef T3 arg3; - typedef T4 arg4; - typedef T5 arg5; - - template< - typename U1, typename U2, typename U3, typename U4 - , typename U5 - > - struct apply - : F< U1,U2,U3,U4,U5 > - { - }; - }; -}; - -} // namespace mpl -} // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp index 4a02653..ab89996 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp @@ -1,182 +1,198 @@ -// preprocessed version of 'boost/mpl/aux_/lambda_no_ctps.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { -template< int arity_, bool Protect > struct lambda_impl +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ { - template< typename T, typename Tag > struct result_ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +template< typename Arity > struct lambda_impl +{ + template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; + typedef is_placeholder<T> is_le; }; }; -template<> struct lambda_impl<1, false> +template<> struct lambda_impl< int_<1> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef typename l1::is_le is_le1; + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value + > is_le; + typedef bind1< - f_ - , arg1 - > type; + typename F::rebind + , typename l1::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<1, true> +template<> struct lambda_impl< int_<2> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef mpl::protect< bind1< - f_ - , arg1 - > > type; - }; -}; - -template<> struct lambda_impl<2, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value + > is_le; typedef bind2< - f_ - , arg1, arg2 - > type; + typename F::rebind + , typename l1::type, typename l2::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<2, true> +template<> struct lambda_impl< int_<3> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; - typedef mpl::protect< bind2< - f_ - , arg1, arg2 - > > type; - }; -}; - -template<> struct lambda_impl<3, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value + > is_le; typedef bind3< - f_ - , arg1, arg2, arg3 - > type; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<3, true> +template<> struct lambda_impl< int_<4> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; - typedef mpl::protect< bind3< - f_ - , arg1, arg2, arg3 - > > type; - }; -}; - -template<> struct lambda_impl<4, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value + > is_le; typedef bind4< - f_ - , arg1, arg2, arg3, arg4 - > type; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type + > bind_; + + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; + + typedef typename type_::type type; }; }; -template<> struct lambda_impl<4, true> +template<> struct lambda_impl< int_<5> > { - template< typename F, typename Tag > struct result_ + template< typename F, typename Tag, typename Protect > struct result_ { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; + typedef lambda< typename F::arg1, Tag, false_ > l1; + typedef lambda< typename F::arg2, Tag, false_ > l2; + typedef lambda< typename F::arg3, Tag, false_ > l3; + typedef lambda< typename F::arg4, Tag, false_ > l4; + typedef lambda< typename F::arg5, Tag, false_ > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; - typedef mpl::protect< bind4< - f_ - , arg1, arg2, arg3, arg4 - > > type; - }; -}; - -template<> struct lambda_impl<5, false> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - typedef typename lambda< typename F::arg5, Tag, false >::type arg5; - + typedef aux::lambda_or< + BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value + > is_le; typedef bind5< - f_ - , arg1, arg2, arg3, arg4, arg5 - > type; - }; -}; + typename F::rebind + , typename l1::type, typename l2::type, typename l3::type + , typename l4::type, typename l5::type + > bind_; -template<> struct lambda_impl<5, true> -{ - template< typename F, typename Tag > struct result_ - { - typedef typename F::rebind f_; - typedef typename lambda< typename F::arg1, Tag, false >::type arg1; - typedef typename lambda< typename F::arg2, Tag, false >::type arg2; - typedef typename lambda< typename F::arg3, Tag, false >::type arg3; - typedef typename lambda< typename F::arg4, Tag, false >::type arg4; - typedef typename lambda< typename F::arg5, Tag, false >::type arg5; - + typedef typename if_< + is_le + , if_< Protect, protect<bind_>, bind_ > + , identity<F> + >::type type_; - typedef mpl::protect< bind5< - f_ - , arg1, arg2, arg3, arg4, arg5 - > > type; + typedef typename type_::type type; }; }; @@ -184,19 +200,29 @@ template<> struct lambda_impl<5, true> template< typename T - , typename Tag = void_ - , bool Protect = true + , typename Tag + , typename Protect > struct lambda - : aux::lambda_impl< - ::boost::mpl::aux::template_arity<T>::value +{ + /// Metafunction forwarding confuses MSVC 6.x + typedef typename aux::template_arity<T>::type arity_; + typedef typename aux::lambda_impl<arity_> + ::template result_< T,Tag,Protect > l_; - , Protect + typedef typename l_::type type; + typedef typename l_::is_le is_le; +}; - >::template result_< T,Tag > +BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) + +template< + typename T + > +struct is_lambda_expression + : lambda<T>::is_le { }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/less.hpp b/include/boost/mpl/aux_/preprocessed/plain/less.hpp new file mode 100644 index 0000000..a632b14 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/less.hpp @@ -0,0 +1,89 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/less.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less + : less_impl< + typename less_tag<N1>::type + , typename less_tag<N2>::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/less_equal.hpp b/include/boost/mpl/aux_/preprocessed/plain/less_equal.hpp new file mode 100644 index 0000000..a9869f7 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/less_equal.hpp @@ -0,0 +1,89 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/less_equal.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct less_equal + : less_equal_impl< + typename less_equal_tag<N1>::type + , typename less_equal_tag<N2>::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/list.hpp b/include/boost/mpl/aux_/preprocessed/plain/list.hpp index 1a89231..4e8ad53 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/list.hpp @@ -1,14 +1,23 @@ -// preprocessed version of 'boost/mpl/list.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T0 = void_, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - , typename T6 = void_, typename T7 = void_, typename T8 = void_ - , typename T9 = void_ + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na > struct list; @@ -16,8 +25,8 @@ template< > struct list< - void_, void_, void_, void_, void_, void_, void_, void_, void_ - , void_ + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : list0< > { @@ -28,7 +37,8 @@ template< typename T0 > struct list< - T0, void_, void_, void_, void_, void_, void_, void_, void_, void_ + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : list1<T0> { @@ -38,7 +48,10 @@ struct list< template< typename T0, typename T1 > -struct list< T0,T1,void_,void_,void_,void_,void_,void_,void_,void_ > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; @@ -47,7 +60,10 @@ struct list< T0,T1,void_,void_,void_,void_,void_,void_,void_,void_ > template< typename T0, typename T1, typename T2 > -struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; @@ -56,7 +72,10 @@ struct list< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > template< typename T0, typename T1, typename T2, typename T3 > -struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; @@ -65,7 +84,10 @@ struct list< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > template< typename T0, typename T1, typename T2, typename T3, typename T4 > -struct list< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; @@ -75,7 +97,10 @@ template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > -struct list< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; @@ -85,7 +110,10 @@ template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > -struct list< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; @@ -95,7 +123,10 @@ template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > -struct list< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; @@ -105,24 +136,188 @@ template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > -struct list< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; -// primary template (not a specialization!) - template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > -struct list +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { - typedef list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > type; + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/list_c.hpp b/include/boost/mpl/aux_/preprocessed/plain/list_c.hpp index 4a95b69..0b48a7f 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/list_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/list_c.hpp @@ -1,25 +1,34 @@ -// preprocessed version of 'boost/mpl/list_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T - , long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX - , long C9 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T - > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c<T> { @@ -27,12 +36,12 @@ struct list_c< }; template< - typename T - , long C0 + typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { @@ -40,12 +49,12 @@ struct list_c< }; template< - typename T - , long C0, long C1 + typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { @@ -53,12 +62,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2 + typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { @@ -66,12 +75,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3 + typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { @@ -79,12 +88,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3, long C4 + typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { @@ -92,11 +101,12 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { @@ -104,49 +114,215 @@ struct list_c< }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 > -struct list_c< T,C0,C1,C2,C3,C4,C5,C6,LONG_MAX,LONG_MAX,LONG_MAX > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX + > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 > -struct list_c< T,C0,C1,C2,C3,C4,C5,C6,C7,LONG_MAX,LONG_MAX > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 > -struct list_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,LONG_MAX > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; -// primary template (not a specialization!) - template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 > -struct list_c +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : list16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : list17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : list18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct list_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : list19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct list_c + : list20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/map.hpp b/include/boost/mpl/aux_/preprocessed/plain/map.hpp new file mode 100644 index 0000000..1503c72 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/map.hpp @@ -0,0 +1,323 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/map.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct map; + +template< + + > +struct map< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map0< > +{ + typedef map0< >::type type; +}; + +template< + typename T0 + > +struct map< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map1<T0> +{ + typedef typename map1<T0>::type type; +}; + +template< + typename T0, typename T1 + > +struct map< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map2< T0,T1 > +{ + typedef typename map2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct map< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map3< T0,T1,T2 > +{ + typedef typename map3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct map< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map4< T0,T1,T2,T3 > +{ + typedef typename map4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct map< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map5< T0,T1,T2,T3,T4 > +{ + typedef typename map5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct map< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : map8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : map15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : map16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : map17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : map18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct map< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : map19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct map + : map20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/plain/minus.hpp b/include/boost/mpl/aux_/preprocessed/plain/minus.hpp new file mode 100644 index 0000000..4e80b1c --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/minus.hpp @@ -0,0 +1,138 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/minus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag<N1>::type + , typename minus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , minus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/modulus.hpp b/include/boost/mpl/aux_/preprocessed/plain/modulus.hpp new file mode 100644 index 0000000..1e51910 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/modulus.hpp @@ -0,0 +1,95 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/modulus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct modulus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< modulus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< modulus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct modulus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct modulus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct modulus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct modulus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct modulus + : modulus_impl< + typename modulus_tag<N1>::type + , typename modulus_tag<N2>::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) + +}} + +namespace boost { namespace mpl { +template<> +struct modulus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp b/include/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp new file mode 100644 index 0000000..4237305 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp @@ -0,0 +1,89 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/not_equal_to.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct not_equal_to + : not_equal_to_impl< + typename not_equal_to_tag<N1>::type + , typename not_equal_to_tag<N2>::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/or.hpp b/include/boost/mpl/aux_/preprocessed/plain/or.hpp index 863f510..986b2e0 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/or.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/or.hpp @@ -1,5 +1,13 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information + +// 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) +// + +// Preprocessed version of "boost/mpl/or.hpp" header +// -- DO NOT modify by hand! namespace boost { namespace mpl { @@ -33,8 +41,8 @@ struct or_impl< } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ @@ -45,17 +53,12 @@ struct or_ > { - BOOST_MPL_AUX_LAMBDA_SUPPORT( - 5 - , or_ - , (T1, T2, T3, T4, T5) - ) }; -BOOST_MPL_AUX_VOID_SPEC_EXT( +BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) -}} // namespace boost::mpl +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/placeholders.hpp b/include/boost/mpl/aux_/preprocessed/plain/placeholders.hpp index f71a075..4cb7d7d 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/placeholders.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/placeholders.hpp @@ -1,47 +1,78 @@ -// preprocessed version of 'boost/mpl/aux_/config/use_preprocessed.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// Copyright Aleksey Gurtovoy 2001-2003 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// Preprocessed version of "boost/mpl/placeholders.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; -namespace placeholders { -using boost::mpl::_; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_) -// agurt, 17/mar/02: one more placeholder for the last 'apply#' -// specialization +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +}}} + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; -namespace placeholders { -using boost::mpl::_1; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_1) + +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; -namespace placeholders { -using boost::mpl::_2; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_2) + +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; -namespace placeholders { -using boost::mpl::_3; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_3) + +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; -namespace placeholders { -using boost::mpl::_4; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_4) + +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; -namespace placeholders { -using boost::mpl::_5; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_5) + +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; +}}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; -namespace placeholders { -using boost::mpl::_6; -} -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_6) +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; +}}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/plus.hpp b/include/boost/mpl/aux_/preprocessed/plain/plus.hpp new file mode 100644 index 0000000..03af077 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/plus.hpp @@ -0,0 +1,138 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/plus.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag<N1>::type + , typename plus_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , plus + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/quote.hpp b/include/boost/mpl/aux_/preprocessed/plain/quote.hpp index 18a937d..d7d0420 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/quote.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/quote.hpp @@ -1,12 +1,18 @@ -// preprocessed version of 'boost/mpl/quote.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// -template< typename T, bool has_type_ = aux::has_type<T>::value > +// Preprocessed version of "boost/mpl/quote.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< typename T, bool has_type_ > struct quote_impl - : T { }; @@ -25,7 +31,10 @@ struct quote1 { template< typename U1 > struct apply - : quote_impl< F<U1> > + : quote_impl< + F<U1> + , aux::has_type< F<U1> >::value + > { }; @@ -39,7 +48,10 @@ struct quote2 { template< typename U1, typename U2 > struct apply - : quote_impl< F<U1,U2> > + : quote_impl< + F< U1,U2 > + , aux::has_type< F< U1,U2 > >::value + > { }; @@ -53,7 +65,10 @@ struct quote3 { template< typename U1, typename U2, typename U3 > struct apply - : quote_impl< F<U1,U2,U3> > + : quote_impl< + F< U1,U2,U3 > + , aux::has_type< F< U1,U2,U3 > >::value + > { }; @@ -70,7 +85,10 @@ struct quote4 > struct apply - : quote_impl< F<U1,U2,U3,U4> > + : quote_impl< + F< U1,U2,U3,U4 > + , aux::has_type< F< U1,U2,U3,U4 > >::value + > { }; @@ -92,12 +110,14 @@ struct quote5 > struct apply - : quote_impl< F<U1,U2,U3,U4,U5> > + : quote_impl< + F< U1,U2,U3,U4,U5 > + , aux::has_type< F< U1,U2,U3,U4,U5 > >::value + > { }; }; -} // namespace mpl -} // namespace boost +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp new file mode 100644 index 0000000..84c3d9c --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp @@ -0,0 +1,231 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/Attic/reverse_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename iter3::type >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename iter3::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename iter0::type >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename iter1::type >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename iter2::type >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename iter3::type >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename iter3::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename iter2::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename iter1::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename iter0::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_fold_impl< + -1 + , typename next<First>::type + , Last + , typename apply2<ForwardOp,State, typename First::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename First::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000..6d7439a --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp @@ -0,0 +1,231 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/aux_/Attic/reverse_iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename next<iter1>::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename next<iter2>::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; + typedef typename next<iter0>::type iter1; + typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; + typedef typename next<iter1>::type iter2; + typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; + typedef typename next<iter2>::type iter3; + typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; + typedef typename next<iter3>::type iter4; + + + typedef reverse_iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; + typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; + typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; + typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_iter_fold_impl< + -1 + , typename next<First>::type + , Last + , typename apply2< ForwardOp,State,First >::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , First + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/set.hpp b/include/boost/mpl/aux_/preprocessed/plain/set.hpp new file mode 100644 index 0000000..6c4ae6f --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/set.hpp @@ -0,0 +1,323 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/set.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct set; + +template< + + > +struct set< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set0< > +{ + typedef set0< >::type type; +}; + +template< + typename T0 + > +struct set< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set1<T0> +{ + typedef typename set1<T0>::type type; +}; + +template< + typename T0, typename T1 + > +struct set< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set2< T0,T1 > +{ + typedef typename set2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct set< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set3< T0,T1,T2 > +{ + typedef typename set3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set4< T0,T1,T2,T3 > +{ + typedef typename set4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set5< T0,T1,T2,T3,T4 > +{ + typedef typename set5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : set8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : set15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : set16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : set17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : set18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : set19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set + : set20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/plain/shift_left.hpp b/include/boost/mpl/aux_/preprocessed/plain/shift_left.hpp new file mode 100644 index 0000000..e628fd5 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/shift_left.hpp @@ -0,0 +1,93 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_left.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_left_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< shift_left_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_left_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct shift_left_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_left_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_left_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct shift_left_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_left + : shift_left_impl< + typename shift_left_tag<N1>::type + , typename shift_left_tag<N2>::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_left_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename Shift > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + << BOOST_MPL_AUX_VALUE_WKND(Shift)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/shift_right.hpp b/include/boost/mpl/aux_/preprocessed/plain/shift_right.hpp new file mode 100644 index 0000000..97f000f --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/shift_right.hpp @@ -0,0 +1,93 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/shift_right.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct shift_right_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< shift_right_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< shift_right_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct shift_right_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_right_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct shift_right_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct shift_right_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct shift_right + : shift_right_impl< + typename shift_right_tag<N1>::type + , typename shift_right_tag<N2>::type + >::template apply< N1,N2 >::type +{ +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) + +}} + +namespace boost { namespace mpl { +template<> +struct shift_right_impl< integral_c_tag,integral_c_tag > +{ + template< typename N, typename Shift > struct apply + + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + >> BOOST_MPL_AUX_VALUE_WKND(Shift)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/plain/template_arity.hpp index f884bb3..a23fc23 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/template_arity.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/template_arity.hpp @@ -1,3 +1,11 @@ -// preprocessed version of 'boost/mpl/aux_/template_arity.hpp' header -// see the original for copyright information + +// Copyright Aleksey Gurtovoy 2001-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) +// + +// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// -- DO NOT modify by hand! diff --git a/include/boost/mpl/aux_/preprocessed/plain/times.hpp b/include/boost/mpl/aux_/preprocessed/plain/times.hpp new file mode 100644 index 0000000..b7bc98f --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/times.hpp @@ -0,0 +1,138 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/times.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( Tag1::value > Tag2::value ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag2 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag1,Tag2 >,Tag1, Tag2 > + > +{ +}; + +/// for Digital Mars C++/compilers with no CTPS support +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static int const value = 0; + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, N4, na ) + ) +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, N3, na, na ) + ) +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag<N1>::type + , typename times_tag<N2>::type + >::template apply< N1,N2 >::type +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + 5 + , times + , ( N1, N2, na, na, na ) + ) + +}; + +BOOST_MPL_AUX_NA_SPEC2(2, 5, times) + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) + > + { + }; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp b/include/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp new file mode 100644 index 0000000..a971f81 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp @@ -0,0 +1,94 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/Attic/unpack_args.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< int size, typename F, typename Args > +struct unpack_args_impl; + +template< typename F, typename Args > +struct unpack_args_impl< 0,F,Args > + : apply0< + F + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 1,F,Args > + : apply1< + F + , typename at_c< Args,0 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 2,F,Args > + : apply2< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 3,F,Args > + : apply3< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 4,F,Args > + : apply4< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + > +{ +}; + +template< typename F, typename Args > +struct unpack_args_impl< 5,F,Args > + : apply5< + F + , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type + , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type + , typename at_c< Args,4 >::type + > +{ +}; + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply + + : aux::unpack_args_impl< size<Args>::value,F, Args > + + { + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +}} + diff --git a/include/boost/mpl/aux_/preprocessed/plain/vector.hpp b/include/boost/mpl/aux_/preprocessed/plain/vector.hpp index da4ae25..bfa9565 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/vector.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/vector.hpp @@ -1,14 +1,23 @@ -// preprocessed version of 'boost/mpl/vector.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T0 = void_, typename T1 = void_, typename T2 = void_ - , typename T3 = void_, typename T4 = void_, typename T5 = void_ - , typename T6 = void_, typename T7 = void_, typename T8 = void_ - , typename T9 = void_ + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na > struct vector; @@ -16,115 +25,299 @@ template< > struct vector< - void_, void_, void_, void_, void_, void_, void_, void_, void_ - , void_ + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : vector0< > { - typedef vector0< > type; + typedef vector0< >::type type; }; template< typename T0 > struct vector< - T0, void_, void_, void_, void_, void_, void_, void_, void_, void_ + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : vector1<T0> { - typedef vector1<T0> type; + typedef typename vector1<T0>::type type; }; template< typename T0, typename T1 > struct vector< - T0, T1, void_, void_, void_, void_, void_, void_, void_, void_ + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na > : vector2< T0,T1 > { - typedef vector2< T0,T1 > type; + typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > -struct vector< T0,T1,T2,void_,void_,void_,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector3< T0,T1,T2 > { - typedef vector3< T0,T1,T2 > type; + typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > -struct vector< T0,T1,T2,T3,void_,void_,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector4< T0,T1,T2,T3 > { - typedef vector4< T0,T1,T2,T3 > type; + typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > -struct vector< T0,T1,T2,T3,T4,void_,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector5< T0,T1,T2,T3,T4 > { - typedef vector5< T0,T1,T2,T3,T4 > type; + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > -struct vector< T0,T1,T2,T3,T4,T5,void_,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector6< T0,T1,T2,T3,T4,T5 > { - typedef vector6< T0,T1,T2,T3,T4,T5 > type; + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > -struct vector< T0,T1,T2,T3,T4,T5,T6,void_,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector7< T0,T1,T2,T3,T4,T5,T6 > { - typedef vector7< T0,T1,T2,T3,T4,T5,T6 > type; + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > -struct vector< T0,T1,T2,T3,T4,T5,T6,T7,void_,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { - typedef vector8< T0,T1,T2,T3,T4,T5,T6,T7 > type; + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > -struct vector< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { - typedef vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > type; + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; -// primary template (not a specialization!) - template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > -struct vector +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { - typedef vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > type; + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessed/plain/vector_c.hpp b/include/boost/mpl/aux_/preprocessed/plain/vector_c.hpp index 2cb74fe..840c2e1 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/vector_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/vector_c.hpp @@ -1,154 +1,328 @@ -// preprocessed version of 'boost/mpl/vector_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< - typename T - , long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX + typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX - , long C9 = LONG_MAX + , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX + , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX + , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX + , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T - > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c<T> { - typedef vector0_c<T> type; + typedef typename vector0_c<T>::type type; }; template< - typename T - , long C0 + typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T,C0 > { - typedef vector1_c< T,C0 > type; + typedef typename vector1_c< T,C0 >::type type; }; template< - typename T - , long C0, long C1 + typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T,C0,C1 > { - typedef vector2_c< T,C0,C1 > type; + typedef typename vector2_c< T,C0,C1 >::type type; }; template< - typename T - , long C0, long C1, long C2 + typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T,C0,C1,C2 > { - typedef vector3_c< T,C0,C1,C2 > type; + typedef typename vector3_c< T,C0,C1,C2 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3 + typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T,C0,C1,C2,C3 > { - typedef vector4_c< T,C0,C1,C2,C3 > type; + typedef typename vector4_c< T,C0,C1,C2,C3 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4 + typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX - , LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T,C0,C1,C2,C3,C4 > { - typedef vector5_c< T,C0,C1,C2,C3,C4 > type; + typedef typename vector5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T,C0,C1,C2,C3,C4,C5 > { - typedef vector6_c< T,C0,C1,C2,C3,C4,C5 > type; + typedef typename vector6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T,C0,C1,C2,C3,C4,C5,C6 > { - typedef vector7_c< T,C0,C1,C2,C3,C4,C5,C6 > type; + typedef typename vector7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7 > -struct vector_c< T,C0,C1,C2,C3,C4,C5,C6,C7,LONG_MAX,LONG_MAX > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX + > : vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { - typedef vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > type; + typedef typename vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8 > -struct vector_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,LONG_MAX > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { - typedef vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > type; + typedef typename vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; -// primary template (not a specialization!) - template< - typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8, long C9 + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9 > -struct vector_c +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + , LONG_MAX + > : vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { - typedef vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > type; + typedef typename vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; -} // namespace mpl -} // namespace boost +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > +{ + typedef typename vector11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > +{ + typedef typename vector12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > +{ + typedef typename vector13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector14_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 + > +{ + typedef typename vector14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector15_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + > +{ + typedef typename vector15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector16_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15 + > +{ + typedef typename vector16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX + > + : vector17_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16 + > +{ + typedef typename vector17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, LONG_MAX, LONG_MAX + > + : vector18_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17 + > +{ + typedef typename vector18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; +}; + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18 + > +struct vector_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, LONG_MAX + > + : vector19_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18 + > +{ + typedef typename vector19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; +}; + +/// primary template (not a specialization!) + +template< + typename T, long C0, long C1, long C2, long C3, long C4, long C5 + , long C6, long C7, long C8, long C9, long C10, long C11, long C12 + , long C13, long C14, long C15, long C16, long C17, long C18, long C19 + > +struct vector_c + : vector20_c< + T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 + , C15, C16, C17, C18, C19 + > +{ + typedef typename vector20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; +}; + +}} diff --git a/include/boost/mpl/aux_/preprocessor/add.hpp b/include/boost/mpl/aux_/preprocessor/add.hpp index 8d425da..740f60a 100644 --- a/include/boost/mpl/aux_/preprocessor/add.hpp +++ b/include/boost/mpl/aux_/preprocessor/add.hpp @@ -1,23 +1,27 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/preprocessor/add.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_PREPROCESSOR_ADD_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_ADD_HPP_INCLUDED -#include "boost/mpl/aux_/preprocessor/tuple.hpp" -#include "boost/mpl/aux_/config/preprocessor.hpp" +// 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. -#if defined(BOOST_MPL_BROKEN_PP_MACRO_EXPANSION) -# include "boost/preprocessor/cat.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/preprocessor.hpp> + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +# include <boost/mpl/aux_/preprocessor/tuple.hpp> + +#if defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION) +# include <boost/preprocessor/cat.hpp> # define BOOST_MPL_PP_ADD(i,j) \ BOOST_MPL_PP_ADD_DELAY(i,j) \ @@ -34,18 +38,28 @@ # define BOOST_MPL_PP_ADD_DELAY(i,j) \ BOOST_MPL_PP_TUPLE_11_ELEM_##i BOOST_MPL_PP_ADD_##j \ /**/ -#endif // BOOST_MPL_BROKEN_PP_MACRO_EXPANSION +#endif -#define BOOST_MPL_PP_ADD_0 (0,1,2,3,4,5,6,7,8,9,10) -#define BOOST_MPL_PP_ADD_1 (1,2,3,4,5,6,7,8,9,10,0) -#define BOOST_MPL_PP_ADD_2 (2,3,4,5,6,7,8,9,10,0,0) -#define BOOST_MPL_PP_ADD_3 (3,4,5,6,7,8,9,10,0,0,0) -#define BOOST_MPL_PP_ADD_4 (4,5,6,7,8,9,10,0,0,0,0) -#define BOOST_MPL_PP_ADD_5 (5,6,7,8,9,10,0,0,0,0,0) -#define BOOST_MPL_PP_ADD_6 (6,7,8,9,10,0,0,0,0,0,0) -#define BOOST_MPL_PP_ADD_7 (7,8,9,10,0,0,0,0,0,0,0) -#define BOOST_MPL_PP_ADD_8 (8,9,10,0,0,0,0,0,0,0,0) -#define BOOST_MPL_PP_ADD_9 (9,10,0,0,0,0,0,0,0,0,0) -#define BOOST_MPL_PP_ADD_10 (10,0,0,0,0,0,0,0,0,0,0) +# define BOOST_MPL_PP_ADD_0 (0,1,2,3,4,5,6,7,8,9,10) +# define BOOST_MPL_PP_ADD_1 (1,2,3,4,5,6,7,8,9,10,0) +# define BOOST_MPL_PP_ADD_2 (2,3,4,5,6,7,8,9,10,0,0) +# define BOOST_MPL_PP_ADD_3 (3,4,5,6,7,8,9,10,0,0,0) +# define BOOST_MPL_PP_ADD_4 (4,5,6,7,8,9,10,0,0,0,0) +# define BOOST_MPL_PP_ADD_5 (5,6,7,8,9,10,0,0,0,0,0) +# define BOOST_MPL_PP_ADD_6 (6,7,8,9,10,0,0,0,0,0,0) +# define BOOST_MPL_PP_ADD_7 (7,8,9,10,0,0,0,0,0,0,0) +# define BOOST_MPL_PP_ADD_8 (8,9,10,0,0,0,0,0,0,0,0) +# define BOOST_MPL_PP_ADD_9 (9,10,0,0,0,0,0,0,0,0,0) +# define BOOST_MPL_PP_ADD_10 (10,0,0,0,0,0,0,0,0,0,0) + +#else + +# include <boost/preprocessor/arithmetic/add.hpp> + +# define BOOST_MPL_PP_ADD(i,j) \ + BOOST_PP_ADD(i,j) \ + /**/ + +#endif #endif // BOOST_MPL_AUX_PREPROCESSOR_ADD_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp b/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp index a4b56d4..26763a2 100644 --- a/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp +++ b/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp @@ -1,40 +1,41 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/preprocessor/def_params_tail.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_PREPROCESSOR_DEF_PARAMS_TAIL_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_DEF_PARAMS_TAIL_HPP_INCLUDED -#include "boost/mpl/limits/arity.hpp" -#include "boost/mpl/aux_/config/dtp.hpp" -#include "boost/mpl/aux_/config/preprocessor.hpp" +// 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. -#include "boost/preprocessor/comma_if.hpp" -#include "boost/preprocessor/logical/and.hpp" -#include "boost/preprocessor/identity.hpp" -#include "boost/preprocessor/empty.hpp" +// $Source$ +// $Date$ +// $Revision$ -// BOOST_MPL_PP_DEF_PARAMS_TAIL(1,T): , T1 = void_, .., Tn = void_ -// BOOST_MPL_PP_DEF_PARAMS_TAIL(2,T): , T2 = void_, .., Tn = void_ -// BOOST_MPL_PP_DEF_PARAMS_TAIL(n,T): <nothing> +#include <boost/mpl/limits/arity.hpp> +#include <boost/mpl/aux_/config/dtp.hpp> +#include <boost/mpl/aux_/config/preprocessor.hpp> -#if !defined(BOOST_MPL_NO_OWN_PP_PRIMITIVES) +#include <boost/preprocessor/comma_if.hpp> +#include <boost/preprocessor/logical/and.hpp> +#include <boost/preprocessor/identity.hpp> +#include <boost/preprocessor/empty.hpp> -# include "boost/mpl/aux_/preprocessor/filter_params.hpp" -# include "boost/mpl/aux_/preprocessor/sub.hpp" +// BOOST_MPL_PP_DEF_PARAMS_TAIL(1,T,value): , T1 = value, .., Tn = value +// BOOST_MPL_PP_DEF_PARAMS_TAIL(2,T,value): , T2 = value, .., Tn = value +// BOOST_MPL_PP_DEF_PARAMS_TAIL(n,T,value): <nothing> + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +# include <boost/mpl/aux_/preprocessor/filter_params.hpp> +# include <boost/mpl/aux_/preprocessor/sub.hpp> # define BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, value_func) \ BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_1( \ i \ - , BOOST_MPL_PP_SUB(BOOST_MPL_METAFUNCTION_MAX_ARITY,i) \ + , BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY,i) \ , param \ , value_func \ ) \ @@ -62,36 +63,36 @@ #else -# include "boost/preprocessor/arithmetic/add.hpp" -# include "boost/preprocessor/arithmetic/sub.hpp" -# include "boost/preprocessor/inc.hpp" -# include "boost/preprocessor/tuple/elem.hpp" -# include "boost/preprocessor/repeat.hpp" -# include "boost/preprocessor/cat.hpp" +# include <boost/preprocessor/arithmetic/add.hpp> +# include <boost/preprocessor/arithmetic/sub.hpp> +# include <boost/preprocessor/inc.hpp> +# include <boost/preprocessor/tuple/elem.hpp> +# include <boost/preprocessor/repeat.hpp> +# include <boost/preprocessor/cat.hpp> # define BOOST_MPL_PP_AUX_TAIL_PARAM_FUNC(unused, i, op) \ - BOOST_PP_COMMA_IF(i) \ - BOOST_PP_CAT( \ + , BOOST_PP_CAT( \ BOOST_PP_TUPLE_ELEM(3, 1, op) \ , BOOST_PP_ADD_D(1, i, BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(3, 0, op))) \ ) BOOST_PP_TUPLE_ELEM(3, 2, op)() \ /**/ # define BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, value_func) \ - BOOST_PP_REPEAT_1( \ - BOOST_PP_SUB_D(1, BOOST_MPL_METAFUNCTION_MAX_ARITY, i) \ + BOOST_PP_REPEAT( \ + BOOST_PP_SUB_D(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, i) \ , BOOST_MPL_PP_AUX_TAIL_PARAM_FUNC \ , (i, param, value_func) \ ) \ /**/ -#endif // BOOST_MPL_NO_OWN_PP_PRIMITIVES + +#endif // BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES #define BOOST_MPL_PP_DEF_PARAMS_TAIL(i, param, value) \ BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, BOOST_PP_IDENTITY(=value)) \ /**/ -#if !defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) # define BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, param, value) \ BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, BOOST_PP_IDENTITY(=value)) \ /**/ diff --git a/include/boost/mpl/aux_/preprocessor/default_params.hpp b/include/boost/mpl/aux_/preprocessor/default_params.hpp index 93269e3..d054a27 100644 --- a/include/boost/mpl/aux_/preprocessor/default_params.hpp +++ b/include/boost/mpl/aux_/preprocessor/default_params.hpp @@ -1,28 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/preprocessor/default_params.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_PREPROCESSOR_DEFAULT_PARAMS_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_DEFAULT_PARAMS_HPP_INCLUDED -#include "boost/mpl/aux_/config/preprocessor.hpp" +// 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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/preprocessor.hpp> // BOOST_MPL_PP_DEFAULT_PARAMS(0,T,int): <nothing> // BOOST_MPL_PP_DEFAULT_PARAMS(1,T,int): T1 = int // BOOST_MPL_PP_DEFAULT_PARAMS(2,T,int): T1 = int, T2 = int // BOOST_MPL_PP_DEFAULT_PARAMS(n,T,int): T1 = int, T2 = int, .., Tn = int -#if !defined(BOOST_MPL_NO_OWN_PP_PRIMITIVES) +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) -# include "boost/preprocessor/cat.hpp" +# include <boost/preprocessor/cat.hpp> # define BOOST_MPL_PP_DEFAULT_PARAMS(n,p,v) \ BOOST_PP_CAT(BOOST_MPL_PP_DEFAULT_PARAMS_,n)(p,v) \ @@ -41,11 +42,11 @@ #else -# include "boost/preprocessor/tuple/elem.hpp" -# include "boost/preprocessor/comma_if.hpp" -# include "boost/preprocessor/repeat.hpp" -# include "boost/preprocessor/inc.hpp" -# include "boost/preprocessor/cat.hpp" +# include <boost/preprocessor/tuple/elem.hpp> +# include <boost/preprocessor/comma_if.hpp> +# include <boost/preprocessor/repeat.hpp> +# include <boost/preprocessor/inc.hpp> +# include <boost/preprocessor/cat.hpp> # define BOOST_MPL_PP_AUX_DEFAULT_PARAM_FUNC(unused, i, pv) \ BOOST_PP_COMMA_IF(i) \ @@ -54,13 +55,13 @@ /**/ # define BOOST_MPL_PP_DEFAULT_PARAMS(n, param, value) \ - BOOST_PP_REPEAT_1( \ + BOOST_PP_REPEAT( \ n \ , BOOST_MPL_PP_AUX_DEFAULT_PARAM_FUNC \ , (param,value) \ ) \ /**/ -#endif // BOOST_MPL_USE_OWN_PP_PRIMITIVES +#endif #endif // BOOST_MPL_AUX_PREPROCESSOR_DEFAULT_PARAMS_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/preprocessor/enum.hpp b/include/boost/mpl/aux_/preprocessor/enum.hpp index 5b1c8d2..6a2a84c 100644 --- a/include/boost/mpl/aux_/preprocessor/enum.hpp +++ b/include/boost/mpl/aux_/preprocessor/enum.hpp @@ -1,28 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/preprocessor/enum.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_PREPROCESSOR_ENUM_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_ENUM_HPP_INCLUDED -#include "boost/mpl/aux_/config/preprocessor.hpp" +// 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/mpl/aux_/config/preprocessor.hpp> // BOOST_MPL_PP_ENUM(0,int): <nothing> // BOOST_MPL_PP_ENUM(1,int): int // BOOST_MPL_PP_ENUM(2,int): int, int // BOOST_MPL_PP_ENUM(n,int): int, int, .., int -#if !defined(BOOST_MPL_NO_OWN_PP_PRIMITIVES) +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) -# include "boost/preprocessor/cat.hpp" +# include <boost/preprocessor/cat.hpp> # define BOOST_MPL_PP_ENUM(n, param) \ BOOST_PP_CAT(BOOST_MPL_PP_ENUM_,n)(param) \ @@ -41,21 +42,21 @@ #else -# include "boost/preprocessor/comma_if.hpp" -# include "boost/preprocessor/repeat.hpp" +# include <boost/preprocessor/comma_if.hpp> +# include <boost/preprocessor/repeat.hpp> # define BOOST_MPL_PP_AUX_ENUM_FUNC(unused, i, param) \ BOOST_PP_COMMA_IF(i) param \ /**/ # define BOOST_MPL_PP_ENUM(n, param) \ - BOOST_PP_REPEAT_1( \ + BOOST_PP_REPEAT( \ n \ , BOOST_MPL_PP_AUX_ENUM_FUNC \ , param \ ) \ /**/ -#endif // BOOST_MPL_NO_OWN_PP_PRIMITIVES +#endif #endif // BOOST_MPL_AUX_PREPROCESSOR_ENUM_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/preprocessor/ext_params.hpp b/include/boost/mpl/aux_/preprocessor/ext_params.hpp index feae623..3cd520d 100644 --- a/include/boost/mpl/aux_/preprocessor/ext_params.hpp +++ b/include/boost/mpl/aux_/preprocessor/ext_params.hpp @@ -1,29 +1,30 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/preprocessor/ext_params.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED -#include "boost/mpl/aux_/config/preprocessor.hpp" +// 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. -// BOOST_MPL_PP_EXT_PARAMS(1,1,T): <nothing> -// BOOST_MPL_PP_EXT_PARAMS(1,2,T): T1 -// BOOST_MPL_PP_EXT_PARAMS(1,3,T): T1, T2 -// BOOST_MPL_PP_EXT_PARAMS(1,n,T): T1, T2, .., Tn-1 +// $Source$ +// $Date$ +// $Revision$ -#if !defined(BOOST_MPL_NO_OWN_PP_PRIMITIVES) +#include <boost/mpl/aux_/config/preprocessor.hpp> -# include "boost/mpl/aux_/preprocessor/filter_params.hpp" -# include "boost/mpl/aux_/preprocessor/sub.hpp" +// BOOST_MPL_PP_EXT_PARAMS(2,2,T): <nothing> +// BOOST_MPL_PP_EXT_PARAMS(2,3,T): T2 +// BOOST_MPL_PP_EXT_PARAMS(2,4,T): T2, T3 +// BOOST_MPL_PP_EXT_PARAMS(2,n,T): T2, T3, .., Tn-1 + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +# include <boost/mpl/aux_/preprocessor/filter_params.hpp> +# include <boost/mpl/aux_/preprocessor/sub.hpp> # define BOOST_MPL_PP_EXT_PARAMS(i,j,p) \ BOOST_MPL_PP_EXT_PARAMS_DELAY_1(i,BOOST_MPL_PP_SUB(j,i),p) \ @@ -49,12 +50,12 @@ #else -# include "boost/preprocessor/arithmetic/add.hpp" -# include "boost/preprocessor/arithmetic/sub.hpp" -# include "boost/preprocessor/comma_if.hpp" -# include "boost/preprocessor/repeat.hpp" -# include "boost/preprocessor/tuple/elem.hpp" -# include "boost/preprocessor/cat.hpp" +# include <boost/preprocessor/arithmetic/add.hpp> +# include <boost/preprocessor/arithmetic/sub.hpp> +# include <boost/preprocessor/comma_if.hpp> +# include <boost/preprocessor/repeat.hpp> +# include <boost/preprocessor/tuple/elem.hpp> +# include <boost/preprocessor/cat.hpp> # define BOOST_MPL_PP_AUX_EXT_PARAM_FUNC(unused, i, op) \ BOOST_PP_COMMA_IF(i) \ @@ -65,13 +66,13 @@ /**/ # define BOOST_MPL_PP_EXT_PARAMS(i, j, param) \ - BOOST_PP_REPEAT_1( \ + BOOST_PP_REPEAT( \ BOOST_PP_SUB_D(1,j,i) \ , BOOST_MPL_PP_AUX_EXT_PARAM_FUNC \ , (i,param) \ ) \ /**/ -#endif // BOOST_MPL_NO_OWN_PP_PRIMITIVES +#endif #endif // BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/preprocessor/filter_params.hpp b/include/boost/mpl/aux_/preprocessor/filter_params.hpp index 27d5dc6..de8a58b 100644 --- a/include/boost/mpl/aux_/preprocessor/filter_params.hpp +++ b/include/boost/mpl/aux_/preprocessor/filter_params.hpp @@ -1,18 +1,19 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/preprocessor/filter_params.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_PREPROCESSOR_FILTER_PARAMS_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_FILTER_PARAMS_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$ + #define BOOST_MPL_PP_FILTER_PARAMS_0(p1,p2,p3,p4,p5,p6,p7,p8,p9) #define BOOST_MPL_PP_FILTER_PARAMS_1(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1 #define BOOST_MPL_PP_FILTER_PARAMS_2(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2 diff --git a/include/boost/mpl/aux_/preprocessor/is_seq.hpp b/include/boost/mpl/aux_/preprocessor/is_seq.hpp index 8354938..26c391e 100644 --- a/include/boost/mpl/aux_/preprocessor/is_seq.hpp +++ b/include/boost/mpl/aux_/preprocessor/is_seq.hpp @@ -2,23 +2,24 @@ #ifndef BOOST_MPL_AUX_PREPROCESSOR_IS_SEQ_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_IS_SEQ_HPP_INCLUDED -// + file: boost/mpl/aux_/preprocessor/is_seq.hpp -// + last modified: 03/may/03 - -// Copyright (c) 2003 -// Paul Mensonides, Aleksey Gurtovoy +// Copyright Paul Mensonides 2003 +// Copyright Aleksey Gurtovoy 2003-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/preprocessor/seq/size.hpp" -#include "boost/preprocessor/arithmetic/dec.hpp" -#include "boost/preprocessor/punctuation/paren.hpp" -#include "boost/preprocessor/cat.hpp" -#include "boost/preprocessor/config/config.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/preprocessor/seq/size.hpp> +#include <boost/preprocessor/arithmetic/dec.hpp> +#include <boost/preprocessor/punctuation/paren.hpp> +#include <boost/preprocessor/cat.hpp> +#include <boost/preprocessor/config/config.hpp> // returns 1 if 'seq' is a PP-sequence, 0 otherwise: // diff --git a/include/boost/mpl/aux_/preprocessor/params.hpp b/include/boost/mpl/aux_/preprocessor/params.hpp index d9d1404..7cec9ff 100644 --- a/include/boost/mpl/aux_/preprocessor/params.hpp +++ b/include/boost/mpl/aux_/preprocessor/params.hpp @@ -1,28 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/preprocessor/params.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_PREPROCESSOR_PARAMS_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_PARAMS_HPP_INCLUDED -#include "boost/mpl/aux_/config/preprocessor.hpp" +// 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/mpl/aux_/config/preprocessor.hpp> // BOOST_MPL_PP_PARAMS(0,T): <nothing> // BOOST_MPL_PP_PARAMS(1,T): T1 // BOOST_MPL_PP_PARAMS(2,T): T1, T2 // BOOST_MPL_PP_PARAMS(n,T): T1, T2, .., Tn -#if !defined(BOOST_MPL_NO_OWN_PP_PRIMITIVES) +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) -# include "boost/preprocessor/cat.hpp" +# include <boost/preprocessor/cat.hpp> # define BOOST_MPL_PP_PARAMS(n,p) \ BOOST_PP_CAT(BOOST_MPL_PP_PARAMS_,n)(p) \ @@ -41,10 +42,10 @@ #else -# include "boost/preprocessor/comma_if.hpp" -# include "boost/preprocessor/repeat.hpp" -# include "boost/preprocessor/inc.hpp" -# include "boost/preprocessor/cat.hpp" +# include <boost/preprocessor/comma_if.hpp> +# include <boost/preprocessor/repeat.hpp> +# include <boost/preprocessor/inc.hpp> +# include <boost/preprocessor/cat.hpp> # define BOOST_MPL_PP_AUX_PARAM_FUNC(unused, i, param) \ BOOST_PP_COMMA_IF(i) \ @@ -52,13 +53,13 @@ /**/ # define BOOST_MPL_PP_PARAMS(n, param) \ - BOOST_PP_REPEAT_1( \ + BOOST_PP_REPEAT( \ n \ , BOOST_MPL_PP_AUX_PARAM_FUNC \ , param \ ) \ /**/ -#endif // BOOST_MPL_NO_OWN_PP_PRIMITIVES +#endif #endif // BOOST_MPL_AUX_PREPROCESSOR_PARAMS_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/preprocessor/partial_spec_params.hpp b/include/boost/mpl/aux_/preprocessor/partial_spec_params.hpp index 6d35ab9..f8edcb8 100644 --- a/include/boost/mpl/aux_/preprocessor/partial_spec_params.hpp +++ b/include/boost/mpl/aux_/preprocessor/partial_spec_params.hpp @@ -1,29 +1,30 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/preprocessor/partial_spec_params.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_PREPROCESSOR_PARTIAL_SPEC_PARAMS_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_PARTIAL_SPEC_PARAMS_HPP_INCLUDED -#include "boost/mpl/limits/arity.hpp" -#include "boost/mpl/aux_/preprocessor/params.hpp" -#include "boost/mpl/aux_/preprocessor/enum.hpp" -#include "boost/mpl/aux_/preprocessor/sub.hpp" -#include "boost/preprocessor/comma_if.hpp" +// 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/mpl/limits/arity.hpp> +#include <boost/mpl/aux_/preprocessor/params.hpp> +#include <boost/mpl/aux_/preprocessor/enum.hpp> +#include <boost/mpl/aux_/preprocessor/sub.hpp> +#include <boost/preprocessor/comma_if.hpp> #define BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ BOOST_MPL_PP_PARAMS(n, param) \ -BOOST_PP_COMMA_IF(BOOST_MPL_PP_SUB(BOOST_MPL_METAFUNCTION_MAX_ARITY,n)) \ +BOOST_PP_COMMA_IF(BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY,n)) \ BOOST_MPL_PP_ENUM( \ - BOOST_MPL_PP_SUB(BOOST_MPL_METAFUNCTION_MAX_ARITY,n) \ + BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY,n) \ , def \ ) \ /**/ diff --git a/include/boost/mpl/aux_/preprocessor/range.hpp b/include/boost/mpl/aux_/preprocessor/range.hpp index ca987e4..5648615 100644 --- a/include/boost/mpl/aux_/preprocessor/range.hpp +++ b/include/boost/mpl/aux_/preprocessor/range.hpp @@ -1,19 +1,20 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/preprocessor/range.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED -#include "boost/preprocessor/seq/subseq.hpp" +// 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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/preprocessor/seq/subseq.hpp> #define BOOST_MPL_PP_RANGE(first, length) \ BOOST_PP_SEQ_SUBSEQ((0)(1)(2)(3)(4)(5)(6)(7)(8)(9), first, length) \ diff --git a/include/boost/mpl/aux_/preprocessor/repeat.hpp b/include/boost/mpl/aux_/preprocessor/repeat.hpp index 7a4a45e..94e104d 100644 --- a/include/boost/mpl/aux_/preprocessor/repeat.hpp +++ b/include/boost/mpl/aux_/preprocessor/repeat.hpp @@ -1,23 +1,24 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/preprocessor/repeat.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_PREPROCESSOR_REPEAT_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_REPEAT_HPP_INCLUDED -#include "boost/mpl/aux_/config/preprocessor.hpp" +// 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. -#if !defined(BOOST_MPL_NO_OWN_PP_PRIMITIVES) +// $Source$ +// $Date$ +// $Revision$ -# include "boost/preprocessor/cat.hpp" +#include <boost/mpl/aux_/config/preprocessor.hpp> + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +# include <boost/preprocessor/cat.hpp> # define BOOST_MPL_PP_REPEAT(n,f,param) \ BOOST_PP_CAT(BOOST_MPL_PP_REPEAT_,n)(f,param) \ @@ -35,14 +36,16 @@ # define BOOST_MPL_PP_REPEAT_9(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) f(0,7,p) f(0,8,p) # define BOOST_MPL_PP_REPEAT_10(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) f(0,7,p) f(0,8,p) f(0,9,p) -#else +#else -# include "boost/preprocessor/repeat.hpp" +# include <boost/preprocessor/repeat.hpp> # define BOOST_MPL_PP_REPEAT(n,f,param) \ - BOOST_PP_REPEAT_1(n,f,param) \ + BOOST_PP_REPEAT(n,f,param) \ /**/ -#endif // BOOST_MPL_NO_OWN_PP_PRIMITIVES +#endif + +#define BOOST_MPL_PP_REPEAT_IDENTITY_FUNC(unused1, unused2, x) x #endif // BOOST_MPL_AUX_PREPROCESSOR_REPEAT_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/preprocessor/sub.hpp b/include/boost/mpl/aux_/preprocessor/sub.hpp index 0769d08..93522cc 100644 --- a/include/boost/mpl/aux_/preprocessor/sub.hpp +++ b/include/boost/mpl/aux_/preprocessor/sub.hpp @@ -1,23 +1,27 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/preprocessor/sub.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_PREPROCESSOR_SUB_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_SUB_HPP_INCLUDED -#include "boost/mpl/aux_/preprocessor/tuple.hpp" -#include "boost/mpl/aux_/config/preprocessor.hpp" +// 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. -#if defined(BOOST_MPL_BROKEN_PP_MACRO_EXPANSION) -# include "boost/preprocessor/cat.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/preprocessor.hpp> + +#if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) + +# include <boost/mpl/aux_/preprocessor/tuple.hpp> + +#if defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION) +# include <boost/preprocessor/cat.hpp> # define BOOST_MPL_PP_SUB(i,j) \ BOOST_MPL_PP_SUB_DELAY(i,j) \ @@ -34,18 +38,28 @@ # define BOOST_MPL_PP_SUB_DELAY(i,j) \ BOOST_MPL_PP_TUPLE_11_ELEM_##i BOOST_MPL_PP_SUB_##j \ /**/ -#endif // BOOST_MPL_BROKEN_PP_MACRO_EXPANSION +#endif -#define BOOST_MPL_PP_SUB_0 (0,1,2,3,4,5,6,7,8,9,10) -#define BOOST_MPL_PP_SUB_1 (0,0,1,2,3,4,5,6,7,8,9) -#define BOOST_MPL_PP_SUB_2 (0,0,0,1,2,3,4,5,6,7,8) -#define BOOST_MPL_PP_SUB_3 (0,0,0,0,1,2,3,4,5,6,7) -#define BOOST_MPL_PP_SUB_4 (0,0,0,0,0,1,2,3,4,5,6) -#define BOOST_MPL_PP_SUB_5 (0,0,0,0,0,0,1,2,3,4,5) -#define BOOST_MPL_PP_SUB_6 (0,0,0,0,0,0,0,1,2,3,4) -#define BOOST_MPL_PP_SUB_7 (0,0,0,0,0,0,0,0,1,2,3) -#define BOOST_MPL_PP_SUB_8 (0,0,0,0,0,0,0,0,0,1,2) -#define BOOST_MPL_PP_SUB_9 (0,0,0,0,0,0,0,0,0,0,1) -#define BOOST_MPL_PP_SUB_10 (0,0,0,0,0,0,0,0,0,0,0) +# define BOOST_MPL_PP_SUB_0 (0,1,2,3,4,5,6,7,8,9,10) +# define BOOST_MPL_PP_SUB_1 (0,0,1,2,3,4,5,6,7,8,9) +# define BOOST_MPL_PP_SUB_2 (0,0,0,1,2,3,4,5,6,7,8) +# define BOOST_MPL_PP_SUB_3 (0,0,0,0,1,2,3,4,5,6,7) +# define BOOST_MPL_PP_SUB_4 (0,0,0,0,0,1,2,3,4,5,6) +# define BOOST_MPL_PP_SUB_5 (0,0,0,0,0,0,1,2,3,4,5) +# define BOOST_MPL_PP_SUB_6 (0,0,0,0,0,0,0,1,2,3,4) +# define BOOST_MPL_PP_SUB_7 (0,0,0,0,0,0,0,0,1,2,3) +# define BOOST_MPL_PP_SUB_8 (0,0,0,0,0,0,0,0,0,1,2) +# define BOOST_MPL_PP_SUB_9 (0,0,0,0,0,0,0,0,0,0,1) +# define BOOST_MPL_PP_SUB_10 (0,0,0,0,0,0,0,0,0,0,0) + +#else + +# include <boost/preprocessor/arithmetic/sub.hpp> + +# define BOOST_MPL_PP_SUB(i,j) \ + BOOST_PP_SUB(i,j) \ + /**/ + +#endif #endif // BOOST_MPL_AUX_PREPROCESSOR_SUB_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/preprocessor/token_equal.hpp b/include/boost/mpl/aux_/preprocessor/token_equal.hpp index 191d5b1..d621d2f 100644 --- a/include/boost/mpl/aux_/preprocessor/token_equal.hpp +++ b/include/boost/mpl/aux_/preprocessor/token_equal.hpp @@ -2,25 +2,26 @@ #ifndef BOOST_MPL_AUX_PREPROCESSOR_TOKEN_EQUAL_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_TOKEN_EQUAL_HPP_INCLUDED -// + file: boost/mpl/aux_/preprocessor/token_equal.hpp -// + last modified: 03/may/03 - -// Copyright (c) 2003 -// Paul Mensonides, Aleksey Gurtovoy +// Copyright Paul Mensonides 2003 +// Copyright Aleksey Gurtovoy 2003-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/aux_/preprocessor/is_seq.hpp" +// $Source$ +// $Date$ +// $Revision$ -#include "boost/preprocessor/if.hpp" -#include "boost/preprocessor/logical/bitand.hpp" -#include "boost/preprocessor/logical/compl.hpp" -#include "boost/preprocessor/tuple/eat.hpp" -#include "boost/preprocessor/cat.hpp" +#include <boost/mpl/aux_/preprocessor/is_seq.hpp> + +#include <boost/preprocessor/if.hpp> +#include <boost/preprocessor/logical/bitand.hpp> +#include <boost/preprocessor/logical/compl.hpp> +#include <boost/preprocessor/tuple/eat.hpp> +#include <boost/preprocessor/cat.hpp> // compares tokens 'a' and 'b' for equality: // diff --git a/include/boost/mpl/aux_/preprocessor/tuple.hpp b/include/boost/mpl/aux_/preprocessor/tuple.hpp index 7f35c57..e7fecd8 100644 --- a/include/boost/mpl/aux_/preprocessor/tuple.hpp +++ b/include/boost/mpl/aux_/preprocessor/tuple.hpp @@ -1,18 +1,19 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/preprocessor/tuple.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_PREPROCESSOR_TUPLE_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_TUPLE_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. + +// $Source$ +// $Date$ +// $Revision$ + #define BOOST_MPL_PP_TUPLE_11_ELEM_0(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e0 #define BOOST_MPL_PP_TUPLE_11_ELEM_1(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e1 #define BOOST_MPL_PP_TUPLE_11_ELEM_2(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e2 diff --git a/include/boost/mpl/aux_/prior.hpp b/include/boost/mpl/aux_/prior.hpp deleted file mode 100644 index b272a0a..0000000 --- a/include/boost/mpl/aux_/prior.hpp +++ /dev/null @@ -1,30 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/prior.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_PRIOR_HPP_INCLUDED -#define BOOST_MPL_AUX_PRIOR_HPP_INCLUDED - -#if defined(BOOST_MPL_USE_NEXT_INTERNALLY) - -# if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include "boost/mpl/prior.hpp" -# endif - -# define BOOST_MPL_AUX_PRIOR(x) prior<x>::type - -#else - -# define BOOST_MPL_AUX_PRIOR(x) x::prior - -#endif - -#endif // BOOST_MPL_AUX_PRIOR_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/ptr_to_ref.hpp b/include/boost/mpl/aux_/ptr_to_ref.hpp index 89fec9b..4c7e1e8 100644 --- a/include/boost/mpl/aux_/ptr_to_ref.hpp +++ b/include/boost/mpl/aux_/ptr_to_ref.hpp @@ -2,18 +2,18 @@ #ifndef BOOST_MPL_AUX_PTR_TO_REF_HPP_INCLUDED #define BOOST_MPL_AUX_PTR_TO_REF_HPP_INCLUDED -// + file: boost/mpl/aux_/ptr_to_ref.hpp -// + last modified: 03/may/03 - -// Copyright (c) 2002-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2003-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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$ + namespace boost { namespace mpl { namespace aux { template< typename T > static T const& ptr_to_ref(T*); diff --git a/include/boost/mpl/aux_/push_back_impl.hpp b/include/boost/mpl/aux_/push_back_impl.hpp index 8b60653..284b2c2 100644 --- a/include/boost/mpl/aux_/push_back_impl.hpp +++ b/include/boost/mpl/aux_/push_back_impl.hpp @@ -1,36 +1,55 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/push_back_impl.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_PUSH_BACK_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_PUSH_BACK_IMPL_HPP_INCLUDED -#include "boost/mpl/push_back_fwd.hpp" -#include "boost/mpl/aux_/traits_lambda_spec.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -// no default implementation; the definition is needed to make happy the deficient -// compilers +#include <boost/mpl/push_back_fwd.hpp> +#include <boost/mpl/aux_/has_type.hpp> +#include <boost/mpl/aux_/traits_lambda_spec.hpp> +#include <boost/mpl/aux_/config/forwarding.hpp> +#include <boost/mpl/aux_/config/static_constant.hpp> +namespace boost { namespace mpl { + +// agurt 05/feb/04: no default implementation; the stub definition is needed +// to enable the default 'has_push_back' implementation below template< typename Tag > -struct push_back_traits +struct push_back_impl { - template< typename Sequence, typename T > struct algorithm; + template< typename Sequence, typename T > struct apply {}; }; -BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,push_back_traits) +template< typename Tag > +struct has_push_back_impl +{ + template< typename Seq > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) + : aux::has_type< push_back<Seq,int> > + { +#else + { + typedef aux::has_type< push_back<Seq,int> > type; + BOOST_STATIC_CONSTANT(bool, value = + (aux::has_type< push_back<Seq,int> >::value) + ); +#endif + }; +}; -} // namespace mpl -} // namespace boost +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2, push_back_impl) +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, has_push_back_impl) + +}} #endif // BOOST_MPL_AUX_PUSH_BACK_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/push_front_impl.hpp b/include/boost/mpl/aux_/push_front_impl.hpp index 142c361..a08d404 100644 --- a/include/boost/mpl/aux_/push_front_impl.hpp +++ b/include/boost/mpl/aux_/push_front_impl.hpp @@ -1,35 +1,56 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/push_front_impl.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_PUSH_FRONT_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_PUSH_FRONT_IMPL_HPP_INCLUDED -#include "boost/mpl/push_front_fwd.hpp" -#include "boost/mpl/aux_/traits_lambda_spec.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -// no default implementation; the definition is needed to make MSVC happy +#include <boost/mpl/push_front_fwd.hpp> +#include <boost/mpl/aux_/has_type.hpp> +#include <boost/mpl/aux_/traits_lambda_spec.hpp> +#include <boost/mpl/aux_/config/forwarding.hpp> +#include <boost/mpl/aux_/config/static_constant.hpp> + +namespace boost { namespace mpl { + +// agurt 05/feb/04: no default implementation; the stub definition is needed +// to enable the default 'has_push_front' implementation below template< typename Tag > -struct push_front_traits +struct push_front_impl { - template< typename Sequence, typename T > struct algorithm; + template< typename Sequence, typename T > struct apply {}; }; -BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,push_front_traits) +template< typename Tag > +struct has_push_front_impl +{ + template< typename Seq > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) + : aux::has_type< push_front<Seq,int> > + { +#else + { + typedef aux::has_type< push_front<Seq,int> > type; + BOOST_STATIC_CONSTANT(bool, value = + (aux::has_type< push_front<Seq,int> >::value) + ); +#endif + }; +}; -} // namespace mpl -} // namespace boost +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2, push_front_impl) +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, has_push_front_impl) + +}} #endif // BOOST_MPL_AUX_PUSH_FRONT_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/range_c/O1_size.hpp b/include/boost/mpl/aux_/range_c/O1_size.hpp index e8c3f40..69b77b0 100644 --- a/include/boost/mpl/aux_/range_c/O1_size.hpp +++ b/include/boost/mpl/aux_/range_c/O1_size.hpp @@ -1,32 +1,31 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/range_c/O1_size.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_RANGE_C_O1_SIZE_HPP_INCLUDED #define BOOST_MPL_AUX_RANGE_C_O1_SIZE_HPP_INCLUDED -#include "boost/mpl/O1_size_fwd.hpp" -#include "boost/mpl/aux_/range_c/size.hpp" -#include "boost/mpl/aux_/range_c/tag.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/O1_size_fwd.hpp> +#include <boost/mpl/aux_/range_c/size.hpp> +#include <boost/mpl/aux_/range_c/tag.hpp> + +namespace boost { namespace mpl { template<> -struct O1_size_traits< aux::half_open_range_tag > - : size_traits< aux::half_open_range_tag > +struct O1_size_impl< aux::half_open_range_tag > + : size_impl< aux::half_open_range_tag > { }; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AUX_RANGE_C_O1_SIZE_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/range_c/back.hpp b/include/boost/mpl/aux_/range_c/back.hpp index a9a29fc..53ae166 100644 --- a/include/boost/mpl/aux_/range_c/back.hpp +++ b/include/boost/mpl/aux_/range_c/back.hpp @@ -1,35 +1,34 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/range_c/back.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_RANGE_C_BACK_HPP_INCLUDED #define BOOST_MPL_AUX_RANGE_C_BACK_HPP_INCLUDED -#include "boost/mpl/back_fwd.hpp" -#include "boost/mpl/prior.hpp" -#include "boost/mpl/aux_/range_c/tag.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/back_fwd.hpp> +#include <boost/mpl/prior.hpp> +#include <boost/mpl/aux_/range_c/tag.hpp> + +namespace boost { namespace mpl { template<> -struct back_traits< aux::half_open_range_tag > +struct back_impl< aux::half_open_range_tag > { - template< typename Range > struct algorithm + template< typename Range > struct apply { typedef typename prior< typename Range::finish >::type type; }; }; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AUX_RANGE_C_BACK_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/range_c/begin_end.hpp b/include/boost/mpl/aux_/range_c/begin_end.hpp deleted file mode 100644 index 7ad1ec2..0000000 --- a/include/boost/mpl/aux_/range_c/begin_end.hpp +++ /dev/null @@ -1,45 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/aux_/begin_end.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED -#define BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED - -#include "boost/mpl/begin_end_fwd.hpp" -#include "boost/mpl/list/aux_/iterator.hpp" -#include "boost/mpl/list/aux_/tag.hpp" -#include "boost/mpl/list/aux_/node.hpp" - -namespace boost { -namespace mpl { - -template<> -struct begin_traits< aux::list_tag > -{ - template< typename List > struct algorithm - { - typedef list_iterator<typename List::type> type; - }; -}; - -template<> -struct end_traits< aux::list_tag > -{ - template< typename > struct algorithm - { - typedef list_iterator<null_node> type; - }; -}; - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/range_c/empty.hpp b/include/boost/mpl/aux_/range_c/empty.hpp index 5922fd5..ef94742 100644 --- a/include/boost/mpl/aux_/range_c/empty.hpp +++ b/include/boost/mpl/aux_/range_c/empty.hpp @@ -1,29 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/range_c/empty.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_RANGE_C_EMPTY_HPP_INCLUDED #define BOOST_MPL_AUX_RANGE_C_EMPTY_HPP_INCLUDED -#include "boost/mpl/empty_fwd.hpp" -#include "boost/mpl/equal_to.hpp" -#include "boost/mpl/aux_/range_c/tag.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/empty_fwd.hpp> +#include <boost/mpl/equal_to.hpp> +#include <boost/mpl/aux_/range_c/tag.hpp> + +namespace boost { namespace mpl { template<> -struct empty_traits< aux::half_open_range_tag > +struct empty_impl< aux::half_open_range_tag > { - template< typename Range > struct algorithm + template< typename Range > struct apply : equal_to< typename Range::start , typename Range::finish @@ -32,7 +32,6 @@ struct empty_traits< aux::half_open_range_tag > }; }; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AUX_RANGE_C_EMPTY_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/range_c/front.hpp b/include/boost/mpl/aux_/range_c/front.hpp index 136dd6f..36fb936 100644 --- a/include/boost/mpl/aux_/range_c/front.hpp +++ b/include/boost/mpl/aux_/range_c/front.hpp @@ -1,34 +1,33 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/range_c/front.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_RANGE_C_FRONT_HPP_INCLUDED #define BOOST_MPL_AUX_RANGE_C_FRONT_HPP_INCLUDED -#include "boost/mpl/front_fwd.hpp" -#include "boost/mpl/aux_/range_c/tag.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/front_fwd.hpp> +#include <boost/mpl/aux_/range_c/tag.hpp> + +namespace boost { namespace mpl { template<> -struct front_traits< aux::half_open_range_tag > +struct front_impl< aux::half_open_range_tag > { - template< typename Range > struct algorithm + template< typename Range > struct apply { typedef typename Range::start type; }; }; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AUX_RANGE_C_FRONT_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/range_c/iterator.hpp b/include/boost/mpl/aux_/range_c/iterator.hpp index 2950f45..b61501c 100644 --- a/include/boost/mpl/aux_/range_c/iterator.hpp +++ b/include/boost/mpl/aux_/range_c/iterator.hpp @@ -1,39 +1,41 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/range_c/iterator.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_RANGE_C_ITERATOR_HPP_INCLUDED #define BOOST_MPL_AUX_RANGE_C_ITERATOR_HPP_INCLUDED -#include "boost/mpl/iterator_tag.hpp" -#include "boost/mpl/plus.hpp" -#include "boost/mpl/minus.hpp" -#include "boost/mpl/aux_/iterator_names.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/iterator_tags.hpp> +#include <boost/mpl/next_prior.hpp> +#include <boost/mpl/plus.hpp> +#include <boost/mpl/minus.hpp> +#include <boost/mpl/aux_/iterator_names.hpp> + +namespace boost { namespace mpl { template< typename N > -struct range_c_iterator +struct rc_iter { - typedef ra_iter_tag_ category; + typedef aux::rc_iter_tag tag; + typedef random_access_iterator_tag category; typedef N type; - typedef range_c_iterator<typename N::next> next; - typedef range_c_iterator<typename N::prior> prior; + typedef rc_iter<typename next<N>::type> next; + typedef rc_iter<typename prior<N>::type> prior; template< typename D > struct BOOST_MPL_AUX_ITERATOR_ADVANCE { - typedef range_c_iterator< + typedef rc_iter< typename plus<N,D>::type > type; }; @@ -45,7 +47,6 @@ struct range_c_iterator }; }; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AUX_RANGE_C_ITERATOR_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/range_c/size.hpp b/include/boost/mpl/aux_/range_c/size.hpp index e0bb1fa..9757dbe 100644 --- a/include/boost/mpl/aux_/range_c/size.hpp +++ b/include/boost/mpl/aux_/range_c/size.hpp @@ -1,29 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/range_c/size.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_RANGE_C_SIZE_HPP_INCLUDED #define BOOST_MPL_AUX_RANGE_C_SIZE_HPP_INCLUDED -#include "boost/mpl/size_fwd.hpp" -#include "boost/mpl/minus.hpp" -#include "boost/mpl/aux_/range_c/tag.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/size_fwd.hpp> +#include <boost/mpl/minus.hpp> +#include <boost/mpl/aux_/range_c/tag.hpp> + +namespace boost { namespace mpl { template<> -struct size_traits< aux::half_open_range_tag > +struct size_impl< aux::half_open_range_tag > { - template< typename Range > struct algorithm + template< typename Range > struct apply : minus< typename Range::finish , typename Range::start @@ -32,7 +32,6 @@ struct size_traits< aux::half_open_range_tag > }; }; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AUX_RANGE_C_SIZE_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/range_c/tag.hpp b/include/boost/mpl/aux_/range_c/tag.hpp index 5ded3b8..121e680 100644 --- a/include/boost/mpl/aux_/range_c/tag.hpp +++ b/include/boost/mpl/aux_/range_c/tag.hpp @@ -1,26 +1,24 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/range_c/tag.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_RANGE_C_TAG_HPP_INCLUDED #define BOOST_MPL_AUX_RANGE_C_TAG_HPP_INCLUDED -namespace boost { -namespace mpl { -namespace aux { +// 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$ + +namespace boost { namespace mpl { namespace aux { struct half_open_range_tag; +struct rc_iter_tag; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} #endif // BOOST_MPL_AUX_RANGE_C_TAG_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/reverse_fold_impl.hpp b/include/boost/mpl/aux_/reverse_fold_impl.hpp new file mode 100644 index 0000000..8be9df9 --- /dev/null +++ b/include/boost/mpl/aux_/reverse_fold_impl.hpp @@ -0,0 +1,43 @@ + +#ifndef BOOST_MPL_AUX_REVERSE_FOLD_IMPL_HPP_INCLUDED +#define BOOST_MPL_AUX_REVERSE_FOLD_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. + +// $Source$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include <boost/mpl/next_prior.hpp> +# include <boost/mpl/apply.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + || defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) +# include <boost/mpl/if.hpp> +# include <boost/type_traits/is_same.hpp> +# endif +#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 reverse_fold_impl.hpp +# include <boost/mpl/aux_/include_preprocessed.hpp> + +#else + +# define AUX778076_FOLD_IMPL_OP(iter) typename iter::type +# define AUX778076_FOLD_IMPL_NAME_PREFIX reverse_fold +# include <boost/mpl/aux_/reverse_fold_impl_body.hpp> + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX_REVERSE_FOLD_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/reverse_fold_impl_body.hpp b/include/boost/mpl/aux_/reverse_fold_impl_body.hpp new file mode 100644 index 0000000..7dc0348 --- /dev/null +++ b/include/boost/mpl/aux_/reverse_fold_impl_body.hpp @@ -0,0 +1,412 @@ + +// 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/mpl/limits/unrolling.hpp> +# include <boost/mpl/aux_/preprocessor/repeat.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# include <boost/mpl/aux_/nttp_decl.hpp> + +# include <boost/preprocessor/arithmetic/sub.hpp> +# include <boost/preprocessor/iterate.hpp> +# include <boost/preprocessor/dec.hpp> +# include <boost/preprocessor/inc.hpp> +# include <boost/preprocessor/cat.hpp> + +// local macros, #undef-ined at the end of the header + +# define AUX778076_ITER_FOLD_FORWARD_STEP(unused, n_, unused2) \ + typedef typename apply2< \ + ForwardOp \ + , BOOST_PP_CAT(fwd_state,n_) \ + , AUX778076_FOLD_IMPL_OP(BOOST_PP_CAT(iter,n_)) \ + >::type BOOST_PP_CAT(fwd_state,BOOST_PP_INC(n_)); \ + typedef typename next<BOOST_PP_CAT(iter,n_)>::type \ + BOOST_PP_CAT(iter,BOOST_PP_INC(n_)); \ + /**/ + +# define AUX778076_ITER_FOLD_BACKWARD_STEP_FUNC(n_) \ + typedef typename apply2< \ + BackwardOp \ + , BOOST_PP_CAT(bkwd_state,n_) \ + , AUX778076_FOLD_IMPL_OP(BOOST_PP_CAT(iter,BOOST_PP_DEC(n_))) \ + >::type BOOST_PP_CAT(bkwd_state,BOOST_PP_DEC(n_)); \ + /**/ + +# define AUX778076_ITER_FOLD_BACKWARD_STEP(unused, n_, j) \ + AUX778076_ITER_FOLD_BACKWARD_STEP_FUNC( \ + BOOST_PP_SUB_D(1,j,n_) \ + ) \ + /**/ + +# define AUX778076_FIRST_BACKWARD_STATE_TYPEDEF(n_) \ + typedef typename nested_chunk::state BOOST_PP_CAT(bkwd_state,n_); + /**/ + +# define AUX778076_FOLD_IMPL_NAME \ + BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_impl) \ + /**/ + +# define AUX778076_FOLD_CHUNK_NAME \ + BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_chunk) \ + /**/ + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration +template< + BOOST_MPL_AUX_NTTP_DECL(long, N) + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct AUX778076_FOLD_IMPL_NAME; + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux_/reverse_fold_impl_body.hpp>)) +# include BOOST_PP_ITERATE() + +// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING +template< + BOOST_MPL_AUX_NTTP_DECL(long, N) + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct AUX778076_FOLD_IMPL_NAME +{ + typedef First iter0; + typedef State fwd_state0; + + BOOST_MPL_PP_REPEAT( + BOOST_MPL_LIMIT_UNROLLING + , AUX778076_ITER_FOLD_FORWARD_STEP + , unused + ) + + typedef AUX778076_FOLD_IMPL_NAME< + ( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING ) + , BOOST_PP_CAT(iter,BOOST_MPL_LIMIT_UNROLLING) + , Last + , BOOST_PP_CAT(fwd_state,BOOST_MPL_LIMIT_UNROLLING) + , BackwardOp + , ForwardOp + > nested_chunk; + + AUX778076_FIRST_BACKWARD_STATE_TYPEDEF(BOOST_MPL_LIMIT_UNROLLING) + + BOOST_MPL_PP_REPEAT( + BOOST_MPL_LIMIT_UNROLLING + , AUX778076_ITER_FOLD_BACKWARD_STEP + , BOOST_MPL_LIMIT_UNROLLING + ) + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +// fallback implementation for sequences of unknown size +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct AUX778076_FOLD_IMPL_NAME<-1,First,Last,State,BackwardOp,ForwardOp> +{ + typedef AUX778076_FOLD_IMPL_NAME< + -1 + , typename next<First>::type + , Last + , typename apply2<ForwardOp,State,AUX778076_FOLD_IMPL_OP(First)>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , AUX778076_FOLD_IMPL_OP(First) + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct AUX778076_FOLD_IMPL_NAME<-1,Last,Last,State,BackwardOp,ForwardOp> +{ + typedef State state; + typedef Last iterator; +}; + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > +struct AUX778076_FOLD_CHUNK_NAME; + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux_/reverse_fold_impl_body.hpp>)) +# include BOOST_PP_ITERATE() + +// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > +struct AUX778076_FOLD_CHUNK_NAME +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + + BOOST_MPL_PP_REPEAT( + BOOST_MPL_LIMIT_UNROLLING + , AUX778076_ITER_FOLD_FORWARD_STEP + , unused + ) + + typedef AUX778076_FOLD_IMPL_NAME< + ( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING ) + , BOOST_PP_CAT(iter,BOOST_MPL_LIMIT_UNROLLING) + , Last + , BOOST_PP_CAT(fwd_state,BOOST_MPL_LIMIT_UNROLLING) + , BackwardOp + , ForwardOp + > nested_chunk; + + AUX778076_FIRST_BACKWARD_STATE_TYPEDEF(BOOST_MPL_LIMIT_UNROLLING) + + BOOST_MPL_PP_REPEAT( + BOOST_MPL_LIMIT_UNROLLING + , AUX778076_ITER_FOLD_BACKWARD_STEP + , BOOST_MPL_LIMIT_UNROLLING + ) + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; + }; +}; + +// fallback implementation for sequences of unknown size +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step); + +template< + typename Last + , typename State + > +struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step) +{ + typedef Last iterator; + typedef State state; +}; + +template<> +struct AUX778076_FOLD_CHUNK_NAME<-1> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef typename if_< + typename is_same<First,Last>::type + , BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step)<Last,State> + , BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step)<First,Last,State,BackwardOp,ForwardOp> + >::type res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; + }; + +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) + /// ETI workaround + template<> struct result_<int,int,int,int,int> + { + typedef int state; + typedef int iterator; + }; +#endif +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step) +{ + typedef AUX778076_FOLD_CHUNK_NAME<-1>::template result_< + typename next<First>::type + , Last + , typename apply2<ForwardOp,State,AUX778076_FOLD_IMPL_OP(First)>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , AUX778076_FOLD_IMPL_OP(First) + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + BOOST_MPL_AUX_NTTP_DECL(long, N) + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct AUX778076_FOLD_IMPL_NAME + : AUX778076_FOLD_CHUNK_NAME<N> + ::template result_<First,Last,State,BackwardOp,ForwardOp> +{ +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +}}} + +# undef AUX778076_FIRST_BACKWARD_STATE_TYPEDEF +# undef AUX778076_ITER_FOLD_BACKWARD_STEP +# undef AUX778076_ITER_FOLD_BACKWARD_STEP_FUNC +# undef AUX778076_ITER_FOLD_FORWARD_STEP + +#undef AUX778076_FOLD_IMPL_OP +#undef AUX778076_FOLD_IMPL_NAME_PREFIX + +///// iteration + +#else + +# define n_ BOOST_PP_FRAME_ITERATION(1) + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct AUX778076_FOLD_IMPL_NAME<n_,First,Last,State,BackwardOp,ForwardOp> +{ + typedef First iter0; + typedef State fwd_state0; + + BOOST_MPL_PP_REPEAT( + n_ + , AUX778076_ITER_FOLD_FORWARD_STEP + , unused + ) + + typedef BOOST_PP_CAT(fwd_state,n_) BOOST_PP_CAT(bkwd_state,n_); + + BOOST_MPL_PP_REPEAT( + n_ + , AUX778076_ITER_FOLD_BACKWARD_STEP + , n_ + ) + + typedef bkwd_state0 state; + typedef BOOST_PP_CAT(iter,n_) iterator; +}; + +#else + +template<> struct AUX778076_FOLD_CHUNK_NAME<n_> +{ + template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > + struct result_ + { + typedef First iter0; + typedef State fwd_state0; + + BOOST_MPL_PP_REPEAT( + n_ + , AUX778076_ITER_FOLD_FORWARD_STEP + , unused + ) + + typedef BOOST_PP_CAT(fwd_state,n_) BOOST_PP_CAT(bkwd_state,n_); + + BOOST_MPL_PP_REPEAT( + n_ + , AUX778076_ITER_FOLD_BACKWARD_STEP + , n_ + ) + + typedef bkwd_state0 state; + typedef BOOST_PP_CAT(iter,n_) iterator; + }; + +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) + /// ETI workaround + template<> struct result_<int,int,int,int,int> + { + typedef int state; + typedef int iterator; + }; +#endif +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +# undef n_ + +#endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/aux_/reverse_iter_fold_impl.hpp b/include/boost/mpl/aux_/reverse_iter_fold_impl.hpp new file mode 100644 index 0000000..ab0b607 --- /dev/null +++ b/include/boost/mpl/aux_/reverse_iter_fold_impl.hpp @@ -0,0 +1,43 @@ + +#ifndef BOOST_MPL_AUX_ITER_FOLD_BACKWARD_IMPL_HPP_INCLUDED +#define BOOST_MPL_AUX_ITER_FOLD_BACKWARD_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. + +// $Source$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include <boost/mpl/next_prior.hpp> +# include <boost/mpl/apply.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + || defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) +# include <boost/mpl/if.hpp> +# include <boost/type_traits/is_same.hpp> +# endif +#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 reverse_iter_fold_impl.hpp +# include <boost/mpl/aux_/include_preprocessed.hpp> + +#else + +# define AUX778076_FOLD_IMPL_OP(iter) iter +# define AUX778076_FOLD_IMPL_NAME_PREFIX reverse_iter_fold +# include <boost/mpl/aux_/reverse_fold_impl_body.hpp> + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX_ITER_FOLD_BACKWARD_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/select1st_wknd.hpp b/include/boost/mpl/aux_/select1st_wknd.hpp deleted file mode 100644 index d9863d7..0000000 --- a/include/boost/mpl/aux_/select1st_wknd.hpp +++ /dev/null @@ -1,72 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/select1st_wknd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2003 -// Eric Friedman, Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_SELECT1ST_WKND_HPP_INCLUDED -#define BOOST_MPL_AUX_SELECT1ST_WKND_HPP_INCLUDED - -#include "boost/mpl/aux_/is_msvc_eti_arg.hpp" -#include "boost/mpl/aux_/config/eti.hpp" - -#if defined(BOOST_MPL_MSVC_ETI_BUG) - -namespace boost { namespace mpl { namespace aux { - -# if defined(BOOST_MPL_MSVC_60_ETI_BUG) - -template< typename Pair > -struct select1st_wknd -{ - typedef typename Pair::first type; -}; - -template<> struct select1st_wknd<int> -{ - typedef int type; -}; - -# else // !defined(BOOST_MPL_MSVC_60_ETI_BUG) - -template< bool > struct select1st_wknd_impl -{ - template< typename Pair > struct result_ - { - typedef typename Pair::second type; - }; -}; - -template<> struct select1st_wknd_impl<false> -{ - template< typename Pair > struct result_ - { - typedef int type; - }; -}; - -template< typename Pair > struct select1st_wknd - : select1st_wknd_impl< !aux::is_msvc_eti_arg<Pair>::value > - ::template result_<Pair> -{ -}; - -# endif // BOOST_MPL_MSVC_60_ETI_BUG workaround - -}}} // namespace boost::mpl::aux - -# define BOOST_MPL_AUX_SELECT1ST_WKND(pair) ::boost::mpl::aux::select1st_wknd< pair >::type - -#else // !defined(BOOST_MPL_MSVC_ETI_BUG) - -# define BOOST_MPL_AUX_SELECT1ST_WKND(pair) pair::first - -#endif // BOOST_MPL_MSVC_ETI_BUG workaround - -#endif // BOOST_MPL_AUX_SELECT1ST_WKND_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/select2nd_wknd.hpp b/include/boost/mpl/aux_/select2nd_wknd.hpp deleted file mode 100644 index c6fbb3e..0000000 --- a/include/boost/mpl/aux_/select2nd_wknd.hpp +++ /dev/null @@ -1,72 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/select2nd_wknd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2003 -// Eric Friedman, Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_SELECT2ND_WKND_HPP_INCLUDED -#define BOOST_MPL_AUX_SELECT2ND_WKND_HPP_INCLUDED - -#include "boost/mpl/aux_/is_msvc_eti_arg.hpp" -#include "boost/mpl/aux_/config/eti.hpp" - -#if defined(BOOST_MPL_MSVC_ETI_BUG) - -namespace boost { namespace mpl { namespace aux { - -# if defined(BOOST_MPL_MSVC_60_ETI_BUG) - -template< typename Pair > -struct select2nd_wknd -{ - typedef typename Pair::second type; -}; - -template<> struct select2nd_wknd<int> -{ - typedef int type; -}; - -# else // !defined(BOOST_MPL_MSVC_60_ETI_BUG) - -template< bool > struct select2nd_wknd_impl -{ - template< typename Pair > struct result_ - { - typedef typename Pair::second type; - }; -}; - -template<> struct select2nd_wknd_impl<false> -{ - template< typename Pair > struct result_ - { - typedef int type; - }; -}; - -template< typename Pair > struct select2nd_wknd - : select2nd_wknd_impl< !aux::is_msvc_eti_arg<Pair>::value > - ::template result_<Pair> -{ -}; - -# endif // BOOST_MPL_MSVC_60_ETI_BUG workaround - -}}} // namespace boost::mpl::aux - -# define BOOST_MPL_AUX_SELECT2ND_WKND(pair) ::boost::mpl::aux::select2nd_wknd< pair >::type - -#else // !defined(BOOST_MPL_MSVC_ETI_BUG) - -# define BOOST_MPL_AUX_SELECT2ND_WKND(pair) pair::second - -#endif // BOOST_MPL_MSVC_ETI_BUG workaround - -#endif // BOOST_MPL_AUX_SELECT2ND_WKND_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/sequence_tag.hpp b/include/boost/mpl/aux_/sequence_tag.hpp deleted file mode 100644 index b8b50cb..0000000 --- a/include/boost/mpl/aux_/sequence_tag.hpp +++ /dev/null @@ -1,35 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/sequence_tag.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_SEQUENCE_TAG_HPP_INCLUDED -#define BOOST_MPL_AUX_SEQUENCE_TAG_HPP_INCLUDED - -//#include "boost/mpl/aux_/config/internal.hpp" -#include "boost/config.hpp" - -#if !defined(BOOST_MPL_INTERNAL_USE_SEQUENCE_TAG) -# define BOOST_MPL_INTERNAL_USE_SEQUENCE_TAG -#endif - -#if defined(BOOST_MPL_INTERNAL_USE_SEQUENCE_TAG) \ - || defined(BOOST_MSVC) && BOOST_MSVC < 1300 - -# include "boost/mpl/sequence_tag.hpp" -# define BOOST_MPL_AUX_SEQUENCE_TAG(seq) sequence_tag<seq>::type - -#else - -# define BOOST_MPL_AUX_SEQUENCE_TAG(seq) seq::tag - -#endif - -#endif // BOOST_MPL_AUX_SEQUENCE_TAG_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/sequence_wrapper.hpp b/include/boost/mpl/aux_/sequence_wrapper.hpp new file mode 100644 index 0000000..6b6383b --- /dev/null +++ b/include/boost/mpl/aux_/sequence_wrapper.hpp @@ -0,0 +1,281 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +// 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/mpl/aux_/config/ctps.hpp> +# include <boost/mpl/aux_/nttp_decl.hpp> + +# include <boost/preprocessor/arithmetic/sub.hpp> +# include <boost/preprocessor/tuple/elem.hpp> +# include <boost/preprocessor/enum_params_with_a_default.hpp> +# include <boost/preprocessor/enum_params.hpp> +# include <boost/preprocessor/enum.hpp> +# include <boost/preprocessor/repeat.hpp> +# include <boost/preprocessor/comma_if.hpp> +# include <boost/preprocessor/iterate.hpp> + +#if defined(BOOST_MPL_PREPROCESSING_MODE) +# undef LONG_MAX +#endif + +namespace boost { namespace mpl { + +#if !defined(AUX778076_SEQUENCE_INTEGRAL_WRAPPER) + +# define AUX778076_SEQUENCE_PARAM_NAME T +# define AUX778076_SEQUENCE_TEMPLATE_PARAM typename T +# define AUX778076_SEQUENCE_DEFAULT na + +# define AUX778076_SEQUENCE_NAME_N(n) \ + BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,n) \ + /**/ + +# define AUX778076_SEQUENCE_PARAMS() \ + BOOST_PP_ENUM_PARAMS( \ + AUX778076_SEQUENCE_LIMIT \ + , AUX778076_SEQUENCE_TEMPLATE_PARAM \ + ) \ + /**/ + +# define AUX778076_SEQUENCE_ARGS() \ + BOOST_PP_ENUM_PARAMS( \ + AUX778076_SEQUENCE_LIMIT \ + , T \ + ) \ + /**/ + +# define AUX778076_SEQUENCE_DEFAULT_PARAMS() \ + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( \ + AUX778076_SEQUENCE_LIMIT \ + , AUX778076_SEQUENCE_TEMPLATE_PARAM \ + , AUX778076_SEQUENCE_DEFAULT \ + ) \ + /**/ + +# define AUX778076_SEQUENCE_N_PARAMS(n) \ + BOOST_PP_ENUM_PARAMS(n, AUX778076_SEQUENCE_TEMPLATE_PARAM) \ + /**/ + +# define AUX778076_SEQUENCE_N_ARGS(n) \ + BOOST_PP_ENUM_PARAMS(n, T) \ + /**/ + +# define AUX778076_SEQUENCE_N_PARTIAL_SPEC_ARGS(n) \ + BOOST_PP_ENUM_PARAMS(n, T) \ + BOOST_PP_COMMA_IF(n) \ + BOOST_PP_ENUM( \ + BOOST_PP_SUB_D(1,AUX778076_SEQUENCE_LIMIT,n) \ + , BOOST_PP_TUPLE_ELEM_3_2 \ + , AUX778076_SEQUENCE_DEFAULT \ + ) \ + /**/ + +#else // AUX778076_SEQUENCE_INTEGRAL_WRAPPER + +# define AUX778076_SEQUENCE_PARAM_NAME C +# define AUX778076_SEQUENCE_TEMPLATE_PARAM BOOST_MPL_AUX_NTTP_DECL(long, C) +# define AUX778076_SEQUENCE_DEFAULT LONG_MAX + +# define AUX778076_SEQUENCE_PARAMS() \ + typename T, BOOST_PP_ENUM_PARAMS( \ + AUX778076_SEQUENCE_LIMIT \ + , AUX778076_SEQUENCE_TEMPLATE_PARAM \ + ) \ + /**/ + +# define AUX778076_SEQUENCE_ARGS() \ + T, BOOST_PP_ENUM_PARAMS( \ + AUX778076_SEQUENCE_LIMIT \ + , C \ + ) \ + /**/ + +# define AUX778076_SEQUENCE_DEFAULT_PARAMS() \ + typename T, \ + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( \ + AUX778076_SEQUENCE_LIMIT \ + , AUX778076_SEQUENCE_TEMPLATE_PARAM \ + , AUX778076_SEQUENCE_DEFAULT \ + ) \ + /**/ + +# define AUX778076_SEQUENCE_N_PARAMS(n) \ + typename T BOOST_PP_COMMA_IF(n) \ + BOOST_PP_ENUM_PARAMS(n, AUX778076_SEQUENCE_TEMPLATE_PARAM) \ + /**/ + +# define AUX778076_SEQUENCE_N_ARGS(n) \ + T BOOST_PP_COMMA_IF(n) \ + BOOST_PP_ENUM_PARAMS(n, C) \ + /**/ + +# define AUX778076_SEQUENCE_N_PARTIAL_SPEC_ARGS(n) \ + T, BOOST_PP_ENUM_PARAMS(n, C) \ + BOOST_PP_COMMA_IF(n) \ + BOOST_PP_ENUM( \ + BOOST_PP_SUB_D(1,AUX778076_SEQUENCE_LIMIT,n) \ + , BOOST_PP_TUPLE_ELEM_3_2 \ + , AUX778076_SEQUENCE_DEFAULT \ + ) \ + /**/ + +#endif // AUX778076_SEQUENCE_INTEGRAL_WRAPPER + + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +// forward declaration +template< + AUX778076_SEQUENCE_DEFAULT_PARAMS() + > +struct AUX778076_SEQUENCE_NAME; +#else +namespace aux { +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > +struct BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_chooser); +} +#endif + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, AUX778076_SEQUENCE_LIMIT, <boost/mpl/aux_/sequence_wrapper.hpp>)) +#include BOOST_PP_ITERATE() + +// real C++ version is already taken care of +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +namespace aux { +// ???_count_args +#define AUX778076_COUNT_ARGS_PREFIX AUX778076_SEQUENCE_NAME +#define AUX778076_COUNT_ARGS_DEFAULT AUX778076_SEQUENCE_DEFAULT +#define AUX778076_COUNT_ARGS_PARAM_NAME AUX778076_SEQUENCE_PARAM_NAME +#define AUX778076_COUNT_ARGS_TEMPLATE_PARAM AUX778076_SEQUENCE_TEMPLATE_PARAM +#define AUX778076_COUNT_ARGS_ARITY AUX778076_SEQUENCE_LIMIT +#define AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES +#include <boost/mpl/aux_/count_args.hpp> + +template< + AUX778076_SEQUENCE_PARAMS() + > +struct BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_impl) +{ + typedef aux::BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_count_args)< + BOOST_PP_ENUM_PARAMS(AUX778076_SEQUENCE_LIMIT, AUX778076_SEQUENCE_PARAM_NAME) + > arg_num_; + + typedef typename aux::BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_chooser)< arg_num_::value > + ::template result_< AUX778076_SEQUENCE_ARGS() >::type type; +}; + +} // namespace aux + +template< + AUX778076_SEQUENCE_DEFAULT_PARAMS() + > +struct AUX778076_SEQUENCE_NAME + : aux::BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_impl)< + AUX778076_SEQUENCE_ARGS() + >::type +{ + typedef typename aux::BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_impl)< + AUX778076_SEQUENCE_ARGS() + >::type type; +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +# undef AUX778076_SEQUENCE_N_PARTIAL_SPEC_ARGS +# undef AUX778076_SEQUENCE_N_ARGS +# undef AUX778076_SEQUENCE_N_PARAMS +# undef AUX778076_SEQUENCE_DEFAULT_PARAMS +# undef AUX778076_SEQUENCE_ARGS +# undef AUX778076_SEQUENCE_PARAMS +# undef AUX778076_SEQUENCE_NAME_N +# undef AUX778076_SEQUENCE_DEFAULT +# undef AUX778076_SEQUENCE_TEMPLATE_PARAM +# undef AUX778076_SEQUENCE_PARAM_NAME +# undef AUX778076_SEQUENCE_LIMIT +# undef AUX778076_SEQUENCE_NAME +# undef AUX778076_SEQUENCE_INTEGRAL_WRAPPER + +}} + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +#if i_ == AUX778076_SEQUENCE_LIMIT + +/// primary template (not a specialization!) +template< + AUX778076_SEQUENCE_N_PARAMS(i_) + > +struct AUX778076_SEQUENCE_NAME + : AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) > +{ + typedef typename AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) >::type type; +}; + +#else + +template< + AUX778076_SEQUENCE_N_PARAMS(i_) + > +struct AUX778076_SEQUENCE_NAME< AUX778076_SEQUENCE_N_PARTIAL_SPEC_ARGS(i_) > + : AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) > +{ +#if i_ > 0 || defined(AUX778076_SEQUENCE_INTEGRAL_WRAPPER) + typedef typename AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) >::type type; +#else + typedef AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) >::type type; +#endif +}; + +#endif // i_ == AUX778076_SEQUENCE_LIMIT + +# else + +namespace aux { + +template<> +struct BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_chooser)<i_> +{ + template< + AUX778076_SEQUENCE_PARAMS() + > + struct result_ + { +#if i_ > 0 || defined(AUX778076_SEQUENCE_INTEGRAL_WRAPPER) + typedef typename AUX778076_SEQUENCE_NAME_N(i_)< + AUX778076_SEQUENCE_N_ARGS(i_) + >::type type; +#else + typedef AUX778076_SEQUENCE_NAME_N(i_)< + AUX778076_SEQUENCE_N_ARGS(i_) + >::type type; +#endif + }; +}; + +} // namespace aux + +# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/aux_/shift_op.hpp b/include/boost/mpl/aux_/shift_op.hpp new file mode 100644 index 0000000..8dc9e7c --- /dev/null +++ b/include/boost/mpl/aux_/shift_op.hpp @@ -0,0 +1,86 @@ + +// 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. + +// $Source$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include <boost/mpl/integral_c.hpp> +# include <boost/mpl/aux_/value_wknd.hpp> +#endif + +#if !defined(AUX778076_OP_PREFIX) +# define AUX778076_OP_PREFIX AUX778076_OP_NAME +#endif + +#define AUX778076_OP_ARITY 2 + +#include <boost/mpl/aux_/numeric_op.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 BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +namespace aux { +template< typename T, typename Shift, T n, Shift s > +struct BOOST_PP_CAT(BOOST_PP_CAT(msvc_,AUX778076_OP_PREFIX),_impl) +{ + enum msvc_wknd { value = (n AUX778076_OP_TOKEN s) }; + typedef integral_c<T,value> type; +}; +} +#endif + +template<> +struct AUX778076_OP_IMPL_NAME<integral_c_tag,integral_c_tag> +{ + template< typename N, typename Shift > struct apply +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + : integral_c< + typename N::value_type + , ( BOOST_MPL_AUX_VALUE_WKND(N)::value + AUX778076_OP_TOKEN BOOST_MPL_AUX_VALUE_WKND(Shift)::value ) + > +#else + : aux::BOOST_PP_CAT(BOOST_PP_CAT(msvc_,AUX778076_OP_NAME),_impl)< + typename N::value_type + , typename Shift::value_type + , N::value + , Shift::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 diff --git a/include/boost/mpl/aux_/single_element_iter.hpp b/include/boost/mpl/aux_/single_element_iter.hpp index d8d9de6..69eabcd 100644 --- a/include/boost/mpl/aux_/single_element_iter.hpp +++ b/include/boost/mpl/aux_/single_element_iter.hpp @@ -1,27 +1,28 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/single_element_iter.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_SINGLE_ELEMENT_ITER_HPP_INCLUDED #define BOOST_MPL_AUX_SINGLE_ELEMENT_ITER_HPP_INCLUDED -#include "boost/mpl/iterator_tag.hpp" -#include "boost/mpl/plus.hpp" -#include "boost/mpl/minus.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_/config/nttp.hpp" +// 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/mpl/iterator_tags.hpp> +#include <boost/mpl/plus.hpp> +#include <boost/mpl/minus.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> namespace boost { namespace mpl { @@ -34,7 +35,7 @@ struct single_element_iter; template< typename T, BOOST_MPL_AUX_NTTP_DECL(int, N) > struct single_iter_base { - typedef ra_iter_tag_ category; + typedef random_access_iterator_tag category; typedef mpl::int_<N> position; template< typename D > @@ -112,8 +113,6 @@ struct single_element_iter } // namespace aux -//BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, aux::single_element_iter) - -}} // namespace boost::mpl +}} #endif // BOOST_MPL_AUX_SINGLE_ELEMENT_ITER_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/size_impl.hpp b/include/boost/mpl/aux_/size_impl.hpp index fee0953..a1d9750 100644 --- a/include/boost/mpl/aux_/size_impl.hpp +++ b/include/boost/mpl/aux_/size_impl.hpp @@ -1,35 +1,35 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/size_impl.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_SIZE_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_SIZE_IMPL_HPP_INCLUDED -#include "boost/mpl/size_fwd.hpp" -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/distance.hpp" -#include "boost/mpl/aux_/traits_lambda_spec.hpp" -#include "boost/config.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/size_fwd.hpp> +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/distance.hpp> +#include <boost/mpl/aux_/traits_lambda_spec.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +namespace boost { namespace mpl { // default implementation; conrete sequences might override it by -// specializing either the 'size_traits' or the primary 'size' template +// specializing either the 'size_impl' or the primary 'size' template template< typename Tag > -struct size_traits +struct size_impl { - template< typename Sequence > struct algorithm -#if !defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) + template< typename Sequence > struct apply +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) : distance< typename begin<Sequence>::type , typename end<Sequence>::type @@ -45,9 +45,8 @@ struct size_traits }; }; -BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,size_traits) +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, size_impl) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AUX_SIZE_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/sort_impl.hpp b/include/boost/mpl/aux_/sort_impl.hpp index fe3cc04..b645241 100644 --- a/include/boost/mpl/aux_/sort_impl.hpp +++ b/include/boost/mpl/aux_/sort_impl.hpp @@ -1,33 +1,32 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/sort_impl.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002-2003 -// Eric Friedman -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_SORT_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_SORT_IMPL_HPP_INCLUDED -#include "boost/mpl/aux_/select1st_wknd.hpp" -#include "boost/mpl/aux_/select2nd_wknd.hpp" -#include "boost/mpl/apply.hpp" -#include "boost/mpl/apply_if.hpp" -#include "boost/mpl/copy_backward.hpp" -#include "boost/mpl/empty.hpp" -#include "boost/mpl/front.hpp" -#include "boost/mpl/identity.hpp" -#include "boost/mpl/partition.hpp" -#include "boost/mpl/pop_front.hpp" -#include "boost/mpl/push_front.hpp" -#include "boost/mpl/aux_/traits_lambda_spec.hpp" +// Copyright Eric Friedman 2002-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $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/pop_front.hpp> +#include <boost/mpl/push_front.hpp> +#include <boost/mpl/protect.hpp> +#include <boost/mpl/aux_/traits_lambda_spec.hpp> + +namespace boost { namespace mpl { namespace aux { @@ -58,15 +57,15 @@ private: >::type partitioned; typedef typename quick_sort< - typename BOOST_MPL_AUX_SELECT1ST_WKND(partitioned), Predicate + typename first<partitioned>::type, Predicate >::type first_part; typedef typename quick_sort< - typename BOOST_MPL_AUX_SELECT2ND_WKND(partitioned), Predicate + typename second<partitioned>::type, Predicate >::type second_part; public: - typedef typename copy_backward< + typedef typename reverse_fold< first_part , typename push_front< second_part,pivot_ >::type , push_front<_,_> @@ -76,7 +75,7 @@ public: template <typename Sequence, typename Predicate> struct quick_sort - : apply_if< + : eval_if< empty<Sequence> , identity< Sequence > , quick_sort_impl< Sequence,Predicate > @@ -87,10 +86,10 @@ struct quick_sort } // namespace aux template< typename Tag > -struct sort_traits +struct sort_impl { template< typename Sequence, typename Predicate > - struct algorithm + struct apply { typedef typename aux::quick_sort< Sequence, Predicate @@ -98,9 +97,8 @@ struct sort_traits }; }; -BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,sort_traits) +BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,sort_impl) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AUX_SORT_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/static_cast.hpp b/include/boost/mpl/aux_/static_cast.hpp index 8dde5b0..1ccaf30 100644 --- a/include/boost/mpl/aux_/static_cast.hpp +++ b/include/boost/mpl/aux_/static_cast.hpp @@ -2,19 +2,19 @@ #ifndef BOOST_MPL_AUX_STATIC_CAST_HPP_INCLUDED #define BOOST_MPL_AUX_STATIC_CAST_HPP_INCLUDED -// + file: boost/mpl/aux_/static_cast.hpp -// + last modified: 02/may/03 - -// Copyright (c) 2001-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2001-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/aux_/config/workaround.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/workaround.hpp> #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ || BOOST_WORKAROUND(__GNUC__, < 3) \ diff --git a/include/boost/mpl/aux_/template_arity.hpp b/include/boost/mpl/aux_/template_arity.hpp index 6d0a6fa..d95b5cf 100644 --- a/include/boost/mpl/aux_/template_arity.hpp +++ b/include/boost/mpl/aux_/template_arity.hpp @@ -1,14 +1,3 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/template_arity.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// 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) #if !defined(BOOST_PP_IS_ITERATING) @@ -17,44 +6,59 @@ #ifndef BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED #define BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED -#include "boost/mpl/aux_/config/ttp.hpp" -#include "boost/mpl/aux_/config/lambda.hpp" +// Copyright Aleksey Gurtovoy 2001-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_/config/ttp.hpp> +#include <boost/mpl/aux_/config/lambda.hpp> #if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include "boost/mpl/aux_/template_arity_fwd.hpp" -# if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) -# if defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) -# include "boost/mpl/aux_/type_wrapper.hpp" +# include <boost/mpl/aux_/template_arity_fwd.hpp> +# include <boost/mpl/int.hpp> +# if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +# if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) +# include <boost/mpl/aux_/type_wrapper.hpp> # endif # else -# include "boost/mpl/aux_/has_rebind.hpp" +# include <boost/mpl/aux_/has_rebind.hpp> # endif #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER template_arity.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" +# include <boost/mpl/aux_/include_preprocessed.hpp> #else -# if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) -# if defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) +# if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +# if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) -# include "boost/mpl/limits/arity.hpp" -# include "boost/mpl/aux_/config/nttp.hpp" -# include "boost/mpl/aux_/preprocessor/range.hpp" -# include "boost/mpl/aux_/preprocessor/repeat.hpp" -# include "boost/mpl/aux_/preprocessor/params.hpp" +# include <boost/mpl/limits/arity.hpp> +# include <boost/mpl/aux_/preprocessor/range.hpp> +# include <boost/mpl/aux_/preprocessor/repeat.hpp> +# include <boost/mpl/aux_/preprocessor/params.hpp> +# include <boost/mpl/aux_/nttp_decl.hpp> -# include "boost/preprocessor/seq/fold_left.hpp" -# include "boost/preprocessor/comma_if.hpp" -# include "boost/preprocessor/iterate.hpp" -# include "boost/preprocessor/inc.hpp" -# include "boost/preprocessor/cat.hpp" +# include <boost/preprocessor/seq/fold_left.hpp> +# include <boost/preprocessor/comma_if.hpp> +# include <boost/preprocessor/iterate.hpp> +# include <boost/preprocessor/inc.hpp> +# include <boost/preprocessor/cat.hpp> + +# define AUX778076_ARITY BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) namespace boost { namespace mpl { namespace aux { @@ -63,34 +67,31 @@ template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arity_tag typedef char (&type)[N + 1]; }; -#define AUX_MAX_ARITY_OP(unused, state, i) \ - ( BOOST_PP_CAT(C,i) > 0 ? BOOST_PP_CAT(C,i) : state ) \ +# define AUX778076_MAX_ARITY_OP(unused, state, i_) \ + ( BOOST_PP_CAT(C,i_) > 0 ? BOOST_PP_CAT(C,i_) : state ) \ /**/ template< - BOOST_MPL_PP_PARAMS( - BOOST_MPL_METAFUNCTION_MAX_ARITY - , BOOST_MPL_AUX_NTTP_DECL(int, C) - ) + BOOST_MPL_PP_PARAMS(AUX778076_ARITY, BOOST_MPL_AUX_NTTP_DECL(int, C)) > struct max_arity { BOOST_STATIC_CONSTANT(int, value = BOOST_PP_SEQ_FOLD_LEFT( - AUX_MAX_ARITY_OP + AUX778076_MAX_ARITY_OP , -1 - , BOOST_MPL_PP_RANGE(1, BOOST_MPL_METAFUNCTION_MAX_ARITY) + , BOOST_MPL_PP_RANGE(1, AUX778076_ARITY) ) ); }; -#undef AUX_MAX_ARITY_OP +# undef AUX778076_MAX_ARITY_OP -arity_tag<0> arity_helper(...); +arity_tag<0>::type arity_helper(...); -#define BOOST_PP_ITERATION_LIMITS (1, BOOST_MPL_METAFUNCTION_MAX_ARITY) -#define BOOST_PP_FILENAME_1 "boost/mpl/aux_/template_arity.hpp" -#include BOOST_PP_ITERATE() +# define BOOST_PP_ITERATION_LIMITS (1, AUX778076_ARITY) +# define BOOST_PP_FILENAME_1 <boost/mpl/aux_/template_arity.hpp> +# include BOOST_PP_ITERATE() template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) > struct template_arity_impl @@ -100,8 +101,8 @@ struct template_arity_impl ); }; -#define AUX_TEMPLATE_ARITY_IMPL_INVOCATION(unused, i, F) \ - BOOST_PP_COMMA_IF(i) template_arity_impl<F,BOOST_PP_INC(i)>::value \ +# define AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION(unused, i_, F) \ + BOOST_PP_COMMA_IF(i_) template_arity_impl<F,BOOST_PP_INC(i_)>::value \ /**/ template< typename F > @@ -109,23 +110,25 @@ struct template_arity { BOOST_STATIC_CONSTANT(int, value = ( max_arity< BOOST_MPL_PP_REPEAT( - BOOST_MPL_METAFUNCTION_MAX_ARITY - , AUX_TEMPLATE_ARITY_IMPL_INVOCATION + AUX778076_ARITY + , AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION , F ) >::value )); + + typedef int_<value> type; }; -#undef AUX_TEMPLATE_ARITY_IMPL_INVOCATION +# undef AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION -}}} // namespace boost::mpl::aux +# undef AUX778076_ARITY -# endif // BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING -# else // BOOST_MPL_NO_FULL_LAMBDA_SUPPORT +}}} -# include "boost/mpl/aux_/config/eti.hpp" -# include "boost/mpl/aux_/config/static_constant.hpp" -# include "boost/mpl/aux_/config/workaround.hpp" +# endif // BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING +# else // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + +# include <boost/mpl/aux_/config/eti.hpp> namespace boost { namespace mpl { namespace aux { @@ -133,8 +136,8 @@ template< bool > struct template_arity_impl { template< typename F > struct result_ + : int_<-1> { - BOOST_STATIC_CONSTANT(int, value = -1); }; }; @@ -142,12 +145,8 @@ template<> struct template_arity_impl<true> { template< typename F > struct result_ + : F::arity { -#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x561 && !defined(BOOST_STRICT_CONFIG)) - enum { value = F::arity }; -#else - BOOST_STATIC_CONSTANT(int, value = F::arity); -#endif }; }; @@ -158,32 +157,32 @@ struct template_arity { }; -#if defined(BOOST_MPL_MSVC_ETI_BUG) +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) template<> struct template_arity<int> + : int_<-1> { - BOOST_STATIC_CONSTANT(int, value = -1); }; #endif -}}} // namespace boost::mpl::aux +}}} -# endif // BOOST_MPL_NO_FULL_LAMBDA_SUPPORT +# endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED ///// iteration #else -#define i BOOST_PP_FRAME_ITERATION(1) +#define i_ BOOST_PP_FRAME_ITERATION(1) template< - template< BOOST_MPL_PP_PARAMS(i, typename P) > class F - , BOOST_MPL_PP_PARAMS(i, typename T) + template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F + , BOOST_MPL_PP_PARAMS(i_, typename T) > -typename arity_tag<i>::type -arity_helper(type_wrapper< F<BOOST_MPL_PP_PARAMS(i, T)> >, arity_tag<i>); +typename arity_tag<i_>::type +arity_helper(type_wrapper< F<BOOST_MPL_PP_PARAMS(i_, T)> >, arity_tag<i_>); -#undef i +#undef i_ #endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/aux_/template_arity_fwd.hpp b/include/boost/mpl/aux_/template_arity_fwd.hpp index db8a424..087010d 100644 --- a/include/boost/mpl/aux_/template_arity_fwd.hpp +++ b/include/boost/mpl/aux_/template_arity_fwd.hpp @@ -1,26 +1,23 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/template_arity_fwd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_TEMPLATE_ARITY_FWD_HPP_INCLUDED #define BOOST_MPL_AUX_TEMPLATE_ARITY_FWD_HPP_INCLUDED -namespace boost { -namespace mpl { -namespace aux { +// Copyright Aleksey Gurtovoy 2001-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$ + +namespace boost { namespace mpl { namespace aux { template< typename F > struct template_arity; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} #endif // BOOST_MPL_AUX_TEMPLATE_ARITY_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/test.hpp b/include/boost/mpl/aux_/test.hpp index b89be45..7b08140 100644 --- a/include/boost/mpl/aux_/test.hpp +++ b/include/boost/mpl/aux_/test.hpp @@ -2,22 +2,30 @@ #ifndef BOOST_MPL_AUX_TEST_HPP_INCLUDED #define BOOST_MPL_AUX_TEST_HPP_INCLUDED -// + file: boost/mpl/aux_/test.hpp -// + last modified: 04/may/03 - -// Copyright (c) 2002-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2002-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/aux_/test/assert.hpp" -#include "boost/mpl/aux_/test/data.hpp" -#include "boost/mpl/aux_/test/test_case.hpp" -#include "boost/mpl/aux_/test/for_each.hpp" -#include "boost/mpl/aux_/config/msvc_typename.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/test/test_case.hpp> +#include <boost/mpl/aux_/test/data.hpp> +#include <boost/mpl/aux_/test/assert.hpp> + +#include <boost/type_traits/is_same.hpp> + +int main() +{ + return 0; +} + +using namespace boost; +using namespace mpl; #endif // BOOST_MPL_AUX_TEST_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/test/assert.hpp b/include/boost/mpl/aux_/test/assert.hpp index 2d66507..6323586 100644 --- a/include/boost/mpl/aux_/test/assert.hpp +++ b/include/boost/mpl/aux_/test/assert.hpp @@ -2,77 +2,23 @@ #ifndef BOOST_MPL_AUX_TEST_ASSERT_HPP_INCLUDED #define BOOST_MPL_AUX_TEST_ASSERT_HPP_INCLUDED -// + file: boost/mpl/aux_/test/assert.hpp -// + last modified: 04/may/03 - -// Copyright (c) 2002-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2002-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/aux_/config/ctps.hpp" -#include "boost/mpl/aux_/config/msvc.hpp" -#include "boost/mpl/aux_/config/workaround.hpp" +// $Source$ +// $Date$ +// $Revision$ -#include "boost/static_assert.hpp" +#include <boost/mpl/assert.hpp> -#include "boost/preprocessor/tuple/rem.hpp" -#include "boost/preprocessor/control/expr_if.hpp" -#include "boost/preprocessor/logical/not.hpp" - -#define CTT_assert( expr ) BOOST_STATIC_ASSERT( expr ) -#define CTT_assert_equal(arity, tuple) assert_equal< BOOST_PP_TUPLE_REM(arity)tuple >::type() -#define CTT_assert_not_equal(arity, tuple) assert_not_equal< BOOST_PP_TUPLE_REM(arity)tuple >() -#define CTT_assert_same(arity, tuple) assert_same< BOOST_PP_TUPLE_REM(arity)tuple >() -#define CTT_assert_not_same(arity, tuple) assert_not_same< BOOST_PP_TUPLE_REM(arity)tuple >() - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -# define AUX_ASSERT_DEF( param_type, suffix, test_equality ) \ -template< param_type x, param_type y > struct assert_##suffix \ -BOOST_PP_EXPR_IF( BOOST_PP_NOT(test_equality), {} ); \ -template< param_type x > struct assert_##suffix<x,x> \ -BOOST_PP_EXPR_IF( test_equality, {} ); \ -/**/ -#elif BOOST_WORKAROUND(BOOST_MSVC, <= 1300) -# define AUX_ASSERT_DEF( param_type, suffix, test_equality ) \ -template< param_type x > struct assert_##suffix##_impl \ -{ \ - template< param_type y > struct result_; \ - template<> struct result_<x> \ - { BOOST_PP_EXPR_IF( BOOST_PP_NOT(test_equality), private: virtual ~result_<x>() = 0; ) }; \ - template< param_type y > struct result_ \ - { BOOST_PP_EXPR_IF( test_equality, private: virtual ~result_<y>() = 0; ) }; \ -}; \ -\ -template< param_type x, param_type y > struct assert_##suffix \ - : assert_##suffix##_impl<x>::template result_<y> {}; \ -/**/ -#else -# define AUX_ASSERT_DEF( param_type, suffix, test_equality ) \ -template< param_type x > struct assert_##suffix##_impl \ -{ \ - template< param_type y > struct result_ \ - BOOST_PP_EXPR_IF( BOOST_PP_NOT(test_equality), {} ); \ -}; \ -template< param_type x > struct assert_##suffix##_impl<x>::result_<x> \ -BOOST_PP_EXPR_IF( test_equality, {} ); \ -\ -template< param_type x, param_type y > struct assert_##suffix \ - : assert_##suffix##_impl<x>::template result_<y> {}; \ -/**/ -#endif - -namespace { -AUX_ASSERT_DEF(long, equal, 1) -AUX_ASSERT_DEF(long, not_equal, 0) -AUX_ASSERT_DEF(typename, same, 1) -AUX_ASSERT_DEF(typename, not_same, 0) -} - -#undef AUX_ASSERT_DEF +#define MPL_ASSERT(pred) BOOST_MPL_ASSERT(pred) +#define MPL_ASSERT_NOT(pred) BOOST_MPL_ASSERT_NOT(pred) +#define MPL_ASSERT_MSG(c, msg, types) BOOST_MPL_ASSERT_MSG(c, msg, types) +#define MPL_ASSERT_RELATION(x, rel, y) BOOST_MPL_ASSERT_RELATION(x, rel, y) #endif // BOOST_MPL_AUX_TEST_ASSERT_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/test/data.hpp b/include/boost/mpl/aux_/test/data.hpp index 92b03ff..fbeed8e 100644 --- a/include/boost/mpl/aux_/test/data.hpp +++ b/include/boost/mpl/aux_/test/data.hpp @@ -2,39 +2,24 @@ #ifndef BOOST_MPL_AUX_TEST_DATA_HPP_INCLUDED #define BOOST_MPL_AUX_TEST_DATA_HPP_INCLUDED -// + file: boost/mpl/aux_/test/data.hpp -// + last modified: 04/may/03 - -// Copyright (c) 2002-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2002-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/noncopyable.hpp" +// $Source$ +// $Date$ +// $Revision$ +#include <boost/noncopyable.hpp> + +enum enum_ {}; struct UDT {}; struct incomplete; -class abstract { virtual ~abstract() = 0; }; +class abstract { public: virtual ~abstract() = 0; }; using boost::noncopyable; -// to do: add function types for compilers that are able to handle them -// (T ())(T (int))(void (T))(T (T)) -// (T[10])(T const[10])(T volatile[10])(T const volatile[10]) -// (T (*)())(T (* const)())(T (* volatile)())(T (* const volatile)()) -// (T (*)(int))(void (*)(T))(T (*)(T)) - -#define CTT_basic_modifiers( T ) \ - (T const)(T volatile)(T const volatile) \ - (T&)(T const&)(T volatile&)(T const volatile&) \ - (T*)(T const*)(T volatile*)(T const volatile*) \ -/**/ - -#define CTT_basic_types() \ - (bool)(char)(int)(UDT)(incomplete)(noncopyable)(abstract) \ -/**/ - #endif // BOOST_MPL_AUX_TEST_DATA_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/test/for_each.hpp b/include/boost/mpl/aux_/test/for_each.hpp deleted file mode 100644 index 10e27b0..0000000 --- a/include/boost/mpl/aux_/test/for_each.hpp +++ /dev/null @@ -1,56 +0,0 @@ - -#ifndef BOOST_MPL_AUX_TEST_FOR_EACH_HPP_INCLUDED -#define BOOST_MPL_AUX_TEST_FOR_EACH_HPP_INCLUDED - -// + file: boost/mpl/aux_/test/for_each.hpp -// + last modified: 04/may/03 - -// Copyright (c) 2002-03 -// Aleksey Gurtovoy -// -// 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. - -#include "boost/mpl/aux_/preprocessor/is_seq.hpp" - -#include "boost/preprocessor/seq/for_each_i.hpp" -#include "boost/preprocessor/seq/transform.hpp" -#include "boost/preprocessor/seq/enum.hpp" -#include "boost/preprocessor/tuple/elem.hpp" -#include "boost/preprocessor/control/expr_if.hpp" -#include "boost/preprocessor/cat.hpp" - -#define CTT_AUX_IS_PLACEHOLDER_1 (1) - -#define CTT_AUX_IS_PLACEHOLDER(x) \ - BOOST_MPL_PP_IS_SEQ( BOOST_PP_CAT(CTT_AUX_IS_PLACEHOLDER, x) ) \ -/**/ - -#define CTT_AUX_PARAM_OR_T( unused, T, param ) \ - BOOST_PP_TUPLE_ELEM( 2, CTT_AUX_IS_PLACEHOLDER(param), (param, T) ) \ -/**/ - -#define CTT_AUX_REPLACE_PLACEHOLDER( params_seq, T ) \ - BOOST_PP_SEQ_ENUM( \ - BOOST_PP_SEQ_TRANSFORM( CTT_AUX_PARAM_OR_T, T, params_seq ) \ - ) \ -/**/ - -#define CTT_AUX_INVOKE_TEST( unused, test_params_pair, i, T ) \ - BOOST_PP_EXPR_IF(i, ;) \ - BOOST_PP_TUPLE_ELEM(2, 0, test_params_pair)< \ - CTT_AUX_REPLACE_PLACEHOLDER( \ - BOOST_PP_TUPLE_ELEM(2, 1, test_params_pair) \ - , T \ - ) \ - >() \ -/**/ - -#define CTT_for_each( seq, test, params_seq ) \ - BOOST_PP_SEQ_FOR_EACH_I( CTT_AUX_INVOKE_TEST, (test, params_seq), seq ) \ -/**/ - -#endif // BOOST_MPL_AUX_TEST_FOR_EACH_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/test/test_case.hpp b/include/boost/mpl/aux_/test/test_case.hpp index 5eda148..87df458 100644 --- a/include/boost/mpl/aux_/test/test_case.hpp +++ b/include/boost/mpl/aux_/test/test_case.hpp @@ -2,35 +2,20 @@ #ifndef BOOST_MPL_AUX_TEST_TEST_CASE_HPP_INCLUDED #define BOOST_MPL_AUX_TEST_TEST_CASE_HPP_INCLUDED -// + file: boost/mpl/aux_/test/test_case.hpp -// + last modified: 04/may/03 - -// Copyright (c) 2002-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2002-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/preprocessor/comma_if.hpp" -#include "boost/preprocessor/seq/for_each_i.hpp" -#include "boost/preprocessor/seq/enum.hpp" +// $Source$ +// $Date$ +// $Revision$ -#define CTT_AUX_PARAM_DEF(unused, prefix, i, elem) \ - BOOST_PP_COMMA_IF(i) prefix elem \ -/**/ +#include <boost/preprocessor/cat.hpp> -#define CTT_test_case( name, params_seq ) \ -template< \ - BOOST_PP_SEQ_FOR_EACH_I( CTT_AUX_PARAM_DEF, typename, params_seq ) \ - > \ -void name() \ -/**/ - -#define CTT_test( test, params_seq ) \ - test< BOOST_PP_SEQ_ENUM(params_seq) >() \ -/**/ +#define MPL_TEST_CASE() void BOOST_PP_CAT(test,__LINE__)() #endif // BOOST_MPL_AUX_TEST_TEST_CASE_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/traits_lambda_spec.hpp b/include/boost/mpl/aux_/traits_lambda_spec.hpp index 87914ba..4c82a65 100644 --- a/include/boost/mpl/aux_/traits_lambda_spec.hpp +++ b/include/boost/mpl/aux_/traits_lambda_spec.hpp @@ -1,32 +1,33 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/traits_lambda_spec.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_TRAITS_LAMBDA_SPEC_HPP_INCLUDED #define BOOST_MPL_AUX_TRAITS_LAMBDA_SPEC_HPP_INCLUDED -#include "boost/mpl/void.hpp" -#include "boost/mpl/aux_/preprocessor/params.hpp" -#include "boost/mpl/aux_/config/lambda.hpp" +// 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. -#if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/void.hpp> +#include <boost/mpl/aux_/preprocessor/params.hpp> +#include <boost/mpl/aux_/config/lambda.hpp> + +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) # define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(i, trait) /**/ -#elif !defined(BOOST_MPL_MSVC_ETI_BUG) +#elif !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) # define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(i, trait) \ template<> struct trait<void_> \ { \ - template< BOOST_MPL_PP_PARAMS(i, typename T) > struct algorithm \ + template< BOOST_MPL_PP_PARAMS(i, typename T) > struct apply \ { \ }; \ }; \ @@ -37,19 +38,19 @@ template<> struct trait<void_> \ # define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(i, trait) \ template<> struct trait<void_> \ { \ - template< BOOST_MPL_PP_PARAMS(i, typename T) > struct algorithm \ + template< BOOST_MPL_PP_PARAMS(i, typename T) > struct apply \ { \ }; \ }; \ template<> struct trait<int> \ { \ - template< BOOST_MPL_PP_PARAMS(i, typename T) > struct algorithm \ + template< BOOST_MPL_PP_PARAMS(i, typename T) > struct apply \ { \ typedef int type; \ }; \ }; \ /**/ -#endif // BOOST_MPL_NO_FULL_LAMBDA_SUPPORT +#endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT #endif // BOOST_MPL_AUX_TRAITS_LAMBDA_SPEC_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/transform_iter.hpp b/include/boost/mpl/aux_/transform_iter.hpp index f6f1129..59ca315 100644 --- a/include/boost/mpl/aux_/transform_iter.hpp +++ b/include/boost/mpl/aux_/transform_iter.hpp @@ -1,25 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/transform_iter.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_TRANSFORM_ITER_HPP_INCLUDED #define BOOST_MPL_AUX_TRANSFORM_ITER_HPP_INCLUDED -#include "boost/mpl/apply.hpp" -#include "boost/mpl/aux_/lambda_spec.hpp" -#include "boost/mpl/aux_/config/ctps.hpp" -#include "boost/type_traits/is_same.hpp" +// 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/mpl/apply.hpp> +#include <boost/mpl/iterator_tags.hpp> +#include <boost/mpl/next.hpp> +#include <boost/mpl/deref.hpp> +#include <boost/mpl/aux_/lambda_spec.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> +#include <boost/type_traits/is_same.hpp> + +namespace boost { namespace mpl { -namespace boost { -namespace mpl { namespace aux { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) @@ -32,12 +36,12 @@ template< struct transform_iter { typedef Iterator base; - typedef typename base::category category; - typedef transform_iter< typename base::next,LastIterator,F > next; + typedef forward_iterator_tag category; + typedef transform_iter< typename next<base>::type,LastIterator,F > next; typedef typename apply1< F - , typename base::type + , typename deref<base>::type >::type type; }; @@ -48,7 +52,7 @@ template< struct transform_iter< LastIterator,LastIterator,F > { typedef LastIterator base; - typedef typename base::category category; + typedef forward_iterator_tag category; }; #else @@ -71,14 +75,12 @@ struct transform_iter_impl struct result_ { typedef Iterator base; - // agurt, 14/oct/02: have to use |Iterator| instead of |base| below - // to prevent |base| and |mpl::base| conflict on MSVC 6.0 - typedef typename Iterator::category category; - typedef transform_iter< typename Iterator::next,LastIterator,F > next; + typedef forward_iterator_tag category; + typedef transform_iter< typename next<Iterator>::type,LastIterator,F > next; typedef typename apply1< F - , typename Iterator::type + , typename deref<Iterator>::type >::type type; }; }; @@ -94,7 +96,7 @@ struct transform_iter_impl<true> struct result_ { typedef Iterator base; - typedef typename Iterator::category category; + typedef forward_iterator_tag category; }; }; @@ -116,7 +118,6 @@ struct transform_iter BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, aux::transform_iter) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_AUX_TRANSFORM_ITER_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/type_wrapper.hpp b/include/boost/mpl/aux_/type_wrapper.hpp index e83b87e..472b80b 100644 --- a/include/boost/mpl/aux_/type_wrapper.hpp +++ b/include/boost/mpl/aux_/type_wrapper.hpp @@ -2,22 +2,24 @@ #ifndef BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED #define BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED -// + file: boost/mpl/aux_/type_wrapper.hpp -// + last modified: 09/may/03 - -// Copyright (c) 2000-03 -// Peter Dimov, Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Peter Dimov 2000-2003 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/aux_/config/ctps.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/adl_barrier.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN -namespace boost { -namespace mpl { namespace aux { template< typename T > struct type_wrapper @@ -44,7 +46,7 @@ template< typename W > struct wrapped_type #endif } // namespace aux -} // namespace mpl -} // namespace boost + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE #endif // BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/typeof.hpp b/include/boost/mpl/aux_/typeof.hpp deleted file mode 100644 index 6ccd72f..0000000 --- a/include/boost/mpl/aux_/typeof.hpp +++ /dev/null @@ -1,73 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/typeof.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_TYPEOF_HPP_INCLUDED -#define BOOST_MPL_AUX_TYPEOF_HPP_INCLUDED -#include <boost/detail/workaround.hpp> - -#if defined(__BORLANDC__) -# define BOOST_MPL_AUX_TYPEOF(T,x) typename T::value_type -#elif BOOST_WORKAROUND(__MWERKS__, <= 0x2407) || BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || BOOST_WORKAROUND(__EDG_VERSION__, <= 243) -# define BOOST_MPL_AUX_TYPEOF(T,x) long -#elif defined(__GCC__) && !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) -# define BOOST_MPL_AUX_TYPEOF(T,x) __typeof__(x) -#else -# include "boost/config.hpp" -# include "boost/mpl/aux_/config/nttp.hpp" - -namespace boost { -namespace mpl { - -// the implementation below is based on "A Portable typeof Operator" article -// by Bill Gibbons, C++ User Journal, November 2000 - -namespace aux { -template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct typeof_answer { typedef char type[N]; }; -template< BOOST_MPL_AUX_NTTP_DECL(long, S) > struct typeof_c; -} - -#define BOOST_MPL_AUX_REGISTER_TYPE(index, T) \ -namespace boost { namespace mpl { namespace aux { \ -template<> struct typeof_c<index> { typedef T type; }; \ -typeof_answer<index>::type& type_index(T const&); \ -}}} \ -/**/ - -#define BOOST_MPL_AUX_TYPEOF(T,x) \ -typename boost::mpl::aux::typeof_c< \ - sizeof(::boost::mpl::aux::type_index(x)) \ - >::type \ -/**/ - -} // namespace mpl -} // namespace boost - -BOOST_MPL_AUX_REGISTER_TYPE(1, bool) -BOOST_MPL_AUX_REGISTER_TYPE(2, signed char) -BOOST_MPL_AUX_REGISTER_TYPE(3, unsigned char) -BOOST_MPL_AUX_REGISTER_TYPE(4, char) -#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) -BOOST_MPL_AUX_REGISTER_TYPE(5, wchar_t) -#endif -BOOST_MPL_AUX_REGISTER_TYPE(6, short) -BOOST_MPL_AUX_REGISTER_TYPE(7, unsigned short) -BOOST_MPL_AUX_REGISTER_TYPE(8, int) -BOOST_MPL_AUX_REGISTER_TYPE(9, unsigned int) -BOOST_MPL_AUX_REGISTER_TYPE(10, long) -BOOST_MPL_AUX_REGISTER_TYPE(11, unsigned long) -//BOOST_MPL_AUX_REGISTER_TYPE(12, float) -//BOOST_MPL_AUX_REGISTER_TYPE(13, double) -//BOOST_MPL_AUX_REGISTER_TYPE(14, long double) - -#endif // __GCC__ - -#endif // BOOST_MPL_AUX_TYPEOF_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/unwrap.hpp b/include/boost/mpl/aux_/unwrap.hpp index aab844b..80d22d9 100644 --- a/include/boost/mpl/aux_/unwrap.hpp +++ b/include/boost/mpl/aux_/unwrap.hpp @@ -1,19 +1,21 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/unwrap.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. -// Copyright (c) 2001 David Abrahams -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED #define BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED -#include "boost/ref.hpp" +// Copyright Peter Dimov and Multi Media Ltd 2001, 2002 +// Copyright David Abrahams 2001 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/ref.hpp> namespace boost { namespace mpl { namespace aux { @@ -40,6 +42,6 @@ unwrap(reference_wrapper<F> const& f, int) return f; } -}}} // namespace boost::mpl::aux +}}} #endif // BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/value_wknd.hpp b/include/boost/mpl/aux_/value_wknd.hpp index 3a5fffd..87069cd 100644 --- a/include/boost/mpl/aux_/value_wknd.hpp +++ b/include/boost/mpl/aux_/value_wknd.hpp @@ -1,56 +1,63 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/value_wknd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED #define BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED -#include "boost/mpl/aux_/config/eti.hpp" +// 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. -#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \ - || defined(BOOST_MPL_MSVC_60_ETI_BUG) - -# include "boost/mpl/int.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { namespace mpl { namespace aux { +#include <boost/mpl/aux_/config/bcc_integral_constants.hpp> +#include <boost/mpl/aux_/config/eti.hpp> -template< typename C_ > -struct value_wknd +#if defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) \ + || defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) + +# include <boost/mpl/int.hpp> +# include <boost/mpl/aux_/adl_barrier.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +namespace aux { +template< typename C_ > struct value_wknd : C_ { }; -#if defined(BOOST_MPL_MSVC_60_ETI_BUG) -template<> -struct value_wknd<int> +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) +template<> struct value_wknd<int> : int_<1> { + using int_<1>::value; }; #endif +} // namespace aux +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE -}}} // namespace boost::mpl::aux - -# if !defined(BOOST_MPL_MSVC_60_ETI_BUG) -# define BOOST_MPL_AUX_VALUE_WKND(C) ::boost::mpl::aux::value_wknd< C > -# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) BOOST_MPL_AUX_VALUE_WKND(C) -# else -# define BOOST_MPL_AUX_VALUE_WKND(C) C -# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) ::boost::mpl::aux::value_wknd< C > -# endif +#if !defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) +# define BOOST_MPL_AUX_VALUE_WKND(C) \ + ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::aux::value_wknd< C > \ +/**/ +# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) BOOST_MPL_AUX_VALUE_WKND(C) #else +# define BOOST_MPL_AUX_VALUE_WKND(C) C +# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) \ + ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::aux::value_wknd< C > \ +/**/ +#endif + +#else // BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS # define BOOST_MPL_AUX_VALUE_WKND(C) C # define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) C -#endif // __BORLANDC__ || BOOST_MPL_MSVC_60_ETI_BUG +#endif #endif // BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/void_spec.hpp b/include/boost/mpl/aux_/void_spec.hpp deleted file mode 100644 index 5314928..0000000 --- a/include/boost/mpl/aux_/void_spec.hpp +++ /dev/null @@ -1,150 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/aux_/void_spec.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_AUX_VOID_SPEC_HPP_INCLUDED -#define BOOST_MPL_AUX_VOID_SPEC_HPP_INCLUDED - -#include "boost/mpl/lambda_fwd.hpp" -#include "boost/mpl/void.hpp" -#include "boost/mpl/int_fwd.hpp" -#include "boost/mpl/aux_/preprocessor/params.hpp" -#include "boost/mpl/aux_/preprocessor/enum.hpp" -#include "boost/mpl/aux_/preprocessor/def_params_tail.hpp" -#include "boost/mpl/aux_/arity.hpp" -#include "boost/mpl/aux_/template_arity_fwd.hpp" -#include "boost/mpl/aux_/lambda_arity_param.hpp" -#include "boost/mpl/aux_/algorithm_namespace.hpp" -#include "boost/mpl/aux_/config/dtp.hpp" -#include "boost/mpl/aux_/config/nttp.hpp" -#include "boost/mpl/aux_/config/ttp.hpp" -#include "boost/mpl/aux_/config/lambda.hpp" -#include "boost/mpl/aux_/config/overload_resolution.hpp" - -#include "boost/config.hpp" - -#define BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) \ - BOOST_MPL_PP_ENUM(i, void_) \ -/**/ - -#if defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) -# define BOOST_MPL_AUX_VOID_SPEC_ARITY(i, name) \ -namespace aux { \ -template< BOOST_MPL_AUX_NTTP_DECL(int, N) > \ -struct arity< \ - name< BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) > \ - , N \ - > \ -{ \ - BOOST_STATIC_CONSTANT(int \ - , value = BOOST_MPL_METAFUNCTION_MAX_ARITY \ - ); \ -}; \ -} \ -/**/ -#else -# define BOOST_MPL_AUX_VOID_SPEC_ARITY(i, name) /**/ -#endif - -#define BOOST_MPL_AUX_VOID_SPEC_MAIN(i, name) \ -template<> \ -struct name< BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) > \ -{ \ - template< \ - BOOST_MPL_PP_PARAMS(i, typename T) \ - BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, typename T, void_) \ - > \ - struct apply \ - : name< BOOST_MPL_PP_PARAMS(i, T) > \ - { \ - }; \ -}; \ -/**/ - -#if defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) -# define BOOST_MPL_AUX_VOID_SPEC_LAMBDA(i, name) \ -template<> \ -struct lambda< \ - name< BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) > \ - , void_ \ - , true \ - > \ -{ \ - typedef name< BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) > type; \ -}; \ -/**/ -#else -# define BOOST_MPL_AUX_VOID_SPEC_LAMBDA(i, name) \ -template<> \ -struct lambda< \ - name< BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) > \ - , void_ \ - BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<-1>) \ - > \ -{ \ - typedef name< BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) > type; \ -}; \ -/**/ -#endif - -#if defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) || \ - defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) && \ - defined(BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION) -# define BOOST_MPL_AUX_VOID_SPEC_TEMPLATE_ARITY(i, j, name) \ -namespace aux { \ -template< BOOST_MPL_PP_PARAMS(j, typename T) > \ -struct template_arity< \ - name< BOOST_MPL_PP_PARAMS(j, T) > \ - > \ -{ \ - BOOST_STATIC_CONSTANT(int, value = j); \ -}; \ -\ -template<> \ -struct template_arity< \ - name< BOOST_MPL_PP_ENUM(i, void_) > \ - > \ -{ \ - BOOST_STATIC_CONSTANT(int, value = -1); \ -}; \ -} \ -/**/ -#else -# define BOOST_MPL_AUX_VOID_SPEC_TEMPLATE_ARITY(i, j, name) /**/ -#endif - - -#define BOOST_MPL_AUX_VOID_SPEC_PARAM(param) param = void_ - -#define BOOST_MPL_AUX_VOID_SPEC(i, name) \ -BOOST_MPL_AUX_VOID_SPEC_MAIN(i, name) \ -BOOST_MPL_AUX_VOID_SPEC_LAMBDA(i, name) \ -BOOST_MPL_AUX_VOID_SPEC_ARITY(i, name) \ -BOOST_MPL_AUX_VOID_SPEC_TEMPLATE_ARITY(i, i, name) \ -/**/ - -#define BOOST_MPL_AUX_VOID_SPEC_EXT(i, j, name) \ -BOOST_MPL_AUX_VOID_SPEC_MAIN(i, name) \ -BOOST_MPL_AUX_VOID_SPEC_LAMBDA(i, name) \ -BOOST_MPL_AUX_VOID_SPEC_ARITY(i, name) \ -BOOST_MPL_AUX_VOID_SPEC_TEMPLATE_ARITY(i, j, name) \ -/**/ - -#define BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(i, name) \ -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN \ -BOOST_MPL_AUX_VOID_SPEC_MAIN(i, name) \ -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END \ -BOOST_MPL_AUX_VOID_SPEC_LAMBDA(i, BOOST_MPL_AUX_AGLORITHM_NAMESPACE_PREFIX name) \ -BOOST_MPL_AUX_VOID_SPEC_ARITY(i, BOOST_MPL_AUX_AGLORITHM_NAMESPACE_PREFIX name) \ -BOOST_MPL_AUX_VOID_SPEC_TEMPLATE_ARITY(i, i, BOOST_MPL_AUX_AGLORITHM_NAMESPACE_PREFIX name) \ -/**/ - -#endif // BOOST_MPL_AUX_VOID_SPEC_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/yes_no.hpp b/include/boost/mpl/aux_/yes_no.hpp index b9a1bce..c7d6ca9 100644 --- a/include/boost/mpl/aux_/yes_no.hpp +++ b/include/boost/mpl/aux_/yes_no.hpp @@ -2,22 +2,26 @@ #ifndef BOOST_MPL_AUX_YES_NO_HPP_INCLUDED #define BOOST_MPL_AUX_YES_NO_HPP_INCLUDED -// + file: boost/mpl/aux_/yes_no.hpp -// + last modified: 05/nov/03 - -// Copyright Aleksey Gurtovoy 2000-03 +// Copyright Aleksey Gurtovoy 2000-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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_/config/workaround.hpp" -#include "boost/mpl/aux_/config/msvc.hpp" +#include <boost/mpl/aux_/adl_barrier.hpp> +#include <boost/mpl/aux_/nttp_decl.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> +#include <boost/mpl/aux_/config/msvc.hpp> -namespace boost { namespace mpl { namespace aux { +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +namespace aux { typedef char (&no_tag)[1]; typedef char (&yes_tag)[2]; @@ -33,7 +37,7 @@ template<> struct yes_no_tag<true> }; -template< long n > struct weighted_tag +template< BOOST_MPL_AUX_NTTP_DECL(long, n) > struct weighted_tag { #if !BOOST_WORKAROUND(BOOST_MSVC, == 1200) typedef char (&type)[n]; @@ -43,7 +47,7 @@ template< long n > struct weighted_tag #endif }; -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ || BOOST_WORKAROUND(BOOST_MSVC, == 1300) template<> struct weighted_tag<0> { @@ -51,6 +55,8 @@ template<> struct weighted_tag<0> }; #endif -}}} // namespace boost::mpl::aux +} // namespace aux + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE #endif // BOOST_MPL_AUX_YES_NO_HPP_INCLUDED diff --git a/include/boost/mpl/back.hpp b/include/boost/mpl/back.hpp index b27f8f8..e5f860c 100644 --- a/include/boost/mpl/back.hpp +++ b/include/boost/mpl/back.hpp @@ -1,40 +1,39 @@ -//----------------------------------------------------------------------------- -// boost mpl/back.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_BACK_HPP_INCLUDED #define BOOST_MPL_BACK_HPP_INCLUDED -#include "boost/mpl/back_fwd.hpp" -#include "boost/mpl/aux_/back_impl.hpp" -#include "boost/mpl/aux_/sequence_tag.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/back_fwd.hpp> +#include <boost/mpl/aux_/back_impl.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct back - : back_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) > - ::template algorithm< Sequence > + : back_impl< typename sequence_tag<Sequence>::type > + ::template apply< Sequence > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,back,(Sequence)) }; -BOOST_MPL_AUX_VOID_SPEC(1, back) +BOOST_MPL_AUX_NA_SPEC(1, back) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_BACK_HPP_INCLUDED diff --git a/include/boost/mpl/back_fwd.hpp b/include/boost/mpl/back_fwd.hpp index f62a51a..86fadb8 100644 --- a/include/boost/mpl/back_fwd.hpp +++ b/include/boost/mpl/back_fwd.hpp @@ -1,25 +1,24 @@ -//----------------------------------------------------------------------------- -// boost mpl/back_fwd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_BACK_FWD_HPP_INCLUDED #define BOOST_MPL_BACK_FWD_HPP_INCLUDED -namespace boost { -namespace mpl { +// 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. -template< typename Tag > struct back_traits; +// $Source$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct back_impl; template< typename Sequence > struct back; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_BACK_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/back_inserter.hpp b/include/boost/mpl/back_inserter.hpp new file mode 100644 index 0000000..da05b14 --- /dev/null +++ b/include/boost/mpl/back_inserter.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_BACK_INSERTER_HPP_INCLUDED +#define BOOST_MPL_BACK_INSERTER_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/push_back.hpp> +#include <boost/mpl/inserter.hpp> + +namespace boost { +namespace mpl { + +template< + typename Sequence + > +struct back_inserter + : inserter< Sequence,push_back<> > +{ +}; + +}} + +#endif // BOOST_MPL_BACK_INSERTER_HPP_INCLUDED diff --git a/include/boost/mpl/base.hpp b/include/boost/mpl/base.hpp index 5ddc650..336053b 100644 --- a/include/boost/mpl/base.hpp +++ b/include/boost/mpl/base.hpp @@ -1,27 +1,26 @@ -//----------------------------------------------------------------------------- -// boost mpl/base.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_BASE_HPP_INCLUDED #define BOOST_MPL_BASE_HPP_INCLUDED -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/mpl/aux_/config/eti.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(T) > struct base { @@ -29,16 +28,8 @@ struct base BOOST_MPL_AUX_LAMBDA_SUPPORT(1,base,(T)) }; -#if defined(BOOST_MPL_MSVC_60_ETI_BUG) -template<> struct base<int> -{ - typedef int type; -}; -#endif +BOOST_MPL_AUX_NA_SPEC(1, base) -BOOST_MPL_AUX_VOID_SPEC(1, base) - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_BASE_HPP_INCLUDED diff --git a/include/boost/mpl/begin.hpp b/include/boost/mpl/begin.hpp new file mode 100644 index 0000000..54e7e9f --- /dev/null +++ b/include/boost/mpl/begin.hpp @@ -0,0 +1,19 @@ + +#ifndef BOOST_MPL_BEGIN_HPP_INCLUDED +#define BOOST_MPL_BEGIN_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/begin_end.hpp> + +#endif // BOOST_MPL_BEGIN_HPP_INCLUDED diff --git a/include/boost/mpl/begin_end.hpp b/include/boost/mpl/begin_end.hpp index b855a0c..cdc6e7c 100644 --- a/include/boost/mpl/begin_end.hpp +++ b/include/boost/mpl/begin_end.hpp @@ -1,56 +1,57 @@ -//----------------------------------------------------------------------------- -// boost mpl/begin_end.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_BEGIN_END_HPP_INCLUDED #define BOOST_MPL_BEGIN_END_HPP_INCLUDED -#include "boost/mpl/begin_end_fwd.hpp" -#include "boost/mpl/aux_/begin_end_impl.hpp" -#include "boost/mpl/aux_/sequence_tag.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/begin_end_fwd.hpp> +#include <boost/mpl/aux_/begin_end_impl.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { // agurt, 13/sep/02: switched from inheritance to typedef; MSVC is more // happy this way (less ETI-related errors), and it doesn't affect // anything else template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct begin { - typedef typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) tag_; - typedef typename begin_traits< tag_ > - ::template algorithm< Sequence >::type type; + typedef typename sequence_tag<Sequence>::type tag_; + typedef typename begin_impl< tag_ > + ::template apply< Sequence >::type type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,begin,(Sequence)) }; template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct end { - typedef typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) tag_; - typedef typename end_traits< tag_ > - ::template algorithm< Sequence >::type type; + typedef typename sequence_tag<Sequence>::type tag_; + typedef typename end_impl< tag_ > + ::template apply< Sequence >::type type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,end,(Sequence)) }; -BOOST_MPL_AUX_VOID_SPEC(1, begin) -BOOST_MPL_AUX_VOID_SPEC(1, end) +BOOST_MPL_AUX_NA_SPEC(1, begin) +BOOST_MPL_AUX_NA_SPEC(1, end) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_BEGIN_END_HPP_INCLUDED diff --git a/include/boost/mpl/begin_end_fwd.hpp b/include/boost/mpl/begin_end_fwd.hpp index 8d88c3e..b08f6c3 100644 --- a/include/boost/mpl/begin_end_fwd.hpp +++ b/include/boost/mpl/begin_end_fwd.hpp @@ -1,28 +1,27 @@ -//----------------------------------------------------------------------------- -// boost mpl/begin_end_fwd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_BEGIN_END_FWD_HPP_INCLUDED #define BOOST_MPL_BEGIN_END_FWD_HPP_INCLUDED -namespace boost { -namespace mpl { +// 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. -template< typename Tag > struct begin_traits; -template< typename Tag > struct end_traits; +// $Source$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct begin_impl; +template< typename Tag > struct end_impl; template< typename Sequence > struct begin; template< typename Sequence > struct end; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_BEGIN_END_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/bind.hpp b/include/boost/mpl/bind.hpp index b3c407e..90886cc 100644 --- a/include/boost/mpl/bind.hpp +++ b/include/boost/mpl/bind.hpp @@ -1,14 +1,3 @@ -//----------------------------------------------------------------------------- -// boost mpl/bind.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Peter Dimov, Aleksey Gurtovoy -// -// 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) #if !defined(BOOST_PP_IS_ITERATING) @@ -17,97 +6,114 @@ #ifndef BOOST_MPL_BIND_HPP_INCLUDED #define BOOST_MPL_BIND_HPP_INCLUDED -#include "boost/mpl/aux_/apply.hpp" -#include "boost/mpl/aux_/config/bind.hpp" -#include "boost/mpl/aux_/config/lambda.hpp" -#include "boost/mpl/aux_/config/ctps.hpp" -#include "boost/mpl/aux_/config/static_constant.hpp" +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-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/placeholders.hpp" -# include "boost/mpl/void.hpp" -# include "boost/mpl/protect.hpp" -# include "boost/mpl/limits/arity.hpp" -# include "boost/mpl/aux_/arity_spec.hpp" -# include "boost/mpl/aux_/type_wrapper.hpp" -# include "boost/mpl/aux_/yes_no.hpp" -# include "boost/mpl/aux_/common_name_wknd.hpp" -# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -# include "boost/type_traits/is_reference.hpp" +# include <boost/mpl/bind_fwd.hpp> +# include <boost/mpl/placeholders.hpp> +# include <boost/mpl/next.hpp> +# include <boost/mpl/protect.hpp> +# include <boost/mpl/apply_wrap.hpp> +# include <boost/mpl/limits/arity.hpp> +# include <boost/mpl/aux_/na.hpp> +# include <boost/mpl/aux_/arity_spec.hpp> +# include <boost/mpl/aux_/type_wrapper.hpp> +# include <boost/mpl/aux_/yes_no.hpp> +# include <boost/mpl/aux_/config/static_constant.hpp> +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +# include <boost/type_traits/is_reference.hpp> # endif #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/bind.hpp> +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \ - !defined(BOOST_MPL_PREPROCESSING_MODE) +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) -# if defined(BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT) +# if defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) # define BOOST_MPL_PREPROCESSED_HEADER basic_bind.hpp # else # define BOOST_MPL_PREPROCESSED_HEADER bind.hpp # endif -# include "boost/mpl/aux_/include_preprocessed.hpp" +# include <boost/mpl/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/aux_/preprocessor/params.hpp" -# include "boost/mpl/aux_/preprocessor/default_params.hpp" -# include "boost/mpl/aux_/preprocessor/def_params_tail.hpp" -# include "boost/mpl/aux_/preprocessor/partial_spec_params.hpp" -# include "boost/mpl/aux_/preprocessor/enum.hpp" -# include "boost/mpl/aux_/preprocessor/add.hpp" -# include "boost/mpl/aux_/config/dtp.hpp" -# include "boost/mpl/aux_/config/nttp.hpp" +# include <boost/mpl/aux_/preprocessor/params.hpp> +# include <boost/mpl/aux_/preprocessor/default_params.hpp> +# include <boost/mpl/aux_/preprocessor/def_params_tail.hpp> +# include <boost/mpl/aux_/preprocessor/partial_spec_params.hpp> +# include <boost/mpl/aux_/preprocessor/ext_params.hpp> +# include <boost/mpl/aux_/preprocessor/repeat.hpp> +# include <boost/mpl/aux_/preprocessor/enum.hpp> +# include <boost/mpl/aux_/preprocessor/add.hpp> +# include <boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# include <boost/mpl/aux_/config/ttp.hpp> +# include <boost/mpl/aux_/config/dtp.hpp> +# include <boost/mpl/aux_/nttp_decl.hpp> -# include "boost/preprocessor/iterate.hpp" -# include "boost/preprocessor/comma_if.hpp" -# include "boost/preprocessor/cat.hpp" -# include "boost/preprocessor/inc.hpp" +# include <boost/preprocessor/iterate.hpp> +# include <boost/preprocessor/comma_if.hpp> +# include <boost/preprocessor/cat.hpp> +# include <boost/preprocessor/inc.hpp> -namespace boost { -namespace mpl { - -BOOST_MPL_AUX_COMMON_NAME_WKND(bind1st) -BOOST_MPL_AUX_COMMON_NAME_WKND(bind2nd) +namespace boost { namespace mpl { // local macros, #undef-ined at the end of the header -# define AUX_APPLY(args) \ - BOOST_MPL_AUX_APPLY(BOOST_MPL_METAFUNCTION_MAX_ARITY, args) \ +# define AUX778076_APPLY \ + BOOST_PP_CAT(apply_wrap,BOOST_MPL_LIMIT_METAFUNCTION_ARITY) \ /**/ -# define AUX_BIND_PARAMS(param) \ +# if defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) +# define AUX778076_DMC_PARAM() , int dummy_ +# else +# define AUX778076_DMC_PARAM() +# endif + +# define AUX778076_BIND_PARAMS(param) \ BOOST_MPL_PP_PARAMS( \ - BOOST_MPL_METAFUNCTION_MAX_ARITY \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ ) \ /**/ -# define AUX_BIND_DEFAULT_PARAMS(param, value) \ +# define AUX778076_BIND_DEFAULT_PARAMS(param, value) \ BOOST_MPL_PP_DEFAULT_PARAMS( \ - BOOST_MPL_METAFUNCTION_MAX_ARITY \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ , value \ ) \ /**/ -# define AUX_BIND_N_PARAMS(n, param) \ - BOOST_PP_COMMA_IF(n) \ - BOOST_MPL_PP_PARAMS(n, param) \ +# define AUX778076_BIND_N_PARAMS(n, param) \ + BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \ /**/ -# define AUX_BIND_N_SPEC_PARAMS(n, param, def) \ +# define AUX778076_BIND_N_SPEC_PARAMS(n, param, def) \ BOOST_PP_COMMA_IF(n) \ BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ /**/ -#if !defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) -# define AUX_BIND_NESTED_DEFAULT_PARAMS(param, value) \ - AUX_BIND_DEFAULT_PARAMS(param, value) \ +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +# define AUX778076_BIND_NESTED_DEFAULT_PARAMS(param, value) \ + AUX778076_BIND_DEFAULT_PARAMS(param, value) \ /**/ #else -# define AUX_BIND_NESTED_DEFAULT_PARAMS(param, value) \ - AUX_BIND_PARAMS(param) \ +# define AUX778076_BIND_NESTED_DEFAULT_PARAMS(param, value) \ + AUX778076_BIND_PARAMS(param) \ /**/ #endif @@ -116,14 +122,14 @@ namespace aux { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< - typename T, AUX_BIND_PARAMS(typename U) + typename T, AUX778076_BIND_PARAMS(typename U) > struct resolve_bind_arg { typedef T type; }; -# if !defined(BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT) +# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) template< typename T @@ -131,7 +137,7 @@ template< > struct replace_unnamed_arg { - typedef Arg next_arg; + typedef Arg next; typedef T type; }; @@ -140,21 +146,40 @@ template< > struct replace_unnamed_arg< arg<-1>,Arg > { - typedef typename Arg::next next_arg; + typedef typename Arg::next next; typedef Arg type; }; -# endif // BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT +# endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT -#else +template< + BOOST_MPL_AUX_NTTP_DECL(int, N), AUX778076_BIND_PARAMS(typename U) + > +struct resolve_bind_arg< arg<N>,AUX778076_BIND_PARAMS(U) > +{ + typedef typename AUX778076_APPLY<mpl::arg<N>, AUX778076_BIND_PARAMS(U)>::type type; +}; + +#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) +template< + typename F, AUX778076_BIND_PARAMS(typename T), AUX778076_BIND_PARAMS(typename U) + > +struct resolve_bind_arg< bind<F,AUX778076_BIND_PARAMS(T)>,AUX778076_BIND_PARAMS(U) > +{ + typedef bind<F,AUX778076_BIND_PARAMS(T)> f_; + typedef typename AUX778076_APPLY<f_, AUX778076_BIND_PARAMS(U)>::type type; +}; +#endif + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // agurt, 15/jan/02: it's not a intended to be used as a function class, and // MSVC6.5 has problems with 'apply' name here (the code compiles, but doesn't -// work), so i went with the 'result_' here, and in all other similar cases +// work), so I went with the 'result_' here, and in all other similar cases template< bool > struct resolve_arg_impl { - template< typename T, AUX_BIND_PARAMS(typename U) > struct result_ + template< typename T, AUX778076_BIND_PARAMS(typename U) > struct result_ { typedef T type; }; @@ -163,12 +188,12 @@ struct resolve_arg_impl template<> struct resolve_arg_impl<true> { - template< typename T, AUX_BIND_PARAMS(typename U) > struct result_ + template< typename T, AUX778076_BIND_PARAMS(typename U) > struct result_ { - typedef typename AUX_APPLY(( + typedef typename AUX778076_APPLY< T - , AUX_BIND_PARAMS(U) - ))::type type; + , AUX778076_BIND_PARAMS(U) + >::type type; }; }; @@ -176,22 +201,22 @@ struct resolve_arg_impl<true> template< typename T > struct is_bind_template; template< - typename T, AUX_BIND_PARAMS(typename U) + typename T, AUX778076_BIND_PARAMS(typename U) > struct resolve_bind_arg : resolve_arg_impl< is_bind_template<T>::value > - ::template result_< T,AUX_BIND_PARAMS(U) > + ::template result_< T,AUX778076_BIND_PARAMS(U) > { }; -# if !defined(BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT) +# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) template< typename T > struct replace_unnamed_arg_impl { template< typename Arg > struct result_ { - typedef Arg next_arg; + typedef Arg next; typedef T type; }; }; @@ -201,7 +226,7 @@ struct replace_unnamed_arg_impl< arg<-1> > { template< typename Arg > struct result_ { - typedef typename Arg::next next_arg; + typedef typename next<Arg>::type next; typedef Arg type; }; }; @@ -212,68 +237,11 @@ struct replace_unnamed_arg { }; -# endif // BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT +# endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -} // namespace aux - -#if !defined(BOOST_MPL_NO_BIND_TEMPLATE) -// forward declaration -template< - typename F, AUX_BIND_DEFAULT_PARAMS(typename T, void_) - > -struct bind; -#endif - -// fwd, for 'resolve_bind_arg'/'is_bind_template' specializations -template< typename F, typename T > struct bind1st; -template< typename F, typename T > struct bind2nd; - -namespace aux { - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -template< - BOOST_MPL_AUX_NTTP_DECL(int, N), AUX_BIND_PARAMS(typename U) - > -struct resolve_bind_arg< arg<N>,AUX_BIND_PARAMS(U) > -{ - typedef typename AUX_APPLY((mpl::arg<N>, AUX_BIND_PARAMS(U)))::type type; -}; - -#if !defined(BOOST_MPL_NO_BIND_TEMPLATE) -template< - typename F, AUX_BIND_PARAMS(typename T), AUX_BIND_PARAMS(typename U) - > -struct resolve_bind_arg< bind<F,AUX_BIND_PARAMS(T)>,AUX_BIND_PARAMS(U) > -{ - typedef bind<F,AUX_BIND_PARAMS(T)> f_; - typedef typename AUX_APPLY((f_, AUX_BIND_PARAMS(U)))::type type; -}; -#endif - -template< - typename F, typename T, AUX_BIND_PARAMS(typename U) - > -struct resolve_bind_arg< bind1st<F,T>, AUX_BIND_PARAMS(U) > -{ - typedef bind1st<F,T> f_; - typedef typename AUX_APPLY((f_, AUX_BIND_PARAMS(U)))::type type; -}; - -template< - typename F, typename T, AUX_BIND_PARAMS(typename U) - > -struct resolve_bind_arg< bind2nd<F,T>, AUX_BIND_PARAMS(U) > -{ - typedef bind2nd<F,T> f_; - typedef typename AUX_APPLY((f_, AUX_BIND_PARAMS(U)))::type type; -}; - -#else // agurt, 10/mar/02: the forward declaration has to appear before any of // 'is_bind_helper' overloads, otherwise MSVC6.5 issues an ICE on it -template< BOOST_MPL_AUX_NTTP_DECL(int, arity_) > struct bind_impl_chooser; +template< BOOST_MPL_AUX_NTTP_DECL(int, arity_) > struct bind_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect<T>*); @@ -282,19 +250,16 @@ template< typename T > aux::no_tag is_bind_helper(protect<T>*); // agurt, 15/mar/02: MSVC 6.5 fails to properly resolve the overload // in case if we use 'aux::type_wrapper< bind<...> >' here, and all // 'bind' instantiations form a complete type anyway -#if !defined(BOOST_MPL_NO_BIND_TEMPLATE) +#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) template< - typename F, AUX_BIND_PARAMS(typename T) + typename F, AUX778076_BIND_PARAMS(typename T) > -aux::yes_tag is_bind_helper(bind<F,AUX_BIND_PARAMS(T)>*); +aux::yes_tag is_bind_helper(bind<F,AUX778076_BIND_PARAMS(T)>*); #endif template< BOOST_MPL_AUX_NTTP_DECL(int, N) > aux::yes_tag is_bind_helper(arg<N>*); -template< typename F, typename T > aux::yes_tag is_bind_helper(bind1st<F,T>*); -template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd<F,T>*); - template< bool is_ref_ = true > struct is_bind_template_impl { @@ -326,224 +291,251 @@ template< typename T > struct is_bind_template } // namespace aux -#if !defined(BOOST_MPL_NO_BIND_TEMPLATE) -BOOST_MPL_AUX_ARITY_SPEC( - BOOST_PP_INC(BOOST_MPL_METAFUNCTION_MAX_ARITY) - , bind - ) -#endif - -BOOST_MPL_AUX_ARITY_SPEC(2,bind1st) -BOOST_MPL_AUX_ARITY_SPEC(2,bind2nd) #define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(0, BOOST_MPL_METAFUNCTION_MAX_ARITY, "boost/mpl/bind.hpp")) + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/bind.hpp>)) #include BOOST_PP_ITERATE() +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) +/// if_/eval_if specializations +# define AUX778076_SPEC_NAME if_ +# define BOOST_PP_ITERATION_PARAMS_1 (3,(3, 3, <boost/mpl/bind.hpp>)) +# include BOOST_PP_ITERATE() + +#if !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) +# define AUX778076_SPEC_NAME eval_if +# define BOOST_PP_ITERATION_PARAMS_1 (3,(3, 3, <boost/mpl/bind.hpp>)) +# include BOOST_PP_ITERATE() +#endif +#endif + // real C++ version is already taken care of #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !defined(BOOST_MPL_NO_BIND_TEMPLATE) + && !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) namespace aux { // apply_count_args -#define BOOST_MPL_AUX_COUNT_ARGS_PREFIX bind -#define BOOST_MPL_AUX_COUNT_ARGS_DEFAULT void_ -#define BOOST_MPL_AUX_COUNT_ARGS_ARITY BOOST_MPL_METAFUNCTION_MAX_ARITY -#include "boost/mpl/aux_/count_args.hpp" +#define AUX778076_COUNT_ARGS_PREFIX bind +#define AUX778076_COUNT_ARGS_DEFAULT na +#define AUX778076_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY +#include <boost/mpl/aux_/count_args.hpp> } // bind template< - typename F, AUX_BIND_PARAMS(typename T) + typename F, AUX778076_BIND_PARAMS(typename T) AUX778076_DMC_PARAM() > struct bind - : aux::bind_impl_chooser< - aux::bind_count_args<AUX_BIND_PARAMS(T)>::value - >::template result_< F,AUX_BIND_PARAMS(T) >::type + : aux::bind_chooser< + aux::bind_count_args<AUX778076_BIND_PARAMS(T)>::value + >::template result_< F,AUX778076_BIND_PARAMS(T) >::type { }; +BOOST_MPL_AUX_ARITY_SPEC( + BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) + , bind + ) + #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -// bind1st/bind2nd, lightweight, for simple cases/backward compatibility +# undef AUX778076_BIND_NESTED_DEFAULT_PARAMS +# undef AUX778076_BIND_N_SPEC_PARAMS +# undef AUX778076_BIND_N_PARAMS +# undef AUX778076_BIND_DEFAULT_PARAMS +# undef AUX778076_BIND_PARAMS +# undef AUX778076_DMC_PARAM +# undef AUX778076_APPLY -template< typename F, typename T > -struct bind1st -{ - template< - typename U - BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(1, typename U, void_) - > - struct apply - : BOOST_MPL_AUX_APPLY2(F,T,U) - { - }; -}; +}} -template< typename F, typename T > -struct bind2nd -{ - template< - typename U - BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(1, typename U, void_) - > - struct apply - : BOOST_MPL_AUX_APPLY2(F,U,T) - { - }; -}; - -# undef AUX_BIND_NESTED_DEFAULT_PARAMS -# undef AUX_BIND_N_SPEC_PARAMS -# undef AUX_BIND_N_PARAMS -# undef AUX_BIND_DEFAULT_PARAMS -# undef AUX_BIND_PARAMS -# undef AUX_APPLY - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_BIND_HPP_INCLUDED ///// iteration, depth == 1 #elif BOOST_PP_ITERATION_DEPTH() == 1 -# define i BOOST_PP_FRAME_ITERATION(1) +# define i_ BOOST_PP_FRAME_ITERATION(1) + +#if defined(AUX778076_SPEC_NAME) + +// lazy metafunction specialization +template< template< BOOST_MPL_PP_PARAMS(i_, typename T) > class F, typename Tag > +struct BOOST_PP_CAT(quote,i_); + +template< BOOST_MPL_PP_PARAMS(i_, typename T) > struct AUX778076_SPEC_NAME; template< - typename F AUX_BIND_N_PARAMS(i, typename T) + typename Tag AUX778076_BIND_N_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(bind,i_)< + BOOST_PP_CAT(quote,i_)<AUX778076_SPEC_NAME,Tag> + AUX778076_BIND_N_PARAMS(i_,T) > -struct BOOST_PP_CAT(bind,i) { template< - AUX_BIND_NESTED_DEFAULT_PARAMS(typename U, void_) + AUX778076_BIND_NESTED_DEFAULT_PARAMS(typename U, na) > struct apply { private: -# if !defined(BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT) + typedef mpl::arg<1> n1; +# define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i_, <boost/mpl/bind.hpp>)) +# include BOOST_PP_ITERATE() + + typedef typename AUX778076_SPEC_NAME< + typename t1::type + , BOOST_MPL_PP_EXT_PARAMS(2, BOOST_PP_INC(i_), t) + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +#undef AUX778076_SPEC_NAME + +#else // AUX778076_SPEC_NAME + +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() + > +struct BOOST_PP_CAT(bind,i_) +{ + template< + AUX778076_BIND_NESTED_DEFAULT_PARAMS(typename U, na) + > + struct apply + { + private: +# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) typedef aux::replace_unnamed_arg< F,mpl::arg<1> > r0; typedef typename r0::type a0; - typedef typename r0::next_arg n1; - typedef typename aux::resolve_bind_arg<a0,AUX_BIND_PARAMS(U)>::type f_; - //: + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg<a0,AUX778076_BIND_PARAMS(U)>::type f_; + /// # else - typedef typename aux::resolve_bind_arg<F,AUX_BIND_PARAMS(U)>::type f_; + typedef typename aux::resolve_bind_arg<F,AUX778076_BIND_PARAMS(U)>::type f_; -# endif // BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT +# endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT -# if i > 0 -# define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i, "boost/mpl/bind.hpp")) +# if i_ > 0 +# define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i_, <boost/mpl/bind.hpp>)) # include BOOST_PP_ITERATE() # endif public: - typedef typename BOOST_MPL_AUX_APPLY( - i - , (f_ AUX_BIND_N_PARAMS(i,t)) - )::type type; + +# define AUX778076_ARG(unused, i_, t) \ + BOOST_PP_COMMA_IF(i_) \ + typename BOOST_PP_CAT(t,BOOST_PP_INC(i_))::type \ +/**/ + + typedef typename BOOST_PP_CAT(apply_wrap,i_)< + f_ + BOOST_PP_COMMA_IF(i_) BOOST_MPL_PP_REPEAT(i_, AUX778076_ARG, t) + >::type type; + +# undef AUX778076_ARG }; }; - namespace aux { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< - typename F AUX_BIND_N_PARAMS(i, typename T), AUX_BIND_PARAMS(typename U) + typename F AUX778076_BIND_N_PARAMS(i_, typename T), AUX778076_BIND_PARAMS(typename U) > struct resolve_bind_arg< - BOOST_PP_CAT(bind,i)<F AUX_BIND_N_PARAMS(i,T)>,AUX_BIND_PARAMS(U) + BOOST_PP_CAT(bind,i_)<F AUX778076_BIND_N_PARAMS(i_,T)>,AUX778076_BIND_PARAMS(U) > { - typedef BOOST_PP_CAT(bind,i)<F AUX_BIND_N_PARAMS(i,T)> f_; - typedef typename AUX_APPLY((f_, AUX_BIND_PARAMS(U)))::type type; + typedef BOOST_PP_CAT(bind,i_)<F AUX778076_BIND_N_PARAMS(i_,T)> f_; + typedef typename AUX778076_APPLY<f_, AUX778076_BIND_PARAMS(U)>::type type; }; #else template< - typename F AUX_BIND_N_PARAMS(i, typename T) + typename F AUX778076_BIND_N_PARAMS(i_, typename T) > aux::yes_tag -is_bind_helper(BOOST_PP_CAT(bind,i)<F AUX_BIND_N_PARAMS(i,T)>*); +is_bind_helper(BOOST_PP_CAT(bind,i_)<F AUX778076_BIND_N_PARAMS(i_,T)>*); #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace aux -BOOST_MPL_AUX_ARITY_SPEC(BOOST_PP_INC(i), BOOST_PP_CAT(bind,i)) +BOOST_MPL_AUX_ARITY_SPEC(BOOST_PP_INC(i_), BOOST_PP_CAT(bind,i_)) -# if !defined(BOOST_MPL_NO_BIND_TEMPLATE) +# if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -#if i == BOOST_MPL_METAFUNCTION_MAX_ARITY - -//: primary template (not a specialization!) +#if i_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY +/// primary template (not a specialization!) template< - typename F AUX_BIND_N_PARAMS(i, typename T) + typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() > struct bind - : BOOST_PP_CAT(bind,i)<F AUX_BIND_N_PARAMS(i,T) > + : BOOST_PP_CAT(bind,i_)<F AUX778076_BIND_N_PARAMS(i_,T) > { }; - #else - template< - typename F AUX_BIND_N_PARAMS(i, typename T) + typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() > -struct bind< F AUX_BIND_N_SPEC_PARAMS(i, T, void_) > - : BOOST_PP_CAT(bind,i)<F AUX_BIND_N_PARAMS(i,T) > +struct bind< F AUX778076_BIND_N_SPEC_PARAMS(i_, T, na) > + : BOOST_PP_CAT(bind,i_)<F AUX778076_BIND_N_PARAMS(i_,T) > { }; +#endif -#endif // i == BOOST_MPL_METAFUNCTION_MAX_ARITY - -# else +# else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace aux { template<> -struct bind_impl_chooser<i> +struct bind_chooser<i_> { template< - typename F, AUX_BIND_PARAMS(typename T) + typename F, AUX778076_BIND_PARAMS(typename T) > struct result_ { - typedef BOOST_PP_CAT(bind,i)< F AUX_BIND_N_PARAMS(i,T) > type; + typedef BOOST_PP_CAT(bind,i_)< F AUX778076_BIND_N_PARAMS(i_,T) > type; }; }; } // namespace aux # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -# endif // BOOST_MPL_NO_BIND_TEMPLATE +# endif // BOOST_MPL_CFG_NO_BIND_TEMPLATE -# undef i +#endif // AUX778076_SPEC_NAME + +# undef i_ ///// iteration, depth == 2 #elif BOOST_PP_ITERATION_DEPTH() == 2 -# define j BOOST_PP_FRAME_ITERATION(2) -# if !defined(BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT) +# define j_ BOOST_PP_FRAME_ITERATION(2) +# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) - typedef aux::replace_unnamed_arg< BOOST_PP_CAT(T,j),BOOST_PP_CAT(n,j) > BOOST_PP_CAT(r,j); - typedef typename BOOST_PP_CAT(r,j)::type BOOST_PP_CAT(a,j); - typedef typename BOOST_PP_CAT(r,j)::next_arg BOOST_PP_CAT(n,BOOST_PP_INC(j)); - typedef typename aux::resolve_bind_arg<BOOST_PP_CAT(a,j), AUX_BIND_PARAMS(U)>::type BOOST_PP_CAT(t,j); - //: + typedef aux::replace_unnamed_arg< BOOST_PP_CAT(T,j_),BOOST_PP_CAT(n,j_) > BOOST_PP_CAT(r,j_); + typedef typename BOOST_PP_CAT(r,j_)::type BOOST_PP_CAT(a,j_); + typedef typename BOOST_PP_CAT(r,j_)::next BOOST_PP_CAT(n,BOOST_PP_INC(j_)); + typedef aux::resolve_bind_arg<BOOST_PP_CAT(a,j_), AUX778076_BIND_PARAMS(U)> BOOST_PP_CAT(t,j_); + /// # else - typedef typename aux::resolve_bind_arg< BOOST_PP_CAT(T,j),AUX_BIND_PARAMS(U)>::type BOOST_PP_CAT(t,j); + typedef aux::resolve_bind_arg< BOOST_PP_CAT(T,j_),AUX778076_BIND_PARAMS(U)> BOOST_PP_CAT(t,j_); # endif -# undef j +# undef j_ #endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/bind_fwd.hpp b/include/boost/mpl/bind_fwd.hpp new file mode 100644 index 0000000..957679a --- /dev/null +++ b/include/boost/mpl/bind_fwd.hpp @@ -0,0 +1,99 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_BIND_FWD_HPP_INCLUDED +#define BOOST_MPL_BIND_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. + +// $Source$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include <boost/mpl/aux_/na.hpp> +#endif + +#include <boost/mpl/aux_/config/bind.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 bind_fwd.hpp +# include <boost/mpl/aux_/include_preprocessed.hpp> + +#else + +# include <boost/mpl/limits/arity.hpp> +# include <boost/mpl/aux_/preprocessor/params.hpp> +# include <boost/mpl/aux_/preprocessor/default_params.hpp> +# include <boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp> + +# include <boost/preprocessor/comma_if.hpp> +# include <boost/preprocessor/iterate.hpp> +# include <boost/preprocessor/cat.hpp> + +namespace boost { namespace mpl { + +// local macros, #undef-ined at the end of the header + +# if defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) +# define AUX778076_DMC_PARAM() , int dummy_ = 0 +# else +# define AUX778076_DMC_PARAM() +# endif + +# define AUX778076_BIND_DEFAULT_PARAMS(param, value) \ + BOOST_MPL_PP_DEFAULT_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + , value \ + ) \ + AUX778076_DMC_PARAM() \ + /**/ + +# define AUX778076_BIND_N_PARAMS(n, param) \ + BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \ + AUX778076_DMC_PARAM() \ + /**/ + +#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) +template< + typename F, AUX778076_BIND_DEFAULT_PARAMS(typename T, na) + > +struct bind; +#endif + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/bind_fwd.hpp>)) +#include BOOST_PP_ITERATE() + +# undef AUX778076_BIND_N_PARAMS +# undef AUX778076_BIND_DEFAULT_PARAMS +# undef AUX778076_DMC_PARAM +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_BIND_FWD_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(bind,i_); + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/bitand.hpp b/include/boost/mpl/bitand.hpp index 427031e..d520893 100644 --- a/include/boost/mpl/bitand.hpp +++ b/include/boost/mpl/bitand.hpp @@ -2,62 +2,22 @@ #ifndef BOOST_MPL_BITAND_HPP_INCLUDED #define BOOST_MPL_BITAND_HPP_INCLUDED -// + file: boost/mpl/bitand.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy, Jaap Suter +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appears in all copies and -// that both the copyright notice and this permission notice appear in -// supporting documentation. No representations are made about the -// suitability of this software for any purpose. It is provided "as is" -// without express or implied warranty. +// 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. -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/aux_/typeof.hpp" -#include "boost/mpl/aux_/value_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/config.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { - -template< - typename T, T N1, T N2 - > -struct bitand_c -{ - BOOST_STATIC_CONSTANT(T, value = (N1 & N2)); -#if !defined(__BORLANDC__) - typedef integral_c<T,value> type; -#else - typedef integral_c<T,(N1 & N2)> type; -#endif -}; - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) - > -struct bitand_ - : bitand_c< - BOOST_MPL_AUX_TYPEOF(T1, T1::value & T2::value) - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T1)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T2)::value - > -{ - BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitand_, (T1,T2)) -}; - -BOOST_MPL_AUX_VOID_SPEC(2,bitand_) - -} // namespace mpl -} // namespace boost +#define AUX778076_OP_NAME bitand_ +#define AUX778076_OP_PREFIX bitand +#define AUX778076_OP_TOKEN & +#include <boost/mpl/aux_/arithmetic_op.hpp> #endif // BOOST_MPL_BITAND_HPP_INCLUDED diff --git a/include/boost/mpl/bitor.hpp b/include/boost/mpl/bitor.hpp index 6ed75f1..b42be4a 100644 --- a/include/boost/mpl/bitor.hpp +++ b/include/boost/mpl/bitor.hpp @@ -2,62 +2,22 @@ #ifndef BOOST_MPL_BITOR_HPP_INCLUDED #define BOOST_MPL_BITOR_HPP_INCLUDED -// + file: boost/mpl/bitor.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy, Jaap Suter +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appears in all copies and -// that both the copyright notice and this permission notice appear in -// supporting documentation. No representations are made about the -// suitability of this software for any purpose. It is provided "as is" -// without express or implied warranty. +// 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. -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/aux_/typeof.hpp" -#include "boost/mpl/aux_/value_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/config.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { - -template< - typename T, T N1, T N2 - > -struct bitor_c -{ - BOOST_STATIC_CONSTANT(T, value = (N1 | N2)); -#if !defined(__BORLANDC__) - typedef integral_c<T,value> type; -#else - typedef integral_c<T,(N1 | N2)> type; -#endif -}; - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) - > -struct bitor_ - : bitor_c< - BOOST_MPL_AUX_TYPEOF(T1, T1::value | T2::value) - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T1)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T2)::value - > -{ - BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitor_, (T1,T2)) -}; - -BOOST_MPL_AUX_VOID_SPEC(2,bitor_) - -} // namespace mpl -} // namespace boost +#define AUX778076_OP_NAME bitor_ +#define AUX778076_OP_PREFIX bitor +#define AUX778076_OP_TOKEN | +#include <boost/mpl/aux_/arithmetic_op.hpp> #endif // BOOST_MPL_BITOR_HPP_INCLUDED diff --git a/include/boost/mpl/bitwise.hpp b/include/boost/mpl/bitwise.hpp index d225847..0ef878e 100644 --- a/include/boost/mpl/bitwise.hpp +++ b/include/boost/mpl/bitwise.hpp @@ -2,26 +2,23 @@ #ifndef BOOST_MPL_BITWISE_HPP_INCLUDED #define BOOST_MPL_BITWISE_HPP_INCLUDED -// + file: boost/mpl/bitwise.hpp -// + last modified: 09/mar/03 - -// Copyright (c) 2003 -// Aleksey Gurtovoy, Jaap Suter +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright Jaap Suter 2003 // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appears in all copies and -// that both the copyright notice and this permission notice appear in -// supporting documentation. No representations are made about the -// suitability of this software for any purpose. It is provided "as is" -// without express or implied warranty. +// 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. -#include "boost/mpl/bitand.hpp" -#include "boost/mpl/bitor.hpp" -#include "boost/mpl/bitxor.hpp" -#include "boost/mpl/shift_left.hpp" -#include "boost/mpl/shift_right.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/bitand.hpp> +#include <boost/mpl/bitor.hpp> +#include <boost/mpl/bitxor.hpp> +#include <boost/mpl/shift_left.hpp> +#include <boost/mpl/shift_right.hpp> #endif // BOOST_MPL_BITWISE_HPP_INCLUDED diff --git a/include/boost/mpl/bitxor.hpp b/include/boost/mpl/bitxor.hpp index 1c335be..071e8bd 100644 --- a/include/boost/mpl/bitxor.hpp +++ b/include/boost/mpl/bitxor.hpp @@ -2,62 +2,22 @@ #ifndef BOOST_MPL_BITXOR_HPP_INCLUDED #define BOOST_MPL_BITXOR_HPP_INCLUDED -// + file: boost/mpl/bitxor.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy, Jaap Suter +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appears in all copies and -// that both the copyright notice and this permission notice appear in -// supporting documentation. No representations are made about the -// suitability of this software for any purpose. It is provided "as is" -// without express or implied warranty. +// 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. -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/aux_/typeof.hpp" -#include "boost/mpl/aux_/value_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/config.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { - -template< - typename T, T N1, T N2 - > -struct bitxor_c -{ - BOOST_STATIC_CONSTANT(T, value = (N1 ^ N2)); -#if !defined(__BORLANDC__) - typedef integral_c<T,value> type; -#else - typedef integral_c<T,(N1 ^ N2)> type; -#endif -}; - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) - > -struct bitxor_ - : bitxor_c< - BOOST_MPL_AUX_TYPEOF(T1, T1::value ^ T2::value) - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T1)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T2)::value - > -{ - BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitxor_, (T1,T2)) -}; - -BOOST_MPL_AUX_VOID_SPEC(2,bitxor_) - -} // namespace mpl -} // namespace boost +#define AUX778076_OP_NAME bitxor_ +#define AUX778076_OP_PREFIX bitxor +#define AUX778076_OP_TOKEN ^ +#include <boost/mpl/aux_/arithmetic_op.hpp> #endif // BOOST_MPL_BITXOR_HPP_INCLUDED diff --git a/include/boost/mpl/bool.hpp b/include/boost/mpl/bool.hpp index a9ee696..84fe692 100644 --- a/include/boost/mpl/bool.hpp +++ b/include/boost/mpl/bool.hpp @@ -2,22 +2,22 @@ #ifndef BOOST_MPL_BOOL_HPP_INCLUDED #define BOOST_MPL_BOOL_HPP_INCLUDED -// + file: boost/mpl/bool.hpp -// + last modified: 12/apr/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/bool_fwd.hpp" -#include "boost/mpl/aux_/config/static_constant.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { namespace mpl { +#include <boost/mpl/bool_fwd.hpp> +#include <boost/mpl/aux_/config/static_constant.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template< bool C_ > struct bool_ { @@ -32,6 +32,6 @@ template< bool C_ > bool const bool_<C_>::value; #endif -}} // namespace boost::mpl +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE #endif // BOOST_MPL_BOOL_HPP_INCLUDED diff --git a/include/boost/mpl/bool_fwd.hpp b/include/boost/mpl/bool_fwd.hpp index 6510086..618534e 100644 --- a/include/boost/mpl/bool_fwd.hpp +++ b/include/boost/mpl/bool_fwd.hpp @@ -2,19 +2,21 @@ #ifndef BOOST_MPL_BOOL_FWD_HPP_INCLUDED #define BOOST_MPL_BOOL_FWD_HPP_INCLUDED -// + file: boost/mpl/bool_fwd.hpp -// + last modified: 08/mar/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -namespace boost { namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/adl_barrier.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template< bool C_ > struct bool_; @@ -22,6 +24,10 @@ template< bool C_ > struct bool_; typedef bool_<true> true_; typedef bool_<false> false_; -}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +BOOST_MPL_AUX_ADL_BARRIER_DECL(bool_) +BOOST_MPL_AUX_ADL_BARRIER_DECL(true_) +BOOST_MPL_AUX_ADL_BARRIER_DECL(false_) #endif // BOOST_MPL_BOOL_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/clear.hpp b/include/boost/mpl/clear.hpp index 3d46ca5..f1f703c 100644 --- a/include/boost/mpl/clear.hpp +++ b/include/boost/mpl/clear.hpp @@ -1,40 +1,39 @@ -//----------------------------------------------------------------------------- -// boost mpl/clear.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_CLEAR_HPP_INCLUDED #define BOOST_MPL_CLEAR_HPP_INCLUDED -#include "boost/mpl/clear_fwd.hpp" -#include "boost/mpl/aux_/clear_impl.hpp" -#include "boost/mpl/aux_/sequence_tag.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/clear_fwd.hpp> +#include <boost/mpl/aux_/clear_impl.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct clear - : clear_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) > - ::template algorithm< Sequence > + : clear_impl< typename sequence_tag<Sequence>::type > + ::template apply< Sequence > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,clear,(Sequence)) }; -BOOST_MPL_AUX_VOID_SPEC(1, clear) +BOOST_MPL_AUX_NA_SPEC(1, clear) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_CLEAR_HPP_INCLUDED diff --git a/include/boost/mpl/clear_fwd.hpp b/include/boost/mpl/clear_fwd.hpp index 9e4490b..7f66c40 100644 --- a/include/boost/mpl/clear_fwd.hpp +++ b/include/boost/mpl/clear_fwd.hpp @@ -1,25 +1,24 @@ -//----------------------------------------------------------------------------- -// boost mpl/clear_fwd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_CLEAR_FWD_HPP_INCLUDED #define BOOST_MPL_CLEAR_FWD_HPP_INCLUDED -namespace boost { -namespace mpl { +// 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. -template< typename Tag > struct clear_traits; +// $Source$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct clear_impl; template< typename Sequence > struct clear; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_CLEAR_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/comparison.hpp b/include/boost/mpl/comparison.hpp index 88cfa3f..10694f9 100644 --- a/include/boost/mpl/comparison.hpp +++ b/include/boost/mpl/comparison.hpp @@ -2,23 +2,23 @@ #ifndef BOOST_MPL_COMPARISON_HPP_INCLUDED #define BOOST_MPL_COMPARISON_HPP_INCLUDED -// + file: boost/mpl/comparison.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/equal_to.hpp" -#include "boost/mpl/not_equal_to.hpp" -#include "boost/mpl/less.hpp" -#include "boost/mpl/greater.hpp" -#include "boost/mpl/less_equal.hpp" -#include "boost/mpl/greater_equal.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/equal_to.hpp> +#include <boost/mpl/not_equal_to.hpp> +#include <boost/mpl/less.hpp> +#include <boost/mpl/greater.hpp> +#include <boost/mpl/less_equal.hpp> +#include <boost/mpl/greater_equal.hpp> #endif // BOOST_MPL_COMPARISON_HPP_INCLUDED diff --git a/include/boost/mpl/contains.hpp b/include/boost/mpl/contains.hpp index 50ed466..c8d44a1 100644 --- a/include/boost/mpl/contains.hpp +++ b/include/boost/mpl/contains.hpp @@ -1,44 +1,41 @@ -//----------------------------------------------------------------------------- -// boost mpl/contains.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Eric Friedman -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_CONTAINS_HPP_INCLUDED #define BOOST_MPL_CONTAINS_HPP_INCLUDED -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/find.hpp" -#include "boost/mpl/not.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/type_traits/is_same.hpp" +// Copyright Eric Friedman 2002 +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/contains_fwd.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/contains_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_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(T) > struct contains - : not_< is_same< - typename find<Sequence,T>::type - , typename end<Sequence>::type - > > + : contains_impl< typename sequence_tag<Sequence>::type > + ::template apply< Sequence,T > { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,contains,(Sequence,T)) }; -BOOST_MPL_AUX_VOID_SPEC(2, contains) +BOOST_MPL_AUX_NA_SPEC(2, contains) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_CONTAINS_HPP_INCLUDED diff --git a/include/boost/mpl/contains_fwd.hpp b/include/boost/mpl/contains_fwd.hpp new file mode 100644 index 0000000..01382eb --- /dev/null +++ b/include/boost/mpl/contains_fwd.hpp @@ -0,0 +1,25 @@ + +#ifndef BOOST_MPL_CONTAINS_FWD_HPP_INCLUDED +#define BOOST_MPL_CONTAINS_FWD_HPP_INCLUDED + +// Copyright Eric Friedman 2002 +// 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$ + +namespace boost { namespace mpl { + +template< typename Tag > struct contains_impl; +template< typename Sequence, typename T > struct contains; + +}} + +#endif // BOOST_MPL_CONTAINS_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/copy.hpp b/include/boost/mpl/copy.hpp index 617f46d..aa7a336 100644 --- a/include/boost/mpl/copy.hpp +++ b/include/boost/mpl/copy.hpp @@ -1,41 +1,58 @@ -//----------------------------------------------------------------------------- -// boost mpl/copy.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_COPY_HPP_INCLUDED #define BOOST_MPL_COPY_HPP_INCLUDED -#include "boost/mpl/fold.hpp" -#include "boost/mpl/aux_/void_spec.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN +#include <boost/mpl/fold.hpp> +#include <boost/mpl/reverse_fold.hpp> +#include <boost/mpl/aux_/inserter_algorithm.hpp> + +namespace boost { namespace mpl { + +namespace aux { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(State) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(BinaryOp) + typename Sequence + , typename Inserter > -struct copy - : fold< Sequence,State,BinaryOp > +struct copy_impl + : fold< + Sequence + , typename Inserter::state + , typename Inserter::operation + > { }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END +template< + typename Sequence + , typename Inserter + > +struct reverse_copy_impl + : reverse_fold< + Sequence + , typename Inserter::state + , typename Inserter::operation + > +{ +}; -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(3, copy) +} // namespace aux -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(2, copy) + +}} #endif // BOOST_MPL_COPY_HPP_INCLUDED diff --git a/include/boost/mpl/copy_backward.hpp b/include/boost/mpl/copy_backward.hpp deleted file mode 100644 index 0618d05..0000000 --- a/include/boost/mpl/copy_backward.hpp +++ /dev/null @@ -1,41 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/copy_backward.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_COPY_BACKWARD_HPP_INCLUDED -#define BOOST_MPL_COPY_BACKWARD_HPP_INCLUDED - -#include "boost/mpl/fold_backward.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/algorithm_namespace.hpp" - -namespace boost { -namespace mpl { - -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(State) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(BinaryOp) - > -struct copy_backward - : fold_backward< Sequence,State,BinaryOp > -{ -}; - -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(3, copy_backward) - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_COPY_BACKWARD_HPP_INCLUDED diff --git a/include/boost/mpl/copy_backward_if.hpp b/include/boost/mpl/copy_backward_if.hpp deleted file mode 100644 index a55a4a8..0000000 --- a/include/boost/mpl/copy_backward_if.hpp +++ /dev/null @@ -1,54 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/copy_backward_if.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_COPY_BACKWARD_IF_HPP_INCLUDED -#define BOOST_MPL_COPY_BACKWARD_IF_HPP_INCLUDED - -#include "boost/mpl/fold_backward.hpp" -#include "boost/mpl/aux_/copy_if_op.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/protect.hpp" -#include "boost/mpl/aux_/void_spec.hpp" - -namespace boost { -namespace mpl { - -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(State) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(BinaryOp) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Predicate) - > -struct copy_backward_if -{ - private: - typedef typename lambda<BinaryOp>::type op_; - typedef typename lambda<Predicate>::type pred_; - - public: - typedef typename fold_backward< - Sequence - , State - , protect< aux::copy_if_op<op_,pred_> > - >::type type; -}; - -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END - -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(4, copy_backward_if) - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_COPY_BACKWARD_IF_HPP_INCLUDED diff --git a/include/boost/mpl/copy_if.hpp b/include/boost/mpl/copy_if.hpp index 6db5716..fab6848 100644 --- a/include/boost/mpl/copy_if.hpp +++ b/include/boost/mpl/copy_if.hpp @@ -1,54 +1,96 @@ -//----------------------------------------------------------------------------- -// boost mpl/copy_if.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_COPY_IF_HPP_INCLUDED #define BOOST_MPL_COPY_IF_HPP_INCLUDED -#include "boost/mpl/fold.hpp" -#include "boost/mpl/aux_/copy_if_op.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/protect.hpp" -#include "boost/mpl/aux_/void_spec.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN +#include <boost/mpl/fold.hpp> +#include <boost/mpl/reverse_fold.hpp> +#include <boost/mpl/apply.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/protect.hpp> +#include <boost/mpl/aux_/inserter_algorithm.hpp> +#include <boost/mpl/aux_/config/forwarding.hpp> + +namespace boost { namespace mpl { + +namespace aux { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(State) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(BinaryOp) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Predicate) + typename Operation + , typename Predicate > -struct copy_if +struct copy_if_op { - private: - typedef typename lambda<BinaryOp>::type op_; - typedef typename lambda<Predicate>::type pred_; - - public: - typedef typename fold< - Sequence - , State - , protect< aux::copy_if_op<op_,pred_> > - >::type type; + template< typename Sequence, typename T > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) + : eval_if< + typename apply1<Predicate,T>::type + , apply2<Operation,Sequence,T> + , identity<Sequence> + > + { +#else + { + typedef typename eval_if< + typename apply1<Predicate,T>::type + , apply2<Operation,Sequence,T> + , identity<Sequence> + >::type type; +#endif + }; }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END +template< + typename Sequence + , typename Predicate + , typename Inserter + > +struct copy_if_impl + : fold< + Sequence + , typename Inserter::state + , protect< aux::copy_if_op< + typename Inserter::operation + , Predicate + > > + > +{ +}; -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(4, copy_if) +template< + typename Sequence + , typename Predicate + , typename Inserter + > +struct reverse_copy_if_impl + : reverse_fold< + Sequence + , typename Inserter::state + , protect< aux::copy_if_op< + typename Inserter::operation + , Predicate + > > + > +{ +}; -} // namespace mpl -} // namespace boost +} // namespace aux + +BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, copy_if) + +}} #endif // BOOST_MPL_COPY_IF_HPP_INCLUDED diff --git a/include/boost/mpl/count.hpp b/include/boost/mpl/count.hpp index 0f675b7..1e48024 100644 --- a/include/boost/mpl/count.hpp +++ b/include/boost/mpl/count.hpp @@ -2,42 +2,38 @@ #ifndef BOOST_MPL_COUNT_HPP_INCLUDED #define BOOST_MPL_COUNT_HPP_INCLUDED -// + file: boost/mpl/count.hpp -// + last modified: 05/nov/03 - -// Copyright Aleksey Gurtovoy 2000-03 +// Copyright Aleksey Gurtovoy 2000-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. -#include "boost/mpl/count_fwd.hpp" -#include "boost/mpl/aux_/count_impl.hpp" -#include "boost/mpl/aux_/sequence_tag.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { +#include <boost/mpl/count_fwd.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/count_impl.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(T) > struct count - : count_impl< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) > + : count_impl< typename sequence_tag<Sequence>::type > ::template apply<Sequence,T> { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,count,(Sequence,T)) }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END - -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, count) +BOOST_MPL_AUX_NA_SPEC(2, count) }} diff --git a/include/boost/mpl/count_fwd.hpp b/include/boost/mpl/count_fwd.hpp index 1d1d8c2..177c24b 100644 --- a/include/boost/mpl/count_fwd.hpp +++ b/include/boost/mpl/count_fwd.hpp @@ -2,27 +2,22 @@ #ifndef BOOST_MPL_COUNT_FWD_HPP_INCLUDED #define BOOST_MPL_COUNT_FWD_HPP_INCLUDED -// + file: boost/mpl/count_fwd.hpp -// + last modified: 05/nov/03 - -// Copyright Aleksey Gurtovoy 2000-03 +// Copyright Aleksey Gurtovoy 2000-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. -#include "boost/mpl/aux_/algorithm_namespace.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { +namespace boost { namespace mpl { template< typename Tag > struct count_impl; - -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN template< typename Sequence, typename T > struct count; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END }} diff --git a/include/boost/mpl/count_if.hpp b/include/boost/mpl/count_if.hpp index 560deb7..3426236 100644 --- a/include/boost/mpl/count_if.hpp +++ b/include/boost/mpl/count_if.hpp @@ -1,31 +1,31 @@ -//----------------------------------------------------------------------------- -// boost mpl/count_if.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_COUNT_IF_HPP_INCLUDED #define BOOST_MPL_COUNT_IF_HPP_INCLUDED -#include "boost/mpl/fold.hpp" -#include "boost/mpl/next.hpp" -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/identity.hpp" -#include "boost/mpl/apply_if.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/protect.hpp" -#include "boost/mpl/apply.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// Copyright Aleksey Gurtovoy 2000-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/fold.hpp> +#include <boost/mpl/next.hpp> +#include <boost/mpl/integral_c.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/apply.hpp> +#include <boost/mpl/aux_/msvc_eti_base.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> +#include <boost/mpl/aux_/config/forwarding.hpp> + +namespace boost { namespace mpl { namespace aux { @@ -37,43 +37,43 @@ struct next_if , typename T > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) + : eval_if< + typename apply1<Predicate,T>::type + , next<N> + , identity<N> + > { - typedef typename apply_if< +#else + { + typedef typename eval_if< typename apply1<Predicate,T>::type , next<N> , identity<N> >::type type; +#endif }; }; } // namespace aux -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Predicate) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(Predicate) > struct count_if -{ - private: - typedef typename lambda<Predicate>::type pred_; - - public: - typedef typename fold< + : aux::msvc_eti_base< typename fold< Sequence - , integral_c<unsigned long, 0> - , protect< aux::next_if<pred_> > - >::type type; - + , integral_c<unsigned long,0> + , protect< aux::next_if<Predicate> > + >::type > +{ BOOST_MPL_AUX_LAMBDA_SUPPORT(2,count_if,(Sequence,Predicate)) }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END +BOOST_MPL_AUX_NA_SPEC(2, count_if) -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, count_if) - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_COUNT_IF_HPP_INCLUDED diff --git a/include/boost/mpl/deref.hpp b/include/boost/mpl/deref.hpp index c71f135..fc2ff91 100644 --- a/include/boost/mpl/deref.hpp +++ b/include/boost/mpl/deref.hpp @@ -1,44 +1,41 @@ -//----------------------------------------------------------------------------- -// boost mpl/deref.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002-03 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_DEREF_HPP_INCLUDED #define BOOST_MPL_DEREF_HPP_INCLUDED -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/mpl/aux_/config/eti.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/msvc_type.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> +#include <boost/mpl/aux_/config/eti.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Iterator) + typename BOOST_MPL_AUX_NA_PARAM(Iterator) > struct deref { +#if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) typedef typename Iterator::type type; +#else + typedef typename aux::msvc_type<Iterator>::type type; +#endif BOOST_MPL_AUX_LAMBDA_SUPPORT(1,deref,(Iterator)) }; -#if defined(BOOST_MPL_MSVC_ETI_BUG) -template<> struct deref<int> -{ - typedef int type; -}; -#endif +BOOST_MPL_AUX_NA_SPEC(1, deref) -BOOST_MPL_AUX_VOID_SPEC(1, deref) - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_DEREF_HPP_INCLUDED diff --git a/include/boost/mpl/distance.hpp b/include/boost/mpl/distance.hpp index 983a614..6570b75 100644 --- a/include/boost/mpl/distance.hpp +++ b/include/boost/mpl/distance.hpp @@ -1,139 +1,78 @@ -//----------------------------------------------------------------------------- -// boost mpl/distance.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_DISTANCE_HPP_INCLUDED #define BOOST_MPL_DISTANCE_HPP_INCLUDED -#include "boost/mpl/aux_/iter_distance.hpp" -#include "boost/mpl/aux_/iterator_category.hpp" -#include "boost/mpl/iterator_tag.hpp" -#include "boost/mpl/iter_fold.hpp" -#include "boost/mpl/iterator_range.hpp" -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/next.hpp" -#include "boost/mpl/aux_/common_name_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/config.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -BOOST_MPL_AUX_COMMON_NAME_WKND(distance) +#include <boost/mpl/distance_fwd.hpp> +#include <boost/mpl/iter_fold.hpp> +#include <boost/mpl/iterator_range.hpp> +#include <boost/mpl/long.hpp> +#include <boost/mpl/next.hpp> +#include <boost/mpl/tag.hpp> +#include <boost/mpl/apply_wrap.hpp> +#include <boost/mpl/aux_/msvc_eti_base.hpp> +#include <boost/mpl/aux_/value_wknd.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/config/forwarding.hpp> +#include <boost/mpl/aux_/config/static_constant.hpp> -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -namespace aux { +namespace boost { namespace mpl { -// forward/bidirectional iterators -template< typename Category, typename First, typename Last > -struct distance_impl - : iter_fold< - iterator_range<First,Last> - , integral_c<long, 0> - , next<> - > +// default implementation for forward/bidirectional iterators +template< typename Tag > struct distance_impl { -}; - -template< typename First, typename Last > -struct distance_impl<ra_iter_tag_,First,Last> - : aux::iter_distance<First,Last> -{ -}; - -} // namespace aux - -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(First) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Last) - > -struct distance -// Aleksey claims borland doesn't like inheritance here, but it passes -// all the same tests; the workaround can easily be enabled again if -// verified. -- dwa 2003/5/8 -# if 1 || !defined(__BORLANDC__) - : aux::distance_impl< - typename BOOST_MPL_AUX_ITERATOR_CATEGORY(First) - , First - , Last - > -# endif -{ -# if 0 && defined(__BORLANDC__) - typedef typename aux::distance_impl< - typename BOOST_MPL_AUX_ITERATOR_CATEGORY(First) - , First - , Last - >::type type; - BOOST_STATIC_CONSTANT(typename type::value_type, value = type::value); -# endif -}; - -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END - -#else - -namespace aux { - -// forward/bidirectional iterators -template< typename Category > -struct distance_impl -{ - template< typename First, typename Last > struct result_ - : iter_fold< + template< typename First, typename Last > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) + : aux::msvc_eti_base< typename iter_fold< iterator_range<First,Last> - , integral_c<long, 0> + , long_<0> , next<> - > + >::type > { +#else + { + typedef typename iter_fold< + iterator_range<First,Last> + , long_<0> + , next<> + >::type type; + + BOOST_STATIC_CONSTANT(long, value = + (iter_fold< + iterator_range<First,Last> + , long_<0> + , next<> + >::type::value) + ); +#endif }; }; -template<> -struct distance_impl<ra_iter_tag_> -{ - template< typename First, typename Last > struct result_ - : aux::iter_distance<First,Last> - { - }; -}; - -} // namespace aux - -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN - template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(First) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Last) + typename BOOST_MPL_AUX_NA_PARAM(First) + , typename BOOST_MPL_AUX_NA_PARAM(Last) > struct distance -#if !defined(BOOST_MSVC) || BOOST_MSVC != 1300 - : aux::distance_impl< typename BOOST_MPL_AUX_ITERATOR_CATEGORY(First) > -#else - : aux::distance_impl< fwd_iter_tag_ > -#endif - ::template result_<First,Last> + : distance_impl< typename tag<First>::type > + ::template apply<First, Last> { + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, distance, (First, Last)) }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END +BOOST_MPL_AUX_NA_SPEC(2, distance) -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, distance) - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_DISTANCE_HPP_INCLUDED diff --git a/include/boost/mpl/distance_fwd.hpp b/include/boost/mpl/distance_fwd.hpp new file mode 100644 index 0000000..66152cc --- /dev/null +++ b/include/boost/mpl/distance_fwd.hpp @@ -0,0 +1,28 @@ + +#ifndef BOOST_MPL_DISTANCE_FWD_HPP_INCLUDED +#define BOOST_MPL_DISTANCE_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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/common_name_wknd.hpp> + +namespace boost { namespace mpl { + +BOOST_MPL_AUX_COMMON_NAME_WKND(distance) + +template< typename Tag > struct advance_impl; +template< typename First, typename Last > struct distance; + +}} + +#endif // BOOST_MPL_DISTANCE_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/divides.hpp b/include/boost/mpl/divides.hpp index 24d3b53..0e29ce0 100644 --- a/include/boost/mpl/divides.hpp +++ b/include/boost/mpl/divides.hpp @@ -2,74 +2,20 @@ #ifndef BOOST_MPL_DIVIDES_HPP_INCLUDED #define BOOST_MPL_DIVIDES_HPP_INCLUDED -// + file: boost/mpl/divides.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/aux_/typeof.hpp" -#include "boost/mpl/aux_/value_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/mpl/aux_/config/eti.hpp" -#include "boost/config.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { - -template< - typename T, T N1, T N2, T N3 = 1, T N4 = 1, T N5 = 1 - > -struct divides_c -{ - BOOST_STATIC_CONSTANT(T, value = (N1 / N2 / N3 / N4 / N5)); -#if !defined(__BORLANDC__) - typedef integral_c<T,value> type; -#else - typedef integral_c<T,(N1 / N2 / N3 / N4 / N5)> type; -#endif -}; - -#if defined(BOOST_MPL_MSVC_ETI_BUG) -template<> -struct divides_c<long,0,0,0,0,0> -{ -}; -#endif - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) - , typename T3 = integral_c<int,1> - , typename T4 = integral_c<int,1> - , typename T5 = integral_c<int,1> - > -struct divides - : divides_c< - BOOST_MPL_AUX_TYPEOF(T1, - T1::value / T2::value / T3::value / T4::value / T5::value - ) - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T1)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T2)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T3)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T4)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T5)::value - > -{ - BOOST_MPL_AUX_LAMBDA_SUPPORT(5, divides, (T1,T2,T3,T4,T5)) -}; - -BOOST_MPL_AUX_VOID_SPEC_EXT(2,5,divides) - -} // namespace mpl -} // namespace boost +#define AUX778076_OP_NAME divides +#define AUX778076_OP_TOKEN / +#include <boost/mpl/aux_/arithmetic_op.hpp> #endif // BOOST_MPL_DIVIDES_HPP_INCLUDED diff --git a/include/boost/mpl/empty.hpp b/include/boost/mpl/empty.hpp index 469f289..ac4415a 100644 --- a/include/boost/mpl/empty.hpp +++ b/include/boost/mpl/empty.hpp @@ -1,40 +1,39 @@ -//----------------------------------------------------------------------------- -// boost mpl/empty.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_EMPTY_HPP_INCLUDED #define BOOST_MPL_EMPTY_HPP_INCLUDED -#include "boost/mpl/empty_fwd.hpp" -#include "boost/mpl/aux_/empty_impl.hpp" -#include "boost/mpl/aux_/sequence_tag.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/empty_fwd.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/empty_impl.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct empty - : empty_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) > - ::template algorithm< Sequence > + : empty_impl< typename sequence_tag<Sequence>::type > + ::template apply< Sequence > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,empty,(Sequence)) }; -BOOST_MPL_AUX_VOID_SPEC(1, empty) +BOOST_MPL_AUX_NA_SPEC(1, empty) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_EMPTY_HPP_INCLUDED diff --git a/include/boost/mpl/empty_base.hpp b/include/boost/mpl/empty_base.hpp index e4c53f5..a2f5504 100644 --- a/include/boost/mpl/empty_base.hpp +++ b/include/boost/mpl/empty_base.hpp @@ -1,38 +1,40 @@ -//----------------------------------------------------------------------------- -// boost mpl/empty_base.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_EMPTY_BASE_HPP_INCLUDED #define BOOST_MPL_EMPTY_BASE_HPP_INCLUDED -#include "boost/type_traits/is_empty.hpp" -#include "boost/mpl/bool.hpp" -#include "boost/config.hpp" +// Copyright Aleksey Gurtovoy 2001-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/bool.hpp> +#include <boost/mpl/aux_/config/msvc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +#include <boost/type_traits/is_empty.hpp> // should be always the last #include directive -#include "boost/type_traits/detail/bool_trait_def.hpp" +#include <boost/type_traits/detail/bool_trait_def.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { // empty base class, guaranteed to have no members; inheritance from // 'empty_base' through the 'inherit' metafunction is a no-op - see -// "mpl/inherit.hpp" header for the details +// "mpl/inherit.hpp> header for the details struct empty_base {}; template< typename T > struct is_empty_base : false_ { -#if defined(BOOST_MSVC) && BOOST_MSVC < 1300 +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) using false_::value; #endif }; @@ -41,17 +43,17 @@ template<> struct is_empty_base<empty_base> : true_ { -#if defined(BOOST_MSVC) && BOOST_MSVC < 1300 +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) using true_::value; #endif }; -} // namespace mpl +}} +namespace boost { BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_empty, mpl::empty_base, true) +} -} // namespace boost - -#include "boost/type_traits/detail/bool_trait_undef.hpp" +#include <boost/type_traits/detail/bool_trait_undef.hpp> #endif // BOOST_MPL_EMPTY_BASE_HPP_INCLUDED diff --git a/include/boost/mpl/empty_fwd.hpp b/include/boost/mpl/empty_fwd.hpp index d7212b6..de8124f 100644 --- a/include/boost/mpl/empty_fwd.hpp +++ b/include/boost/mpl/empty_fwd.hpp @@ -1,25 +1,24 @@ -//----------------------------------------------------------------------------- -// boost mpl/empty_fwd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_EMPTY_FWD_HPP_INCLUDED #define BOOST_MPL_EMPTY_FWD_HPP_INCLUDED -namespace boost { -namespace mpl { +// 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. -template< typename Tag > struct empty_traits; +// $Source$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct empty_impl; template< typename Sequence > struct empty; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_EMPTY_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/end.hpp b/include/boost/mpl/end.hpp new file mode 100644 index 0000000..a395d93 --- /dev/null +++ b/include/boost/mpl/end.hpp @@ -0,0 +1,19 @@ + +#ifndef BOOST_MPL_END_HPP_INCLUDED +#define BOOST_MPL_END_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/begin_end.hpp> + +#endif // BOOST_MPL_END_HPP_INCLUDED diff --git a/include/boost/mpl/equal.hpp b/include/boost/mpl/equal.hpp index 6ed9557..06c29dc 100644 --- a/include/boost/mpl/equal.hpp +++ b/include/boost/mpl/equal.hpp @@ -1,36 +1,38 @@ -//----------------------------------------------------------------------------- -// boost mpl/equal.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_EQUAL_HPP_INCLUDED #define BOOST_MPL_EQUAL_HPP_INCLUDED -#include "boost/mpl/aux_/iter_fold_if_impl.hpp" -#include "boost/mpl/aux_/iter_apply.hpp" -#include "boost/mpl/and.hpp" -#include "boost/mpl/not.hpp" -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/next.hpp" -#include "boost/mpl/always.hpp" -#include "boost/mpl/bool.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/bind.hpp" -#include "boost/mpl/apply.hpp" -#include "boost/mpl/void.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/type_traits/is_same.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/iter_fold_if_impl.hpp> +#include <boost/mpl/aux_/iter_apply.hpp> +#include <boost/mpl/and.hpp> +#include <boost/mpl/not.hpp> +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/next.hpp> +#include <boost/mpl/always.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/lambda.hpp> +#include <boost/mpl/bind.hpp> +#include <boost/mpl/apply.hpp> +#include <boost/mpl/void.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> +#include <boost/mpl/aux_/msvc_eti_base.hpp> + +#include <boost/type_traits/is_same.hpp> + +namespace boost { namespace mpl { namespace aux { @@ -55,29 +57,23 @@ struct equal_pred }; }; -} // namespace aux - -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN - template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence2) - , typename Predicate = is_same<_,_> + typename Sequence1 + , typename Sequence2 + , typename Predicate > -struct equal +struct equal_impl { - private: typedef typename begin<Sequence1>::type first1_; typedef typename begin<Sequence2>::type first2_; typedef typename end<Sequence1>::type last1_; typedef typename end<Sequence2>::type last2_; - typedef typename lambda<Predicate>::type pred_; typedef aux::iter_fold_if_impl< first1_ , first2_ , next<> - , aux::equal_pred<pred_,last1_,last2_> + , protect< aux::equal_pred<Predicate,last1_,last2_> > , void_ , always<false_> > fold_; @@ -89,17 +85,28 @@ struct equal , is_same<iter2_,last2_> > result_; - public: typedef typename result_::type type; +}; + +} // namespace aux + + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence1) + , typename BOOST_MPL_AUX_NA_PARAM(Sequence2) + , typename Predicate = is_same<_,_> + > +struct equal + : aux::msvc_eti_base< + typename aux::equal_impl<Sequence1,Sequence2,Predicate>::type + >::type +{ BOOST_MPL_AUX_LAMBDA_SUPPORT(2,equal,(Sequence1,Sequence2)) }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END +BOOST_MPL_AUX_NA_SPEC(2, equal) -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, equal) - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_EQUAL_HPP_INCLUDED diff --git a/include/boost/mpl/equal_to.hpp b/include/boost/mpl/equal_to.hpp index f01b4cb..04e4b83 100644 --- a/include/boost/mpl/equal_to.hpp +++ b/include/boost/mpl/equal_to.hpp @@ -2,11 +2,11 @@ #ifndef BOOST_MPL_EQUAL_TO_HPP_INCLUDED #define BOOST_MPL_EQUAL_TO_HPP_INCLUDED -// Copyright (c) 2000-03 Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. @@ -14,59 +14,8 @@ // $Date$ // $Revision$ -#include "boost/mpl/bool.hpp" -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/aux_/value_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/config.hpp" - -namespace boost { -namespace mpl { - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) - > -struct equal_to -{ - enum - { - msvc71_wknd_ = ( BOOST_MPL_AUX_VALUE_WKND(T1)::value - == BOOST_MPL_AUX_VALUE_WKND(T2)::value ) - }; - - BOOST_STATIC_CONSTANT(bool, value = msvc71_wknd_); - -#if !defined(__BORLANDC__) - typedef bool_<value> type; -#else - typedef bool_<( - BOOST_MPL_AUX_VALUE_WKND(T1)::value - == BOOST_MPL_AUX_VALUE_WKND(T2)::value - )> type; -#endif - - BOOST_MPL_AUX_LAMBDA_SUPPORT(2,equal_to,(T1,T2)) -}; - -BOOST_MPL_AUX_VOID_SPEC(2, equal_to) - -template< long N > -struct eq -{ - template< typename T > struct apply -#if !defined(__BORLANDC__) - : equal_to< T,integral_c<long,N> > - { -#else - { - typedef typename equal_to< T,integral_c<long,N> >::type type; -#endif - }; -}; - -} // namespace mpl -} // namespace boost +#define AUX778076_OP_NAME equal_to +#define AUX778076_OP_TOKEN == +#include <boost/mpl/aux_/comparison_op.hpp> #endif // BOOST_MPL_EQUAL_TO_HPP_INCLUDED diff --git a/include/boost/mpl/erase.hpp b/include/boost/mpl/erase.hpp index ec0a487..ff9a928 100644 --- a/include/boost/mpl/erase.hpp +++ b/include/boost/mpl/erase.hpp @@ -1,56 +1,42 @@ -//----------------------------------------------------------------------------- -// boost mpl/erase.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_ERASE_HPP_INCLUDED #define BOOST_MPL_ERASE_HPP_INCLUDED -#include "boost/mpl/erase_fwd.hpp" -#include "boost/mpl/aux_/next.hpp" -#include "boost/mpl/aux_/erase_impl.hpp" -#include "boost/mpl/aux_/sequence_tag.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/mpl/aux_/config/msvc_typename.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -namespace aux { -template< typename T > struct erase_param -{ - typedef typename BOOST_MPL_AUX_NEXT(T) type; -}; +#include <boost/mpl/erase_fwd.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/erase_impl.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> +#include <boost/mpl/aux_/config/msvc_typename.hpp> -template<> struct erase_param<void_> -{ - typedef void_ type; -}; -} // namespace aux +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(First) - , typename Last = BOOST_MSVC_TYPENAME aux::erase_param<First>::type + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(First_or_T) + , typename BOOST_MPL_AUX_NA_PARAM(Last) > struct erase - : erase_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) > - ::template algorithm< Sequence,First,Last > + : erase_impl< typename sequence_tag<Sequence>::type > + ::template apply< Sequence,First_or_T,Last > { - BOOST_MPL_AUX_LAMBDA_SUPPORT(3,erase,(Sequence,First,Last)) + BOOST_MPL_AUX_LAMBDA_SUPPORT(3,erase,(Sequence,First_or_T,Last)) }; -BOOST_MPL_AUX_VOID_SPEC_EXT(2,3,erase) +BOOST_MPL_AUX_NA_SPEC(3,erase) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_ERASE_HPP_INCLUDED diff --git a/include/boost/mpl/erase_fwd.hpp b/include/boost/mpl/erase_fwd.hpp index 39d75df..d5b4cd1 100644 --- a/include/boost/mpl/erase_fwd.hpp +++ b/include/boost/mpl/erase_fwd.hpp @@ -1,25 +1,24 @@ -//----------------------------------------------------------------------------- -// boost mpl/erase_fwd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_ERASE_FWD_HPP_INCLUDED #define BOOST_MPL_ERASE_FWD_HPP_INCLUDED -namespace boost { -namespace mpl { +// 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. -template< typename Tag > struct erase_traits; +// $Source$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct erase_impl; template< typename Sequence, typename First, typename Last > struct erase; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_ERASE_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/erase_key.hpp b/include/boost/mpl/erase_key.hpp new file mode 100644 index 0000000..d85a21d --- /dev/null +++ b/include/boost/mpl/erase_key.hpp @@ -0,0 +1,41 @@ + +#ifndef BOOST_MPL_ERASE_KEY_HPP_INCLUDED +#define BOOST_MPL_ERASE_KEY_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$ + +#include <boost/mpl/erase_key_fwd.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/erase_key_impl.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> +#include <boost/mpl/aux_/config/msvc_typename.hpp> + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(Key) + > +struct erase_key + : erase_key_impl< typename sequence_tag<Sequence>::type > + ::template apply< Sequence,Key > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,erase_key,(Sequence,Key)) +}; + +BOOST_MPL_AUX_NA_SPEC(2,erase_key) + +}} + +#endif // BOOST_MPL_ERASE_KEY_HPP_INCLUDED diff --git a/include/boost/mpl/erase_key_fwd.hpp b/include/boost/mpl/erase_key_fwd.hpp new file mode 100644 index 0000000..4808b86 --- /dev/null +++ b/include/boost/mpl/erase_key_fwd.hpp @@ -0,0 +1,24 @@ + +#ifndef BOOST_MPL_ERASE_KEY_FWD_HPP_INCLUDED +#define BOOST_MPL_ERASE_KEY_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct erase_key_impl; +template< typename Sequence, typename Key > struct erase_key; + +}} + +#endif // BOOST_MPL_ERASE_KEY_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/eval_if.hpp b/include/boost/mpl/eval_if.hpp new file mode 100755 index 0000000..4b07d9a --- /dev/null +++ b/include/boost/mpl/eval_if.hpp @@ -0,0 +1,64 @@ + +#ifndef BOOST_MPL_EVAL_IF_HPP_INCLUDED +#define BOOST_MPL_EVAL_IF_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$ + +#include <boost/mpl/if.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> +#include <boost/mpl/aux_/config/msvc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(C) + , typename BOOST_MPL_AUX_NA_PARAM(F1) + , typename BOOST_MPL_AUX_NA_PARAM(F2) + > +struct eval_if +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + : if_<C,F1,F2>::type +{ +#else +{ + typedef typename if_<C,F1,F2>::type f_; + typedef typename f_::type type; +#endif + BOOST_MPL_AUX_LAMBDA_SUPPORT(3,eval_if,(C,F1,F2)) +}; + +// (almost) copy & paste in order to save one more +// recursively nested template instantiation to user +template< + bool C + , typename F1 + , typename F2 + > +struct eval_if_c +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + : if_c<C,F1,F2>::type +{ +#else +{ + typedef typename if_c<C,F1,F2>::type f_; + typedef typename f_::type type; +#endif +}; + +BOOST_MPL_AUX_NA_SPEC(3, eval_if) + +}} + +#endif // BOOST_MPL_EVAL_IF_HPP_INCLUDED diff --git a/include/boost/mpl/filter_view.hpp b/include/boost/mpl/filter_view.hpp index e564a86..b53ea97 100644 --- a/include/boost/mpl/filter_view.hpp +++ b/include/boost/mpl/filter_view.hpp @@ -1,29 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/filter_view.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_FILTER_VIEW_HPP_INCLUDED #define BOOST_MPL_FILTER_VIEW_HPP_INCLUDED -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/aux_/filter_iter.hpp" -#include "boost/mpl/aux_/void_spec.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/lambda.hpp> +#include <boost/mpl/aux_/filter_iter.hpp> +#include <boost/mpl/aux_/na_spec.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Predicate) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(Predicate) > struct filter_view { @@ -39,9 +39,8 @@ struct filter_view typedef aux::filter_iter< last_,last_,pred_ > end; }; -BOOST_MPL_AUX_VOID_SPEC(2, filter_view) +BOOST_MPL_AUX_NA_SPEC(2, filter_view) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_FILTER_VIEW_HPP_INCLUDED diff --git a/include/boost/mpl/find.hpp b/include/boost/mpl/find.hpp index a5cac55..1d490f9 100644 --- a/include/boost/mpl/find.hpp +++ b/include/boost/mpl/find.hpp @@ -1,31 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/find.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_FIND_HPP_INCLUDED #define BOOST_MPL_FIND_HPP_INCLUDED -#include "boost/mpl/find_if.hpp" -#include "boost/mpl/same_as.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// Copyright Aleksey Gurtovoy 2000-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN +#include <boost/mpl/find_if.hpp> +#include <boost/mpl/same_as.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(T) > struct find : find_if< Sequence,same_as<T> > @@ -33,11 +31,8 @@ struct find BOOST_MPL_AUX_LAMBDA_SUPPORT(2,find,(Sequence,T)) }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END +BOOST_MPL_AUX_NA_SPEC(2, find) -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, find) - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_FIND_HPP_INCLUDED diff --git a/include/boost/mpl/find_if.hpp b/include/boost/mpl/find_if.hpp index 52b8962..782484b 100644 --- a/include/boost/mpl/find_if.hpp +++ b/include/boost/mpl/find_if.hpp @@ -1,64 +1,50 @@ -//----------------------------------------------------------------------------- -// boost mpl/find_if.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_FIND_IF_HPP_INCLUDED #define BOOST_MPL_FIND_IF_HPP_INCLUDED -#include "boost/mpl/aux_/find_if_pred.hpp" -#include "boost/mpl/arg.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/iter_fold_if.hpp" -#include "boost/mpl/protect.hpp" -#include "boost/mpl/aux_/common_name_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/find_if_pred.hpp> +#include <boost/mpl/arg.hpp> +#include <boost/mpl/iter_fold_if.hpp> +#include <boost/mpl/aux_/common_name_wknd.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { BOOST_MPL_AUX_COMMON_NAME_WKND(find_if) -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN - template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Predicate) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(Predicate) > struct find_if { -private: - - typedef typename lambda<Predicate>::type pred_; - typedef typename iter_fold_if< Sequence , void - , protect< arg<1> > // ignore - , protect< aux::find_if_pred<pred_> > + , arg<1> // ignore + , protect< aux::find_if_pred<Predicate> > >::type result_; -public: - - typedef typename result_::second type; + typedef typename second<result_>::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2,find_if,(Sequence,Predicate)) - }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END +BOOST_MPL_AUX_NA_SPEC(2,find_if) -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2,find_if) - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_FIND_IF_HPP_INCLUDED diff --git a/include/boost/mpl/fold.hpp b/include/boost/mpl/fold.hpp index cb20036..1e6c4c7 100644 --- a/include/boost/mpl/fold.hpp +++ b/include/boost/mpl/fold.hpp @@ -1,32 +1,32 @@ -//----------------------------------------------------------------------------- -// boost mpl/fold.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy, David Abrahams -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_FOLD_HPP_INCLUDED #define BOOST_MPL_FOLD_HPP_INCLUDED -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/O1_size.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/aux_/fold_impl.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/O1_size.hpp> +#include <boost/mpl/aux_/fold_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_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(State) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(ForwardOp) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(State) + , typename BOOST_MPL_AUX_NA_PARAM(ForwardOp) > struct fold { @@ -35,15 +35,14 @@ struct fold , typename begin<Sequence>::type , typename end<Sequence>::type , State - , typename lambda<ForwardOp>::type + , ForwardOp >::state type; BOOST_MPL_AUX_LAMBDA_SUPPORT(3,fold,(Sequence,State,ForwardOp)) }; -BOOST_MPL_AUX_VOID_SPEC(3, fold) +BOOST_MPL_AUX_NA_SPEC(3, fold) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_FOLD_HPP_INCLUDED diff --git a/include/boost/mpl/fold_backward.hpp b/include/boost/mpl/fold_backward.hpp deleted file mode 100644 index 3578ae8..0000000 --- a/include/boost/mpl/fold_backward.hpp +++ /dev/null @@ -1,51 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/fold_backward.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy, David Abrahams -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_FOLD_BACKWARD_HPP_INCLUDED -#define BOOST_MPL_FOLD_BACKWARD_HPP_INCLUDED - -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/O1_size.hpp" -#include "boost/mpl/arg.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/aux_/fold_backward_impl.hpp" -#include "boost/mpl/aux_/void_spec.hpp" - -namespace boost { -namespace mpl { - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(State) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(BackwardOp) - , typename ForwardOp = arg<1> - > -struct fold_backward -{ - typedef typename aux::fold_backward_impl< - ::boost::mpl::O1_size<Sequence>::value - , typename begin<Sequence>::type - , typename end<Sequence>::type - , State - , typename lambda<BackwardOp>::type - , typename lambda<ForwardOp>::type - >::state type; - - BOOST_MPL_AUX_LAMBDA_SUPPORT(3,fold_backward,(Sequence,State,BackwardOp)) -}; - -BOOST_MPL_AUX_VOID_SPEC(3, fold_backward) - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_FOLD_BACKWARD_HPP_INCLUDED diff --git a/include/boost/mpl/for_each.hpp b/include/boost/mpl/for_each.hpp index c21c432..3dfc188 100644 --- a/include/boost/mpl/for_each.hpp +++ b/include/boost/mpl/for_each.hpp @@ -1,34 +1,35 @@ -//----------------------------------------------------------------------------- -// boost mpl/for_each.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_FOR_EACH_HPP_INCLUDED #define BOOST_MPL_FOR_EACH_HPP_INCLUDED -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/apply.hpp" -#include "boost/mpl/bool.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/identity.hpp" -#include "boost/mpl/aux_/unwrap.hpp" +// 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. -#include "boost/type_traits/is_same.hpp" -#include "boost/utility/value_init.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/apply.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/next_prior.hpp> +#include <boost/mpl/deref.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/aux_/unwrap.hpp> + +#include <boost/type_traits/is_same.hpp> +#include <boost/utility/value_init.hpp> + +namespace boost { namespace mpl { namespace aux { -template <bool done = true> +template< bool done = true > struct for_each_impl { template< @@ -47,7 +48,7 @@ struct for_each_impl } }; -template <> +template<> struct for_each_impl<false> { template< @@ -63,7 +64,7 @@ struct for_each_impl<false> , F f ) { - typedef typename Iterator::type item; + typedef typename deref<Iterator>::type item; typedef typename apply1<TransformFunc,item>::type arg; // dwa 2002/9/10 -- make sure not to invoke undefined behavior @@ -71,9 +72,9 @@ struct for_each_impl<false> value_initialized<arg> x; aux::unwrap(f, 0)(boost::get(x)); - typedef typename Iterator::next iter; - for_each_impl<boost::is_same<iter,LastIterator>::value>::execute( - (iter*)0, (LastIterator*)0, (TransformFunc*)0, f); + typedef typename next<Iterator>::type iter; + for_each_impl<boost::is_same<iter,LastIterator>::value> + ::execute((iter*)0, (LastIterator*)0, (TransformFunc*)0, f); } }; @@ -91,10 +92,9 @@ void for_each(F f, Sequence* = 0, TransformOp* = 0) { typedef typename begin<Sequence>::type first; typedef typename end<Sequence>::type last; - typedef typename lambda<TransformOp>::type transform_op; - aux::for_each_impl< boost::is_same<first,last>::value >::execute( - (first*)0, (last*)0, (transform_op*)0, f); + aux::for_each_impl< boost::is_same<first,last>::value > + ::execute((first*)0, (last*)0, (TransformOp*)0, f); } template< @@ -107,7 +107,6 @@ void for_each(F f, Sequence* = 0) for_each<Sequence, identity<> >(f); } -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_FOR_EACH_HPP_INCLUDED diff --git a/include/boost/mpl/front.hpp b/include/boost/mpl/front.hpp index 5fc7bde..446cf7b 100644 --- a/include/boost/mpl/front.hpp +++ b/include/boost/mpl/front.hpp @@ -1,40 +1,39 @@ -//----------------------------------------------------------------------------- -// boost mpl/front.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_FRONT_HPP_INCLUDED #define BOOST_MPL_FRONT_HPP_INCLUDED -#include "boost/mpl/front_fwd.hpp" -#include "boost/mpl/aux_/front_impl.hpp" -#include "boost/mpl/aux_/sequence_tag.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/front_fwd.hpp> +#include <boost/mpl/aux_/front_impl.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct front - : front_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) > - ::template algorithm< Sequence > + : front_impl< typename sequence_tag<Sequence>::type > + ::template apply< Sequence > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,front,(Sequence)) }; -BOOST_MPL_AUX_VOID_SPEC(1, front) +BOOST_MPL_AUX_NA_SPEC(1, front) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_FRONT_HPP_INCLUDED diff --git a/include/boost/mpl/front_fwd.hpp b/include/boost/mpl/front_fwd.hpp index 57c966f..fec885f 100644 --- a/include/boost/mpl/front_fwd.hpp +++ b/include/boost/mpl/front_fwd.hpp @@ -1,25 +1,24 @@ -//----------------------------------------------------------------------------- -// boost mpl/front_fwd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_FRONT_FWD_HPP_INCLUDED #define BOOST_MPL_FRONT_FWD_HPP_INCLUDED -namespace boost { -namespace mpl { +// 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. -template< typename Tag > struct front_traits; +// $Source$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct front_impl; template< typename Sequence > struct front; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_FRONT_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/front_inserter.hpp b/include/boost/mpl/front_inserter.hpp new file mode 100644 index 0000000..1f7e864 --- /dev/null +++ b/include/boost/mpl/front_inserter.hpp @@ -0,0 +1,33 @@ + +#ifndef BOOST_MPL_FRONT_INSERTER_HPP_INCLUDED +#define BOOST_MPL_FRONT_INSERTER_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/push_front.hpp> +#include <boost/mpl/inserter.hpp> + +namespace boost { namespace mpl { + +template< + typename Sequence + > +struct front_inserter + : inserter< Sequence,push_front<> > +{ +}; + +}} + +#endif // BOOST_MPL_FRONT_INSERTER_HPP_INCLUDED diff --git a/include/boost/mpl/greater.hpp b/include/boost/mpl/greater.hpp index cafb4b0..6a809c7 100644 --- a/include/boost/mpl/greater.hpp +++ b/include/boost/mpl/greater.hpp @@ -2,11 +2,11 @@ #ifndef BOOST_MPL_GREATER_HPP_INCLUDED #define BOOST_MPL_GREATER_HPP_INCLUDED -// Copyright (c) 2000-03 Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. @@ -14,59 +14,8 @@ // $Date$ // $Revision$ -#include "boost/mpl/bool.hpp" -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/aux_/value_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/config.hpp" - -namespace boost { -namespace mpl { - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) - > -struct greater -{ - enum - { - msvc71_wknd_ = ( BOOST_MPL_AUX_VALUE_WKND(T1)::value - > BOOST_MPL_AUX_VALUE_WKND(T2)::value ) - }; - - BOOST_STATIC_CONSTANT(bool, value = msvc71_wknd_); - -#if !defined(__BORLANDC__) - typedef bool_<value> type; -#else - typedef bool_<( - (BOOST_MPL_AUX_VALUE_WKND(T1)::value) - > (BOOST_MPL_AUX_VALUE_WKND(T2)::value) - )> type; -#endif - - BOOST_MPL_AUX_LAMBDA_SUPPORT(2,greater,(T1,T2)) -}; - -BOOST_MPL_AUX_VOID_SPEC(2, greater) - -template< long N > -struct gt -{ - template< typename T > struct apply -#if !defined(__BORLANDC__) - : greater< T,integral_c<long,N> > - { -#else - { - typedef typename greater< T,integral_c<long,N> >::type type; -#endif - }; -}; - -} // namespace mpl -} // namespace boost +#define AUX778076_OP_NAME greater +#define AUX778076_OP_TOKEN > +#include <boost/mpl/aux_/comparison_op.hpp> #endif // BOOST_MPL_GREATER_HPP_INCLUDED diff --git a/include/boost/mpl/greater_equal.hpp b/include/boost/mpl/greater_equal.hpp index 79d4f3b..5d13f9d 100644 --- a/include/boost/mpl/greater_equal.hpp +++ b/include/boost/mpl/greater_equal.hpp @@ -2,11 +2,11 @@ #ifndef BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED #define BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED -// Copyright (c) 2000-03 Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. @@ -14,59 +14,8 @@ // $Date$ // $Revision$ -#include "boost/mpl/bool.hpp" -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/aux_/value_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/config.hpp" - -namespace boost { -namespace mpl { - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) - > -struct greater_equal -{ - enum - { - msvc71_wknd_ = ( BOOST_MPL_AUX_VALUE_WKND(T1)::value - >= BOOST_MPL_AUX_VALUE_WKND(T2)::value ) - }; - - BOOST_STATIC_CONSTANT(bool, value = msvc71_wknd_); - -#if !defined(__BORLANDC__) - typedef bool_<value> type; -#else - typedef bool_<( - BOOST_MPL_AUX_VALUE_WKND(T1)::value - >= BOOST_MPL_AUX_VALUE_WKND(T2)::value - )> type; -#endif - - BOOST_MPL_AUX_LAMBDA_SUPPORT(2,greater_equal,(T1,T2)) -}; - -BOOST_MPL_AUX_VOID_SPEC(2, greater_equal) - -template< long N > -struct ge -{ - template< typename T > struct apply -#if !defined(__BORLANDC__) - : greater_equal< T,integral_c<long,N> > - { -#else - { - typedef typename greater_equal< T,integral_c<long,N> >::type type; -#endif - }; -}; - -} // namespace mpl -} // namespace boost +#define AUX778076_OP_NAME greater_equal +#define AUX778076_OP_TOKEN >= +#include <boost/mpl/aux_/comparison_op.hpp> #endif // BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED diff --git a/include/boost/mpl/has_key.hpp b/include/boost/mpl/has_key.hpp index 6968685..dddd256 100644 --- a/include/boost/mpl/has_key.hpp +++ b/include/boost/mpl/has_key.hpp @@ -2,39 +2,39 @@ #ifndef BOOST_MPL_HAS_KEY_HPP_INCLUDED #define BOOST_MPL_HAS_KEY_HPP_INCLUDED -// + file: boost/mpl/has_key.hpp -// + last modified: 02/may/03 - -// Copyright (c) 2002-03 -// David Abrahams, Aleksey Gurtovoy +// 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 +// 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. -#include "boost/mpl/has_key_fwd.hpp" -#include "boost/mpl/aux_/has_key_impl.hpp" -#include "boost/mpl/aux_/sequence_tag.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { +#include <boost/mpl/has_key_fwd.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/has_key_impl.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(AssociativeSequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Key) + typename BOOST_MPL_AUX_NA_PARAM(AssociativeSequence) + , typename BOOST_MPL_AUX_NA_PARAM(Key) > struct has_key - : has_key_impl< typename BOOST_MPL_AUX_SEQUENCE_TAG(AssociativeSequence) > + : has_key_impl< typename sequence_tag<AssociativeSequence>::type > ::template apply<AssociativeSequence,Key> { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,has_key,(AssociativeSequence,Key)) }; -BOOST_MPL_AUX_VOID_SPEC(2, has_key) +BOOST_MPL_AUX_NA_SPEC(2, has_key) }} diff --git a/include/boost/mpl/has_key_fwd.hpp b/include/boost/mpl/has_key_fwd.hpp index 149f03d..ba6502a 100644 --- a/include/boost/mpl/has_key_fwd.hpp +++ b/include/boost/mpl/has_key_fwd.hpp @@ -2,20 +2,20 @@ #ifndef BOOST_MPL_HAS_KEY_FWD_HPP_INCLUDED #define BOOST_MPL_HAS_KEY_FWD_HPP_INCLUDED -// + file: boost/mpl/has_key_fwd.hpp -// + last modified: 02/may/03 - -// Copyright (c) 2002-03 -// David Abrahams, Aleksey Gurtovoy +// 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 +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { template< typename Tag > struct has_key_impl; template< typename AssociativeSequence, typename Key > struct has_key; diff --git a/include/boost/mpl/has_xxx.hpp b/include/boost/mpl/has_xxx.hpp new file mode 100644 index 0000000..b988d23 --- /dev/null +++ b/include/boost/mpl/has_xxx.hpp @@ -0,0 +1,218 @@ + +#ifndef BOOST_MPL_HAS_XXX_HPP_INCLUDED +#define BOOST_MPL_HAS_XXX_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// Copyright David Abrahams 2002-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/bool.hpp> +#include <boost/mpl/aux_/type_wrapper.hpp> +#include <boost/mpl/aux_/yes_no.hpp> +#include <boost/mpl/aux_/config/has_xxx.hpp> +#include <boost/mpl/aux_/config/msvc_typename.hpp> +#include <boost/mpl/aux_/config/msvc.hpp> +#include <boost/mpl/aux_/config/static_constant.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +#include <boost/preprocessor/cat.hpp> + +#if !defined(BOOST_MPL_CFG_NO_HAS_XXX) + +# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + +// agurt, 11/sep/02: MSVC-specific version (< 7.1), based on a USENET +// newsgroup's posting by John Madsen (comp.lang.c++.moderated, +// 1999-11-12 19:17:06 GMT); the code is _not_ standard-conforming, but +// it works way more reliably than the SFINAE-based implementation + +// Modified dwa 8/Oct/02 to handle reference types. + +# include <boost/mpl/if.hpp> +# include <boost/mpl/bool.hpp> + +namespace boost { namespace mpl { namespace aux { + +struct has_xxx_tag; + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1300) +template< typename U > struct msvc_incomplete_array +{ + typedef char (&type)[sizeof(U) + 1]; +}; +#endif + +template< typename T > +struct msvc_is_incomplete +{ + // MSVC is capable of some kinds of SFINAE. If U is an incomplete + // type, it won't pick the second overload + static char tester(...); + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1300) + template< typename U > + static typename msvc_incomplete_array<U>::type tester(type_wrapper<U>); +#else + template< typename U > + static char (& tester(type_wrapper<U>) )[sizeof(U)+1]; +#endif + + BOOST_STATIC_CONSTANT(bool, value = + sizeof(tester(type_wrapper<T>())) == 1 + ); +}; + +template<> +struct msvc_is_incomplete<int> +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +}}} + +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, default_) \ +template< typename T, typename name = ::boost::mpl::aux::has_xxx_tag > \ +struct BOOST_PP_CAT(trait,_impl) : T \ +{ \ + static boost::mpl::aux::no_tag \ + test(void(*)(::boost::mpl::aux::has_xxx_tag)); \ + \ + static boost::mpl::aux::yes_tag test(...); \ + \ + BOOST_STATIC_CONSTANT(bool, value = \ + sizeof(test(static_cast<void(*)(name)>(0))) \ + != sizeof(boost::mpl::aux::no_tag) \ + ); \ + typedef boost::mpl::bool_<value> type; \ +}; \ +\ +template< typename T, bool fallback_ = default_ > struct trait \ + : boost::mpl::if_c< \ + boost::mpl::aux::msvc_is_incomplete<T>::value \ + , boost::mpl::bool_<false> \ + , BOOST_PP_CAT(trait,_impl)<T> \ + >::type \ +{ \ +}; \ +\ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, void) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, bool) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, char) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed char) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned char) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed short) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned short) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed int) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned int) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed long) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned long) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, float) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, double) \ +BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, long double) \ +/**/ + +# define BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, T) \ +template<> struct trait<T> \ +{ \ + BOOST_STATIC_CONSTANT(bool, value = false); \ + typedef boost::mpl::bool_<false> type; \ +}; \ +/**/ + +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \ + BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \ + BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, wchar_t) \ +/**/ +#else +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \ + BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \ +/**/ +#endif + + +// SFINAE-based implementations below are derived from a USENET newsgroup's +// posting by Rani Sharoni (comp.lang.c++.moderated, 2002-03-17 07:45:09 PST) + +# elif BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) + +// MSVC 7.1+ + +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ +template< typename T > struct BOOST_PP_CAT(trait,_wrapper_); \ +template< typename T > \ +boost::mpl::aux::yes_tag BOOST_PP_CAT(trait,_helper_)( \ + BOOST_PP_CAT(trait,_wrapper_)<T> const volatile* \ + , BOOST_PP_CAT(trait,_wrapper_)<BOOST_MSVC_TYPENAME T::name>* = 0 \ + ); \ +\ +boost::mpl::aux::no_tag BOOST_PP_CAT(trait,_helper_)(...); \ +\ +template< typename T, bool fallback_ = default_ > struct trait \ +{ \ + typedef BOOST_PP_CAT(trait,_wrapper_)<T> t_; \ + BOOST_STATIC_CONSTANT(bool, value = \ + sizeof((BOOST_PP_CAT(trait,_helper_))(static_cast<t_*>(0))) \ + == sizeof(boost::mpl::aux::yes_tag) \ + ); \ + typedef boost::mpl::bool_<value> type; \ +}; \ +/**/ + +# else // other SFINAE-capable compilers + +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ +template< typename T, bool fallback_ = default_ > struct trait \ +{ \ + struct gcc_3_2_wknd \ + { \ + template< typename U > \ + static boost::mpl::aux::yes_tag test( \ + boost::mpl::aux::type_wrapper<U> const volatile* \ + , boost::mpl::aux::type_wrapper<BOOST_MSVC_TYPENAME U::name>* = 0 \ + ); \ + \ + static boost::mpl::aux::no_tag test(...); \ + }; \ + \ + typedef boost::mpl::aux::type_wrapper<T> t_; \ + BOOST_STATIC_CONSTANT(bool, value = \ + sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) \ + == sizeof(boost::mpl::aux::yes_tag) \ + ); \ + typedef boost::mpl::bool_<value> type; \ +}; \ +/**/ + +# endif // BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + + +#else // BOOST_MPL_CFG_NO_HAS_XXX + +// placeholder implementation + +# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ +template< typename T, bool fallback_ = default_ > \ +struct trait \ +{ \ + BOOST_STATIC_CONSTANT(bool, value = fallback_); \ + typedef boost::mpl::bool_<fallback_> type; \ +}; \ +/**/ + +#endif + +#define BOOST_MPL_HAS_XXX_TRAIT_DEF(name) \ + BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(BOOST_PP_CAT(has_,name), name, false) \ +/**/ + +#endif // BOOST_MPL_HAS_XXX_HPP_INCLUDED diff --git a/include/boost/mpl/identity.hpp b/include/boost/mpl/identity.hpp index 442fe20..1eaa9a4 100644 --- a/include/boost/mpl/identity.hpp +++ b/include/boost/mpl/identity.hpp @@ -1,46 +1,45 @@ -//----------------------------------------------------------------------------- -// boost mpl/identity.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_IDENTITY_HPP_INCLUDED #define BOOST_MPL_IDENTITY_HPP_INCLUDED -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(T) > struct identity { typedef T type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,identity,(T)) + BOOST_MPL_AUX_LAMBDA_SUPPORT(1, identity, (T)) }; template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(T) > struct make_identity { typedef identity<T> type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,make_identity,(T)) + BOOST_MPL_AUX_LAMBDA_SUPPORT(1, make_identity, (T)) }; -BOOST_MPL_AUX_VOID_SPEC(1, identity) -BOOST_MPL_AUX_VOID_SPEC(1, make_identity) +BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, identity) +BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, make_identity) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_IDENTITY_HPP_INCLUDED diff --git a/include/boost/mpl/if.hpp b/include/boost/mpl/if.hpp index 477dd58..2b8d276 100644 --- a/include/boost/mpl/if.hpp +++ b/include/boost/mpl/if.hpp @@ -2,38 +2,30 @@ #ifndef BOOST_MPL_IF_HPP_INCLUDED #define BOOST_MPL_IF_HPP_INCLUDED -// + file: boost/mpl/if.hpp -// + last modified: 17/sep/03 - -// Copyright (c) 2000-03 Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/void.hpp" -#include "boost/mpl/aux_/value_wknd.hpp" -#include "boost/mpl/aux_/static_cast.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/mpl/aux_/config/workaround.hpp" -#include "boost/config.hpp" +// $Source$ +// $Date$ +// $Revision$ -#if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) -# include "boost/mpl/arg_fwd.hpp" -# include "boost/mpl/aux_/preprocessor/params.hpp" -# include "boost/mpl/aux_/preprocessor/default_params.hpp" -#endif +#include <boost/mpl/aux_/value_wknd.hpp> +#include <boost/mpl/aux_/static_cast.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> +#include <boost/mpl/aux_/config/bcc_integral_constants.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN - template< bool C , typename T1 @@ -54,16 +46,16 @@ struct if_c<false,T1,T2> }; template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(C) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(C) + , typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct if_ { private: // agurt, 02/jan/03: two-step 'type' definition for the sake of aCC typedef if_c< -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) +#if defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) BOOST_MPL_AUX_VALUE_WKND(C)::value #else BOOST_MPL_AUX_STATIC_CAST(bool, BOOST_MPL_AUX_VALUE_WKND(C)::value) @@ -118,15 +110,15 @@ struct if_c // (almost) copy & paste in order to save one more // recursively nested template instantiation to user template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(C_) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(C_) + , typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct if_ { - enum { msvc70_wknd_ = C_::value }; + enum { msvc_wknd_ = BOOST_MPL_AUX_MSVC_VALUE_WKND(C_)::value }; - typedef typename aux::if_impl< BOOST_MPL_AUX_STATIC_CAST(bool, msvc70_wknd_) > + typedef typename aux::if_impl< BOOST_MPL_AUX_STATIC_CAST(bool, msvc_wknd_) > ::template result_<T1,T2>::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(C_,T1,T2)) @@ -134,120 +126,8 @@ struct if_ #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END +BOOST_MPL_AUX_NA_SPEC(3, if_) -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(3, if_) - - -#if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) - -// Aleksey, check it out: lazy if_ evaluation in lambdas! -// I think this doesn't handle the case of -// -// _1<foo<_2>, bar<_2>, baz<_2> > -// -// (or however it is that you express that... when the ordinary bind3 -// computes the function based on the actual arguments). That leads me -// to think that some kind of true currying might be a better -// approach, e.g.: -// -// -// boost::mpl::bind3< -// boost::mpl::quote3<boost::mpl::if_> -// , boost::mpl::bind1<boost::mpl::quote1<boost::is_reference>, boost::mpl::arg<1> > -// , boost::mpl::arg<1> -// , boost::mpl::bind1<boost::mpl::quote1<add_ptr>, boost::mpl::arg<1> > -// >::apply<...> -// -// becomes: -// -// boost::mpl::bind< -// boost::mpl::quote3<boost::mpl::if_> -// >::bind< -// , boost::mpl::bind1<boost::mpl::quote1<boost::is_reference>, -// boost::mpl::arg<1> > -// >::bind< -// boost::mpl::arg<1> -// >::bind< -// boost::mpl::bind1<boost::mpl::quote1<add_ptr>, boost::mpl::arg<1> > -// >::apply<...> -// -// so that after the 2nd bind we have a different function depending -// on the result of is_reference. - -# define AUX_BIND_PARAMS(param) \ - BOOST_MPL_PP_PARAMS( \ - BOOST_MPL_METAFUNCTION_MAX_ARITY \ - , param \ - ) \ - /**/ - -# define AUX_BIND_DEFAULT_PARAMS(param, value) \ - BOOST_MPL_PP_DEFAULT_PARAMS( \ - BOOST_MPL_METAFUNCTION_MAX_ARITY \ - , param \ - , value \ - ) \ - /**/ - -template <class T1, class T2, class T3, class T4> struct bind3; -template <template <class T1, class T2, class T3> class F, class tag> struct quote3; - -namespace aux -{ - template < - typename T - , AUX_BIND_PARAMS(typename U) - > struct resolve_bind_arg; - - template< - typename T - , typename Arg - > - struct replace_unnamed_arg; -} - -template< - typename T1, typename T2, typename T3 - > -struct bind3<quote3<if_, void_>, T1, T2, T3> -{ - template< - AUX_BIND_DEFAULT_PARAMS(typename U, void_) - > - struct apply - { - private: - typedef quote3<if_, void_> a0; - typedef mpl::arg< 1> n1; - - typedef aux::replace_unnamed_arg< T1,n1 > r1; - typedef typename r1::type a1; - typedef typename r1::next_arg n2; - typedef typename aux::resolve_bind_arg< a1,AUX_BIND_PARAMS(U) >::type t1; - - typedef aux::replace_unnamed_arg< T2,n2 > r2; - typedef typename r2::type a2; - typedef typename r2::next_arg n3; - typedef typename aux::resolve_bind_arg< a2,AUX_BIND_PARAMS(U) > f2; - - typedef aux::replace_unnamed_arg< T3,n3 > r3; - typedef typename r3::type a3; - typedef typename r3::next_arg n4; - typedef typename aux::resolve_bind_arg< a3,AUX_BIND_PARAMS(U) > f3; - - typedef typename if_<t1,f2,f3>::type f_; - public: - typedef typename f_::type type; - }; -}; - -# undef AUX_BIND_PARAMS -# undef AUX_BIND_DEFAULT_PARAMS - -#endif // BOOST_MPL_NO_FULL_LAMBDA_SUPPORT - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_IF_HPP_INCLUDED diff --git a/include/boost/mpl/index_if.hpp b/include/boost/mpl/index_if.hpp index c167448..ee3d4cf 100644 --- a/include/boost/mpl/index_if.hpp +++ b/include/boost/mpl/index_if.hpp @@ -1,58 +1,48 @@ -//----------------------------------------------------------------------------- -// boost mpl/index_if.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2003 -// Eric Friedman -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_INDEX_IF_HPP_INCLUDED #define BOOST_MPL_INDEX_IF_HPP_INCLUDED -#include "boost/mpl/aux_/find_if_pred.hpp" -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/if.hpp" -#include "boost/mpl/int.hpp" -#include "boost/mpl/iter_fold_if.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/next.hpp" -#include "boost/mpl/protect.hpp" -#include "boost/mpl/void.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/type_traits/is_same.hpp" +// Copyright Eric Friedman 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN +#include <boost/mpl/aux_/find_if_pred.hpp> +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/iter_fold_if.hpp> +#include <boost/mpl/next.hpp> +#include <boost/mpl/void.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> +#include <boost/type_traits/is_same.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Predicate) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(Predicate) > struct index_if { -private: - - typedef typename lambda<Predicate>::type pred_; - typedef typename iter_fold_if< Sequence , int_<0> - , protect< next<> > - , protect< aux::find_if_pred<pred_> > + , next<> + , aux::find_if_pred<Predicate> >::type result_; typedef typename end<Sequence>::type not_found_; - typedef typename result_::first result_index_; - typedef typename result_::second result_iterator_; - -public: + typedef typename first<result_>::type result_index_; + typedef typename second<result_>::type result_iterator_; typedef typename if_< is_same< result_iterator_,not_found_ > @@ -61,14 +51,10 @@ public: >::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2,index_if,(Sequence,Predicate)) - }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END +BOOST_MPL_AUX_NA_SPEC(2, index_if) -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, index_if) - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_INDEX_IF_HPP_INCLUDED diff --git a/include/boost/mpl/index_of.hpp b/include/boost/mpl/index_of.hpp index 8dd534a..88c1670 100644 --- a/include/boost/mpl/index_of.hpp +++ b/include/boost/mpl/index_of.hpp @@ -1,31 +1,30 @@ -//----------------------------------------------------------------------------- -// boost mpl/index_of.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2003 -// Eric Friedman, Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_INDEX_OF_HPP_INCLUDED #define BOOST_MPL_INDEX_OF_HPP_INCLUDED -#include "boost/mpl/index_if.hpp" -#include "boost/mpl/same_as.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright Eric Friedman 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN +#include <boost/mpl/index_if.hpp> +#include <boost/mpl/same_as.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(T) > struct index_of : index_if< Sequence,same_as<T> > @@ -33,11 +32,8 @@ struct index_of BOOST_MPL_AUX_LAMBDA_SUPPORT(2,index_of,(Sequence,T)) }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END +BOOST_MPL_AUX_NA_SPEC(2, index_of) -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, index_of) - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_INDEX_OF_HPP_INCLUDED diff --git a/include/boost/mpl/inherit.hpp b/include/boost/mpl/inherit.hpp index bce0035..32939c3 100644 --- a/include/boost/mpl/inherit.hpp +++ b/include/boost/mpl/inherit.hpp @@ -1,14 +1,3 @@ -//----------------------------------------------------------------------------- -// boost mpl/inherit.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// 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) #if !defined(BOOST_PP_IS_ITERATING) @@ -17,33 +6,46 @@ #ifndef BOOST_MPL_INHERIT_HPP_INCLUDED #define BOOST_MPL_INHERIT_HPP_INCLUDED +// Copyright Aleksey Gurtovoy 2001-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/empty_base.hpp" -# include "boost/mpl/aux_/void_spec.hpp" -# include "boost/mpl/aux_/lambda_support.hpp" +# include <boost/mpl/empty_base.hpp> +# include <boost/mpl/aux_/na_spec.hpp> +# include <boost/mpl/aux_/lambda_support.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if 0 //!defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) - //&& !defined(BOOST_MPL_PREPROCESSING_MODE) +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER inherit.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" +# include <boost/mpl/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/aux_/preprocessor/params.hpp" -# include "boost/mpl/aux_/preprocessor/default_params.hpp" -# include "boost/mpl/limits/arity.hpp" +# include <boost/mpl/limits/arity.hpp> +# include <boost/mpl/aux_/preprocessor/params.hpp> +# include <boost/mpl/aux_/preprocessor/default_params.hpp> +# include <boost/mpl/aux_/preprocessor/enum.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# include <boost/mpl/aux_/config/dtp.hpp> -# include "boost/preprocessor/iterate.hpp" -# include "boost/preprocessor/dec.hpp" -# include "boost/preprocessor/cat.hpp" -# include "boost/config.hpp" +# include <boost/preprocessor/iterate.hpp> +# include <boost/preprocessor/dec.hpp> +# include <boost/preprocessor/cat.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { // 'inherit<T1,T2,..,Tn>' metafunction; returns an unspecified class type // produced by public derivation from all metafunction's parameters @@ -61,8 +63,8 @@ namespace mpl { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : T1, T2 @@ -140,8 +142,8 @@ struct inherit2_impl<true,true> } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : aux::inherit2_impl< @@ -155,70 +157,73 @@ struct inherit2 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -BOOST_MPL_AUX_VOID_SPEC(2, inherit2) +BOOST_MPL_AUX_NA_SPEC(2, inherit2) #define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(3, BOOST_MPL_METAFUNCTION_MAX_ARITY, "boost/mpl/inherit.hpp")) + (3,(3, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/inherit.hpp>)) #include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_INHERIT_HPP_INCLUDED ///// iteration #else -#define n BOOST_PP_FRAME_ITERATION(1) +#define n_ BOOST_PP_FRAME_ITERATION(1) template< - BOOST_MPL_PP_DEFAULT_PARAMS(n, typename T, void_) + BOOST_MPL_PP_DEFAULT_PARAMS(n_, typename T, na) > -struct BOOST_PP_CAT(inherit,n) +struct BOOST_PP_CAT(inherit,n_) : inherit2< - typename BOOST_PP_CAT(inherit,BOOST_PP_DEC(n))< - BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(n), T) + typename BOOST_PP_CAT(inherit,BOOST_PP_DEC(n_))< + BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(n_), T) >::type - , BOOST_PP_CAT(T,n) + , BOOST_PP_CAT(T,n_) > { BOOST_MPL_AUX_LAMBDA_SUPPORT( - n - , BOOST_PP_CAT(inherit,n) - , (BOOST_MPL_PP_PARAMS(n, T)) + n_ + , BOOST_PP_CAT(inherit,n_) + , (BOOST_MPL_PP_PARAMS(n_, T)) ) }; -BOOST_MPL_AUX_VOID_SPEC(n, BOOST_PP_CAT(inherit,n)) +BOOST_MPL_AUX_NA_SPEC(n_, BOOST_PP_CAT(inherit,n_)) -#if n == BOOST_MPL_METAFUNCTION_MAX_ARITY -//: primary template +#if n_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY +/// primary template template< - BOOST_MPL_PP_DEFAULT_PARAMS(n, typename T, empty_base) + BOOST_MPL_PP_DEFAULT_PARAMS(n_, typename T, empty_base) > struct inherit - : BOOST_PP_CAT(inherit,n)<BOOST_MPL_PP_PARAMS(n, T)> + : BOOST_PP_CAT(inherit,n_)<BOOST_MPL_PP_PARAMS(n_, T)> { }; -// 'void_' specialization +// 'na' specialization template<> -struct inherit< BOOST_MPL_AUX_VOID_SPEC_PARAMS(n) > +struct inherit< BOOST_MPL_PP_ENUM(5, na) > { template< - BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(0, typename T, empty_base) +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) + BOOST_MPL_PP_DEFAULT_PARAMS(n_, typename T, empty_base) +#else + BOOST_MPL_PP_PARAMS(n_, typename T) +#endif > struct apply - : inherit< BOOST_MPL_PP_PARAMS(n, T) > + : inherit< BOOST_MPL_PP_PARAMS(n_, T) > { }; }; -BOOST_MPL_AUX_VOID_SPEC_LAMBDA(n, inherit) -BOOST_MPL_AUX_VOID_SPEC_ARITY(n, inherit) -BOOST_MPL_AUX_VOID_SPEC_TEMPLATE_ARITY(n, n, inherit) +BOOST_MPL_AUX_NA_SPEC_LAMBDA(n_, inherit) +BOOST_MPL_AUX_NA_SPEC_ARITY(n_, inherit) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(n_, n_, inherit) #endif -#undef n +#undef n_ #endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/inherit_linearly.hpp b/include/boost/mpl/inherit_linearly.hpp index 2a35130..0259f88 100644 --- a/include/boost/mpl/inherit_linearly.hpp +++ b/include/boost/mpl/inherit_linearly.hpp @@ -1,29 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/inherit_linearly.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_INHERIT_FRONT_TO_BACK_HPP_INCLUDED #define BOOST_MPL_INHERIT_FRONT_TO_BACK_HPP_INCLUDED -#include "boost/mpl/fold.hpp" -#include "boost/mpl/empty_base.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// Copyright Aleksey Gurtovoy 2001-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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/fold.hpp> +#include <boost/mpl/empty_base.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Types_) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Node_) + typename BOOST_MPL_AUX_NA_PARAM(Types_) + , typename BOOST_MPL_AUX_NA_PARAM(Node_) , typename Root_ = empty_base > struct inherit_linearly @@ -32,9 +32,8 @@ struct inherit_linearly BOOST_MPL_AUX_LAMBDA_SUPPORT(3,inherit_linearly,(Types_,Node_,Root_)) }; -BOOST_MPL_AUX_VOID_SPEC(2, inherit_linearly) +BOOST_MPL_AUX_NA_SPEC(2, inherit_linearly) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_INHERIT_FRONT_TO_BACK_HPP_INCLUDED diff --git a/include/boost/mpl/insert.hpp b/include/boost/mpl/insert.hpp index ada023e..6d8f961 100644 --- a/include/boost/mpl/insert.hpp +++ b/include/boost/mpl/insert.hpp @@ -1,42 +1,41 @@ -//----------------------------------------------------------------------------- -// boost mpl/insert.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_INSERT_HPP_INCLUDED #define BOOST_MPL_INSERT_HPP_INCLUDED -#include "boost/mpl/insert_fwd.hpp" -#include "boost/mpl/aux_/insert_impl.hpp" -#include "boost/mpl/aux_/sequence_tag.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $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_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Pos_or_T) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + 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_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) > - ::template algorithm< Sequence,Pos_or_T,T > + : 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_VOID_SPEC(3, insert) +BOOST_MPL_AUX_NA_SPEC(3, insert) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_INSERT_HPP_INCLUDED diff --git a/include/boost/mpl/insert_fwd.hpp b/include/boost/mpl/insert_fwd.hpp index a8b3803..abb8655 100644 --- a/include/boost/mpl/insert_fwd.hpp +++ b/include/boost/mpl/insert_fwd.hpp @@ -2,25 +2,23 @@ #ifndef BOOST_MPL_INSERT_FWD_HPP_INCLUDED #define BOOST_MPL_INSERT_FWD_HPP_INCLUDED -// + file: boost/mpl/insert_fwd.hpp -// + last modified: 02/may/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -template< typename Tag > struct insert_traits; +namespace boost { namespace mpl { + +template< typename Tag > struct insert_impl; template< typename Sequence, typename Pos_or_T, typename T > struct insert; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_INSERT_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/insert_range.hpp b/include/boost/mpl/insert_range.hpp index cb04d03..a0bfbbb 100644 --- a/include/boost/mpl/insert_range.hpp +++ b/include/boost/mpl/insert_range.hpp @@ -1,42 +1,41 @@ -//----------------------------------------------------------------------------- -// boost mpl/insert_range.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_INSERT_RANGE_HPP_INCLUDED #define BOOST_MPL_INSERT_RANGE_HPP_INCLUDED -#include "boost/mpl/insert_range_fwd.hpp" -#include "boost/mpl/aux_/insert_range_impl.hpp" -#include "boost/mpl/aux_/sequence_tag.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $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_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Pos) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Range) + 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_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) > - ::template algorithm< Sequence,Pos,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_VOID_SPEC(3, insert_range) +BOOST_MPL_AUX_NA_SPEC(3, insert_range) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_INSERT_RANGE_HPP_INCLUDED diff --git a/include/boost/mpl/insert_range_fwd.hpp b/include/boost/mpl/insert_range_fwd.hpp index ab88b48..9c961d6 100644 --- a/include/boost/mpl/insert_range_fwd.hpp +++ b/include/boost/mpl/insert_range_fwd.hpp @@ -1,25 +1,24 @@ -//----------------------------------------------------------------------------- -// boost mpl/insert_range_fwd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED #define BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED -namespace boost { -namespace mpl { +// 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. -template< typename Tag > struct insert_range_traits; +// $Source$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct insert_range_impl; template< typename Sequence, typename Pos, typename Range > struct insert_range; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/inserter.hpp b/include/boost/mpl/inserter.hpp new file mode 100644 index 0000000..eff0c63 --- /dev/null +++ b/include/boost/mpl/inserter.hpp @@ -0,0 +1,32 @@ + +#ifndef BOOST_MPL_INSERTER_HPP_INCLUDED +#define BOOST_MPL_INSERTER_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$ + +namespace boost { namespace mpl { + +template< + typename Sequence + , typename Operation + > +struct inserter +{ + typedef Sequence state; + typedef Operation operation; +}; + +}} + +#endif // BOOST_MPL_INSERTER_HPP_INCLUDED diff --git a/include/boost/mpl/int.hpp b/include/boost/mpl/int.hpp index 23d1929..e6d9934 100644 --- a/include/boost/mpl/int.hpp +++ b/include/boost/mpl/int.hpp @@ -2,21 +2,21 @@ #ifndef BOOST_MPL_INT_HPP_INCLUDED #define BOOST_MPL_INT_HPP_INCLUDED -// + file: boost/mpl/int.hpp -// + last modified: 27/jan/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/int_fwd.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/int_fwd.hpp> #define AUX_WRAPPER_VALUE_TYPE int -#include "boost/mpl/aux_/integral_wrapper.hpp" +#include <boost/mpl/aux_/integral_wrapper.hpp> #endif // BOOST_MPL_INT_HPP_INCLUDED diff --git a/include/boost/mpl/int_fwd.hpp b/include/boost/mpl/int_fwd.hpp index 0cbddc5..738ae16 100644 --- a/include/boost/mpl/int_fwd.hpp +++ b/include/boost/mpl/int_fwd.hpp @@ -2,20 +2,26 @@ #ifndef BOOST_MPL_INT_FWD_HPP_INCLUDED #define BOOST_MPL_INT_FWD_HPP_INCLUDED -// + file: boost/mpl/int_fwd.hpp -// + last modified: 08/mar/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -namespace boost { namespace mpl { -template< int N > struct int_; -}} +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/adl_barrier.hpp> +#include <boost/mpl/aux_/nttp_decl.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct int_; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(int_) #endif // BOOST_MPL_INT_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/integral_c.hpp b/include/boost/mpl/integral_c.hpp index 07c901a..3ae5cc6 100644 --- a/include/boost/mpl/integral_c.hpp +++ b/include/boost/mpl/integral_c.hpp @@ -2,22 +2,22 @@ #ifndef BOOST_MPL_INTEGRAL_C_HPP_INCLUDED #define BOOST_MPL_INTEGRAL_C_HPP_INCLUDED -// + file: boost/mpl/integral_c.hpp -// + last modified: 08/mar/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/integral_c_fwd.hpp" -#include "boost/mpl/aux_/ice_cast.hpp" -#include "boost/mpl/aux_/config/ctps.hpp" -#include "boost/mpl/aux_/config/workaround.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/integral_c_fwd.hpp> +#include <boost/mpl/aux_/ice_cast.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> #if BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(53800)) // the type of non-type template arguments may not depend on template arguments @@ -29,12 +29,12 @@ #define AUX_WRAPPER_NAME integral_c #define AUX_WRAPPER_VALUE_TYPE T #define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< T, value > -#include "boost/mpl/aux_/integral_wrapper.hpp" +#include <boost/mpl/aux_/integral_wrapper.hpp> #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x551) -namespace boost { namespace mpl { +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN // 'bool' constant doesn't have 'next'/'prior' members template< bool C > struct integral_c<bool, C> @@ -43,7 +43,7 @@ struct integral_c<bool, C> typedef integral_c type; operator bool() const { return this->value; } }; -}} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE #endif #endif // BOOST_MPL_INTEGRAL_C_HPP_INCLUDED diff --git a/include/boost/mpl/integral_c_fwd.hpp b/include/boost/mpl/integral_c_fwd.hpp index 31e5914..4a60062 100644 --- a/include/boost/mpl/integral_c_fwd.hpp +++ b/include/boost/mpl/integral_c_fwd.hpp @@ -2,27 +2,30 @@ #ifndef BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED #define BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED -// + file: boost/mpl/integral_c_fwd.hpp -// + last modified: 08/mar/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/aux_/config/workaround.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/workaround.hpp> +#include <boost/mpl/aux_/adl_barrier.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN -namespace boost { namespace mpl { #if BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(53800)) // the type of non-type template arguments may not depend on template arguments template< typename T, long N > struct integral_c; #else template< typename T, T N > struct integral_c; #endif -}} + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE #endif // BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/integral_c_tag.hpp b/include/boost/mpl/integral_c_tag.hpp new file mode 100644 index 0000000..7054647 --- /dev/null +++ b/include/boost/mpl/integral_c_tag.hpp @@ -0,0 +1,25 @@ + +#ifndef BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED +#define BOOST_MPL_INTEGRAL_C_TAG_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/aux_/adl_barrier.hpp> +#include <boost/mpl/aux_/config/static_constant.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +struct integral_c_tag { BOOST_STATIC_CONSTANT(int, value = 0); }; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +#endif // BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED diff --git a/include/boost/mpl/is_placeholder.hpp b/include/boost/mpl/is_placeholder.hpp index 1dbb439..213de70 100644 --- a/include/boost/mpl/is_placeholder.hpp +++ b/include/boost/mpl/is_placeholder.hpp @@ -1,23 +1,25 @@ -//----------------------------------------------------------------------------- -// boost mpl/is_placeholder.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED #define BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED -#include "boost/mpl/arg_fwd.hpp" -#include "boost/mpl/bool.hpp" -#include "boost/mpl/aux_/yes_no.hpp" -#include "boost/mpl/aux_/config/ctps.hpp" -#include "boost/mpl/aux_/config/nttp.hpp" +// Copyright Aleksey Gurtovoy 2001-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/arg_fwd.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/aux_/yes_no.hpp> +#include <boost/mpl/aux_/type_wrapper.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> +#include <boost/mpl/aux_/nttp_decl.hpp> namespace boost { namespace mpl { @@ -42,20 +44,23 @@ namespace aux { aux::no_tag is_placeholder_helper(...); template< BOOST_MPL_AUX_NTTP_DECL(int, N) > -aux::yes_tag is_placeholder_helper(arg<N>*); +aux::yes_tag is_placeholder_helper(aux::type_wrapper< arg<N> >*); } // namespace aux template< typename T > struct is_placeholder { + static aux::type_wrapper<T>* get(); BOOST_STATIC_CONSTANT(bool, value = - sizeof(aux::is_placeholder_helper(static_cast<T*>(0))) == sizeof(aux::yes_tag) - ); + sizeof(aux::is_placeholder_helper(get())) == sizeof(aux::yes_tag) + ); + + typedef bool_<value> type; }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -}} // namespace boost::mpl +}} #endif // BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED diff --git a/include/boost/mpl/is_sequence.hpp b/include/boost/mpl/is_sequence.hpp index 7f1e00f..e96b060 100644 --- a/include/boost/mpl/is_sequence.hpp +++ b/include/boost/mpl/is_sequence.hpp @@ -1,35 +1,41 @@ -//----------------------------------------------------------------------------- -// boost mpl/is_sequence.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED #define BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED -#include "boost/mpl/not.hpp" -#include "boost/mpl/and.hpp" -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/if.hpp" -#include "boost/mpl/bool.hpp" -#include "boost/mpl/sequence_tag_fwd.hpp" -#include "boost/mpl/identity.hpp" -#include "boost/mpl/void.hpp" -#include "boost/mpl/aux_/has_tag.hpp" -#include "boost/mpl/aux_/has_begin.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/mpl/aux_/config/eti.hpp" -#include "boost/mpl/aux_/config/workaround.hpp" +// 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. -#include "boost/type_traits/is_same.hpp" -#include "boost/type_traits/is_class.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/not.hpp> +#include <boost/mpl/and.hpp> +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/sequence_tag_fwd.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/void.hpp> +#include <boost/mpl/aux_/has_tag.hpp> +#include <boost/mpl/aux_/has_begin.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> +#include <boost/mpl/aux_/config/eti.hpp> +#include <boost/mpl/aux_/config/msvc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200) +# include <boost/mpl/aux_/msvc_is_class.hpp> +#elif BOOST_WORKAROUND(BOOST_MSVC, == 1300) +# include <boost/type_traits/is_class.hpp> +#endif + +#include <boost/type_traits/is_same.hpp> namespace boost { namespace mpl { @@ -53,22 +59,26 @@ template< typename T > struct is_sequence_impl } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(T) > struct is_sequence : if_< +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200) + aux::msvc_is_class<T> +#else boost::is_class<T> +#endif , aux::is_sequence_impl<T> , bool_<false> >::type { - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_sequence,(T)) + BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T)) }; -#elif defined(BOOST_MPL_NO_AUX_HAS_XXX) +#elif defined(BOOST_MPL_CFG_NO_HAS_XXX) template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(T) > struct is_sequence : bool_<false> @@ -78,25 +88,25 @@ struct is_sequence #else template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(T) > struct is_sequence : not_< is_same< typename begin<T>::type, void_ > > { - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_sequence,(T)) + BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T)) }; #endif // BOOST_MSVC -#if defined(BOOST_MPL_MSVC_60_ETI_BUG) +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) template<> struct is_sequence<int> : bool_<false> { }; #endif -BOOST_MPL_AUX_VOID_SPEC(1, is_sequence) +BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, is_sequence) -}} // namespace boost::mpl +}} #endif // BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED diff --git a/include/boost/mpl/iter_fold.hpp b/include/boost/mpl/iter_fold.hpp index 5d13153..089f4aa 100644 --- a/include/boost/mpl/iter_fold.hpp +++ b/include/boost/mpl/iter_fold.hpp @@ -1,32 +1,33 @@ -//----------------------------------------------------------------------------- -// boost mpl/iter_fold.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy, David Abrahams -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_ITER_FOLD_HPP_INCLUDED #define BOOST_MPL_ITER_FOLD_HPP_INCLUDED -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/O1_size.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/aux_/iter_fold_impl.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/O1_size.hpp> +#include <boost/mpl/lambda.hpp> +#include <boost/mpl/aux_/iter_fold_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_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(State) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(ForwardOp) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(State) + , typename BOOST_MPL_AUX_NA_PARAM(ForwardOp) > struct iter_fold { @@ -41,9 +42,8 @@ struct iter_fold BOOST_MPL_AUX_LAMBDA_SUPPORT(3,iter_fold,(Sequence,State,ForwardOp)) }; -BOOST_MPL_AUX_VOID_SPEC(3, iter_fold) +BOOST_MPL_AUX_NA_SPEC(3, iter_fold) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_ITER_FOLD_HPP_INCLUDED diff --git a/include/boost/mpl/iter_fold_backward.hpp b/include/boost/mpl/iter_fold_backward.hpp deleted file mode 100644 index 34c7598..0000000 --- a/include/boost/mpl/iter_fold_backward.hpp +++ /dev/null @@ -1,56 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/iter_fold_backward.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy, David Abrahams -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_ITER_FOLD_BACKWARD_HPP_INCLUDED -#define BOOST_MPL_ITER_FOLD_BACKWARD_HPP_INCLUDED - -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/O1_size.hpp" -#include "boost/mpl/arg.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/aux_/iter_fold_backward_impl.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" - -namespace boost { -namespace mpl { - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(State) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(BackwardOp) - , typename ForwardOp = arg<1> - > -struct iter_fold_backward -{ - typedef typename aux::iter_fold_backward_impl< - ::boost::mpl::O1_size<Sequence>::value - , typename begin<Sequence>::type - , typename end<Sequence>::type - , State - , typename lambda<BackwardOp>::type - , typename lambda<ForwardOp>::type - >::state type; - - BOOST_MPL_AUX_LAMBDA_SUPPORT( - 4 - , iter_fold_backward - , (Sequence,State,BackwardOp,ForwardOp) - ) -}; - -BOOST_MPL_AUX_VOID_SPEC(3, iter_fold_backward) - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_ITER_FOLD_BACKWARD_HPP_INCLUDED diff --git a/include/boost/mpl/iter_fold_if.hpp b/include/boost/mpl/iter_fold_if.hpp index 066cbc7..2b997a9 100644 --- a/include/boost/mpl/iter_fold_if.hpp +++ b/include/boost/mpl/iter_fold_if.hpp @@ -1,77 +1,79 @@ -//----------------------------------------------------------------------------- -// boost mpl/iter_fold_if.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2003 -// Eric Friedman, Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED #define BOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED -#include "boost/mpl/aux_/config/workaround.hpp" -#include "boost/mpl/aux_/iter_fold_if_impl.hpp" -#include "boost/mpl/and.hpp" -#include "boost/mpl/always.hpp" -#include "boost/mpl/apply.hpp" -#include "boost/mpl/apply_if.hpp" -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/bool.hpp" -#include "boost/mpl/if.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/not.hpp" -#include "boost/mpl/pair.hpp" -#include "boost/mpl/void.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/type_traits/is_same.hpp" +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright Eric Friedman 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/logical.hpp> +#include <boost/mpl/always.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/pair.hpp> +#include <boost/mpl/apply.hpp> +#include <boost/mpl/aux_/iter_fold_if_impl.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> +#include <boost/mpl/aux_/config/forwarding.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +#include <boost/type_traits/is_same.hpp> + +namespace boost { namespace mpl { namespace aux { template< typename Predicate, typename LastIterator > struct iter_fold_if_pred { - template< typename State, typename Iterator > - struct apply + template< typename State, typename Iterator > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) + : and_< + not_< is_same<Iterator,LastIterator> > + , apply1<Predicate,Iterator> + > + { +#else { typedef and_< not_< is_same<Iterator,LastIterator> > , apply1<Predicate,Iterator> > type; +#endif }; }; } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(State) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(ForwardOp) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(ForwardPredicate) - , typename BackwardOp = void_ - , typename BackwardPredicate = void_ + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(State) + , typename BOOST_MPL_AUX_NA_PARAM(ForwardOp) + , typename BOOST_MPL_AUX_NA_PARAM(ForwardPredicate) + , typename BOOST_MPL_AUX_NA_PARAM(BackwardOp) + , typename BOOST_MPL_AUX_NA_PARAM(BackwardPredicate) > struct iter_fold_if { -private: typedef typename begin<Sequence>::type first_; typedef typename end<Sequence>::type last_; - typedef typename lambda<ForwardOp>::type forward_op_; - typedef typename lambda<ForwardPredicate>::type forward_pred_; - typedef typename lambda<BackwardOp>::type backward_op_; - typedef typename apply_if< - is_void_<BackwardPredicate> - , if_< is_void_<BackwardOp>, always<false_>, always<true_> > - , lambda<BackwardPredicate> + typedef typename eval_if< + is_na<BackwardPredicate> + , if_< is_na<BackwardOp>, always<false_>, always<true_> > + , identity<BackwardPredicate> >::type backward_pred_; // cwpro8 doesn't like 'cut-off' type here (use typedef instead) @@ -83,9 +85,9 @@ private: aux::iter_fold_if_impl< first_ , State - , forward_op_ - , aux::iter_fold_if_pred< forward_pred_,last_ > - , backward_op_ + , ForwardOp + , protect< aux::iter_fold_if_pred< ForwardPredicate,last_ > > + , BackwardOp , backward_pred_ > #if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) && !BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) @@ -108,9 +110,8 @@ public: ) }; -BOOST_MPL_AUX_VOID_SPEC(4, iter_fold_if) +BOOST_MPL_AUX_NA_SPEC(6, iter_fold_if) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED diff --git a/include/boost/mpl/iterator_category.hpp b/include/boost/mpl/iterator_category.hpp index aef1cc2..96574e9 100644 --- a/include/boost/mpl/iterator_category.hpp +++ b/include/boost/mpl/iterator_category.hpp @@ -1,27 +1,26 @@ -//----------------------------------------------------------------------------- -// boost mpl/iterator_category.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_ITERATOR_CATEGORY_HPP_INCLUDED #define BOOST_MPL_ITERATOR_CATEGORY_HPP_INCLUDED -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/mpl/aux_/config/eti.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Iterator) + typename BOOST_MPL_AUX_NA_PARAM(Iterator) > struct iterator_category { @@ -29,16 +28,8 @@ struct iterator_category BOOST_MPL_AUX_LAMBDA_SUPPORT(1,iterator_category,(Iterator)) }; -#if defined(BOOST_MPL_MSVC_60_ETI_BUG) -template<> struct iterator_category<int> -{ - typedef int type; -}; -#endif +BOOST_MPL_AUX_NA_SPEC(1, iterator_category) -BOOST_MPL_AUX_VOID_SPEC(1, iterator_category) - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_ITERATOR_CATEGORY_HPP_INCLUDED diff --git a/include/boost/mpl/iterator_range.hpp b/include/boost/mpl/iterator_range.hpp index a68e796..f96ae5c 100644 --- a/include/boost/mpl/iterator_range.hpp +++ b/include/boost/mpl/iterator_range.hpp @@ -1,29 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/iterator_range.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED #define BOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// Copyright Aleksey Gurtovoy 2001-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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { struct iterator_range_tag; template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(First) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Last) + typename BOOST_MPL_AUX_NA_PARAM(First) + , typename BOOST_MPL_AUX_NA_PARAM(Last) > struct iterator_range { @@ -35,9 +35,8 @@ struct iterator_range BOOST_MPL_AUX_LAMBDA_SUPPORT(2,iterator_range,(First,Last)) }; -BOOST_MPL_AUX_VOID_SPEC(2, iterator_range) +BOOST_MPL_AUX_NA_SPEC(2, iterator_range) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED diff --git a/include/boost/mpl/iterator_tag.hpp b/include/boost/mpl/iterator_tag.hpp deleted file mode 100644 index 0c074c7..0000000 --- a/include/boost/mpl/iterator_tag.hpp +++ /dev/null @@ -1,32 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/iterator_tag.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED -#define BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED - -namespace boost { -namespace mpl { - -struct input_iter_tag_; -struct fwd_iter_tag_; -struct bi_iter_tag_; -struct ra_iter_tag_; - -typedef input_iter_tag_ input_iterator_tag; -typedef fwd_iter_tag_ forward_iterator_tag; -typedef bi_iter_tag_ bidirectional_iterator_tag; -typedef ra_iter_tag_ random_access_iterator_tag; - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED diff --git a/include/boost/mpl/iterator_tags.hpp b/include/boost/mpl/iterator_tags.hpp new file mode 100644 index 0000000..0eff663 --- /dev/null +++ b/include/boost/mpl/iterator_tags.hpp @@ -0,0 +1,27 @@ + +#ifndef BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED +#define BOOST_MPL_ITERATOR_TAG_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$ + +#include <boost/mpl/int.hpp> + +namespace boost { namespace mpl { + +struct forward_iterator_tag : int_<0> {}; +struct bidirectional_iterator_tag : int_<1> {}; +struct random_access_iterator_tag : int_<2> {}; + +}} + +#endif // BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED diff --git a/include/boost/mpl/joint_view.hpp b/include/boost/mpl/joint_view.hpp index 151b667..b5d7f67 100644 --- a/include/boost/mpl/joint_view.hpp +++ b/include/boost/mpl/joint_view.hpp @@ -2,35 +2,34 @@ #ifndef BOOST_MPL_JOINT_VIEW_HPP_INCLUDED #define BOOST_MPL_JOINT_VIEW_HPP_INCLUDED -// + file: boost/mpl/joint_view.hpp -// + last modified: 25/may/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#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_/void_spec.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { +#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_traits< aux::joint_view_tag > +struct size_impl< aux::joint_view_tag > { - template < typename JointView > struct algorithm + template < typename JointView > struct apply : plus< size<typename JointView::sequence1_> , size<typename JointView::sequence2_> @@ -39,8 +38,8 @@ struct size_traits< aux::joint_view_tag > }; template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence1_) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence2_) + typename BOOST_MPL_AUX_NA_PARAM(Sequence1_) + , typename BOOST_MPL_AUX_NA_PARAM(Sequence2_) > struct joint_view { @@ -49,19 +48,18 @@ struct joint_view typedef typename begin<Sequence2_>::type first2_; typedef typename end<Sequence2_>::type last2_; - public: // 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 typename aux::joint_iter<first1_,last1_,first2_> begin; typedef typename aux::joint_iter<last1_,last1_,last2_> end; }; -BOOST_MPL_AUX_VOID_SPEC(2, joint_view) +BOOST_MPL_AUX_NA_SPEC(2, joint_view) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_JOINT_VIEW_HPP_INCLUDED diff --git a/include/boost/mpl/key_type.hpp b/include/boost/mpl/key_type.hpp new file mode 100644 index 0000000..252515e --- /dev/null +++ b/include/boost/mpl/key_type.hpp @@ -0,0 +1,40 @@ + +#ifndef BOOST_MPL_KEY_TYPE_HPP_INCLUDED +#define BOOST_MPL_KEY_TYPE_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/key_type_fwd.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(AssociativeSequence) + , typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct key_type + : key_type_impl< typename sequence_tag<AssociativeSequence>::type > + ::template apply<AssociativeSequence,T> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,key_type,(AssociativeSequence,T)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, key_type) + +}} + +#endif // BOOST_MPL_KEY_TYPE_HPP_INCLUDED diff --git a/include/boost/mpl/key_type_fwd.hpp b/include/boost/mpl/key_type_fwd.hpp new file mode 100644 index 0000000..bde019b --- /dev/null +++ b/include/boost/mpl/key_type_fwd.hpp @@ -0,0 +1,25 @@ + +#ifndef BOOST_MPL_KEY_TYPE_FWD_HPP_INCLUDED +#define BOOST_MPL_KEY_TYPE_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct key_type_impl; +template< typename AssociativeSequence, typename T > struct key_type; + +}} + +#endif // BOOST_MPL_KEY_TYPE_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/lambda.hpp b/include/boost/mpl/lambda.hpp index 9e97813..52df0b4 100644 --- a/include/boost/mpl/lambda.hpp +++ b/include/boost/mpl/lambda.hpp @@ -1,24 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/lambda.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LAMBDA_HPP_INCLUDED #define BOOST_MPL_LAMBDA_HPP_INCLUDED -#include "boost/mpl/aux_/config/lambda.hpp" +// Copyright Aleksey Gurtovoy 2001-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. -#if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) -# include "boost/mpl/aux_/full_lambda.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/lambda_fwd.hpp> +#include <boost/mpl/bind.hpp> +#include <boost/mpl/aux_/config/lambda.hpp> + +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +# include <boost/mpl/aux_/full_lambda.hpp> #else -# include "boost/mpl/aux_/lambda_no_ctps.hpp" +# include <boost/mpl/aux_/lambda_no_ctps.hpp> +# include <boost/mpl/aux_/lambda_support.hpp> +# define BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS #endif #endif // BOOST_MPL_LAMBDA_HPP_INCLUDED diff --git a/include/boost/mpl/lambda_fwd.hpp b/include/boost/mpl/lambda_fwd.hpp index ae0fcd0..78a72d9 100644 --- a/include/boost/mpl/lambda_fwd.hpp +++ b/include/boost/mpl/lambda_fwd.hpp @@ -2,45 +2,56 @@ #ifndef BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED #define BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED -// + file: boost/mpl/labmda_fwd.hpp -// + last modified: 02/aug/03 - -// Copyright (c) 2001-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2001-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/aux_/lambda_arity_param.hpp" -#include "boost/mpl/aux_/config/lambda.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { +#include <boost/mpl/void_fwd.hpp> +#include <boost/mpl/aux_/na.hpp> +#include <boost/mpl/aux_/config/lambda.hpp> -#if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) + +# include <boost/mpl/int.hpp> +# include <boost/mpl/aux_/lambda_arity_param.hpp> +# include <boost/mpl/aux_/template_arity_fwd.hpp> + +namespace boost { namespace mpl { template< - typename T - , typename Tag - BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(typename Arity) + typename T = na + , typename Tag = void_ + BOOST_MPL_AUX_LAMBDA_ARITY_PARAM( + typename Arity = int_< aux::template_arity<T>::value > + ) > struct lambda; -#else +}} + +#else // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + +# include <boost/mpl/bool.hpp> + +namespace boost { namespace mpl { template< - typename T - , typename Tag - , bool Protect + typename T = na + , typename Tag = void_ + , typename Protect = true_ > struct lambda; +}} + #endif -} // namespace mpl -} // namespace boost - #endif // BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/lambda_helper.hpp b/include/boost/mpl/lambda_helper.hpp deleted file mode 100644 index 11a3232..0000000 --- a/include/boost/mpl/lambda_helper.hpp +++ /dev/null @@ -1,82 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/lambda_helper.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// 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) - -#if !defined(BOOST_PP_IS_ITERATING) - -///// header body - -#ifndef BOOST_MPL_LAMBDA_HELPER_HPP_INCLUDED -#define BOOST_MPL_LAMBDA_HELPER_HPP_INCLUDED - -#include "boost/config.hpp" -#include "boost/mpl/aux_/config/use_preprocessed.hpp" - -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \ - !defined(BOOST_MPL_PREPROCESSING_MODE) - -# define BOOST_MPL_PREPROCESSED_HEADER lambda_helper.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" - -#else - -# include "boost/mpl/limits/arity.hpp" -# include "boost/mpl/aux_/preprocessor/params.hpp" -# include "boost/mpl/aux_/preprocessor/repeat.hpp" - -# include "boost/preprocessor/iterate.hpp" -# include "boost/preprocessor/inc.hpp" -# include "boost/preprocessor/cat.hpp" - -namespace boost { -namespace mpl { - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (1,BOOST_MPL_METAFUNCTION_MAX_ARITY, "boost/mpl/lambda_helper.hpp")) -#include BOOST_PP_ITERATE() - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS -#endif // BOOST_MPL_LAMBDA_HELPER_HPP_INCLUDED - -///// iteration - -#else -#define i BOOST_PP_FRAME_ITERATION(1) - -#define MPL_AUX_ARG_TYPEDEF(unused, i, T) \ - typedef BOOST_PP_CAT(T, BOOST_PP_INC(i)) \ - BOOST_PP_CAT(arg, BOOST_PP_INC(i)); \ -/**/ - -template< - template< BOOST_MPL_PP_PARAMS(i, typename P) > class F - , BOOST_MPL_PP_PARAMS(i, typename T) - > -struct BOOST_PP_CAT(lambda_helper,i) -{ - struct rebind - { - BOOST_STATIC_CONSTANT(int, arity = i); - BOOST_MPL_PP_REPEAT(i, MPL_AUX_ARG_TYPEDEF, T) - template< BOOST_MPL_PP_PARAMS(i, typename U) > struct apply - : F<BOOST_MPL_PP_PARAMS(i,U)> - { - }; - }; -}; - -#undef MPL_AUX_ARG_TYPEDEF - -#undef i -#endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/less.hpp b/include/boost/mpl/less.hpp index 179c3d1..bbe1c6a 100644 --- a/include/boost/mpl/less.hpp +++ b/include/boost/mpl/less.hpp @@ -2,11 +2,11 @@ #ifndef BOOST_MPL_LESS_HPP_INCLUDED #define BOOST_MPL_LESS_HPP_INCLUDED -// Copyright (c) 2000-03 Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. @@ -14,59 +14,8 @@ // $Date$ // $Revision$ -#include "boost/mpl/bool.hpp" -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/aux_/value_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/config.hpp" - -namespace boost { -namespace mpl { - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) - > -struct less -{ - enum - { - msvc71_wknd_ = ( BOOST_MPL_AUX_VALUE_WKND(T2)::value - > BOOST_MPL_AUX_VALUE_WKND(T1)::value ) - }; - - BOOST_STATIC_CONSTANT(bool, value = msvc71_wknd_); - -#if !defined(__BORLANDC__) - typedef bool_<value> type; -#else - typedef bool_<( - (BOOST_MPL_AUX_VALUE_WKND(T1)::value) - < (BOOST_MPL_AUX_VALUE_WKND(T2)::value) - )> type; -#endif - - BOOST_MPL_AUX_LAMBDA_SUPPORT(2,less,(T1,T2)) -}; - -BOOST_MPL_AUX_VOID_SPEC(2, less) - -template< long N > -struct lt -{ - template< typename T > struct apply -#if !defined(__BORLANDC__) - : less< T,integral_c<long,N> > - { -#else - { - typedef typename less< T,integral_c<long,N> >::type type; -#endif - }; -}; - -} // namespace mpl -} // namespace boost +#define AUX778076_OP_NAME less +#define AUX778076_OP_TOKEN < +#include <boost/mpl/aux_/comparison_op.hpp> #endif // BOOST_MPL_LESS_HPP_INCLUDED diff --git a/include/boost/mpl/less_equal.hpp b/include/boost/mpl/less_equal.hpp index 6ecebbc..5d2aba4 100644 --- a/include/boost/mpl/less_equal.hpp +++ b/include/boost/mpl/less_equal.hpp @@ -2,11 +2,11 @@ #ifndef BOOST_MPL_LESS_EQUAL_HPP_INCLUDED #define BOOST_MPL_LESS_EQUAL_HPP_INCLUDED -// Copyright (c) 2000-03 Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. @@ -14,59 +14,8 @@ // $Date$ // $Revision$ -#include "boost/mpl/bool.hpp" -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/aux_/value_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/config.hpp" - -namespace boost { -namespace mpl { - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) - > -struct less_equal -{ - enum - { - msvc71_wknd_ = ( BOOST_MPL_AUX_VALUE_WKND(T1)::value - <= BOOST_MPL_AUX_VALUE_WKND(T2)::value ) - }; - - BOOST_STATIC_CONSTANT(bool, value = msvc71_wknd_); - -#if !defined(__BORLANDC__) - typedef bool_<value> type; -#else - typedef bool_<( - BOOST_MPL_AUX_VALUE_WKND(T1)::value - <= BOOST_MPL_AUX_VALUE_WKND(T2)::value - )> type; -#endif - - BOOST_MPL_AUX_LAMBDA_SUPPORT(2,less_equal,(T1,T2)) -}; - -BOOST_MPL_AUX_VOID_SPEC(2, less_equal) - -template< long N > -struct le -{ - template< typename T > struct apply -#if !defined(__BORLANDC__) - : less_equal< T,integral_c<long,N> > - { -#else - { - typedef typename less_equal< T,integral_c<long,N> >::type type; -#endif - }; -}; - -} // namespace mpl -} // namespace boost +#define AUX778076_OP_NAME less_equal +#define AUX778076_OP_TOKEN <= +#include <boost/mpl/aux_/comparison_op.hpp> #endif // BOOST_MPL_LESS_EQUAL_HPP_INCLUDED diff --git a/include/boost/mpl/limits/arity.hpp b/include/boost/mpl/limits/arity.hpp index 5503c32..9e03307 100644 --- a/include/boost/mpl/limits/arity.hpp +++ b/include/boost/mpl/limits/arity.hpp @@ -1,20 +1,21 @@ -//----------------------------------------------------------------------------- -// boost mpl/limits/arity.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED #define BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED -#if !defined(BOOST_MPL_METAFUNCTION_MAX_ARITY) -# define BOOST_MPL_METAFUNCTION_MAX_ARITY 5 +// 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_LIMIT_METAFUNCTION_ARITY) +# define BOOST_MPL_LIMIT_METAFUNCTION_ARITY 5 #endif #endif // BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED diff --git a/include/boost/mpl/limits/list.hpp b/include/boost/mpl/limits/list.hpp index c5fae78..5361a94 100644 --- a/include/boost/mpl/limits/list.hpp +++ b/include/boost/mpl/limits/list.hpp @@ -1,20 +1,21 @@ -//----------------------------------------------------------------------------- -// boost mpl/limits/list.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIMITS_LIST_HPP_INCLUDED #define BOOST_MPL_LIMITS_LIST_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_LIMIT_LIST_SIZE) -# define BOOST_MPL_LIMIT_LIST_SIZE 10 +# define BOOST_MPL_LIMIT_LIST_SIZE 20 #endif #endif // BOOST_MPL_LIMITS_LIST_HPP_INCLUDED diff --git a/include/boost/mpl/limits/map.hpp b/include/boost/mpl/limits/map.hpp new file mode 100644 index 0000000..9fe9a9c --- /dev/null +++ b/include/boost/mpl/limits/map.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_LIMITS_MAP_HPP_INCLUDED +#define BOOST_MPL_LIMITS_MAP_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_LIMIT_MAP_SIZE) +# define BOOST_MPL_LIMIT_MAP_SIZE 20 +#endif + +#endif // BOOST_MPL_LIMITS_MAP_HPP_INCLUDED diff --git a/include/boost/mpl/limits/set.hpp b/include/boost/mpl/limits/set.hpp new file mode 100644 index 0000000..526f392 --- /dev/null +++ b/include/boost/mpl/limits/set.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_LIMITS_SET_HPP_INCLUDED +#define BOOST_MPL_LIMITS_SET_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_LIMIT_SET_SIZE) +# define BOOST_MPL_LIMIT_SET_SIZE 20 +#endif + +#endif // BOOST_MPL_LIMITS_SET_HPP_INCLUDED diff --git a/include/boost/mpl/limits/unrolling.hpp b/include/boost/mpl/limits/unrolling.hpp index 435995c..70c8f0c 100644 --- a/include/boost/mpl/limits/unrolling.hpp +++ b/include/boost/mpl/limits/unrolling.hpp @@ -1,20 +1,21 @@ -//----------------------------------------------------------------------------- -// boost mpl/limits/unrolling.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIMITS_UNROLLING_HPP_INCLUDED #define BOOST_MPL_LIMITS_UNROLLING_HPP_INCLUDED -#if !defined(BOOST_MPL_UNROLLING_LIMIT) -# define BOOST_MPL_UNROLLING_LIMIT 4 +// 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_LIMIT_UNROLLING) +# define BOOST_MPL_LIMIT_UNROLLING 4 #endif #endif // BOOST_MPL_LIMITS_UNROLLING_HPP_INCLUDED diff --git a/include/boost/mpl/limits/vector.hpp b/include/boost/mpl/limits/vector.hpp index fda7d6b..f705403 100644 --- a/include/boost/mpl/limits/vector.hpp +++ b/include/boost/mpl/limits/vector.hpp @@ -1,20 +1,21 @@ -//----------------------------------------------------------------------------- -// boost mpl/limits/vector.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIMITS_VECTOR_HPP_INCLUDED #define BOOST_MPL_LIMITS_VECTOR_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_LIMIT_VECTOR_SIZE) -# define BOOST_MPL_LIMIT_VECTOR_SIZE 10 +# define BOOST_MPL_LIMIT_VECTOR_SIZE 20 #endif #endif // BOOST_MPL_LIMITS_VECTOR_HPP_INCLUDED diff --git a/include/boost/mpl/list.hpp b/include/boost/mpl/list.hpp index 89542b0..f0fb45d 100644 --- a/include/boost/mpl/list.hpp +++ b/include/boost/mpl/list.hpp @@ -1,16 +1,12 @@ -#if !defined(BOOST_PP_IS_ITERATING) - -///// header body - #ifndef BOOST_MPL_LIST_HPP_INCLUDED #define BOOST_MPL_LIST_HPP_INCLUDED -// Copyright (c) 2000-04 Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. @@ -18,205 +14,44 @@ // $Date$ // $Revision$ -// no include guards, the header is intended for multiple inclusion! - #if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include "boost/mpl/limits/list.hpp" -# include "boost/mpl/void.hpp" -# include "boost/mpl/aux_/config/preprocessor.hpp" +# include <boost/mpl/limits/list.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" +# 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 MPL_AUX_LIST_HEADER \ +# define AUX778076_HEADER \ BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE).hpp \ /**/ #else -# define MPL_AUX_LIST_HEADER \ +# define AUX778076_HEADER \ BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE)##.hpp \ /**/ #endif -# include BOOST_PP_STRINGIZE(boost/mpl/list/MPL_AUX_LIST_HEADER) -# undef MPL_AUX_LIST_HEADER +# include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_HEADER) +# undef AUX778076_HEADER #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" +# include <boost/mpl/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/aux_/config/nttp.hpp" -# include "boost/mpl/limits/list.hpp" +# include <boost/mpl/limits/list.hpp> -# include "boost/preprocessor/arithmetic/sub.hpp" -# include "boost/preprocessor/tuple/elem.hpp" -# include "boost/preprocessor/enum_params_with_a_default.hpp" -# include "boost/preprocessor/enum_params.hpp" -# include "boost/preprocessor/enum.hpp" -# include "boost/preprocessor/repeat.hpp" -# include "boost/preprocessor/comma_if.hpp" -# include "boost/preprocessor/expr_if.hpp" -# include "boost/preprocessor/iterate.hpp" +# define AUX778076_SEQUENCE_NAME list +# define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_LIST_SIZE +# include <boost/mpl/aux_/sequence_wrapper.hpp> -# include "boost/config.hpp" - -namespace boost { -namespace mpl { - -# define AUX_LIST_PARAMS(param) \ - BOOST_PP_ENUM_PARAMS( \ - BOOST_MPL_LIMIT_LIST_SIZE \ - , param \ - ) \ - /**/ - -# define AUX_LIST_DEFAULT_PARAMS(param, value) \ - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( \ - BOOST_MPL_LIMIT_LIST_SIZE \ - , param \ - , value \ - ) \ - /**/ - -# define AUX_LIST_N_PARAMS(n, param) \ - BOOST_PP_ENUM_PARAMS(n, param) \ - /**/ - -# define AUX_LIST_N_PARTIAL_SPEC_PARAMS(n, param, def) \ - BOOST_PP_ENUM_PARAMS(n, param) \ - BOOST_PP_COMMA_IF(n) \ - BOOST_PP_ENUM( \ - BOOST_PP_SUB_D(1,BOOST_MPL_LIMIT_LIST_SIZE,n) \ - , BOOST_PP_TUPLE_ELEM_3_2 \ - , def \ - ) \ - /**/ - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -// forward declaration -template< - AUX_LIST_DEFAULT_PARAMS(typename T, void_) - > -struct list; -#else -namespace aux { -template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct list_impl_chooser; -} -#endif - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(0, BOOST_MPL_LIMIT_LIST_SIZE, "boost/mpl/list.hpp")) -#include BOOST_PP_ITERATE() - -// real C++ version is already taken care of -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - -namespace aux { -// list_count_args -#define BOOST_MPL_AUX_COUNT_ARGS_PREFIX list -#define BOOST_MPL_AUX_COUNT_ARGS_DEFAULT void_ -#define BOOST_MPL_AUX_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_LIST_SIZE -#define BOOST_MPL_AUX_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES -#include "boost/mpl/aux_/count_args.hpp" - -template< - AUX_LIST_PARAMS(typename T) - > -struct list_impl -{ - typedef aux::list_count_args< AUX_LIST_PARAMS(T) > arg_num_; - typedef typename aux::list_impl_chooser< - arg_num_::value - >::template result_< AUX_LIST_PARAMS(T) >::type type; -}; - -} // namespace aux - -template< - AUX_LIST_DEFAULT_PARAMS(typename T, void_) - > -struct list - : aux::list_impl< AUX_LIST_PARAMS(T) >::type -{ - typedef typename aux::list_impl< - AUX_LIST_PARAMS(T) - >::type type; -}; - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -# undef AUX_LIST_N_PARTIAL_SPEC_PARAMS -# undef AUX_LIST_N_PARAMS -# undef AUX_LIST_DEFAULT_PARAMS -# undef AUX_LIST_PARAMS - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_HPP_INCLUDED - -///// iteration - -#else -#define i BOOST_PP_FRAME_ITERATION(1) - -# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - -#if i == BOOST_MPL_LIMIT_LIST_SIZE - -//: primary template (not a specialization!) -template< - AUX_LIST_N_PARAMS(i, typename T) - > -struct list - : BOOST_PP_CAT(list,i)< AUX_LIST_N_PARAMS(i, T) > -{ - typedef BOOST_PP_CAT(list,i)< AUX_LIST_N_PARAMS(i, T) > type; -}; - -#else - -template< - AUX_LIST_N_PARAMS(i, typename T) - > -struct list< AUX_LIST_N_PARTIAL_SPEC_PARAMS(i, T, void_) > - : BOOST_PP_CAT(list,i)< AUX_LIST_N_PARAMS(i, T) > -{ - typedef BOOST_PP_EXPR_IF(i,typename) BOOST_PP_CAT(list,i)< AUX_LIST_N_PARAMS(i, T) >::type type; -}; - -#endif // i == BOOST_MPL_LIMIT_LIST_SIZE - -# else - -namespace aux { - -template<> -struct list_impl_chooser<i> -{ - template< - AUX_LIST_PARAMS(typename T) - > - struct result_ - { - typedef typename BOOST_PP_CAT(list,i)< - AUX_LIST_N_PARAMS(i, T) - >::type type; - }; -}; - -} // namespace aux - -# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -#undef i -#endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/list/aux_/O1_size.hpp b/include/boost/mpl/list/aux_/O1_size.hpp index ebd7040..1a8575c 100644 --- a/include/boost/mpl/list/aux_/O1_size.hpp +++ b/include/boost/mpl/list/aux_/O1_size.hpp @@ -1,34 +1,33 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/aux_/O1_size.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED -#include "boost/mpl/O1_size_fwd.hpp" -#include "boost/mpl/list/aux_/tag.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/O1_size_fwd.hpp> +#include <boost/mpl/list/aux_/tag.hpp> + +namespace boost { namespace mpl { template<> -struct O1_size_traits< aux::list_tag > +struct O1_size_impl< aux::list_tag > { - template< typename List > struct algorithm + template< typename List > struct apply : List::size { }; }; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED diff --git a/include/boost/mpl/list/aux_/begin_end.hpp b/include/boost/mpl/list/aux_/begin_end.hpp index 7ad1ec2..dc6a4a2 100644 --- a/include/boost/mpl/list/aux_/begin_end.hpp +++ b/include/boost/mpl/list/aux_/begin_end.hpp @@ -1,45 +1,44 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/aux_/begin_end.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED -#include "boost/mpl/begin_end_fwd.hpp" -#include "boost/mpl/list/aux_/iterator.hpp" -#include "boost/mpl/list/aux_/tag.hpp" -#include "boost/mpl/list/aux_/node.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/begin_end_fwd.hpp> +#include <boost/mpl/list/aux_/iterator.hpp> +#include <boost/mpl/list/aux_/tag.hpp> +#include <boost/mpl/list/aux_/item.hpp> + +namespace boost { namespace mpl { template<> -struct begin_traits< aux::list_tag > +struct begin_impl< aux::list_tag > { - template< typename List > struct algorithm + template< typename List > struct apply { - typedef list_iterator<typename List::type> type; + typedef l_iter<typename List::type> type; }; }; template<> -struct end_traits< aux::list_tag > +struct end_impl< aux::list_tag > { - template< typename > struct algorithm + template< typename > struct apply { - typedef list_iterator<null_node> type; + typedef l_iter<l_end> type; }; }; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED diff --git a/include/boost/mpl/list/aux_/clear.hpp b/include/boost/mpl/list/aux_/clear.hpp index 2a94c77..a1d9dc7 100644 --- a/include/boost/mpl/list/aux_/clear.hpp +++ b/include/boost/mpl/list/aux_/clear.hpp @@ -1,35 +1,34 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/aux_/clear.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED -#include "boost/mpl/clear_fwd.hpp" -#include "boost/mpl/list/aux_/node.hpp" -#include "boost/mpl/list/aux_/tag.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/clear_fwd.hpp> +#include <boost/mpl/list/aux_/item.hpp> +#include <boost/mpl/list/aux_/tag.hpp> + +namespace boost { namespace mpl { template<> -struct clear_traits< aux::list_tag > +struct clear_impl< aux::list_tag > { - template< typename List > struct algorithm + template< typename List > struct apply { - typedef null_node type; + typedef l_end type; }; }; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED diff --git a/include/boost/mpl/list/aux_/empty.hpp b/include/boost/mpl/list/aux_/empty.hpp index cdeaef0..82661f3 100644 --- a/include/boost/mpl/list/aux_/empty.hpp +++ b/include/boost/mpl/list/aux_/empty.hpp @@ -1,35 +1,34 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/aux_/empty.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED -#include "boost/mpl/empty_fwd.hpp" -#include "boost/mpl/not.hpp" -#include "boost/mpl/list/aux_/tag.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/empty_fwd.hpp> +#include <boost/mpl/not.hpp> +#include <boost/mpl/list/aux_/tag.hpp> + +namespace boost { namespace mpl { template<> -struct empty_traits< aux::list_tag > +struct empty_impl< aux::list_tag > { - template< typename List > struct algorithm + template< typename List > struct apply : not_<typename List::size> { }; }; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED diff --git a/include/boost/mpl/list/aux_/front.hpp b/include/boost/mpl/list/aux_/front.hpp index 7b0586c..3886f24 100644 --- a/include/boost/mpl/list/aux_/front.hpp +++ b/include/boost/mpl/list/aux_/front.hpp @@ -1,34 +1,33 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/aux_/front.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED -#include "boost/mpl/front_fwd.hpp" -#include "boost/mpl/list/aux_/tag.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/front_fwd.hpp> +#include <boost/mpl/list/aux_/tag.hpp> + +namespace boost { namespace mpl { template<> -struct front_traits< aux::list_tag > +struct front_impl< aux::list_tag > { - template< typename List > struct algorithm + template< typename List > struct apply { typedef typename List::item type; }; }; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED diff --git a/include/boost/mpl/list/aux_/include_preprocessed.hpp b/include/boost/mpl/list/aux_/include_preprocessed.hpp index 3def15b..1792f37 100644 --- a/include/boost/mpl/list/aux_/include_preprocessed.hpp +++ b/include/boost/mpl/list/aux_/include_preprocessed.hpp @@ -1,9 +1,9 @@ -// Copyright (c) 2001-04 Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2001-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. @@ -11,10 +11,10 @@ // $Date$ // $Revision$ -// no include guards, the header is intended for multiple inclusion! +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! -#include "boost/preprocessor/cat.hpp" -#include "boost/preprocessor/stringize.hpp" +#include <boost/preprocessor/cat.hpp> +#include <boost/preprocessor/stringize.hpp> # define AUX_PREPROCESSED_HEADER \ aux_/preprocessed/plain/BOOST_MPL_PREPROCESSED_HEADER \ diff --git a/include/boost/mpl/list/aux_/item.hpp b/include/boost/mpl/list/aux_/item.hpp new file mode 100644 index 0000000..febe849 --- /dev/null +++ b/include/boost/mpl/list/aux_/item.hpp @@ -0,0 +1,55 @@ + +#ifndef BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED +#define BOOST_MPL_LIST_AUX_NODE_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$ + +#include <boost/mpl/long.hpp> +#include <boost/mpl/list/aux_/tag.hpp> +#include <boost/mpl/aux_/config/msvc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +namespace boost { namespace mpl { + +template< + typename Size + , typename T + , typename Next + > +struct l_item +{ +// agurt, 17/jul/03: to facilitate the deficient 'is_sequence' implementation +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + typedef int begin; +#endif + typedef aux::list_tag tag; + typedef l_item type; + + typedef Size size; + typedef T item; + typedef Next next; +}; + +struct l_end +{ +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + typedef int begin; +#endif + typedef aux::list_tag tag; + typedef l_end type; + typedef long_<0> size; +}; + +}} + +#endif // BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED diff --git a/include/boost/mpl/list/aux_/iterator.hpp b/include/boost/mpl/list/aux_/iterator.hpp index 2af2037..387eb13 100644 --- a/include/boost/mpl/list/aux_/iterator.hpp +++ b/include/boost/mpl/list/aux_/iterator.hpp @@ -1,42 +1,43 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/aux_/iterator.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED -#include "boost/mpl/iterator_tag.hpp" -#include "boost/mpl/list/aux_/node.hpp" -#include "boost/mpl/aux_/lambda_spec.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/iterator_tags.hpp> +#include <boost/mpl/next_prior.hpp> +#include <boost/mpl/list/aux_/item.hpp> +#include <boost/mpl/aux_/lambda_spec.hpp> + +namespace boost { namespace mpl { template< typename Node > -struct list_iterator +struct l_iter { + typedef aux::l_iter_tag tag; typedef forward_iterator_tag category; typedef typename Node::item type; - typedef list_iterator<typename Node::next> next; + typedef l_iter<typename next<Node>::type> next; }; -template<> -struct list_iterator<null_node> +template<> struct l_iter<l_end> { + typedef aux::l_iter_tag tag; typedef forward_iterator_tag category; }; -BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1,list_iterator) +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1,l_iter) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED diff --git a/include/boost/mpl/list/aux_/node.hpp b/include/boost/mpl/list/aux_/node.hpp deleted file mode 100644 index d4bfa5c..0000000 --- a/include/boost/mpl/list/aux_/node.hpp +++ /dev/null @@ -1,56 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/aux_/node.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED -#define BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED - -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/list/aux_/tag.hpp" -#include "boost/mpl/aux_/config/msvc.hpp" -#include "boost/mpl/aux_/config/workaround.hpp" - -namespace boost { -namespace mpl { - -template< - typename Size - , typename T - , typename Next - > -struct list_node -{ -// agurt, 17/jul/03: to facilitate the deficient 'is_sequence' implementation -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - typedef int begin; -#endif - typedef aux::list_tag tag; - typedef list_node type; - - typedef Size size; - typedef T item; - typedef Next next; -}; - -struct null_node -{ -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - typedef int begin; -#endif - typedef aux::list_tag tag; - typedef null_node type; - typedef integral_c<long,0> size; -}; - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED diff --git a/include/boost/mpl/list/aux_/numbered.hpp b/include/boost/mpl/list/aux_/numbered.hpp index 661fd95..68ba665 100644 --- a/include/boost/mpl/list/aux_/numbered.hpp +++ b/include/boost/mpl/list/aux_/numbered.hpp @@ -1,23 +1,25 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/aux_/numbered.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Peter Dimov, Aleksey Gurtovoy -// -// 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) -// no include guards, the header is intended for multiple inclusion! +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Peter Dimov 2000-2002 +// 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_PP_IS_ITERATING) -#include "boost/preprocessor/enum_params.hpp" -#include "boost/preprocessor/enum_shifted_params.hpp" -#include "boost/preprocessor/dec.hpp" -#include "boost/preprocessor/cat.hpp" +#include <boost/preprocessor/enum_params.hpp> +#include <boost/preprocessor/enum_shifted_params.hpp> +#include <boost/preprocessor/dec.hpp> +#include <boost/preprocessor/cat.hpp> #define i BOOST_PP_FRAME_ITERATION(1) @@ -27,10 +29,10 @@ template< BOOST_PP_ENUM_PARAMS(i, typename T) > struct list1 - : list_node< - integral_c<long,1> + : l_item< + long_<1> , T0 - , null_node + , l_end > { typedef list1 type; @@ -48,8 +50,8 @@ template< BOOST_PP_ENUM_PARAMS(i, typename T) > struct BOOST_PP_CAT(list,i) - : list_node< - integral_c<long,i> + : l_item< + long_<i> , T0 , MPL_AUX_LIST_TAIL(list,i,T) > diff --git a/include/boost/mpl/list/aux_/numbered_c.hpp b/include/boost/mpl/list/aux_/numbered_c.hpp index 44aa397..43b555d 100644 --- a/include/boost/mpl/list/aux_/numbered_c.hpp +++ b/include/boost/mpl/list/aux_/numbered_c.hpp @@ -1,23 +1,24 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/aux_/numbered_c.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// 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) -// no include guards, the header is intended for multiple inclusion! +// 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. + +// $Source$ +// $Date$ +// $Revision$ #if defined(BOOST_PP_IS_ITERATING) -#include "boost/preprocessor/enum_params.hpp" -#include "boost/preprocessor/enum_shifted_params.hpp" -#include "boost/preprocessor/dec.hpp" -#include "boost/preprocessor/cat.hpp" +#include <boost/preprocessor/enum_params.hpp> +#include <boost/preprocessor/enum_shifted_params.hpp> +#include <boost/preprocessor/dec.hpp> +#include <boost/preprocessor/cat.hpp> #define i BOOST_PP_FRAME_ITERATION(1) @@ -28,10 +29,10 @@ template< , BOOST_PP_ENUM_PARAMS(i, T C) > struct list1_c - : list_node< - integral_c<long,1> + : l_item< + long_<1> , integral_c<T,C0> - , null_node + , l_end > { typedef list1_c type; @@ -50,8 +51,8 @@ template< , BOOST_PP_ENUM_PARAMS(i, T C) > struct BOOST_PP_CAT(BOOST_PP_CAT(list,i),_c) - : list_node< - integral_c<long,i> + : l_item< + long_<i> , integral_c<T,C0> , MPL_AUX_LIST_C_TAIL(list,i,C) > diff --git a/include/boost/mpl/list/aux_/pop_front.hpp b/include/boost/mpl/list/aux_/pop_front.hpp index e7fe312..0ba4dfc 100644 --- a/include/boost/mpl/list/aux_/pop_front.hpp +++ b/include/boost/mpl/list/aux_/pop_front.hpp @@ -1,34 +1,34 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/aux_/pop_front.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED -#include "boost/mpl/pop_front_fwd.hpp" -#include "boost/mpl/list/aux_/tag.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/pop_front_fwd.hpp> +#include <boost/mpl/next_prior.hpp> +#include <boost/mpl/list/aux_/tag.hpp> + +namespace boost { namespace mpl { template<> -struct pop_front_traits< aux::list_tag > +struct pop_front_impl< aux::list_tag > { - template< typename List > struct algorithm + template< typename List > struct apply { - typedef typename List::next type; + typedef typename next<List>::type type; }; }; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED diff --git a/include/boost/mpl/list/aux_/preprocessed/plain/list10.hpp b/include/boost/mpl/list/aux_/preprocessed/plain/list10.hpp index fe842dc..99368d2 100644 --- a/include/boost/mpl/list/aux_/preprocessed/plain/list10.hpp +++ b/include/boost/mpl/list/aux_/preprocessed/plain/list10.hpp @@ -1,17 +1,24 @@ -// preprocessed version of 'boost/mpl/list/list10.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list/list10.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T0 > struct list1 - : list_node< - integral_c< long,1 > + : l_item< + long_<1> , T0 - , null_node + , l_end > { typedef list1 type; @@ -21,8 +28,8 @@ template< typename T0, typename T1 > struct list2 - : list_node< - integral_c< long,2 > + : l_item< + long_<2> , T0 , list1<T1> > @@ -34,8 +41,8 @@ template< typename T0, typename T1, typename T2 > struct list3 - : list_node< - integral_c< long,3 > + : l_item< + long_<3> , T0 , list2< T1,T2 > > @@ -47,8 +54,8 @@ template< typename T0, typename T1, typename T2, typename T3 > struct list4 - : list_node< - integral_c< long,4 > + : l_item< + long_<4> , T0 , list3< T1,T2,T3 > > @@ -60,8 +67,8 @@ template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct list5 - : list_node< - integral_c< long,5 > + : l_item< + long_<5> , T0 , list4< T1,T2,T3,T4 > > @@ -74,8 +81,8 @@ template< , typename T5 > struct list6 - : list_node< - integral_c< long,6 > + : l_item< + long_<6> , T0 , list5< T1,T2,T3,T4,T5 > > @@ -88,8 +95,8 @@ template< , typename T5, typename T6 > struct list7 - : list_node< - integral_c< long,7 > + : l_item< + long_<7> , T0 , list6< T1,T2,T3,T4,T5,T6 > > @@ -102,8 +109,8 @@ template< , typename T5, typename T6, typename T7 > struct list8 - : list_node< - integral_c< long,8 > + : l_item< + long_<8> , T0 , list7< T1,T2,T3,T4,T5,T6,T7 > > @@ -116,8 +123,8 @@ template< , typename T5, typename T6, typename T7, typename T8 > struct list9 - : list_node< - integral_c< long,9 > + : l_item< + long_<9> , T0 , list8< T1,T2,T3,T4,T5,T6,T7,T8 > > @@ -130,8 +137,8 @@ template< , typename T5, typename T6, typename T7, typename T8, typename T9 > struct list10 - : list_node< - integral_c< long,10 > + : l_item< + long_<10> , T0 , list9< T1,T2,T3,T4,T5,T6,T7,T8,T9 > > @@ -139,6 +146,4 @@ struct list10 typedef list10 type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp b/include/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp index 2cf9dba..3a3ee95 100644 --- a/include/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp +++ b/include/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp @@ -1,18 +1,25 @@ -// preprocessed version of 'boost/mpl/list/list10_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list/list10_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T , T C0 > struct list1_c - : list_node< - integral_c< long,1 > + : l_item< + long_<1> , integral_c< T,C0 > - , null_node + , l_end > { typedef list1_c type; @@ -23,8 +30,8 @@ template< , T C0, T C1 > struct list2_c - : list_node< - integral_c< long,2 > + : l_item< + long_<2> , integral_c< T,C0 > , list1_c< T,C1 > > @@ -37,8 +44,8 @@ template< , T C0, T C1, T C2 > struct list3_c - : list_node< - integral_c< long,3 > + : l_item< + long_<3> , integral_c< T,C0 > , list2_c< T,C1,C2 > > @@ -51,8 +58,8 @@ template< , T C0, T C1, T C2, T C3 > struct list4_c - : list_node< - integral_c< long,4 > + : l_item< + long_<4> , integral_c< T,C0 > , list3_c< T,C1,C2,C3 > > @@ -65,8 +72,8 @@ template< , T C0, T C1, T C2, T C3, T C4 > struct list5_c - : list_node< - integral_c< long,5 > + : l_item< + long_<5> , integral_c< T,C0 > , list4_c< T,C1,C2,C3,C4 > > @@ -79,8 +86,8 @@ template< , T C0, T C1, T C2, T C3, T C4, T C5 > struct list6_c - : list_node< - integral_c< long,6 > + : l_item< + long_<6> , integral_c< T,C0 > , list5_c< T,C1,C2,C3,C4,C5 > > @@ -93,8 +100,8 @@ template< , T C0, T C1, T C2, T C3, T C4, T C5, T C6 > struct list7_c - : list_node< - integral_c< long,7 > + : l_item< + long_<7> , integral_c< T,C0 > , list6_c< T,C1,C2,C3,C4,C5,C6 > > @@ -107,8 +114,8 @@ template< , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7 > struct list8_c - : list_node< - integral_c< long,8 > + : l_item< + long_<8> , integral_c< T,C0 > , list7_c< T,C1,C2,C3,C4,C5,C6,C7 > > @@ -121,8 +128,8 @@ template< , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8 > struct list9_c - : list_node< - integral_c< long,9 > + : l_item< + long_<9> , integral_c< T,C0 > , list8_c< T,C1,C2,C3,C4,C5,C6,C7,C8 > > @@ -135,8 +142,8 @@ template< , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9 > struct list10_c - : list_node< - integral_c< long,10 > + : l_item< + long_<10> , integral_c< T,C0 > , list9_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9 > > @@ -144,6 +151,4 @@ struct list10_c typedef list10_c type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/list/aux_/preprocessed/plain/list20.hpp b/include/boost/mpl/list/aux_/preprocessed/plain/list20.hpp index 044762f..750e495 100644 --- a/include/boost/mpl/list/aux_/preprocessed/plain/list20.hpp +++ b/include/boost/mpl/list/aux_/preprocessed/plain/list20.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/list/list20.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list/list20.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 @@ -10,8 +17,8 @@ template< , typename T10 > struct list11 - : list_node< - integral_c< long,11 > + : l_item< + long_<11> , T0 , list10< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > > @@ -25,8 +32,8 @@ template< , typename T10, typename T11 > struct list12 - : list_node< - integral_c< long,12 > + : l_item< + long_<12> , T0 , list11< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > > @@ -40,8 +47,8 @@ template< , typename T10, typename T11, typename T12 > struct list13 - : list_node< - integral_c< long,13 > + : l_item< + long_<13> , T0 , list12< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > > @@ -55,8 +62,8 @@ template< , typename T10, typename T11, typename T12, typename T13 > struct list14 - : list_node< - integral_c< long,14 > + : l_item< + long_<14> , T0 , list13< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > > @@ -70,8 +77,8 @@ template< , typename T10, typename T11, typename T12, typename T13, typename T14 > struct list15 - : list_node< - integral_c< long,15 > + : l_item< + long_<15> , T0 , list14< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 > > @@ -86,8 +93,8 @@ template< , typename T15 > struct list16 - : list_node< - integral_c< long,16 > + : l_item< + long_<16> , T0 , list15< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 > > @@ -102,8 +109,8 @@ template< , typename T15, typename T16 > struct list17 - : list_node< - integral_c< long,17 > + : l_item< + long_<17> , T0 , list16< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 > > @@ -118,8 +125,8 @@ template< , typename T15, typename T16, typename T17 > struct list18 - : list_node< - integral_c< long,18 > + : l_item< + long_<18> , T0 , list17< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 > > @@ -134,8 +141,8 @@ template< , typename T15, typename T16, typename T17, typename T18 > struct list19 - : list_node< - integral_c< long,19 > + : l_item< + long_<19> , T0 , list18< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 > > @@ -150,8 +157,8 @@ template< , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list20 - : list_node< - integral_c< long,20 > + : l_item< + long_<20> , T0 , list19< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 > > @@ -159,6 +166,4 @@ struct list20 typedef list20 type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp b/include/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp index a58fb26..88fffd4 100644 --- a/include/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp +++ b/include/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp @@ -1,16 +1,23 @@ -// preprocessed version of 'boost/mpl/list/list20_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list/list20_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 > struct list11_c - : list_node< - integral_c< long,11 > + : l_item< + long_<11> , integral_c< T,C0 > , list10_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > > @@ -24,8 +31,8 @@ template< , T C11 > struct list12_c - : list_node< - integral_c< long,12 > + : l_item< + long_<12> , integral_c< T,C0 > , list11_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > > @@ -39,8 +46,8 @@ template< , T C11, T C12 > struct list13_c - : list_node< - integral_c< long,13 > + : l_item< + long_<13> , integral_c< T,C0 > , list12_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > > @@ -54,8 +61,8 @@ template< , T C11, T C12, T C13 > struct list14_c - : list_node< - integral_c< long,14 > + : l_item< + long_<14> , integral_c< T,C0 > , list13_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 > > @@ -69,8 +76,8 @@ template< , T C11, T C12, T C13, T C14 > struct list15_c - : list_node< - integral_c< long,15 > + : l_item< + long_<15> , integral_c< T,C0 > , list14_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 > > @@ -84,8 +91,8 @@ template< , T C11, T C12, T C13, T C14, T C15 > struct list16_c - : list_node< - integral_c< long,16 > + : l_item< + long_<16> , integral_c< T,C0 > , list15_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 > > @@ -99,8 +106,8 @@ template< , T C11, T C12, T C13, T C14, T C15, T C16 > struct list17_c - : list_node< - integral_c< long,17 > + : l_item< + long_<17> , integral_c< T,C0 > , list16_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 > > @@ -114,8 +121,8 @@ template< , T C11, T C12, T C13, T C14, T C15, T C16, T C17 > struct list18_c - : list_node< - integral_c< long,18 > + : l_item< + long_<18> , integral_c< T,C0 > , list17_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 > > @@ -129,8 +136,8 @@ template< , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18 > struct list19_c - : list_node< - integral_c< long,19 > + : l_item< + long_<19> , integral_c< T,C0 > , list18_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 > > @@ -144,8 +151,8 @@ template< , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19 > struct list20_c - : list_node< - integral_c< long,20 > + : l_item< + long_<20> , integral_c< T,C0 > , list19_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 > > @@ -153,6 +160,4 @@ struct list20_c typedef list20_c type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/list/aux_/preprocessed/plain/list30.hpp b/include/boost/mpl/list/aux_/preprocessed/plain/list30.hpp index 14397e3..5459101 100644 --- a/include/boost/mpl/list/aux_/preprocessed/plain/list30.hpp +++ b/include/boost/mpl/list/aux_/preprocessed/plain/list30.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/list/list30.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list/list30.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 @@ -12,8 +19,8 @@ template< , typename T20 > struct list21 - : list_node< - integral_c< long,21 > + : l_item< + long_<21> , T0 , list20< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20 > > @@ -29,8 +36,8 @@ template< , typename T20, typename T21 > struct list22 - : list_node< - integral_c< long,22 > + : l_item< + long_<22> , T0 , list21< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21 > > @@ -46,8 +53,8 @@ template< , typename T20, typename T21, typename T22 > struct list23 - : list_node< - integral_c< long,23 > + : l_item< + long_<23> , T0 , list22< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22 > > @@ -63,8 +70,8 @@ template< , typename T20, typename T21, typename T22, typename T23 > struct list24 - : list_node< - integral_c< long,24 > + : l_item< + long_<24> , T0 , list23< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23 > > @@ -80,8 +87,8 @@ template< , typename T20, typename T21, typename T22, typename T23, typename T24 > struct list25 - : list_node< - integral_c< long,25 > + : l_item< + long_<25> , T0 , list24< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24 > > @@ -98,8 +105,8 @@ template< , typename T25 > struct list26 - : list_node< - integral_c< long,26 > + : l_item< + long_<26> , T0 , list25< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25 > > @@ -116,8 +123,8 @@ template< , typename T25, typename T26 > struct list27 - : list_node< - integral_c< long,27 > + : l_item< + long_<27> , T0 , list26< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26 > > @@ -134,8 +141,8 @@ template< , typename T25, typename T26, typename T27 > struct list28 - : list_node< - integral_c< long,28 > + : l_item< + long_<28> , T0 , list27< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27 > > @@ -152,8 +159,8 @@ template< , typename T25, typename T26, typename T27, typename T28 > struct list29 - : list_node< - integral_c< long,29 > + : l_item< + long_<29> , T0 , list28< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28 > > @@ -170,8 +177,8 @@ template< , typename T25, typename T26, typename T27, typename T28, typename T29 > struct list30 - : list_node< - integral_c< long,30 > + : l_item< + long_<30> , T0 , list29< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29 > > @@ -179,6 +186,4 @@ struct list30 typedef list30 type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp b/include/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp index 4f6515a..72f1236 100644 --- a/include/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp +++ b/include/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/list/list30_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list/list30_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T @@ -10,8 +17,8 @@ template< , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 > struct list21_c - : list_node< - integral_c< long,21 > + : l_item< + long_<21> , integral_c< T,C0 > , list20_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20 > > @@ -26,8 +33,8 @@ template< , T C21 > struct list22_c - : list_node< - integral_c< long,22 > + : l_item< + long_<22> , integral_c< T,C0 > , list21_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21 > > @@ -42,8 +49,8 @@ template< , T C21, T C22 > struct list23_c - : list_node< - integral_c< long,23 > + : l_item< + long_<23> , integral_c< T,C0 > , list22_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22 > > @@ -58,8 +65,8 @@ template< , T C21, T C22, T C23 > struct list24_c - : list_node< - integral_c< long,24 > + : l_item< + long_<24> , integral_c< T,C0 > , list23_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23 > > @@ -74,8 +81,8 @@ template< , T C21, T C22, T C23, T C24 > struct list25_c - : list_node< - integral_c< long,25 > + : l_item< + long_<25> , integral_c< T,C0 > , list24_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24 > > @@ -90,8 +97,8 @@ template< , T C21, T C22, T C23, T C24, T C25 > struct list26_c - : list_node< - integral_c< long,26 > + : l_item< + long_<26> , integral_c< T,C0 > , list25_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25 > > @@ -106,8 +113,8 @@ template< , T C21, T C22, T C23, T C24, T C25, T C26 > struct list27_c - : list_node< - integral_c< long,27 > + : l_item< + long_<27> , integral_c< T,C0 > , list26_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26 > > @@ -122,8 +129,8 @@ template< , T C21, T C22, T C23, T C24, T C25, T C26, T C27 > struct list28_c - : list_node< - integral_c< long,28 > + : l_item< + long_<28> , integral_c< T,C0 > , list27_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27 > > @@ -138,8 +145,8 @@ template< , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28 > struct list29_c - : list_node< - integral_c< long,29 > + : l_item< + long_<29> , integral_c< T,C0 > , list28_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28 > > @@ -154,8 +161,8 @@ template< , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29 > struct list30_c - : list_node< - integral_c< long,30 > + : l_item< + long_<30> , integral_c< T,C0 > , list29_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29 > > @@ -163,6 +170,4 @@ struct list30_c typedef list30_c type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/list/aux_/preprocessed/plain/list40.hpp b/include/boost/mpl/list/aux_/preprocessed/plain/list40.hpp index cc877f9..68c6761 100644 --- a/include/boost/mpl/list/aux_/preprocessed/plain/list40.hpp +++ b/include/boost/mpl/list/aux_/preprocessed/plain/list40.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/list/list40.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list/list40.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 @@ -14,8 +21,8 @@ template< , typename T30 > struct list31 - : list_node< - integral_c< long,31 > + : l_item< + long_<31> , T0 , list30< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30 > > @@ -33,8 +40,8 @@ template< , typename T30, typename T31 > struct list32 - : list_node< - integral_c< long,32 > + : l_item< + long_<32> , T0 , list31< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31 > > @@ -52,8 +59,8 @@ template< , typename T30, typename T31, typename T32 > struct list33 - : list_node< - integral_c< long,33 > + : l_item< + long_<33> , T0 , list32< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32 > > @@ -71,8 +78,8 @@ template< , typename T30, typename T31, typename T32, typename T33 > struct list34 - : list_node< - integral_c< long,34 > + : l_item< + long_<34> , T0 , list33< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33 > > @@ -90,8 +97,8 @@ template< , typename T30, typename T31, typename T32, typename T33, typename T34 > struct list35 - : list_node< - integral_c< long,35 > + : l_item< + long_<35> , T0 , list34< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34 > > @@ -110,8 +117,8 @@ template< , typename T35 > struct list36 - : list_node< - integral_c< long,36 > + : l_item< + long_<36> , T0 , list35< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35 > > @@ -130,8 +137,8 @@ template< , typename T35, typename T36 > struct list37 - : list_node< - integral_c< long,37 > + : l_item< + long_<37> , T0 , list36< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36 > > @@ -150,8 +157,8 @@ template< , typename T35, typename T36, typename T37 > struct list38 - : list_node< - integral_c< long,38 > + : l_item< + long_<38> , T0 , list37< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37 > > @@ -170,8 +177,8 @@ template< , typename T35, typename T36, typename T37, typename T38 > struct list39 - : list_node< - integral_c< long,39 > + : l_item< + long_<39> , T0 , list38< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38 > > @@ -190,8 +197,8 @@ template< , typename T35, typename T36, typename T37, typename T38, typename T39 > struct list40 - : list_node< - integral_c< long,40 > + : l_item< + long_<40> , T0 , list39< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39 > > @@ -199,6 +206,4 @@ struct list40 typedef list40 type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp b/include/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp index 227418f..489d4fc 100644 --- a/include/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp +++ b/include/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/list/list40_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list/list40_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T @@ -11,8 +18,8 @@ template< , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 > struct list31_c - : list_node< - integral_c< long,31 > + : l_item< + long_<31> , integral_c< T,C0 > , list30_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30 > > @@ -28,8 +35,8 @@ template< , T C31 > struct list32_c - : list_node< - integral_c< long,32 > + : l_item< + long_<32> , integral_c< T,C0 > , list31_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31 > > @@ -45,8 +52,8 @@ template< , T C31, T C32 > struct list33_c - : list_node< - integral_c< long,33 > + : l_item< + long_<33> , integral_c< T,C0 > , list32_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32 > > @@ -62,8 +69,8 @@ template< , T C31, T C32, T C33 > struct list34_c - : list_node< - integral_c< long,34 > + : l_item< + long_<34> , integral_c< T,C0 > , list33_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33 > > @@ -79,8 +86,8 @@ template< , T C31, T C32, T C33, T C34 > struct list35_c - : list_node< - integral_c< long,35 > + : l_item< + long_<35> , integral_c< T,C0 > , list34_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34 > > @@ -96,8 +103,8 @@ template< , T C31, T C32, T C33, T C34, T C35 > struct list36_c - : list_node< - integral_c< long,36 > + : l_item< + long_<36> , integral_c< T,C0 > , list35_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35 > > @@ -113,8 +120,8 @@ template< , T C31, T C32, T C33, T C34, T C35, T C36 > struct list37_c - : list_node< - integral_c< long,37 > + : l_item< + long_<37> , integral_c< T,C0 > , list36_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36 > > @@ -130,8 +137,8 @@ template< , T C31, T C32, T C33, T C34, T C35, T C36, T C37 > struct list38_c - : list_node< - integral_c< long,38 > + : l_item< + long_<38> , integral_c< T,C0 > , list37_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37 > > @@ -147,8 +154,8 @@ template< , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38 > struct list39_c - : list_node< - integral_c< long,39 > + : l_item< + long_<39> , integral_c< T,C0 > , list38_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38 > > @@ -164,8 +171,8 @@ template< , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39 > struct list40_c - : list_node< - integral_c< long,40 > + : l_item< + long_<40> , integral_c< T,C0 > , list39_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39 > > @@ -173,6 +180,4 @@ struct list40_c typedef list40_c type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/list/aux_/preprocessed/plain/list50.hpp b/include/boost/mpl/list/aux_/preprocessed/plain/list50.hpp index f7e9a14..4cc22da 100644 --- a/include/boost/mpl/list/aux_/preprocessed/plain/list50.hpp +++ b/include/boost/mpl/list/aux_/preprocessed/plain/list50.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/list/list50.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list/list50.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 @@ -16,8 +23,8 @@ template< , typename T40 > struct list41 - : list_node< - integral_c< long,41 > + : l_item< + long_<41> , T0 , list40< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40 > > @@ -37,8 +44,8 @@ template< , typename T40, typename T41 > struct list42 - : list_node< - integral_c< long,42 > + : l_item< + long_<42> , T0 , list41< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41 > > @@ -58,8 +65,8 @@ template< , typename T40, typename T41, typename T42 > struct list43 - : list_node< - integral_c< long,43 > + : l_item< + long_<43> , T0 , list42< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42 > > @@ -79,8 +86,8 @@ template< , typename T40, typename T41, typename T42, typename T43 > struct list44 - : list_node< - integral_c< long,44 > + : l_item< + long_<44> , T0 , list43< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43 > > @@ -100,8 +107,8 @@ template< , typename T40, typename T41, typename T42, typename T43, typename T44 > struct list45 - : list_node< - integral_c< long,45 > + : l_item< + long_<45> , T0 , list44< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44 > > @@ -122,8 +129,8 @@ template< , typename T45 > struct list46 - : list_node< - integral_c< long,46 > + : l_item< + long_<46> , T0 , list45< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45 > > @@ -144,8 +151,8 @@ template< , typename T45, typename T46 > struct list47 - : list_node< - integral_c< long,47 > + : l_item< + long_<47> , T0 , list46< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46 > > @@ -166,8 +173,8 @@ template< , typename T45, typename T46, typename T47 > struct list48 - : list_node< - integral_c< long,48 > + : l_item< + long_<48> , T0 , list47< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47 > > @@ -188,8 +195,8 @@ template< , typename T45, typename T46, typename T47, typename T48 > struct list49 - : list_node< - integral_c< long,49 > + : l_item< + long_<49> , T0 , list48< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48 > > @@ -210,8 +217,8 @@ template< , typename T45, typename T46, typename T47, typename T48, typename T49 > struct list50 - : list_node< - integral_c< long,50 > + : l_item< + long_<50> , T0 , list49< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49 > > @@ -219,6 +226,4 @@ struct list50 typedef list50 type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp b/include/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp index cf49530..8e31ea6 100644 --- a/include/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp +++ b/include/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/list/list50_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/list/list50_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T @@ -12,8 +19,8 @@ template< , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 > struct list41_c - : list_node< - integral_c< long,41 > + : l_item< + long_<41> , integral_c< T,C0 > , list40_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40 > > @@ -30,8 +37,8 @@ template< , T C41 > struct list42_c - : list_node< - integral_c< long,42 > + : l_item< + long_<42> , integral_c< T,C0 > , list41_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41 > > @@ -48,8 +55,8 @@ template< , T C41, T C42 > struct list43_c - : list_node< - integral_c< long,43 > + : l_item< + long_<43> , integral_c< T,C0 > , list42_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42 > > @@ -66,8 +73,8 @@ template< , T C41, T C42, T C43 > struct list44_c - : list_node< - integral_c< long,44 > + : l_item< + long_<44> , integral_c< T,C0 > , list43_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43 > > @@ -84,8 +91,8 @@ template< , T C41, T C42, T C43, T C44 > struct list45_c - : list_node< - integral_c< long,45 > + : l_item< + long_<45> , integral_c< T,C0 > , list44_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44 > > @@ -102,8 +109,8 @@ template< , T C41, T C42, T C43, T C44, T C45 > struct list46_c - : list_node< - integral_c< long,46 > + : l_item< + long_<46> , integral_c< T,C0 > , list45_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45 > > @@ -120,8 +127,8 @@ template< , T C41, T C42, T C43, T C44, T C45, T C46 > struct list47_c - : list_node< - integral_c< long,47 > + : l_item< + long_<47> , integral_c< T,C0 > , list46_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46 > > @@ -138,8 +145,8 @@ template< , T C41, T C42, T C43, T C44, T C45, T C46, T C47 > struct list48_c - : list_node< - integral_c< long,48 > + : l_item< + long_<48> , integral_c< T,C0 > , list47_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47 > > @@ -156,8 +163,8 @@ template< , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48 > struct list49_c - : list_node< - integral_c< long,49 > + : l_item< + long_<49> , integral_c< T,C0 > , list48_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48 > > @@ -174,8 +181,8 @@ template< , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48, T C49 > struct list50_c - : list_node< - integral_c< long,50 > + : l_item< + long_<50> , integral_c< T,C0 > , list49_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48,C49 > > @@ -183,6 +190,4 @@ struct list50_c typedef list50_c type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/list/aux_/push_back.hpp b/include/boost/mpl/list/aux_/push_back.hpp new file mode 100644 index 0000000..2511fae --- /dev/null +++ b/include/boost/mpl/list/aux_/push_back.hpp @@ -0,0 +1,36 @@ + +#ifndef BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED +#define BOOST_MPL_LIST_AUX_PUSH_BACK_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$ + +#include <boost/mpl/push_back_fwd.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/list/aux_/tag.hpp> + +namespace boost { namespace mpl { + +template< typename Tag > struct has_push_back_impl; + +template<> +struct has_push_back_impl< aux::list_tag > +{ + template< typename Seq > struct apply + : false_ + { + }; +}; + +}} + +#endif // BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED diff --git a/include/boost/mpl/list/aux_/push_front.hpp b/include/boost/mpl/list/aux_/push_front.hpp index 7726ca3..95213c6 100644 --- a/include/boost/mpl/list/aux_/push_front.hpp +++ b/include/boost/mpl/list/aux_/push_front.hpp @@ -1,40 +1,39 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/aux_/push_front.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED -#include "boost/mpl/push_front_fwd.hpp" -#include "boost/mpl/aux_/next.hpp" -#include "boost/mpl/list/aux_/node.hpp" -#include "boost/mpl/list/aux_/tag.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/push_front_fwd.hpp> +#include <boost/mpl/next.hpp> +#include <boost/mpl/list/aux_/item.hpp> +#include <boost/mpl/list/aux_/tag.hpp> + +namespace boost { namespace mpl { template<> -struct push_front_traits< aux::list_tag > +struct push_front_impl< aux::list_tag > { - template< typename List, typename T > struct algorithm + template< typename List, typename T > struct apply { - typedef list_node< - typename BOOST_MPL_AUX_NEXT(List::size) + typedef l_item< + typename next<typename List::size>::type , T , typename List::type > type; }; }; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED diff --git a/include/boost/mpl/list/aux_/size.hpp b/include/boost/mpl/list/aux_/size.hpp index d6acfbd..6e1e6a9 100644 --- a/include/boost/mpl/list/aux_/size.hpp +++ b/include/boost/mpl/list/aux_/size.hpp @@ -1,34 +1,33 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/aux_/size.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED -#include "boost/mpl/size_fwd.hpp" -#include "boost/mpl/list/aux_/tag.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/size_fwd.hpp> +#include <boost/mpl/list/aux_/tag.hpp> + +namespace boost { namespace mpl { template<> -struct size_traits< aux::list_tag > +struct size_impl< aux::list_tag > { - template< typename List > struct algorithm + template< typename List > struct apply : List::size { }; }; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED diff --git a/include/boost/mpl/list/aux_/tag.hpp b/include/boost/mpl/list/aux_/tag.hpp index 4f8e50d..6543642 100644 --- a/include/boost/mpl/list/aux_/tag.hpp +++ b/include/boost/mpl/list/aux_/tag.hpp @@ -1,26 +1,24 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/aux_/tag.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED -namespace boost { -namespace mpl { -namespace aux { +// 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$ + +namespace boost { namespace mpl { namespace aux { struct list_tag; +struct l_iter_tag; -} // namespace aux -} // namespace mpl -} // namespace boost +}}} #endif // BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED diff --git a/include/boost/mpl/list/list0.hpp b/include/boost/mpl/list/list0.hpp index ba50e9e..1303fd6 100644 --- a/include/boost/mpl/list/list0.hpp +++ b/include/boost/mpl/list/list0.hpp @@ -1,40 +1,42 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/list0.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_LIST0_HPP_INCLUDED #define BOOST_MPL_LIST_LIST0_HPP_INCLUDED -#include "boost/mpl/void.hpp" -#include "boost/mpl/list/aux_/push_front.hpp" -#include "boost/mpl/list/aux_/pop_front.hpp" -#include "boost/mpl/list/aux_/front.hpp" -#include "boost/mpl/list/aux_/clear.hpp" -#include "boost/mpl/list/aux_/O1_size.hpp" -#include "boost/mpl/list/aux_/size.hpp" -#include "boost/mpl/list/aux_/empty.hpp" -#include "boost/mpl/list/aux_/begin_end.hpp" -#include "boost/mpl/list/aux_/node.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -template< typename Dummy = void_ > struct list0; -template<> struct list0<void_> - : null_node +#include <boost/mpl/long.hpp> +#include <boost/mpl/aux_/na.hpp> +#include <boost/mpl/list/aux_/push_front.hpp> +#include <boost/mpl/list/aux_/pop_front.hpp> +#include <boost/mpl/list/aux_/push_back.hpp> +#include <boost/mpl/list/aux_/front.hpp> +#include <boost/mpl/list/aux_/clear.hpp> +#include <boost/mpl/list/aux_/O1_size.hpp> +#include <boost/mpl/list/aux_/size.hpp> +#include <boost/mpl/list/aux_/empty.hpp> +#include <boost/mpl/list/aux_/begin_end.hpp> +#include <boost/mpl/list/aux_/item.hpp> + +namespace boost { namespace mpl { + +template< typename Dummy = na > struct list0; + +template<> struct list0<na> + : l_end { - typedef null_node type; + typedef l_end type; }; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_LIST_LIST0_HPP_INCLUDED diff --git a/include/boost/mpl/list/list0_c.hpp b/include/boost/mpl/list/list0_c.hpp index 7c2eab9..ca964f4 100644 --- a/include/boost/mpl/list/list0_c.hpp +++ b/include/boost/mpl/list/list0_c.hpp @@ -1,38 +1,30 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/list0_c.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED #define BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/list/aux_/push_front.hpp" -#include "boost/mpl/list/aux_/pop_front.hpp" -#include "boost/mpl/list/aux_/front.hpp" -#include "boost/mpl/list/aux_/clear.hpp" -#include "boost/mpl/list/aux_/size.hpp" -#include "boost/mpl/list/aux_/empty.hpp" -#include "boost/mpl/list/aux_/begin_end.hpp" -#include "boost/mpl/list/aux_/node.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/list/list0.hpp> +#include <boost/mpl/integral_c.hpp> + +namespace boost { namespace mpl { template< typename T > struct list0_c - : null_node + : l_end { - typedef null_node type; + typedef l_end type; }; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED diff --git a/include/boost/mpl/list/list10.hpp b/include/boost/mpl/list/list10.hpp index a47dc32..aba9ac3 100644 --- a/include/boost/mpl/list/list10.hpp +++ b/include/boost/mpl/list/list10.hpp @@ -1,44 +1,43 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/list10.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_LIST10_HPP_INCLUDED #define BOOST_MPL_LIST_LIST10_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/list/list0.hpp" +# include <boost/mpl/list/list0.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list10.hpp -# include "boost/mpl/list/aux_/include_preprocessed.hpp" +# include <boost/mpl/list/aux_/include_preprocessed.hpp> #else -# include "boost/preprocessor/iterate.hpp" +# include <boost/preprocessor/iterate.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(1, 10, "boost/mpl/list/aux_/numbered.hpp")) + (3,(1, 10, <boost/mpl/list/aux_/numbered.hpp>)) # include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST10_HPP_INCLUDED diff --git a/include/boost/mpl/list/list10_c.hpp b/include/boost/mpl/list/list10_c.hpp index 8b7e3c0..a8f0fff 100644 --- a/include/boost/mpl/list/list10_c.hpp +++ b/include/boost/mpl/list/list10_c.hpp @@ -1,44 +1,43 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/list10_c.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED #define BOOST_MPL_LIST_LIST10_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/list/list0_c.hpp" +# include <boost/mpl/list/list0_c.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list10_c.hpp -# include "boost/mpl/list/aux_/include_preprocessed.hpp" +# include <boost/mpl/list/aux_/include_preprocessed.hpp> #else -# include "boost/preprocessor/iterate.hpp" +# include <boost/preprocessor/iterate.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(1, 10, "boost/mpl/list/aux_/numbered_c.hpp")) + (3,(1, 10, <boost/mpl/list/aux_/numbered_c.hpp>)) # include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED diff --git a/include/boost/mpl/list/list20.hpp b/include/boost/mpl/list/list20.hpp index 9ef4957..efcf210 100644 --- a/include/boost/mpl/list/list20.hpp +++ b/include/boost/mpl/list/list20.hpp @@ -1,44 +1,43 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/list20.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_LIST20_HPP_INCLUDED #define BOOST_MPL_LIST_LIST20_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/list/list10.hpp" +# include <boost/mpl/list/list10.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list20.hpp -# include "boost/mpl/list/aux_/include_preprocessed.hpp" +# include <boost/mpl/list/aux_/include_preprocessed.hpp> #else -# include "boost/preprocessor/iterate.hpp" +# include <boost/preprocessor/iterate.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(11, 20, "boost/mpl/list/aux_/numbered.hpp")) + (3,(11, 20, <boost/mpl/list/aux_/numbered.hpp>)) # include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST20_HPP_INCLUDED diff --git a/include/boost/mpl/list/list20_c.hpp b/include/boost/mpl/list/list20_c.hpp index c88e1d0..7b8c073 100644 --- a/include/boost/mpl/list/list20_c.hpp +++ b/include/boost/mpl/list/list20_c.hpp @@ -1,44 +1,43 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/list20_c.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED #define BOOST_MPL_LIST_LIST20_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/list/list10_c.hpp" +# include <boost/mpl/list/list10_c.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list20_c.hpp -# include "boost/mpl/list/aux_/include_preprocessed.hpp" +# include <boost/mpl/list/aux_/include_preprocessed.hpp> #else -# include "boost/preprocessor/iterate.hpp" +# include <boost/preprocessor/iterate.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(11, 20, "boost/mpl/list/aux_/numbered_c.hpp")) + (3,(11, 20, <boost/mpl/list/aux_/numbered_c.hpp>)) # include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED diff --git a/include/boost/mpl/list/list30.hpp b/include/boost/mpl/list/list30.hpp index b646789..f894519 100644 --- a/include/boost/mpl/list/list30.hpp +++ b/include/boost/mpl/list/list30.hpp @@ -1,44 +1,43 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/list30.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_LIST30_HPP_INCLUDED #define BOOST_MPL_LIST_LIST30_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/list/list20.hpp" +# include <boost/mpl/list/list20.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list30.hpp -# include "boost/mpl/list/aux_/include_preprocessed.hpp" +# include <boost/mpl/list/aux_/include_preprocessed.hpp> #else -# include "boost/preprocessor/iterate.hpp" +# include <boost/preprocessor/iterate.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(21, 30, "boost/mpl/list/aux_/numbered.hpp")) + (3,(21, 30, <boost/mpl/list/aux_/numbered.hpp>)) # include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST30_HPP_INCLUDED diff --git a/include/boost/mpl/list/list30_c.hpp b/include/boost/mpl/list/list30_c.hpp index a09b99f..3b331de 100644 --- a/include/boost/mpl/list/list30_c.hpp +++ b/include/boost/mpl/list/list30_c.hpp @@ -1,44 +1,43 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/list30_c.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED #define BOOST_MPL_LIST_LIST30_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/list/list20_c.hpp" +# include <boost/mpl/list/list20_c.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list30_c.hpp -# include "boost/mpl/list/aux_/include_preprocessed.hpp" +# include <boost/mpl/list/aux_/include_preprocessed.hpp> #else -# include "boost/preprocessor/iterate.hpp" +# include <boost/preprocessor/iterate.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(21, 30, "boost/mpl/list/aux_/numbered_c.hpp")) + (3,(21, 30, <boost/mpl/list/aux_/numbered_c.hpp>)) # include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED diff --git a/include/boost/mpl/list/list40.hpp b/include/boost/mpl/list/list40.hpp index e7f3536..0bb740d 100644 --- a/include/boost/mpl/list/list40.hpp +++ b/include/boost/mpl/list/list40.hpp @@ -1,44 +1,43 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/list40.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_LIST40_HPP_INCLUDED #define BOOST_MPL_LIST_LIST40_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/list/list30.hpp" +# include <boost/mpl/list/list30.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list40.hpp -# include "boost/mpl/list/aux_/include_preprocessed.hpp" +# include <boost/mpl/list/aux_/include_preprocessed.hpp> #else -# include "boost/preprocessor/iterate.hpp" +# include <boost/preprocessor/iterate.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(31, 40, "boost/mpl/list/aux_/numbered.hpp")) + (3,(31, 40, <boost/mpl/list/aux_/numbered.hpp>)) # include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST40_HPP_INCLUDED diff --git a/include/boost/mpl/list/list40_c.hpp b/include/boost/mpl/list/list40_c.hpp index 01baccb..4a7db88 100644 --- a/include/boost/mpl/list/list40_c.hpp +++ b/include/boost/mpl/list/list40_c.hpp @@ -1,44 +1,43 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/list40_c.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED #define BOOST_MPL_LIST_LIST40_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/list/list30_c.hpp" +# include <boost/mpl/list/list30_c.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list40_c.hpp -# include "boost/mpl/list/aux_/include_preprocessed.hpp" +# include <boost/mpl/list/aux_/include_preprocessed.hpp> #else -# include "boost/preprocessor/iterate.hpp" +# include <boost/preprocessor/iterate.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(31, 40, "boost/mpl/list/aux_/numbered_c.hpp")) + (3,(31, 40, <boost/mpl/list/aux_/numbered_c.hpp>)) # include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED diff --git a/include/boost/mpl/list/list50.hpp b/include/boost/mpl/list/list50.hpp index 6a88055..a666a54 100644 --- a/include/boost/mpl/list/list50.hpp +++ b/include/boost/mpl/list/list50.hpp @@ -1,44 +1,43 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/list50.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_LIST50_HPP_INCLUDED #define BOOST_MPL_LIST_LIST50_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/list/list40.hpp" +# include <boost/mpl/list/list40.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list50.hpp -# include "boost/mpl/list/aux_/include_preprocessed.hpp" +# include <boost/mpl/list/aux_/include_preprocessed.hpp> #else -# include "boost/preprocessor/iterate.hpp" +# include <boost/preprocessor/iterate.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(41, 50, "boost/mpl/list/aux_/numbered.hpp")) + (3,(41, 50, <boost/mpl/list/aux_/numbered.hpp>)) # include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST50_HPP_INCLUDED diff --git a/include/boost/mpl/list/list50_c.hpp b/include/boost/mpl/list/list50_c.hpp index a593d05..5fe1974 100644 --- a/include/boost/mpl/list/list50_c.hpp +++ b/include/boost/mpl/list/list50_c.hpp @@ -1,44 +1,43 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/list50_c.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED #define BOOST_MPL_LIST_LIST50_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/list/list40_c.hpp" +# include <boost/mpl/list/list40_c.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list50_c.hpp -# include "boost/mpl/list/aux_/include_preprocessed.hpp" +# include <boost/mpl/list/aux_/include_preprocessed.hpp> #else -# include "boost/preprocessor/iterate.hpp" +# include <boost/preprocessor/iterate.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(41, 50, "boost/mpl/list/aux_/numbered_c.hpp")) + (3,(41, 50, <boost/mpl/list/aux_/numbered_c.hpp>)) # include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED diff --git a/include/boost/mpl/list_c.hpp b/include/boost/mpl/list_c.hpp index 947db46..0c7b059 100644 --- a/include/boost/mpl/list_c.hpp +++ b/include/boost/mpl/list_c.hpp @@ -1,16 +1,12 @@ -#if !defined(BOOST_PP_IS_ITERATING) - -///// header body - #ifndef BOOST_MPL_LIST_C_HPP_INCLUDED #define BOOST_MPL_LIST_C_HPP_INCLUDED -// Copyright (c) 2000-04 Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. @@ -18,220 +14,47 @@ // $Date$ // $Revision$ -// no include guards, the header is intended for multiple inclusion! - #if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include "boost/mpl/limits/list.hpp" -# include "boost/mpl/aux_/config/preprocessor.hpp" +# include <boost/mpl/limits/list.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" +# 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 MPL_AUX_LIST_HEADER \ - BOOST_PP_CAT(BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE), _c).hpp \ +# define AUX778076_HEADER \ + BOOST_PP_CAT(BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE),_c).hpp \ /**/ #else -# define MPL_AUX_LIST_HEADER \ - BOOST_PP_CAT(BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE), _c)##.hpp \ +# define AUX778076_HEADER \ + BOOST_PP_CAT(BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE),_c)##.hpp \ /**/ #endif -# include BOOST_PP_STRINGIZE(boost/mpl/list/MPL_AUX_LIST_HEADER) -# undef MPL_AUX_LIST_HEADER +# include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_HEADER) +# undef AUX778076_HEADER # include <climits> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \ - !defined(BOOST_MPL_PREPROCESSING_MODE) +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list_c.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" +# include <boost/mpl/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/limits/list.hpp" -# include "boost/mpl/aux_/config/nttp.hpp" +# include <boost/mpl/limits/list.hpp> -# include "boost/preprocessor/arithmetic/sub.hpp" -# include "boost/preprocessor/tuple/elem.hpp" -# include "boost/preprocessor/enum_params_with_a_default.hpp" -# include "boost/preprocessor/enum_params.hpp" -# include "boost/preprocessor/enum.hpp" -# include "boost/preprocessor/repeat.hpp" -# include "boost/preprocessor/comma_if.hpp" -# include "boost/preprocessor/iterate.hpp" +# define AUX778076_SEQUENCE_NAME list_c +# define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_LIST_SIZE +# define AUX778076_SEQUENCE_NAME_N(n) BOOST_PP_CAT(BOOST_PP_CAT(list,n),_c) +# define AUX778076_SEQUENCE_INTEGRAL_WRAPPER +# include <boost/mpl/aux_/sequence_wrapper.hpp> -# include "boost/config.hpp" - -#if defined(BOOST_MPL_PREPROCESSING_MODE) -# undef LONG_MAX -#endif - -namespace boost { -namespace mpl { - -# define AUX_LIST_C(i) \ - BOOST_PP_CAT(BOOST_PP_CAT(list,i),_c) \ - /**/ - -# define AUX_LIST_C_PARAMS(param) \ - BOOST_PP_ENUM_PARAMS( \ - BOOST_MPL_LIMIT_LIST_SIZE \ - , param \ - ) \ - /**/ - -# define AUX_LIST_C_DEFAULT_PARAMS(param, value) \ - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( \ - BOOST_MPL_LIMIT_LIST_SIZE \ - , param \ - , value \ - ) \ - /**/ - -# define AUX_LIST_C_N_PARAMS(n, param) \ - BOOST_PP_COMMA_IF(n) \ - BOOST_PP_ENUM_PARAMS(n, param) \ - /**/ - -# define AUX_LIST_C_N_PARTIAL_SPEC_PARAMS(n, param, def) \ - BOOST_PP_ENUM_PARAMS(n, param) \ - BOOST_PP_COMMA_IF(n) \ - BOOST_PP_ENUM( \ - BOOST_PP_SUB_D(1,BOOST_MPL_LIMIT_LIST_SIZE,n) \ - , BOOST_PP_TUPLE_ELEM_3_2 \ - , def \ - ) \ - /**/ - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -// forward declaration -template< - typename T - , AUX_LIST_C_DEFAULT_PARAMS(BOOST_MPL_AUX_NTTP_DECL(long, C), LONG_MAX) - > -struct list_c; -#else -namespace aux { -template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct list_c_impl_chooser; -} -#endif - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(0, BOOST_MPL_LIMIT_LIST_SIZE, "boost/mpl/list_c.hpp")) -#include BOOST_PP_ITERATE() - -// real C++ version is already taken care of -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - -namespace aux { -// list_count_args -#define BOOST_MPL_AUX_COUNT_ARGS_PREFIX list_c -#define BOOST_MPL_AUX_COUNT_ARGS_DEFAULT LONG_MAX -#define BOOST_MPL_AUX_COUNT_ARGS_TEMPLATE_PARAM BOOST_MPL_AUX_NTTP_DECL(long, T) -#define BOOST_MPL_AUX_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_LIST_SIZE -#define BOOST_MPL_AUX_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES -#include "boost/mpl/aux_/count_args.hpp" - -template< - typename T - , AUX_LIST_C_PARAMS(BOOST_MPL_AUX_NTTP_DECL(long, C)) - > -struct list_c_impl -{ - typedef aux::list_c_count_args< AUX_LIST_C_PARAMS(C) > arg_num_; - typedef typename aux::list_c_impl_chooser< arg_num_::value > - ::template result_< T, AUX_LIST_C_PARAMS(C) >::type type; -}; - -} // namespace aux - -template< - typename T - , AUX_LIST_C_DEFAULT_PARAMS(BOOST_MPL_AUX_NTTP_DECL(long, C), LONG_MAX) - > -struct list_c - : aux::list_c_impl< T,AUX_LIST_C_PARAMS(C) >::type -{ - typedef typename aux::list_c_impl< - T,AUX_LIST_C_PARAMS(C) - >::type type; -}; - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -# undef AUX_LIST_C_N_PARTIAL_SPEC_PARAMS -# undef AUX_LIST_C_N_PARAMS -# undef AUX_LIST_C_DEFAULT_PARAMS -# undef AUX_LIST_C_PARAMS -# undef AUX_LIST_C - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_C_HPP_INCLUDED - -///// iteration - -#else -#define i BOOST_PP_FRAME_ITERATION(1) - -# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - -#if i == BOOST_MPL_LIMIT_LIST_SIZE - -//: primary template (not a specialization!) -template< - typename T - AUX_LIST_C_N_PARAMS(i, BOOST_MPL_AUX_NTTP_DECL(long, C)) - > -struct list_c - : AUX_LIST_C(i)< T AUX_LIST_C_N_PARAMS(i, C) > -{ - typedef typename AUX_LIST_C(i)< T AUX_LIST_C_N_PARAMS(i, C) >::type type; -}; - -#else - -template< - typename T - AUX_LIST_C_N_PARAMS(i, BOOST_MPL_AUX_NTTP_DECL(long, C)) - > -struct list_c< T,AUX_LIST_C_N_PARTIAL_SPEC_PARAMS(i, C, LONG_MAX) > - : AUX_LIST_C(i)< T AUX_LIST_C_N_PARAMS(i, C) > -{ - typedef typename AUX_LIST_C(i)< T AUX_LIST_C_N_PARAMS(i, C) >::type type; -}; - -#endif // i == BOOST_MPL_LIMIT_LIST_SIZE - -# else - -namespace aux { - -template<> -struct list_c_impl_chooser<i> -{ - template< - typename T - , AUX_LIST_C_PARAMS(BOOST_MPL_AUX_NTTP_DECL(long, C)) - > - struct result_ - { - typedef typename AUX_LIST_C(i)< - T AUX_LIST_C_N_PARAMS(i, C) - >::type type; - }; -}; - -} // namespace aux - -# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -#undef i -#endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/logical.hpp b/include/boost/mpl/logical.hpp index 403f100..8411e73 100644 --- a/include/boost/mpl/logical.hpp +++ b/include/boost/mpl/logical.hpp @@ -2,20 +2,20 @@ #ifndef BOOST_MPL_LOGICAL_HPP_INCLUDED #define BOOST_MPL_LOGICAL_HPP_INCLUDED -// + file: boost/mpl/logical.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/or.hpp" -#include "boost/mpl/and.hpp" -#include "boost/mpl/not.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/or.hpp> +#include <boost/mpl/and.hpp> +#include <boost/mpl/not.hpp> #endif // BOOST_MPL_LOGICAL_HPP_INCLUDED diff --git a/include/boost/mpl/long.hpp b/include/boost/mpl/long.hpp index 9b7da80..ba324a6 100644 --- a/include/boost/mpl/long.hpp +++ b/include/boost/mpl/long.hpp @@ -2,21 +2,21 @@ #ifndef BOOST_MPL_LONG_HPP_INCLUDED #define BOOST_MPL_LONG_HPP_INCLUDED -// + file: boost/mpl/long.hpp -// + last modified: 08/mar/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/long_fwd.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/long_fwd.hpp> #define AUX_WRAPPER_VALUE_TYPE long -#include "boost/mpl/aux_/integral_wrapper.hpp" +#include <boost/mpl/aux_/integral_wrapper.hpp> #endif // BOOST_MPL_LONG_HPP_INCLUDED diff --git a/include/boost/mpl/long_fwd.hpp b/include/boost/mpl/long_fwd.hpp index da36eda..4e1bcf2 100644 --- a/include/boost/mpl/long_fwd.hpp +++ b/include/boost/mpl/long_fwd.hpp @@ -2,20 +2,25 @@ #ifndef BOOST_MPL_LONG_FWD_HPP_INCLUDED #define BOOST_MPL_LONG_FWD_HPP_INCLUDED -// + file: boost/mpl/long_fwd.hpp -// + last modified: 08/mar/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -namespace boost { namespace mpl { -template< long N > struct long_; -}} +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/adl_barrier.hpp> +#include <boost/mpl/aux_/nttp_decl.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct long_; + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE #endif // BOOST_MPL_LONG_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/lower_bound.hpp b/include/boost/mpl/lower_bound.hpp index 147afa8..1b39c56 100644 --- a/include/boost/mpl/lower_bound.hpp +++ b/include/boost/mpl/lower_bound.hpp @@ -1,59 +1,57 @@ -//----------------------------------------------------------------------------- -// boost mpl/lower_bound.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LOWER_BOUND_HPP_INCLUDED #define BOOST_MPL_LOWER_BOUND_HPP_INCLUDED -#include "boost/mpl/less.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/aux_/void_spec.hpp" +// Copyright Aleksey Gurtovoy 2001-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. -#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/less.hpp> +#include <boost/mpl/lambda.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) # define BOOST_MPL_CFG_STRIPPED_DOWN_LOWER_BOUND_IMPL #endif #if !defined(BOOST_MPL_CFG_STRIPPED_DOWN_LOWER_BOUND_IMPL) -# include "boost/mpl/minus.hpp" -# include "boost/mpl/divides.hpp" -# include "boost/mpl/size.hpp" -# include "boost/mpl/advance.hpp" -# include "boost/mpl/begin_end.hpp" -# include "boost/mpl/integral_c.hpp" -# include "boost/mpl/int.hpp" -# include "boost/mpl/apply_if.hpp" -# include "boost/mpl/apply.hpp" -# include "boost/mpl/aux_/apply.hpp" -# include "boost/mpl/aux_/deref_wknd.hpp" -# include "boost/mpl/aux_/value_wknd.hpp" +# include <boost/mpl/minus.hpp> +# include <boost/mpl/divides.hpp> +# include <boost/mpl/size.hpp> +# include <boost/mpl/advance.hpp> +# include <boost/mpl/begin_end.hpp> +# include <boost/mpl/long.hpp> +# include <boost/mpl/eval_if.hpp> +# include <boost/mpl/prior.hpp> +# include <boost/mpl/deref.hpp> +# include <boost/mpl/apply.hpp> +# include <boost/mpl/aux_/value_wknd.hpp> #else -# include "boost/mpl/not.hpp" -# include "boost/mpl/find.hpp" -# include "boost/mpl/bind.hpp" +# include <boost/mpl/not.hpp> +# include <boost/mpl/find.hpp> +# include <boost/mpl/bind.hpp> #endif -#include "boost/config.hpp" +#include <boost/config.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { #if defined(BOOST_MPL_CFG_STRIPPED_DOWN_LOWER_BOUND_IMPL) -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN - // agurt 23/oct/02: has a wrong complexity etc., but at least it works // feel free to contribute a better implementation! template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(T) , typename Predicate = less<> , typename pred_ = typename lambda<Predicate>::type > @@ -62,8 +60,6 @@ struct lower_bound { }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END - #else namespace aux { @@ -84,10 +80,10 @@ template< > struct lower_bound_step { - typedef typename apply_if< + typedef typename eval_if< Distance , lower_bound_step_impl<Distance,Predicate,T,DeferredIterator> - , apply0<DeferredIterator> + , DeferredIterator >::type type; }; @@ -99,19 +95,19 @@ template< > struct lower_bound_step_impl { - typedef typename divides< Distance, integral_c<long,2> >::type offset_; + typedef typename divides< Distance, long_<2> >::type offset_; typedef typename DeferredIterator::type iter_; typedef typename advance< iter_,offset_ >::type middle_; - typedef typename BOOST_MPL_AUX_APPLY2( + typedef typename apply2< Predicate - , typename BOOST_MPL_AUX_DEREF_WNKD(middle_) + , typename deref<middle_>::type , T - )::type cond_; + >::type cond_; - typedef typename minus< Distance, offset_, integral_c<long,1> >::type step_; + typedef typename prior< minus< Distance, offset_> >::type step_; typedef lower_bound_step< offset_,Predicate,T,DeferredIterator > step_forward_; typedef lower_bound_step< step_,Predicate,T,next<middle_> > step_backward_; - typedef typename apply_if< + typedef typename eval_if< cond_ , step_backward_ , step_forward_ @@ -121,11 +117,9 @@ struct lower_bound_step_impl } // namespace aux -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN - template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(T) , typename Predicate = less<> > struct lower_bound @@ -140,13 +134,10 @@ struct lower_bound >::type type; }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END - #endif // BOOST_MPL_CFG_STRIPPED_DOWN_LOWER_BOUND_IMPL -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, lower_bound) +BOOST_MPL_AUX_NA_SPEC(2, lower_bound) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_LOWER_BOUND_HPP_INCLUDED diff --git a/include/boost/mpl/map.hpp b/include/boost/mpl/map.hpp new file mode 100644 index 0000000..47fe1ca --- /dev/null +++ b/include/boost/mpl/map.hpp @@ -0,0 +1,57 @@ + +#ifndef BOOST_MPL_MAP_HPP_INCLUDED +#define BOOST_MPL_MAP_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/map.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_MAP_HEADER \ + BOOST_PP_CAT(map, BOOST_MPL_LIMIT_MAP_SIZE).hpp \ + /**/ +#else +# define AUX778076_MAP_HEADER \ + BOOST_PP_CAT(map, BOOST_MPL_LIMIT_MAP_SIZE)##.hpp \ + /**/ +#endif + +# include BOOST_PP_STRINGIZE(boost/mpl/map/AUX778076_MAP_HEADER) +# undef AUX778076_MAP_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 map.hpp +# include <boost/mpl/aux_/include_preprocessed.hpp> + +#else + +# include <boost/mpl/limits/map.hpp> + +# define AUX778076_SEQUENCE_NAME map +# define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_MAP_SIZE +# include <boost/mpl/aux_/sequence_wrapper.hpp> + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_MAP_HPP_INCLUDED diff --git a/include/boost/mpl/map/aux_/at_impl.hpp b/include/boost/mpl/map/aux_/at_impl.hpp new file mode 100644 index 0000000..7a98429 --- /dev/null +++ b/include/boost/mpl/map/aux_/at_impl.hpp @@ -0,0 +1,136 @@ + +#ifndef BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED +#define BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/at_fwd.hpp> +#include <boost/mpl/long.hpp> +#include <boost/mpl/map/aux_/tag.hpp> +#include <boost/mpl/aux_/order_impl.hpp> +#include <boost/mpl/aux_/type_wrapper.hpp> +#include <boost/mpl/aux_/ptr_to_ref.hpp> +#include <boost/mpl/aux_/static_cast.hpp> +#include <boost/mpl/aux_/config/typeof.hpp> + +#if !defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) +# include <boost/mpl/eval_if.hpp> +# include <boost/mpl/pair.hpp> +# include <boost/mpl/void.hpp> +#endif + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +template< typename Map, typename Key > +struct m_at +{ + typedef aux::type_wrapper<Key> key_; + typedef __typeof__( aux::ptr_to_ref(BOOST_MPL_AUX_STATIC_CAST(Map*, 0)) + | BOOST_MPL_AUX_STATIC_CAST(key_*, 0) ) type; +}; + +template<> +struct at_impl< aux::map_tag > +{ + template< typename Map, typename Key > struct apply + : aux::wrapped_type< typename m_at< + Map + , Key + >::type > + { + }; +}; + +// agurt 31/jan/04: two-step implementation for the sake of GCC 3.x +template< typename Map, long order > +struct item_by_order_impl +{ + typedef __typeof__( aux::ptr_to_ref(BOOST_MPL_AUX_STATIC_CAST(Map*, 0)) + || long_<order>() ) type; +}; + +template< typename Map, long order > +struct item_by_order + : aux::wrapped_type< + typename item_by_order_impl<Map,order>::type + > +{ +}; + +#else // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +template< typename Map, long n > struct m_at +{ + typedef void_ type; +}; + +template< typename Map> +struct m_at<Map,2> +{ + typedef typename Map::type1 type; +}; + +template< typename Map> +struct m_at<Map,3> +{ + typedef typename Map::type2 type; +}; + +template< typename Map> +struct m_at<Map,4> +{ + typedef typename Map::type3 type; +}; + +template<> +struct at_impl< aux::map_tag > +{ + template< typename Map, typename Key > struct apply + { + typedef typename m_at< + Map + , x_order_impl<Map,Key>::value + >::type type_; + + typedef typename eval_if< + is_void_<type_> + , void_ + , second<type_> + >::type type; + }; +}; + +template< typename Map, long order > struct item_by_order +{ + BOOST_STATIC_CONSTANT(bool, is_deleted_ = + sizeof( + *BOOST_MPL_AUX_STATIC_CAST(Map*, 0) + % BOOST_MPL_AUX_STATIC_CAST(long_<order>*, 0) + ) - 1 + ); + + typedef typename eval_if_c< + is_deleted_ + , void_ + , m_at<Map,order> + >::type type; +}; + +#endif + +}} + +#endif // BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/map/aux_/begin_end_impl.hpp b/include/boost/mpl/map/aux_/begin_end_impl.hpp new file mode 100644 index 0000000..a67149c --- /dev/null +++ b/include/boost/mpl/map/aux_/begin_end_impl.hpp @@ -0,0 +1,49 @@ + +#ifndef BOOST_MPL_MAP_AUX_BEGIN_END_IMPL_HPP_INCLUDED +#define BOOST_MPL_MAP_AUX_BEGIN_END_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/begin_end_fwd.hpp> +#include <boost/mpl/map/aux_/iterator.hpp> + +namespace boost { namespace mpl { + +template<> +struct begin_impl< aux::map_tag > +{ + template< typename Map > struct apply + { + enum { max_order_ = Map::order + 1 }; + typedef m_iter< + Map + , next_order<Map,1,max_order_>::value + , max_order_ + > type; + }; +}; + +template<> +struct end_impl< aux::map_tag > +{ + template< typename Map > struct apply + { + enum { max_order_ = Map::order + 1 }; + typedef m_iter< Map,max_order_,max_order_ > type; + }; +}; + +}} + +#endif // BOOST_MPL_MAP_AUX_BEGIN_END_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/map/aux_/clear_impl.hpp b/include/boost/mpl/map/aux_/clear_impl.hpp new file mode 100644 index 0000000..4b7b348 --- /dev/null +++ b/include/boost/mpl/map/aux_/clear_impl.hpp @@ -0,0 +1,35 @@ + +#ifndef BOOST_MPL_MAP_AUX_CLEAR_IMPL_HPP_INCLUDED +#define BOOST_MPL_MAP_AUX_CLEAR_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/clear_fwd.hpp> +#include <boost/mpl/map/aux_/map0.hpp> +#include <boost/mpl/map/aux_/tag.hpp> + +namespace boost { namespace mpl { + +template<> +struct clear_impl< aux::map_tag > +{ + template< typename Map > struct apply + { + typedef map0<> type; + }; +}; + +}} + +#endif // BOOST_MPL_MAP_AUX_CLEAR_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/map/aux_/contains_impl.hpp b/include/boost/mpl/map/aux_/contains_impl.hpp new file mode 100644 index 0000000..bd30fd5 --- /dev/null +++ b/include/boost/mpl/map/aux_/contains_impl.hpp @@ -0,0 +1,43 @@ + +#ifndef BOOST_MPL_MAP_AUX_CONTAINS_IMPL_HPP_INCLUDED +#define BOOST_MPL_MAP_AUX_CONTAINS_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/contains_fwd.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/map/aux_/at_impl.hpp> +#include <boost/mpl/map/aux_/tag.hpp> + +#include <boost/type_traits/is_same.hpp> + +namespace boost { namespace mpl { + +template<> +struct contains_impl< aux::map_tag > +{ + template< typename Map, typename Pair > struct apply + : is_same< + typename at_impl<aux::map_tag>::apply< + Map + , typename Pair::first + >::type + , typename Pair::second + > + { + }; +}; + +}} + +#endif // BOOST_MPL_MAP_AUX_CONTAINS_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/map/aux_/empty_impl.hpp b/include/boost/mpl/map/aux_/empty_impl.hpp new file mode 100644 index 0000000..b49850e --- /dev/null +++ b/include/boost/mpl/map/aux_/empty_impl.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_MAP_AUX_EMPTY_IMPL_HPP_INCLUDED +#define BOOST_MPL_MAP_AUX_EMPTY_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/empty_fwd.hpp> +#include <boost/mpl/not.hpp> +#include <boost/mpl/map/aux_/tag.hpp> + +namespace boost { namespace mpl { + +template<> +struct empty_impl< aux::map_tag > +{ + template< typename Map > struct apply + : not_< typename Map::size > + { + }; +}; + +}} + +#endif // BOOST_MPL_MAP_AUX_EMPTY_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/map/aux_/erase_impl.hpp b/include/boost/mpl/map/aux_/erase_impl.hpp new file mode 100644 index 0000000..24a78fc --- /dev/null +++ b/include/boost/mpl/map/aux_/erase_impl.hpp @@ -0,0 +1,44 @@ + +#ifndef BOOST_MPL_MAP_AUX_ERASE_IMPL_HPP_INCLUDED +#define BOOST_MPL_MAP_AUX_ERASE_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/erase_fwd.hpp> +#include <boost/mpl/map/aux_/erase_key_impl.hpp> +#include <boost/mpl/map/aux_/tag.hpp> +#include <boost/mpl/aux_/config/typeof.hpp> + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) +template<> +struct erase_impl< aux::map_tag > +{ + template< + typename Map + , typename Pos + , typename unused_ + > + struct apply + : erase_key_impl<aux::map_tag> + ::apply<Map,typename Pos::type::first> + { + }; +}; +#endif + +}} + +#endif // BOOST_MPL_MAP_AUX_ERASE_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/map/aux_/erase_key_impl.hpp b/include/boost/mpl/map/aux_/erase_key_impl.hpp new file mode 100644 index 0000000..51e287c --- /dev/null +++ b/include/boost/mpl/map/aux_/erase_key_impl.hpp @@ -0,0 +1,56 @@ + +#ifndef BOOST_MPL_MAP_AUX_ERASE_KEY_IMPL_HPP_INCLUDED +#define BOOST_MPL_MAP_AUX_ERASE_KEY_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/erase_key_fwd.hpp> +#include <boost/mpl/map/aux_/has_key_impl.hpp> +#include <boost/mpl/map/aux_/item.hpp> +#include <boost/mpl/map/aux_/tag.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/base.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/aux_/config/typeof.hpp> + +#include <boost/type_traits/is_same.hpp> + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) +template<> +struct erase_key_impl< aux::map_tag > +{ + template< + typename Map + , typename Key + > + struct apply + : eval_if< + has_key_impl<aux::map_tag>::apply<Map,Key> + , eval_if< + is_same< Key,typename Map::key_ > + , base<Map> + , identity< m_mask<Key,Map> > + > + , identity<Map> + > + { + }; +}; +#endif + +}} + +#endif // BOOST_MPL_MAP_AUX_ERASE_KEY_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/map/aux_/has_key_impl.hpp b/include/boost/mpl/map/aux_/has_key_impl.hpp new file mode 100644 index 0000000..0caf056 --- /dev/null +++ b/include/boost/mpl/map/aux_/has_key_impl.hpp @@ -0,0 +1,40 @@ + +#ifndef BOOST_MPL_MAP_AUX_HAS_KEY_IMPL_HPP_INCLUDED +#define BOOST_MPL_MAP_AUX_HAS_KEY_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/has_key_fwd.hpp> +#include <boost/mpl/map/aux_/tag.hpp> +#include <boost/mpl/map/aux_/at_impl.hpp> +#include <boost/mpl/void.hpp> + +namespace boost { +namespace mpl { + +template<> +struct has_key_impl< aux::map_tag > +{ + template< typename Map, typename Key > struct apply + : is_not_void_< + typename at_impl<aux::map_tag> + ::apply<Map,Key>::type + > + { + }; +}; + +}} + +#endif // BOOST_MPL_MAP_AUX_HAS_KEY_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/map/aux_/include_preprocessed.hpp b/include/boost/mpl/map/aux_/include_preprocessed.hpp new file mode 100644 index 0000000..82bddbc --- /dev/null +++ b/include/boost/mpl/map/aux_/include_preprocessed.hpp @@ -0,0 +1,48 @@ + +// Copyright Aleksey Gurtovoy 2001-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$ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! + +#include <boost/mpl/aux_/config/typeof.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> +#include <boost/mpl/aux_/config/preprocessor.hpp> + +#include <boost/preprocessor/cat.hpp> +#include <boost/preprocessor/stringize.hpp> + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) +# define AUX778076_INCLUDE_DIR typeof_based +#elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + || defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) +# define AUX778076_INCLUDE_DIR no_ctps +#else +# define AUX778076_INCLUDE_DIR plain +#endif + +#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) +# define AUX778076_HEADER \ + AUX778076_INCLUDE_DIR/BOOST_MPL_PREPROCESSED_HEADER \ +/**/ +#else +# define AUX778076_HEADER \ + BOOST_PP_CAT(AUX778076_INCLUDE_DIR,/)##BOOST_MPL_PREPROCESSED_HEADER \ +/**/ +#endif + + +# include BOOST_PP_STRINGIZE(boost/mpl/map/aux_/preprocessed/AUX778076_HEADER) + +# undef AUX778076_HEADER +# undef AUX778076_INCLUDE_DIR + +#undef BOOST_MPL_PREPROCESSED_HEADER diff --git a/include/boost/mpl/map/aux_/insert_impl.hpp b/include/boost/mpl/map/aux_/insert_impl.hpp new file mode 100644 index 0000000..fd6b4e5 --- /dev/null +++ b/include/boost/mpl/map/aux_/insert_impl.hpp @@ -0,0 +1,64 @@ + +#ifndef BOOST_MPL_MAP_AUX_INSERT_IMPL_HPP_INCLUDED +#define BOOST_MPL_MAP_AUX_INSERT_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/insert_fwd.hpp> +#include <boost/mpl/map/aux_/contains_impl.hpp> +#include <boost/mpl/map/aux_/item.hpp> +#include <boost/mpl/map/aux_/tag.hpp> +#include <boost/mpl/aux_/na.hpp> +#include <boost/mpl/aux_/config/typeof.hpp> + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) +namespace aux { +template< typename Map, typename Pair > +struct map_insert_impl + : if_< + contains_impl<aux::map_tag>::apply<Map,Pair> + , Map + , m_item< + typename Pair::first + , typename Pair::second + , Map + > + > +{ +}; +} + +template<> +struct insert_impl< aux::map_tag > +{ + template< + typename Map + , typename PosOrKey + , typename KeyOrNA + > + struct apply + : aux::map_insert_impl< + Map + , typename if_na<KeyOrNA,PosOrKey>::type + > + { + }; +}; +#endif + +}} + +#endif // BOOST_MPL_MAP_AUX_INSERT_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/map/aux_/item.hpp b/include/boost/mpl/map/aux_/item.hpp new file mode 100644 index 0000000..5256890 --- /dev/null +++ b/include/boost/mpl/map/aux_/item.hpp @@ -0,0 +1,180 @@ + +#ifndef BOOST_MPL_MAP_AUX_ITEM_HPP_INCLUDED +#define BOOST_MPL_MAP_AUX_ITEM_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/void.hpp> +#include <boost/mpl/pair.hpp> +#include <boost/mpl/long.hpp> +#include <boost/mpl/next.hpp> +#include <boost/mpl/prior.hpp> +#include <boost/mpl/map/aux_/map0.hpp> +#include <boost/mpl/aux_/order_impl.hpp> +#include <boost/mpl/aux_/yes_no.hpp> +#include <boost/mpl/aux_/type_wrapper.hpp> +#include <boost/mpl/aux_/config/static_constant.hpp> +#include <boost/mpl/aux_/config/operators.hpp> +#include <boost/mpl/aux_/config/typeof.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +aux::type_wrapper<void_> operator|(map0<> const&, void const volatile*); +aux::type_wrapper<void_> operator||(map0<> const&, long_<1>); +aux::no_tag operator/(map0<> const&, void const volatile*); + +# if defined(BOOST_MPL_CFG_USE_OPERATORS_SPECIALIZATION) + +template< typename Key, typename T, typename Base > struct m_item; +template< typename Key, typename Base > struct m_mask; + +template< typename Key, typename T, typename Base > +aux::type_wrapper<T> +operator|(m_item<Key,T,Base> const&, aux::type_wrapper<Key>*); + +template< typename Key, typename T, typename Base > +aux::type_wrapper<typename m_item<Key,T,Base>::type> +operator||(m_item<Key,T,Base> const&, long_<m_item<Key,T,Base>::order>); + +template< typename Key, typename Base > +aux::type_wrapper<void_> +operator|(m_mask<Key,Base> const&, aux::type_wrapper<Key>*); + +template< typename Key, typename Base > +aux::type_wrapper<void_> +operator||(m_mask<Key,Base> const&, long_<m_mask<Key,Base>::old_order_::value>); + +template< typename Key, typename T, typename Base > +typename m_item<Key,T,Base>::order_tag_ +operator/(m_item<Key,T,Base> const&, aux::type_wrapper<Key>*); + +# define MPL_AUX_MAP_OPERATOR(x) operator x <> + +# else +# define MPL_AUX_MAP_OPERATOR(x) operator x +# endif + + +template< typename Key, typename T, typename Base > +struct m_item + : Base +{ + typedef Key key_; + typedef pair<Key,T> type; + typedef Base base; + + typedef typename next< typename Base::size >::type size; + + BOOST_STATIC_CONSTANT(long, order = Base::order + 1); + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) + typedef typename aux::weighted_tag<(Base::order + 1)>::type order_tag_; +#else + typedef char (&order_tag_)[order]; +#endif + + friend aux::type_wrapper<T> MPL_AUX_MAP_OPERATOR(|)(m_item const&, aux::type_wrapper<Key>*); + friend aux::type_wrapper<type> MPL_AUX_MAP_OPERATOR(||)(m_item const&, long_<order>); + friend order_tag_ MPL_AUX_MAP_OPERATOR(/)(m_item const&, aux::type_wrapper<Key>*); +}; + + +template< typename Key, typename Base > +struct m_mask + : Base +{ + typedef void_ key_; + typedef Base base; + + typedef typename prior< typename Base::size >::type size; + + typedef typename x_order_impl<Base,Key>::type old_order_; + + friend aux::type_wrapper<void_> MPL_AUX_MAP_OPERATOR(|)(m_mask const&, aux::type_wrapper<Key>*); + friend aux::type_wrapper<void_> MPL_AUX_MAP_OPERATOR(||)(m_mask const&, long_<old_order_::value>); +// friend order_tag_ MPL_AUX_MAP_OPERATOR(/)(m_mask const&, aux::type_wrapper<T>*); +}; + +# undef MPL_AUX_MAP_OPERATOR + +#else // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +aux::no_tag operator/(map0<> const&, void*); +aux::no_tag operator%(map0<> const&, void*); + +template< typename Key, typename T, typename Base > +struct m_item_ + : Base +{ + typedef Key key_; + typedef Base base; + + typedef typename next< typename Base::size >::type size; + + BOOST_STATIC_CONSTANT(long, order = Base::order + 1); + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) + typedef typename aux::weighted_tag<(Base::order + 1)>::type order_tag_; +#else + typedef char (&order_tag_)[order]; +#endif + + friend order_tag_ operator/(m_item_ const&, aux::type_wrapper<Key>*); +}; + +template< typename Key, typename T, typename Base > +struct m_item1 + : m_item_<Key,T,Base> +{ + typedef pair<Key,T> type1; +}; + +template< typename Key, typename T, typename Base > +struct m_item2 + : m_item_<Key,T,Base> +{ + typedef pair<Key,T> type2; +}; + +template< typename Key, typename T, typename Base > +struct m_item3 + : m_item_<Key,T,Base> +{ + typedef pair<Key,T> type3; +}; + +template< typename Key, typename Base > +struct m_mask + : Base +{ + typedef void_ key_; + typedef Base base; + + typedef typename prior< typename Base::size >::type size; + + typedef typename x_order_impl<Base,Key>::type old_order_; + + friend aux::no_tag operator/(m_mask const&, aux::type_wrapper<Key>*); + friend aux::yes_tag operator%(m_mask const&, long_<old_order_::value>*); +}; + + +#endif + +}} + +#endif // BOOST_MPL_MAP_AUX_ITEM_HPP_INCLUDED diff --git a/include/boost/mpl/map/aux_/iterator.hpp b/include/boost/mpl/map/aux_/iterator.hpp new file mode 100644 index 0000000..6bd719a --- /dev/null +++ b/include/boost/mpl/map/aux_/iterator.hpp @@ -0,0 +1,87 @@ + +#ifndef BOOST_MPL_MAP_AUX_ITERATOR_HPP_INCLUDED +#define BOOST_MPL_MAP_AUX_ITERATOR_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/map/aux_/map0.hpp> +#include <boost/mpl/map/aux_/at_impl.hpp> +#include <boost/mpl/map/aux_/tag.hpp> +#include <boost/mpl/iterator_tags.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/next.hpp> +#include <boost/mpl/deref.hpp> +#include <boost/mpl/long.hpp> +#include <boost/mpl/void.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> + + +namespace boost { namespace mpl { + +template< + typename Map + , long order + , long max_order + > +struct next_order + : if_< + is_void_< typename item_by_order<Map,order>::type > + , next_order<Map,(order+1),max_order> + , long_<order> + >::type +{ +}; + +template< + typename Map + , long max_order + > +struct next_order<Map,max_order,max_order> + : long_<max_order> +{ +}; + + +template< typename Map, long order, long max_order > +struct m_iter +{ + typedef forward_iterator_tag category; + typedef typename item_by_order<Map,order>::type type; +}; + +template< typename Map, long max_order > +struct m_iter<Map,max_order,max_order> +{ + typedef forward_iterator_tag category; +}; + + +template< typename Map, long order, long max_order > +struct next< m_iter<Map,order,max_order> > +{ + typedef m_iter< + Map + , next_order<Map,order+1,max_order>::value + , max_order + > type; +}; + +template< typename Map, long max_order > +struct next< m_iter<Map,max_order,max_order> > +{ +}; + +}} + +#endif // BOOST_MPL_MAP_AUX_ITERATOR_HPP_INCLUDED diff --git a/include/boost/mpl/map/aux_/key_type_impl.hpp b/include/boost/mpl/map/aux_/key_type_impl.hpp new file mode 100644 index 0000000..98d5632 --- /dev/null +++ b/include/boost/mpl/map/aux_/key_type_impl.hpp @@ -0,0 +1,36 @@ + +#ifndef BOOST_MPL_MAP_AUX_KEY_TYPE_IMPL_HPP_INCLUDED +#define BOOST_MPL_MAP_AUX_KEY_TYPE_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/key_type_fwd.hpp> +#include <boost/mpl/pair.hpp> +#include <boost/mpl/map/aux_/tag.hpp> + +namespace boost { +namespace mpl { + +template<> +struct key_type_impl< aux::map_tag > +{ + template< typename Map, typename T > struct apply + : first<T> + { + }; +}; + +}} + +#endif // BOOST_MPL_MAP_AUX_KEY_TYPE_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/map/aux_/map0.hpp b/include/boost/mpl/map/aux_/map0.hpp new file mode 100644 index 0000000..0e786c1 --- /dev/null +++ b/include/boost/mpl/map/aux_/map0.hpp @@ -0,0 +1,38 @@ + +#ifndef BOOST_MPL_MAP_AUX_MAP0_HPP_INCLUDED +#define BOOST_MPL_MAP_AUX_MAP0_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/long.hpp> +#include <boost/mpl/void.hpp> +#include <boost/mpl/map/aux_/tag.hpp> +#include <boost/mpl/aux_/na.hpp> +#include <boost/mpl/aux_/config/static_constant.hpp> + +namespace boost { namespace mpl { + +template< typename Dummy = na > struct map0 +{ + typedef map0 type; + typedef aux::map_tag tag; + typedef void_ key_; + typedef long_<0> size; + + BOOST_STATIC_CONSTANT(long, order = 1); +}; + +}} + +#endif // BOOST_MPL_MAP_AUX_MAP0_HPP_INCLUDED diff --git a/include/boost/mpl/map/aux_/numbered.hpp b/include/boost/mpl/map/aux_/numbered.hpp new file mode 100644 index 0000000..7c91eab --- /dev/null +++ b/include/boost/mpl/map/aux_/numbered.hpp @@ -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/enum_params.hpp> +#include <boost/preprocessor/dec.hpp> +#include <boost/preprocessor/cat.hpp> + +#define i_ BOOST_PP_FRAME_ITERATION(1) + +# define AUX778076_MAP_TAIL(map, i_, P) \ + BOOST_PP_CAT(map,i_)< \ + BOOST_PP_ENUM_PARAMS(i_, P) \ + > \ + /**/ + +#if i_ > 0 +template< + BOOST_PP_ENUM_PARAMS(i_, typename P) + > +struct BOOST_PP_CAT(map,i_) + : m_item< + typename BOOST_PP_CAT(P,BOOST_PP_DEC(i_))::first + , typename BOOST_PP_CAT(P,BOOST_PP_DEC(i_))::second + , AUX778076_MAP_TAIL(map,BOOST_PP_DEC(i_),P) + > +{ +}; +#endif + +# undef AUX778076_MAP_TAIL + +#undef i_ + +#endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/map/aux_/preprocessed/plain/map10.hpp b/include/boost/mpl/map/aux_/preprocessed/plain/map10.hpp new file mode 100644 index 0000000..8e24c3c --- /dev/null +++ b/include/boost/mpl/map/aux_/preprocessed/plain/map10.hpp @@ -0,0 +1,140 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/map/Attic/map10.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename P0 + > +struct map1 + : m_item< + typename P0::first + , typename P0::second + , map0< > + > +{ +}; + +template< + typename P0, typename P1 + > +struct map2 + : m_item< + typename P1::first + , typename P1::second + , map1<P0> + > +{ +}; + +template< + typename P0, typename P1, typename P2 + > +struct map3 + : m_item< + typename P2::first + , typename P2::second + , map2< P0,P1 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3 + > +struct map4 + : m_item< + typename P3::first + , typename P3::second + , map3< P0,P1,P2 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + > +struct map5 + : m_item< + typename P4::first + , typename P4::second + , map4< P0,P1,P2,P3 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5 + > +struct map6 + : m_item< + typename P5::first + , typename P5::second + , map5< P0,P1,P2,P3,P4 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6 + > +struct map7 + : m_item< + typename P6::first + , typename P6::second + , map6< P0,P1,P2,P3,P4,P5 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7 + > +struct map8 + : m_item< + typename P7::first + , typename P7::second + , map7< P0,P1,P2,P3,P4,P5,P6 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8 + > +struct map9 + : m_item< + typename P8::first + , typename P8::second + , map8< P0,P1,P2,P3,P4,P5,P6,P7 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + > +struct map10 + : m_item< + typename P9::first + , typename P9::second + , map9< P0,P1,P2,P3,P4,P5,P6,P7,P8 > + > +{ +}; + +}} diff --git a/include/boost/mpl/map/aux_/preprocessed/plain/map20.hpp b/include/boost/mpl/map/aux_/preprocessed/plain/map20.hpp new file mode 100644 index 0000000..b2b52b3 --- /dev/null +++ b/include/boost/mpl/map/aux_/preprocessed/plain/map20.hpp @@ -0,0 +1,160 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/map/Attic/map20.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10 + > +struct map11 + : m_item< + typename P10::first + , typename P10::second + , map10< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11 + > +struct map12 + : m_item< + typename P11::first + , typename P11::second + , map11< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12 + > +struct map13 + : m_item< + typename P12::first + , typename P12::second + , map12< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13 + > +struct map14 + : m_item< + typename P13::first + , typename P13::second + , map13< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + > +struct map15 + : m_item< + typename P14::first + , typename P14::second + , map14< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15 + > +struct map16 + : m_item< + typename P15::first + , typename P15::second + , map15< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16 + > +struct map17 + : m_item< + typename P16::first + , typename P16::second + , map16< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17 + > +struct map18 + : m_item< + typename P17::first + , typename P17::second + , map17< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18 + > +struct map19 + : m_item< + typename P18::first + , typename P18::second + , map18< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + > +struct map20 + : m_item< + typename P19::first + , typename P19::second + , map19< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18 > + > +{ +}; + +}} diff --git a/include/boost/mpl/map/aux_/preprocessed/plain/map30.hpp b/include/boost/mpl/map/aux_/preprocessed/plain/map30.hpp new file mode 100644 index 0000000..d11509f --- /dev/null +++ b/include/boost/mpl/map/aux_/preprocessed/plain/map30.hpp @@ -0,0 +1,180 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/map/Attic/map30.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20 + > +struct map21 + : m_item< + typename P20::first + , typename P20::second + , map20< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21 + > +struct map22 + : m_item< + typename P21::first + , typename P21::second + , map21< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22 + > +struct map23 + : m_item< + typename P22::first + , typename P22::second + , map22< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23 + > +struct map24 + : m_item< + typename P23::first + , typename P23::second + , map23< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + > +struct map25 + : m_item< + typename P24::first + , typename P24::second + , map24< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25 + > +struct map26 + : m_item< + typename P25::first + , typename P25::second + , map25< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26 + > +struct map27 + : m_item< + typename P26::first + , typename P26::second + , map26< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27 + > +struct map28 + : m_item< + typename P27::first + , typename P27::second + , map27< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28 + > +struct map29 + : m_item< + typename P28::first + , typename P28::second + , map28< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + > +struct map30 + : m_item< + typename P29::first + , typename P29::second + , map29< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28 > + > +{ +}; + +}} diff --git a/include/boost/mpl/map/aux_/preprocessed/plain/map40.hpp b/include/boost/mpl/map/aux_/preprocessed/plain/map40.hpp new file mode 100644 index 0000000..6a374d5 --- /dev/null +++ b/include/boost/mpl/map/aux_/preprocessed/plain/map40.hpp @@ -0,0 +1,200 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/map/Attic/map40.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30 + > +struct map31 + : m_item< + typename P30::first + , typename P30::second + , map30< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31 + > +struct map32 + : m_item< + typename P31::first + , typename P31::second + , map31< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32 + > +struct map33 + : m_item< + typename P32::first + , typename P32::second + , map32< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33 + > +struct map34 + : m_item< + typename P33::first + , typename P33::second + , map33< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + > +struct map35 + : m_item< + typename P34::first + , typename P34::second + , map34< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35 + > +struct map36 + : m_item< + typename P35::first + , typename P35::second + , map35< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36 + > +struct map37 + : m_item< + typename P36::first + , typename P36::second + , map36< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37 + > +struct map38 + : m_item< + typename P37::first + , typename P37::second + , map37< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38 + > +struct map39 + : m_item< + typename P38::first + , typename P38::second + , map38< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + > +struct map40 + : m_item< + typename P39::first + , typename P39::second + , map39< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38 > + > +{ +}; + +}} diff --git a/include/boost/mpl/map/aux_/preprocessed/plain/map50.hpp b/include/boost/mpl/map/aux_/preprocessed/plain/map50.hpp new file mode 100644 index 0000000..42451a4 --- /dev/null +++ b/include/boost/mpl/map/aux_/preprocessed/plain/map50.hpp @@ -0,0 +1,220 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/map/Attic/map50.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + , typename P40 + > +struct map41 + : m_item< + typename P40::first + , typename P40::second + , map40< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + , typename P40, typename P41 + > +struct map42 + : m_item< + typename P41::first + , typename P41::second + , map41< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + , typename P40, typename P41, typename P42 + > +struct map43 + : m_item< + typename P42::first + , typename P42::second + , map42< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + , typename P40, typename P41, typename P42, typename P43 + > +struct map44 + : m_item< + typename P43::first + , typename P43::second + , map43< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + , typename P40, typename P41, typename P42, typename P43, typename P44 + > +struct map45 + : m_item< + typename P44::first + , typename P44::second + , map44< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + , typename P40, typename P41, typename P42, typename P43, typename P44 + , typename P45 + > +struct map46 + : m_item< + typename P45::first + , typename P45::second + , map45< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + , typename P40, typename P41, typename P42, typename P43, typename P44 + , typename P45, typename P46 + > +struct map47 + : m_item< + typename P46::first + , typename P46::second + , map46< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + , typename P40, typename P41, typename P42, typename P43, typename P44 + , typename P45, typename P46, typename P47 + > +struct map48 + : m_item< + typename P47::first + , typename P47::second + , map47< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + , typename P40, typename P41, typename P42, typename P43, typename P44 + , typename P45, typename P46, typename P47, typename P48 + > +struct map49 + : m_item< + typename P48::first + , typename P48::second + , map48< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46,P47 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + , typename P40, typename P41, typename P42, typename P43, typename P44 + , typename P45, typename P46, typename P47, typename P48, typename P49 + > +struct map50 + : m_item< + typename P49::first + , typename P49::second + , map49< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46,P47,P48 > + > +{ +}; + +}} diff --git a/include/boost/mpl/map/aux_/preprocessed/typeof_based/map10.hpp b/include/boost/mpl/map/aux_/preprocessed/typeof_based/map10.hpp new file mode 100644 index 0000000..8e24c3c --- /dev/null +++ b/include/boost/mpl/map/aux_/preprocessed/typeof_based/map10.hpp @@ -0,0 +1,140 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/map/Attic/map10.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename P0 + > +struct map1 + : m_item< + typename P0::first + , typename P0::second + , map0< > + > +{ +}; + +template< + typename P0, typename P1 + > +struct map2 + : m_item< + typename P1::first + , typename P1::second + , map1<P0> + > +{ +}; + +template< + typename P0, typename P1, typename P2 + > +struct map3 + : m_item< + typename P2::first + , typename P2::second + , map2< P0,P1 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3 + > +struct map4 + : m_item< + typename P3::first + , typename P3::second + , map3< P0,P1,P2 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + > +struct map5 + : m_item< + typename P4::first + , typename P4::second + , map4< P0,P1,P2,P3 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5 + > +struct map6 + : m_item< + typename P5::first + , typename P5::second + , map5< P0,P1,P2,P3,P4 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6 + > +struct map7 + : m_item< + typename P6::first + , typename P6::second + , map6< P0,P1,P2,P3,P4,P5 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7 + > +struct map8 + : m_item< + typename P7::first + , typename P7::second + , map7< P0,P1,P2,P3,P4,P5,P6 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8 + > +struct map9 + : m_item< + typename P8::first + , typename P8::second + , map8< P0,P1,P2,P3,P4,P5,P6,P7 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + > +struct map10 + : m_item< + typename P9::first + , typename P9::second + , map9< P0,P1,P2,P3,P4,P5,P6,P7,P8 > + > +{ +}; + +}} diff --git a/include/boost/mpl/map/aux_/preprocessed/typeof_based/map20.hpp b/include/boost/mpl/map/aux_/preprocessed/typeof_based/map20.hpp new file mode 100644 index 0000000..b2b52b3 --- /dev/null +++ b/include/boost/mpl/map/aux_/preprocessed/typeof_based/map20.hpp @@ -0,0 +1,160 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/map/Attic/map20.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10 + > +struct map11 + : m_item< + typename P10::first + , typename P10::second + , map10< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11 + > +struct map12 + : m_item< + typename P11::first + , typename P11::second + , map11< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12 + > +struct map13 + : m_item< + typename P12::first + , typename P12::second + , map12< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13 + > +struct map14 + : m_item< + typename P13::first + , typename P13::second + , map13< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + > +struct map15 + : m_item< + typename P14::first + , typename P14::second + , map14< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15 + > +struct map16 + : m_item< + typename P15::first + , typename P15::second + , map15< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16 + > +struct map17 + : m_item< + typename P16::first + , typename P16::second + , map16< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17 + > +struct map18 + : m_item< + typename P17::first + , typename P17::second + , map17< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18 + > +struct map19 + : m_item< + typename P18::first + , typename P18::second + , map18< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + > +struct map20 + : m_item< + typename P19::first + , typename P19::second + , map19< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18 > + > +{ +}; + +}} diff --git a/include/boost/mpl/map/aux_/preprocessed/typeof_based/map30.hpp b/include/boost/mpl/map/aux_/preprocessed/typeof_based/map30.hpp new file mode 100644 index 0000000..d11509f --- /dev/null +++ b/include/boost/mpl/map/aux_/preprocessed/typeof_based/map30.hpp @@ -0,0 +1,180 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/map/Attic/map30.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20 + > +struct map21 + : m_item< + typename P20::first + , typename P20::second + , map20< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21 + > +struct map22 + : m_item< + typename P21::first + , typename P21::second + , map21< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22 + > +struct map23 + : m_item< + typename P22::first + , typename P22::second + , map22< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23 + > +struct map24 + : m_item< + typename P23::first + , typename P23::second + , map23< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + > +struct map25 + : m_item< + typename P24::first + , typename P24::second + , map24< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25 + > +struct map26 + : m_item< + typename P25::first + , typename P25::second + , map25< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26 + > +struct map27 + : m_item< + typename P26::first + , typename P26::second + , map26< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27 + > +struct map28 + : m_item< + typename P27::first + , typename P27::second + , map27< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28 + > +struct map29 + : m_item< + typename P28::first + , typename P28::second + , map28< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + > +struct map30 + : m_item< + typename P29::first + , typename P29::second + , map29< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28 > + > +{ +}; + +}} diff --git a/include/boost/mpl/map/aux_/preprocessed/typeof_based/map40.hpp b/include/boost/mpl/map/aux_/preprocessed/typeof_based/map40.hpp new file mode 100644 index 0000000..6a374d5 --- /dev/null +++ b/include/boost/mpl/map/aux_/preprocessed/typeof_based/map40.hpp @@ -0,0 +1,200 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/map/Attic/map40.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30 + > +struct map31 + : m_item< + typename P30::first + , typename P30::second + , map30< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31 + > +struct map32 + : m_item< + typename P31::first + , typename P31::second + , map31< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32 + > +struct map33 + : m_item< + typename P32::first + , typename P32::second + , map32< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33 + > +struct map34 + : m_item< + typename P33::first + , typename P33::second + , map33< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + > +struct map35 + : m_item< + typename P34::first + , typename P34::second + , map34< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35 + > +struct map36 + : m_item< + typename P35::first + , typename P35::second + , map35< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36 + > +struct map37 + : m_item< + typename P36::first + , typename P36::second + , map36< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37 + > +struct map38 + : m_item< + typename P37::first + , typename P37::second + , map37< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38 + > +struct map39 + : m_item< + typename P38::first + , typename P38::second + , map38< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + > +struct map40 + : m_item< + typename P39::first + , typename P39::second + , map39< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38 > + > +{ +}; + +}} diff --git a/include/boost/mpl/map/aux_/preprocessed/typeof_based/map50.hpp b/include/boost/mpl/map/aux_/preprocessed/typeof_based/map50.hpp new file mode 100644 index 0000000..42451a4 --- /dev/null +++ b/include/boost/mpl/map/aux_/preprocessed/typeof_based/map50.hpp @@ -0,0 +1,220 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/map/Attic/map50.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + , typename P40 + > +struct map41 + : m_item< + typename P40::first + , typename P40::second + , map40< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + , typename P40, typename P41 + > +struct map42 + : m_item< + typename P41::first + , typename P41::second + , map41< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + , typename P40, typename P41, typename P42 + > +struct map43 + : m_item< + typename P42::first + , typename P42::second + , map42< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + , typename P40, typename P41, typename P42, typename P43 + > +struct map44 + : m_item< + typename P43::first + , typename P43::second + , map43< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + , typename P40, typename P41, typename P42, typename P43, typename P44 + > +struct map45 + : m_item< + typename P44::first + , typename P44::second + , map44< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + , typename P40, typename P41, typename P42, typename P43, typename P44 + , typename P45 + > +struct map46 + : m_item< + typename P45::first + , typename P45::second + , map45< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + , typename P40, typename P41, typename P42, typename P43, typename P44 + , typename P45, typename P46 + > +struct map47 + : m_item< + typename P46::first + , typename P46::second + , map46< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + , typename P40, typename P41, typename P42, typename P43, typename P44 + , typename P45, typename P46, typename P47 + > +struct map48 + : m_item< + typename P47::first + , typename P47::second + , map47< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + , typename P40, typename P41, typename P42, typename P43, typename P44 + , typename P45, typename P46, typename P47, typename P48 + > +struct map49 + : m_item< + typename P48::first + , typename P48::second + , map48< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46,P47 > + > +{ +}; + +template< + typename P0, typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6, typename P7, typename P8, typename P9 + , typename P10, typename P11, typename P12, typename P13, typename P14 + , typename P15, typename P16, typename P17, typename P18, typename P19 + , typename P20, typename P21, typename P22, typename P23, typename P24 + , typename P25, typename P26, typename P27, typename P28, typename P29 + , typename P30, typename P31, typename P32, typename P33, typename P34 + , typename P35, typename P36, typename P37, typename P38, typename P39 + , typename P40, typename P41, typename P42, typename P43, typename P44 + , typename P45, typename P46, typename P47, typename P48, typename P49 + > +struct map50 + : m_item< + typename P49::first + , typename P49::second + , map49< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46,P47,P48 > + > +{ +}; + +}} diff --git a/include/boost/mpl/map/aux_/size_impl.hpp b/include/boost/mpl/map/aux_/size_impl.hpp new file mode 100644 index 0000000..f81adf6 --- /dev/null +++ b/include/boost/mpl/map/aux_/size_impl.hpp @@ -0,0 +1,33 @@ + +#ifndef BOOST_MPL_MAP_AUX_SIZE_IMPL_HPP_INCLUDED +#define BOOST_MPL_MAP_AUX_SIZE_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/size_fwd.hpp> +#include <boost/mpl/map/aux_/tag.hpp> + +namespace boost { namespace mpl { + +template<> +struct size_impl< aux::map_tag > +{ + template< typename Map > struct apply + : Map::size + { + }; +}; + +}} + +#endif // BOOST_MPL_MAP_AUX_SIZE_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/map/aux_/tag.hpp b/include/boost/mpl/map/aux_/tag.hpp new file mode 100644 index 0000000..e381772 --- /dev/null +++ b/include/boost/mpl/map/aux_/tag.hpp @@ -0,0 +1,24 @@ + +#ifndef BOOST_MPL_MAP_AUX_TAG_HPP_INCLUDED +#define BOOST_MPL_MAP_AUX_TAG_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { namespace aux { + +struct map_tag; + +}}} + +#endif // BOOST_MPL_MAP_AUX_TAG_HPP_INCLUDED diff --git a/include/boost/mpl/map/aux_/value_type_impl.hpp b/include/boost/mpl/map/aux_/value_type_impl.hpp new file mode 100755 index 0000000..48deb2f --- /dev/null +++ b/include/boost/mpl/map/aux_/value_type_impl.hpp @@ -0,0 +1,36 @@ + +#ifndef BOOST_MPL_MAP_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED +#define BOOST_MPL_MAP_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/value_type_fwd.hpp> +#include <boost/mpl/pair.hpp> +#include <boost/mpl/map/aux_/tag.hpp> + +namespace boost { +namespace mpl { + +template<> +struct value_type_impl< aux::map_tag > +{ + template< typename Map, typename T > struct apply + : second<T> + { + }; +}; + +}} + +#endif // BOOST_MPL_MAP_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/map/map0.hpp b/include/boost/mpl/map/map0.hpp new file mode 100644 index 0000000..05cb186 --- /dev/null +++ b/include/boost/mpl/map/map0.hpp @@ -0,0 +1,36 @@ + +#ifndef BOOST_MPL_MAP_MAP0_HPP_INCLUDED +#define BOOST_MPL_MAP_MAP0_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/map/aux_/contains_impl.hpp> +#include <boost/mpl/map/aux_/at_impl.hpp> +//#include <boost/mpl/map/aux_/O1_size.hpp> +#include <boost/mpl/map/aux_/insert_impl.hpp> +#include <boost/mpl/map/aux_/erase_impl.hpp> +#include <boost/mpl/map/aux_/erase_key_impl.hpp> +#include <boost/mpl/map/aux_/has_key_impl.hpp> +#include <boost/mpl/map/aux_/key_type_impl.hpp> +#include <boost/mpl/map/aux_/value_type_impl.hpp> +#include <boost/mpl/map/aux_/clear_impl.hpp> +#include <boost/mpl/map/aux_/size_impl.hpp> +#include <boost/mpl/map/aux_/empty_impl.hpp> +#include <boost/mpl/map/aux_/begin_end_impl.hpp> +#include <boost/mpl/map/aux_/iterator.hpp> +#include <boost/mpl/map/aux_/item.hpp> +#include <boost/mpl/map/aux_/map0.hpp> +#include <boost/mpl/map/aux_/tag.hpp> + +#endif // BOOST_MPL_MAP_MAP0_HPP_INCLUDED diff --git a/include/boost/mpl/map/map10.hpp b/include/boost/mpl/map/map10.hpp new file mode 100644 index 0000000..bef6903 --- /dev/null +++ b/include/boost/mpl/map/map10.hpp @@ -0,0 +1,44 @@ + +#ifndef BOOST_MPL_MAP_MAP10_HPP_INCLUDED +#define BOOST_MPL_MAP_MAP10_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/map/map0.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 map10.hpp +# include <boost/mpl/map/aux_/include_preprocessed.hpp> + +#else + +# include <boost/preprocessor/iterate.hpp> + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, 10, <boost/mpl/map/aux_/numbered.hpp>)) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_MAP_MAP10_HPP_INCLUDED diff --git a/include/boost/mpl/map/map20.hpp b/include/boost/mpl/map/map20.hpp new file mode 100644 index 0000000..f0feea0 --- /dev/null +++ b/include/boost/mpl/map/map20.hpp @@ -0,0 +1,44 @@ + +#ifndef BOOST_MPL_MAP_MAP20_HPP_INCLUDED +#define BOOST_MPL_MAP_MAP20_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/map/map10.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 map20.hpp +# include <boost/mpl/map/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/map/aux_/numbered.hpp>)) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_MAP_MAP20_HPP_INCLUDED diff --git a/include/boost/mpl/map/map30.hpp b/include/boost/mpl/map/map30.hpp new file mode 100644 index 0000000..791c141 --- /dev/null +++ b/include/boost/mpl/map/map30.hpp @@ -0,0 +1,44 @@ + +#ifndef BOOST_MPL_MAP_MAP30_HPP_INCLUDED +#define BOOST_MPL_MAP_MAP30_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/map/map20.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 map30.hpp +# include <boost/mpl/map/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/map/aux_/numbered.hpp>)) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_MAP_MAP30_HPP_INCLUDED diff --git a/include/boost/mpl/map/map40.hpp b/include/boost/mpl/map/map40.hpp new file mode 100644 index 0000000..3121c41 --- /dev/null +++ b/include/boost/mpl/map/map40.hpp @@ -0,0 +1,44 @@ + +#ifndef BOOST_MPL_MAP_MAP40_HPP_INCLUDED +#define BOOST_MPL_MAP_MAP40_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/map/map30.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 map40.hpp +# include <boost/mpl/map/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/map/aux_/numbered.hpp>)) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_MAP_MAP40_HPP_INCLUDED diff --git a/include/boost/mpl/map/map50.hpp b/include/boost/mpl/map/map50.hpp new file mode 100644 index 0000000..2881918 --- /dev/null +++ b/include/boost/mpl/map/map50.hpp @@ -0,0 +1,44 @@ + +#ifndef BOOST_MPL_MAP_MAP50_HPP_INCLUDED +#define BOOST_MPL_MAP_MAP50_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/map/map40.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 map50.hpp +# include <boost/mpl/map/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/map/aux_/numbered.hpp>)) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_MAP_MAP50_HPP_INCLUDED diff --git a/include/boost/mpl/math/fixed_c.hpp b/include/boost/mpl/math/fixed_c.hpp index f5a184c..7439763 100644 --- a/include/boost/mpl/math/fixed_c.hpp +++ b/include/boost/mpl/math/fixed_c.hpp @@ -1,22 +1,22 @@ -//----------------------------------------------------------------------------- -// boost/mpl/fixed_c.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-01 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_FIXED_C_HPP_INCLUDED #define BOOST_MPL_FIXED_C_HPP_INCLUDED -#include "boost/config.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/static_constant.hpp> + +namespace boost { namespace mpl { template< long IntegerPart @@ -31,7 +31,6 @@ struct fixed_c fixed_c() {} }; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_FIXED_C_HPP_INCLUDED diff --git a/include/boost/mpl/math/is_even.hpp b/include/boost/mpl/math/is_even.hpp index 6979e27..6255f74 100644 --- a/include/boost/mpl/math/is_even.hpp +++ b/include/boost/mpl/math/is_even.hpp @@ -1,28 +1,27 @@ -//----------------------------------------------------------------------------- -// boost/mpl/is_even.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-01 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_MATH_IS_EVEN_HPP_INCLUDED #define BOOST_MPL_MATH_IS_EVEN_HPP_INCLUDED -#include "boost/mpl/bool.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/mpl/aux_/config/eti.hpp" -#include "boost/detail/workaround.hpp" +// 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/mpl/bool.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> +#include <boost/mpl/aux_/config/msvc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> namespace boost { namespace mpl { -namespace math { - #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) namespace aux { @@ -34,8 +33,9 @@ namespace aux }; } #endif + template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(N) + typename BOOST_MPL_AUX_NA_PARAM(N) > struct is_even #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) @@ -47,10 +47,8 @@ struct is_even BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_even,(N)) }; -} // namespace math +BOOST_MPL_AUX_NA_SPEC(1, is_even) -BOOST_MPL_AUX_VOID_SPEC(1, math::is_even) - -}} // namespace boost::mpl +}} #endif // BOOST_MPL_MATH_IS_EVEN_HPP_INCLUDED diff --git a/include/boost/mpl/math/rational_c.hpp b/include/boost/mpl/math/rational_c.hpp index b5dfec0..4c2ae52 100644 --- a/include/boost/mpl/math/rational_c.hpp +++ b/include/boost/mpl/math/rational_c.hpp @@ -1,22 +1,22 @@ -//----------------------------------------------------------------------------- -// boost/mpl/rational_c.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_RATIONAL_C_HPP_INCLUDED #define BOOST_MPL_RATIONAL_C_HPP_INCLUDED -#include "boost/config.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/config/static_constant.hpp> + +namespace boost { namespace mpl { template< typename IntegerType @@ -32,7 +32,6 @@ struct rational_c rational_c() {} }; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_RATIONAL_C_HPP_INCLUDED diff --git a/include/boost/mpl/max_element.hpp b/include/boost/mpl/max_element.hpp index c563290..9dba082 100644 --- a/include/boost/mpl/max_element.hpp +++ b/include/boost/mpl/max_element.hpp @@ -1,29 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/max_element.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_MAX_ELEMENT_HPP_INCLUDED #define BOOST_MPL_MAX_ELEMENT_HPP_INCLUDED -#include "boost/mpl/less.hpp" -#include "boost/mpl/iter_fold.hpp" -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/if.hpp" -#include "boost/mpl/apply.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/aux_/common_name_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/less.hpp> +#include <boost/mpl/iter_fold.hpp> +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/deref.hpp> +#include <boost/mpl/apply.hpp> +#include <boost/mpl/aux_/common_name_wknd.hpp> +#include <boost/mpl/aux_/na_spec.hpp> + +namespace boost { namespace mpl { BOOST_MPL_AUX_COMMON_NAME_WKND(max_element) @@ -37,8 +37,8 @@ struct select_max { typedef typename apply2< Predicate - , typename OldIterator::type - , typename Iterator::type + , typename deref<OldIterator>::type + , typename deref<Iterator>::type >::type condition_; typedef typename if_< @@ -52,30 +52,21 @@ struct select_max } // namespace aux -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN - template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename Predicate = less<_,_> > struct max_element -{ - private: - typedef typename lambda<Predicate>::type pred_; - - public: - typedef typename iter_fold< + : iter_fold< Sequence , typename begin<Sequence>::type - , protect< aux::select_max<pred_> > - >::type type; + , protect< aux::select_max<Predicate> > + > +{ }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END +BOOST_MPL_AUX_NA_SPEC(1, max_element) -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(1, max_element) - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_MAX_ELEMENT_HPP_INCLUDED diff --git a/include/boost/mpl/min_element.hpp b/include/boost/mpl/min_element.hpp new file mode 100755 index 0000000..ff3f05f --- /dev/null +++ b/include/boost/mpl/min_element.hpp @@ -0,0 +1,40 @@ + +#ifndef BOOST_MPL_MIN_ELEMENT_HPP_INCLUDED +#define BOOST_MPL_MIN_ELEMENT_HPP_INCLUDED + +// Copyright David Abrahams 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/max_element.hpp> +#include <boost/mpl/not.hpp> + +namespace boost { namespace mpl { + +BOOST_MPL_AUX_COMMON_NAME_WKND(min_element) + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename Predicate = less<_,_> + > +struct min_element + : max_element< + Sequence + , mpl::not_<Predicate> + > +{ +}; + +BOOST_MPL_AUX_NA_SPEC(1, min_element) + +}} + +#endif // BOOST_MPL_MIN_ELEMENT_HPP_INCLUDED diff --git a/include/boost/mpl/min_max.hpp b/include/boost/mpl/min_max.hpp new file mode 100644 index 0000000..fd8a428 --- /dev/null +++ b/include/boost/mpl/min_max.hpp @@ -0,0 +1,46 @@ + +#ifndef BOOST_MPL_MAX_HPP_INCLUDED +#define BOOST_MPL_MAX_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$ + +#include <boost/mpl/less.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/aux_/na_spec.hpp> + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct min + : if_< less<N1,N2>,N1,N2 > +{ +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct max + : if_< less<N1,N2>,N2,N1 > +{ +}; + +BOOST_MPL_AUX_NA_SPEC(2, min) +BOOST_MPL_AUX_NA_SPEC(2, max) + +}} + +#endif // BOOST_MPL_MAX_HPP_INCLUDED diff --git a/include/boost/mpl/minus.hpp b/include/boost/mpl/minus.hpp index 4a664a1..853b2a0 100644 --- a/include/boost/mpl/minus.hpp +++ b/include/boost/mpl/minus.hpp @@ -2,66 +2,20 @@ #ifndef BOOST_MPL_MINUS_HPP_INCLUDED #define BOOST_MPL_MINUS_HPP_INCLUDED -// + file: boost/mpl/minus.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/aux_/typeof.hpp" -#include "boost/mpl/aux_/value_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/config.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { - -template< - typename T, T N1, T N2, T N3 = 0, T N4 = 0, T N5 = 0 - > -struct minus_c -{ - BOOST_STATIC_CONSTANT(T, value = (N1 - N2 - N3 - N4 - N5)); -#if !defined(__BORLANDC__) - typedef integral_c<T,value> type; -#else - typedef integral_c<T,(N1 - N2 - N3 - N4 - N5)> type; -#endif -}; - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) - , typename T3 = integral_c<int,0> - , typename T4 = integral_c<int,0> - , typename T5 = integral_c<int,0> - > -struct minus - : minus_c< - BOOST_MPL_AUX_TYPEOF(T1, - T1::value - T2::value - T3::value - T4::value - T5::value - ) - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T1)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T2)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T3)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T4)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T5)::value - > -{ - BOOST_MPL_AUX_LAMBDA_SUPPORT(5, minus, (T1,T2,T3,T4,T5)) -}; - -BOOST_MPL_AUX_VOID_SPEC_EXT(2,5,minus) - -} // namespace mpl -} // namespace boost +#define AUX778076_OP_NAME minus +#define AUX778076_OP_TOKEN - +#include <boost/mpl/aux_/arithmetic_op.hpp> #endif // BOOST_MPL_MINUS_HPP_INCLUDED diff --git a/include/boost/mpl/modulus.hpp b/include/boost/mpl/modulus.hpp index bb0dfa6..780f0b8 100644 --- a/include/boost/mpl/modulus.hpp +++ b/include/boost/mpl/modulus.hpp @@ -2,68 +2,21 @@ #ifndef BOOST_MPL_MODULUS_HPP_INCLUDED #define BOOST_MPL_MODULUS_HPP_INCLUDED -// + file: boost/mpl/modulus.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/aux_/typeof.hpp" -#include "boost/mpl/aux_/value_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/mpl/aux_/config/eti.hpp" -#include "boost/config.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { - -template< - typename T, T N1, T N2 - > -struct modulus_c -{ - BOOST_STATIC_CONSTANT(T, value = (N1 % N2)); -#if !defined(__BORLANDC__) - typedef integral_c<T,value> type; -#else - typedef integral_c<T,(N1 % N2)> type; -#endif -}; - -#if defined(BOOST_MPL_MSVC_ETI_BUG) -template<> -struct modulus_c<long,0,0> -{ -}; -#endif - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) - > -struct modulus - : modulus_c< - BOOST_MPL_AUX_TYPEOF(T1, - T1::value % T2::value - ) - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T1)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T2)::value - > -{ - BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (T1,T2)) -}; - -BOOST_MPL_AUX_VOID_SPEC(2,modulus) - -} // namespace mpl -} // namespace boost +#define AUX778076_OP_NAME modulus +#define AUX778076_OP_TOKEN % +#define AUX778076_OP_ARITY 2 +#include <boost/mpl/aux_/arithmetic_op.hpp> #endif // BOOST_MPL_MODULUS_HPP_INCLUDED diff --git a/include/boost/mpl/multiplies.hpp b/include/boost/mpl/multiplies.hpp index 737dd74..c369944 100644 --- a/include/boost/mpl/multiplies.hpp +++ b/include/boost/mpl/multiplies.hpp @@ -2,66 +2,52 @@ #ifndef BOOST_MPL_MULTIPLIES_HPP_INCLUDED #define BOOST_MPL_MULTIPLIES_HPP_INCLUDED -// + file: boost/mpl/multiplies.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/aux_/typeof.hpp" -#include "boost/mpl/aux_/value_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/config.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { +#include <boost/mpl/times.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> +#include <boost/mpl/aux_/preprocessor/default_params.hpp> +#include <boost/mpl/aux_/preprocessor/params.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> -template< - typename T, T N1, T N2, T N3 = 1, T N4 = 1, T N5 = 1 - > -struct multiplies_c -{ - BOOST_STATIC_CONSTANT(T, value = (N1 * N2 * N3 * N4 * N5)); -#if !defined(__BORLANDC__) - typedef integral_c<T,value> type; +// backward compatibility header, deprecated + +namespace boost { namespace mpl { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +# define AUX778076_OP_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY #else - typedef integral_c<T,(N1 * N2 * N3 * N4 * N5)> type; +# define AUX778076_OP_ARITY 2 #endif -}; template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) - , typename T3 = integral_c<int,1> - , typename T4 = integral_c<int,1> - , typename T5 = integral_c<int,1> + BOOST_MPL_PP_DEFAULT_PARAMS(AUX778076_OP_ARITY, typename N, na) > struct multiplies - : multiplies_c< - BOOST_MPL_AUX_TYPEOF(T1, - T1::value * T2::value * T3::value * T4::value * T5::value - ) - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T1)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T2)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T3)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T4)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T5)::value - > + : times< BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) > { - BOOST_MPL_AUX_LAMBDA_SUPPORT(5, multiplies, (T1,T2,T3,T4,T5)) + BOOST_MPL_AUX_LAMBDA_SUPPORT( + AUX778076_OP_ARITY + , multiplies + , ( BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) ) + ) }; -BOOST_MPL_AUX_VOID_SPEC_EXT(2, 5, multiplies) +BOOST_MPL_AUX_NA_SPEC(AUX778076_OP_ARITY, multiplies) -} // namespace mpl -} // namespace boost +#undef AUX778076_OP_ARITY + +}} #endif // BOOST_MPL_MULTIPLIES_HPP_INCLUDED diff --git a/include/boost/mpl/multiset/aux_/count_impl.hpp b/include/boost/mpl/multiset/aux_/count_impl.hpp index 6be6a6e..85923c0 100644 --- a/include/boost/mpl/multiset/aux_/count_impl.hpp +++ b/include/boost/mpl/multiset/aux_/count_impl.hpp @@ -2,29 +2,30 @@ #ifndef BOOST_MPL_MULTISET_AUX_COUNT_IMPL_HPP_INCLUDED #define BOOST_MPL_MULTISET_AUX_COUNT_IMPL_HPP_INCLUDED -// + file: boost/mpl/multiset/aux_/count_impl.hpp -// + last modified: 05/nov/03 - -// Copyright Aleksey Gurtovoy 2003 +// Copyright Aleksey Gurtovoy 2003-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. -#include "boost/mpl/multiset/aux_/tag.hpp" -#include "boost/mpl/count_fwd.hpp" -#include "boost/mpl/int.hpp" -#include "boost/mpl/aux_/type_wrapper.hpp" -#include "boost/mpl/aux_/static_cast.hpp" -#include "boost/mpl/aux_/config/static_constant.hpp" -#include "boost/mpl/aux_/config/workaround.hpp" -#include "boost/mpl/aux_/config/msvc.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/multiset/aux_/tag.hpp> +#include <boost/mpl/count_fwd.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/aux_/type_wrapper.hpp> +#include <boost/mpl/aux_/static_cast.hpp> +#include <boost/mpl/aux_/config/static_constant.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> +#include <boost/mpl/aux_/config/msvc.hpp> #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) -# include "boost/mpl/if.hpp" -# include "boost/type_traits/is_reference.hpp" +# include <boost/mpl/if.hpp> +# include <boost/type_traits/is_reference.hpp> #endif namespace boost { namespace mpl { @@ -76,6 +77,6 @@ struct count_impl< aux::multiset_tag > #endif // BOOST_WORKAROUND(BOOST_MSVC, <= 1300) -}} // namespace boost::mpl +}} #endif // BOOST_MPL_MULTISET_AUX_COUNT_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/multiset/aux_/insert_impl.hpp b/include/boost/mpl/multiset/aux_/insert_impl.hpp index 4e75437..900478c 100644 --- a/include/boost/mpl/multiset/aux_/insert_impl.hpp +++ b/include/boost/mpl/multiset/aux_/insert_impl.hpp @@ -2,32 +2,33 @@ #ifndef BOOST_MPL_MULTISET_AUX_INSERT_IMPL_HPP_INCLUDED #define BOOST_MPL_MULTISET_AUX_INSERT_IMPL_HPP_INCLUDED -// + file: boost/mpl/multiset/aux_/insert_impl.hpp -// + last modified: 05/nov/03 - -// Copyright Aleksey Gurtovoy 2003 +// Copyright Aleksey Gurtovoy 2003-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. -#include "boost/mpl/multiset/aux_/item.hpp" -#include "boost/mpl/multiset/aux_/tag.hpp" -#include "boost/mpl/insert_fwd.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/multiset/aux_/item.hpp> +#include <boost/mpl/multiset/aux_/tag.hpp> +#include <boost/mpl/insert_fwd.hpp> namespace boost { namespace mpl { -//#error here! + template<> -struct insert_traits< aux::multiset_tag > +struct insert_impl< aux::multiset_tag > { - template< typename Set, typename Key, typename unused_ > struct algorithm + template< typename Set, typename Key, typename unused_ > struct apply { typedef ms_item<Key,Set> type; }; }; -}} // namespace boost::mpl +}} #endif // BOOST_MPL_MULTISET_AUX_INSERT_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/multiset/aux_/item.hpp b/include/boost/mpl/multiset/aux_/item.hpp index 348d9da..d136af4 100644 --- a/include/boost/mpl/multiset/aux_/item.hpp +++ b/include/boost/mpl/multiset/aux_/item.hpp @@ -2,36 +2,34 @@ #ifndef BOOST_MPL_MULTISET_AUX_ITEM_HPP_INCLUDED #define BOOST_MPL_MULTISET_AUX_ITEM_HPP_INCLUDED -// + file: boost/mpl/multiset/aux_/item.hpp -// + last modified: 05/nov/03 - -// Copyright Aleksey Gurtovoy 2003 +// Copyright Aleksey Gurtovoy 2003-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. -#include "boost/mpl/multiset/aux_/tag.hpp" -#include "boost/mpl/int.hpp" -#include "boost/mpl/aux_/type_wrapper.hpp" -#include "boost/mpl/aux_/yes_no.hpp" -#include "boost/mpl/aux_/value_wknd.hpp" -#include "boost/mpl/aux_/static_cast.hpp" -#include "boost/mpl/aux_/config/workaround.hpp" -#include "boost/mpl/aux_/config/msvc.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/multiset/aux_/tag.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/aux_/type_wrapper.hpp> +#include <boost/mpl/aux_/yes_no.hpp> +#include <boost/mpl/aux_/value_wknd.hpp> +#include <boost/mpl/aux_/static_cast.hpp> +#include <boost/mpl/aux_/config/arrays.hpp> +#include <boost/mpl/aux_/config/msvc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) -# include "boost/mpl/apply_if.hpp" -# include "boost/mpl/next.hpp" -# include "boost/type_traits/is_same.hpp" +# include <boost/mpl/eval_if.hpp> +# include <boost/mpl/next.hpp> +# include <boost/type_traits/is_same.hpp> #endif -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ - || BOOST_WORKAROUND(BOOST_MSVC, == 1300) -# define BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES -#endif namespace boost { namespace mpl { @@ -46,7 +44,7 @@ struct ms_item { enum { msvc70_wknd_ = sizeof(Base::key_count(BOOST_MPL_AUX_STATIC_CAST(U*,0))) }; typedef int_< msvc70_wknd_ > count_; - typedef typename apply_if< is_same<T,U>, next<count_>, count_ >::type c_; + typedef typename eval_if< is_same<T,U>, next<count_>, count_ >::type c_; #if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) typedef typename aux::weighted_tag<BOOST_MPL_AUX_MSVC_VALUE_WKND(c_)::value>::type type; #else @@ -59,7 +57,7 @@ struct ms_item typedef U (* u_)(); enum { msvc70_wknd_ = sizeof(Base::ref_key_count(BOOST_MPL_AUX_STATIC_CAST(u_,0))) }; typedef int_< msvc70_wknd_ > count_; - typedef typename apply_if< is_same<T,U>, next<count_>, count_ >::type c_; + typedef typename eval_if< is_same<T,U>, next<count_>, count_ >::type c_; #if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) typedef typename aux::weighted_tag<BOOST_MPL_AUX_MSVC_VALUE_WKND(c_)::value>::type type; #else @@ -111,6 +109,6 @@ struct ms_item #endif // BOOST_WORKAROUND(BOOST_MSVC, <= 1300) -}} // namespace boost::mpl +}} #endif // BOOST_MPL_MULTISET_AUX_ITEM_HPP_INCLUDED diff --git a/include/boost/mpl/multiset/aux_/multiset0.hpp b/include/boost/mpl/multiset/aux_/multiset0.hpp index f34acf5..6fbe3c7 100644 --- a/include/boost/mpl/multiset/aux_/multiset0.hpp +++ b/include/boost/mpl/multiset/aux_/multiset0.hpp @@ -2,19 +2,20 @@ #ifndef BOOST_MPL_MULTISET_AUX_MULTISET0_HPP_INCLUDED #define BOOST_MPL_MULTISET_AUX_MULTISET0_HPP_INCLUDED -// + file: boost/mpl/multiset/aux_/multiset0.hpp -// + last modified: 05/nov/03 - -// Copyright Aleksey Gurtovoy 2003 +// Copyright Aleksey Gurtovoy 2003-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. -#include "boost/mpl/multiset/aux_/tag.hpp" -#include "boost/mpl/int.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/multiset/aux_/tag.hpp> +#include <boost/mpl/int.hpp> namespace boost { namespace mpl { @@ -28,6 +29,6 @@ struct multiset0 static char (& ref_key_count(...) )[count_::value]; }; -}} // namespace boost::mpl +}} #endif // BOOST_MPL_MULTISET_AUX_MULTISET0_HPP_INCLUDED diff --git a/include/boost/mpl/multiset/aux_/tag.hpp b/include/boost/mpl/multiset/aux_/tag.hpp index 73e6d12..6c2ceb7 100644 --- a/include/boost/mpl/multiset/aux_/tag.hpp +++ b/include/boost/mpl/multiset/aux_/tag.hpp @@ -2,17 +2,18 @@ #ifndef BOOST_MPL_MULTISET_AUX_TAG_HPP_INCLUDED #define BOOST_MPL_MULTISET_AUX_TAG_HPP_INCLUDED -// + file: boost/mpl/multiset/aux_/tag.hpp -// + last modified: 05/nov/03 - -// Copyright Aleksey Gurtovoy 2003 +// Copyright Aleksey Gurtovoy 2003-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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$ + namespace boost { namespace mpl { namespace aux { struct multiset_tag; diff --git a/include/boost/mpl/multiset/multiset0.hpp b/include/boost/mpl/multiset/multiset0.hpp index a543931..66c77ac 100644 --- a/include/boost/mpl/multiset/multiset0.hpp +++ b/include/boost/mpl/multiset/multiset0.hpp @@ -2,34 +2,35 @@ #ifndef BOOST_MPL_MULTISET_MULTISET0_HPP_INCLUDED #define BOOST_MPL_MULTISET_MULTISET0_HPP_INCLUDED -// + file: boost/mpl/multiset0.hpp -// + last modified: 27/oct/03 - -// Copyright (C) Aleksey Gurtovoy 2003 +// Copyright Aleksey Gurtovoy 2003-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. -//#include "boost/mpl/multiset/aux_/at.hpp" -//#include "boost/mpl/multiset/aux_/front.hpp" -//#include "boost/mpl/multiset/aux_/push_front.hpp" -//#include "boost/mpl/multiset/aux_/pop_front.hpp" -//#include "boost/mpl/multiset/aux_/back.hpp" -//#include "boost/mpl/multiset/aux_/clear.hpp" -//#include "boost/mpl/multiset/aux_/O1_size.hpp" -//#include "boost/mpl/multiset/aux_/size.hpp" -//#include "boost/mpl/multiset/aux_/empty.hpp" -//#include "boost/mpl/multiset/aux_/empty.hpp" -#include "boost/mpl/multiset/aux_/insert_impl.hpp" -#include "boost/mpl/multiset/aux_/count_impl.hpp" -//#include "boost/mpl/multiset/aux_/has_key_impl.hpp" -//#include "boost/mpl/multiset/aux_/begin_end_impl.hpp" -//#include "boost/mpl/multiset/aux_/iterator.hpp" -#include "boost/mpl/multiset/aux_/item.hpp" -#include "boost/mpl/multiset/aux_/multiset0.hpp" -#include "boost/mpl/multiset/aux_/tag.hpp" +// $Source$ +// $Date$ +// $Revision$ + +//#include <boost/mpl/multiset/aux_/at.hpp> +//#include <boost/mpl/multiset/aux_/front.hpp> +//#include <boost/mpl/multiset/aux_/push_front.hpp> +//#include <boost/mpl/multiset/aux_/pop_front.hpp> +//#include <boost/mpl/multiset/aux_/back.hpp> +//#include <boost/mpl/multiset/aux_/clear.hpp> +//#include <boost/mpl/multiset/aux_/O1_size.hpp> +//#include <boost/mpl/multiset/aux_/size.hpp> +//#include <boost/mpl/multiset/aux_/empty.hpp> +//#include <boost/mpl/multiset/aux_/empty.hpp> +#include <boost/mpl/multiset/aux_/insert_impl.hpp> +#include <boost/mpl/multiset/aux_/count_impl.hpp> +//#include <boost/mpl/multiset/aux_/has_key_impl.hpp> +//#include <boost/mpl/multiset/aux_/begin_end_impl.hpp> +//#include <boost/mpl/multiset/aux_/iterator.hpp> +#include <boost/mpl/multiset/aux_/item.hpp> +#include <boost/mpl/multiset/aux_/multiset0.hpp> +#include <boost/mpl/multiset/aux_/tag.hpp> #endif // BOOST_MPL_MULTISET_MULTISET0_HPP_INCLUDED diff --git a/include/boost/mpl/negate.hpp b/include/boost/mpl/negate.hpp index be12b1c..5037d39 100644 --- a/include/boost/mpl/negate.hpp +++ b/include/boost/mpl/negate.hpp @@ -2,46 +2,80 @@ #ifndef BOOST_MPL_NEGATE_HPP_INCLUDED #define BOOST_MPL_NEGATE_HPP_INCLUDED -// + file: boost/mpl/negate.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/aux_/typeof.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/config.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { +#include <boost/mpl/integral_c.hpp> +#include <boost/mpl/aux_/msvc_eti_base.hpp> +#include <boost/mpl/aux_/config/eti.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> +#include <boost/mpl/aux_/config/msvc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) - > -struct negate +namespace boost { namespace mpl { + +template< typename Tag > struct negate_impl; + +template< typename T > struct negate_tag { - typedef BOOST_MPL_AUX_TYPEOF(T,T::value) value_type; - BOOST_STATIC_CONSTANT(value_type, value = (-T::value)); -#if !defined(__BORLANDC__) - typedef integral_c<value_type, value> type; -#else - typedef integral_c<value_type, (-T::value)> type; -#endif - - BOOST_MPL_AUX_LAMBDA_SUPPORT(1, negate, (T)) + typedef typename T::tag type; }; -BOOST_MPL_AUX_VOID_SPEC(1,negate) +template< + typename BOOST_MPL_AUX_NA_PARAM(N) + > +struct negate +#if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) + : negate_impl< + typename negate_tag<N>::type + >::template apply<N>::type +#else + : aux::msvc_eti_base< typename apply_wrap1< + negate_impl< typename negate_tag<N>::type > + , N + >::type >::type +#endif +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1, negate, (N)) +}; -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_NA_SPEC(1, negate) + + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +namespace aux { +template< typename T, T n > struct msvc_negate_impl +{ + enum msvc_wknd { value = -n }; + typedef integral_c<T,value> type; +}; +} +#endif + +template<> +struct negate_impl<integral_c_tag> +{ +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + template< typename N > struct apply + : aux::msvc_negate_impl< typename N::value_type, N::value > +#else + template< typename N > struct apply + : integral_c< typename N::value_type, (-N::value) > +#endif + { + }; +}; + +}} #endif // BOOST_MPL_NEGATE_HPP_INCLUDED diff --git a/include/boost/mpl/next.hpp b/include/boost/mpl/next.hpp index f53faca..e9f7b87 100644 --- a/include/boost/mpl/next.hpp +++ b/include/boost/mpl/next.hpp @@ -1,44 +1,19 @@ -//----------------------------------------------------------------------------- -// boost mpl/next.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_NEXT_HPP_INCLUDED #define BOOST_MPL_NEXT_HPP_INCLUDED -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/mpl/aux_/config/eti.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) - > -struct next -{ - typedef typename T::next type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,next,(T)) -}; - -#if defined(BOOST_MPL_MSVC_ETI_BUG) -template<> struct next<int> -{ - typedef int type; -}; -#endif - -BOOST_MPL_AUX_VOID_SPEC(1, next) - -} // namespace mpl -} // namespace boost +#include <boost/mpl/next_prior.hpp> #endif // BOOST_MPL_NEXT_HPP_INCLUDED diff --git a/include/boost/mpl/next_prior.hpp b/include/boost/mpl/next_prior.hpp new file mode 100644 index 0000000..2b1a9e7 --- /dev/null +++ b/include/boost/mpl/next_prior.hpp @@ -0,0 +1,45 @@ + +#ifndef BOOST_MPL_NEXT_PRIOR_HPP_INCLUDED +#define BOOST_MPL_NEXT_PRIOR_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$ + +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct next +{ + typedef typename T::next type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,next,(T)) +}; + +template< + typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct prior +{ + typedef typename T::prior type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,prior,(T)) +}; + +BOOST_MPL_AUX_NA_SPEC(1, next) +BOOST_MPL_AUX_NA_SPEC(1, prior) + +}} + +#endif // BOOST_MPL_NEXT_PRIOR_HPP_INCLUDED diff --git a/include/boost/mpl/not.hpp b/include/boost/mpl/not.hpp index f343045..9ef88e7 100644 --- a/include/boost/mpl/not.hpp +++ b/include/boost/mpl/not.hpp @@ -2,29 +2,29 @@ #ifndef BOOST_MPL_NOT_HPP_INCLUDED #define BOOST_MPL_NOT_HPP_INCLUDED -// + file: boost/mpl/not.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/bool.hpp" -#include "boost/mpl/aux_/nested_type_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { +#include <boost/mpl/bool.hpp> +#include <boost/mpl/aux_/nttp_decl.hpp> +#include <boost/mpl/aux_/nested_type_wknd.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { namespace aux { -template< long C_ > // 'long' is intentional here +template< BOOST_MPL_AUX_NTTP_DECL(long, C_) > // 'long' is intentional here struct not_impl : bool_<!C_> { @@ -34,7 +34,7 @@ struct not_impl template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(T) > struct not_ : aux::not_impl< @@ -44,9 +44,8 @@ struct not_ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,not_,(T)) }; -BOOST_MPL_AUX_VOID_SPEC(1,not_) +BOOST_MPL_AUX_NA_SPEC(1,not_) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_NOT_HPP_INCLUDED diff --git a/include/boost/mpl/not_equal_to.hpp b/include/boost/mpl/not_equal_to.hpp index 6b42e56..1ebb4a9 100644 --- a/include/boost/mpl/not_equal_to.hpp +++ b/include/boost/mpl/not_equal_to.hpp @@ -2,11 +2,11 @@ #ifndef BOOST_MPL_NOT_EQUAL_TO_HPP_INCLUDED #define BOOST_MPL_NOT_EQUAL_TO_HPP_INCLUDED -// Copyright (c) 2000-03 Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. @@ -14,59 +14,8 @@ // $Date$ // $Revision$ -#include "boost/mpl/bool.hpp" -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/aux_/value_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/config.hpp" - -namespace boost { -namespace mpl { - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) - > -struct not_equal_to -{ - enum - { - msvc71_wknd_ = ( BOOST_MPL_AUX_VALUE_WKND(T1)::value - != BOOST_MPL_AUX_VALUE_WKND(T2)::value ) - }; - - BOOST_STATIC_CONSTANT(bool, value = msvc71_wknd_); - -#if !defined(__BORLANDC__) - typedef bool_<value> type; -#else - typedef bool_<( - BOOST_MPL_AUX_VALUE_WKND(T1)::value - != BOOST_MPL_AUX_VALUE_WKND(T2)::value - )> type; -#endif - - BOOST_MPL_AUX_LAMBDA_SUPPORT(2,not_equal_to,(T1,T2)) -}; - -BOOST_MPL_AUX_VOID_SPEC(2, not_equal_to) - -template< long N > -struct ne -{ - template< typename T > struct apply -#if !defined(__BORLANDC__) - : not_equal_to< T,integral_c<long,N> > - { -#else - { - typedef typename not_equal_to< T,integral_c<long,N> >::type type; -#endif - }; -}; - -} // namespace mpl -} // namespace boost +#define AUX778076_OP_NAME not_equal_to +#define AUX778076_OP_TOKEN != +#include <boost/mpl/aux_/comparison_op.hpp> #endif // BOOST_MPL_NOT_EQUAL_TO_HPP_INCLUDED diff --git a/include/boost/mpl/numeric_cast.hpp b/include/boost/mpl/numeric_cast.hpp new file mode 100644 index 0000000..10367d9 --- /dev/null +++ b/include/boost/mpl/numeric_cast.hpp @@ -0,0 +1,69 @@ + +#ifndef BOOST_MPL_NUMERIC_CAST_HPP_INCLUDED +#define BOOST_MPL_NUMERIC_CAST_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/apply_wrap.hpp> + +namespace boost { namespace mpl { + +// no default implementation; the definition is needed to make MSVC happy + +template< typename SourceTag, typename TargetTag > struct numeric_cast +{ + 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< 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< numeric_cast<Tag2,Tag1>,N2 >::type + > + { + }; +}; + +} // namespace aux + +}} + +#endif // BOOST_MPL_NUMERIC_CAST_HPP_INCLUDED diff --git a/include/boost/mpl/or.hpp b/include/boost/mpl/or.hpp index 38dfe4b..559ca6b 100644 --- a/include/boost/mpl/or.hpp +++ b/include/boost/mpl/or.hpp @@ -2,27 +2,28 @@ #ifndef BOOST_MPL_OR_HPP_INCLUDED #define BOOST_MPL_OR_HPP_INCLUDED -// + file: boost/mpl/or.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +// $Source$ +// $Date$ +// $Revision$ -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -# include "boost/mpl/bool.hpp" -# include "boost/mpl/aux_/nested_type_wknd.hpp" -# include "boost/mpl/aux_/void_spec.hpp" -# include "boost/mpl/aux_/lambda_support.hpp" +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# include <boost/mpl/bool.hpp> +# include <boost/mpl/aux_/nested_type_wknd.hpp> +# include <boost/mpl/aux_/na_spec.hpp> +# include <boost/mpl/aux_/lambda_support.hpp> +# include <boost/mpl/aux_/config/msvc.hpp> // agurt, 19/may/04: workaround a conflict with <iso646.h> header's // 'or' and 'and' macros, see http://tinyurl.com/3et69; 'defined(or)' @@ -37,7 +38,7 @@ #endif # define BOOST_MPL_PREPROCESSED_HEADER or.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" +# include <boost/mpl/aux_/include_preprocessed.hpp> #if defined(_MSC_VER) #if defined(or) @@ -47,10 +48,10 @@ #else -# define AUX_LOGICAL_OP_NAME or_ -# define AUX_LOGICAL_OP_VALUE1 true -# define AUX_LOGICAL_OP_VALUE2 false -# include "boost/mpl/aux_/logical_op.hpp" +# define AUX778076_OP_NAME or_ +# define AUX778076_OP_VALUE1 true +# define AUX778076_OP_VALUE2 false +# include <boost/mpl/aux_/logical_op.hpp> -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_OR_HPP_INCLUDED diff --git a/include/boost/mpl/order.hpp b/include/boost/mpl/order.hpp index e47ec5d..4366341 100644 --- a/include/boost/mpl/order.hpp +++ b/include/boost/mpl/order.hpp @@ -2,39 +2,39 @@ #ifndef BOOST_MPL_ORDER_HPP_INCLUDED #define BOOST_MPL_ORDER_HPP_INCLUDED -// + file: boost/mpl/order.hpp -// + last modified: 02/may/03 - -// Copyright (c) 2002-03 -// David Abrahams, Aleksey Gurtovoy +// 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 +// 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. -#include "boost/mpl/order_fwd.hpp" -#include "boost/mpl/aux_/order_impl.hpp" -#include "boost/mpl/aux_/sequence_tag.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { +#include <boost/mpl/order_fwd.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/order_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_VOID_SPEC_PARAM(AssociativeSequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Key) + typename BOOST_MPL_AUX_NA_PARAM(AssociativeSequence) + , typename BOOST_MPL_AUX_NA_PARAM(Key) > struct order - : order_impl< typename BOOST_MPL_AUX_SEQUENCE_TAG(AssociativeSequence) > + : order_impl< typename sequence_tag<AssociativeSequence>::type > ::template apply<AssociativeSequence,Key> { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,order,(AssociativeSequence,Key)) }; -BOOST_MPL_AUX_VOID_SPEC(2, order) +BOOST_MPL_AUX_NA_SPEC(2, order) }} diff --git a/include/boost/mpl/order_fwd.hpp b/include/boost/mpl/order_fwd.hpp index e9db5c7..291180d 100644 --- a/include/boost/mpl/order_fwd.hpp +++ b/include/boost/mpl/order_fwd.hpp @@ -2,20 +2,20 @@ #ifndef BOOST_MPL_ORDER_FWD_HPP_INCLUDED #define BOOST_MPL_ORDER_FWD_HPP_INCLUDED -// + file: boost/mpl/order_fwd.hpp -// + last modified: 03/may/03 - -// Copyright (c) 2002-03 -// David Abrahams, Aleksey Gurtovoy +// 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 +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { template< typename Tag > struct order_impl; template< typename AssociativeSequence, typename Key > struct order; diff --git a/include/boost/mpl/pair.hpp b/include/boost/mpl/pair.hpp index 1cf22fe..6ff7f48 100644 --- a/include/boost/mpl/pair.hpp +++ b/include/boost/mpl/pair.hpp @@ -1,27 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/pair.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_PAIR_HPP_INCLUDED #define BOOST_MPL_PAIR_HPP_INCLUDED -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// Copyright Aleksey Gurtovoy 2001-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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/msvc_eti_base.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> +#include <boost/mpl/aux_/config/eti.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) + typename BOOST_MPL_AUX_NA_PARAM(T1) + , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct pair { @@ -32,9 +34,37 @@ struct pair BOOST_MPL_AUX_LAMBDA_SUPPORT(2,pair,(T1,T2)) }; -BOOST_MPL_AUX_VOID_SPEC(2, pair) +template< + typename BOOST_MPL_AUX_NA_PARAM(P) + > +struct first +{ +#if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) + typedef typename P::first type; +#else + typedef typename aux::msvc_eti_base<P>::first type; +#endif + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,first,(P)) +}; -} // namespace mpl -} // namespace boost +template< + typename BOOST_MPL_AUX_NA_PARAM(P) + > +struct second +{ +#if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) + typedef typename P::second type; +#else + typedef typename aux::msvc_eti_base<P>::second type; +#endif + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,second,(P)) +}; + + +BOOST_MPL_AUX_NA_SPEC(2, pair) +BOOST_MPL_AUX_NA_SPEC(1, first) +BOOST_MPL_AUX_NA_SPEC(1, second) + +}} #endif // BOOST_MPL_PAIR_HPP_INCLUDED diff --git a/include/boost/mpl/pair_view.hpp b/include/boost/mpl/pair_view.hpp new file mode 100644 index 0000000..77e5ff1 --- /dev/null +++ b/include/boost/mpl/pair_view.hpp @@ -0,0 +1,173 @@ + +#ifndef BOOST_MPL_PAIR_VIEW_HPP_INCLUDED +#define BOOST_MPL_PAIR_VIEW_HPP_INCLUDED + +// Copyright David Abrahams 2003-2004 +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/iterator_category.hpp> +#include <boost/mpl/advance.hpp> +#include <boost/mpl/distance.hpp> +#include <boost/mpl/next_prior.hpp> +#include <boost/mpl/min_max.hpp> +#include <boost/mpl/pair.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_/na_spec.hpp> + +namespace boost { namespace mpl { + +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< typename I1, typename I2, typename Category > +struct pair_iter; + +template< typename Category > +struct pair_iter_ops +{ + template< typename I1, typename I2 > struct result_ + { + typedef typename next<I1>::type i1_; + typedef typename next<I2>::type i2_; + typedef pair_iter<i1_,i2_,Category> next; + }; +}; + +template<> +struct pair_iter_ops<bidirectional_iterator_tag> +{ + template< typename I1, typename I2 > struct result_ + { + typedef bidirectional_iterator_tag category; + + typedef typename next<I1>::type i1_; + typedef typename next<I2>::type i2_; + typedef pair_iter<i1_,i2_,category> next; + + typedef typename prior<I1>::type k1_; + typedef typename 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 next<I1>::type i1_; + typedef typename next<I2>::type i2_; + typedef pair_iter<i1_,i2_,category> next; + + typedef typename prior<I1>::type k1_; + typedef typename 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 +{ + typedef Category category; + typedef pair<typename I1::type, typename I2::type> type; +}; + + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +template< typename I1, typename I2, typename C > +struct next< pair_iter<I1,I2,C> > +{ + typedef typename next<I1>::type i1_; + typedef typename next<I2>::type i2_; + typedef pair_iter<i1_,i2_,C> type; +}; + +template< typename I1, typename I2, typename C > +struct prior< pair_iter<I1,I2,C> > +{ + typedef typename prior<I1>::type i1_; + typedef typename prior<I2>::type i2_; + 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 advance<I1,Distance>::type iter1_; + typedef typename 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> > + : distance<K1,I1> +{ +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence1) + , typename BOOST_MPL_AUX_NA_PARAM(Sequence2) + > +struct pair_view +{ + typedef nested_begin_end_tag tag; + + typedef typename begin<Sequence1>::type iter1_; + typedef typename begin<Sequence2>::type iter2_; + typedef typename min< + typename iterator_category<iter1_>::type + , typename iterator_category<iter2_>::type + >::type category_; + + typedef pair_iter<iter1_,iter2_,category_> begin; + + typedef pair_iter< + typename end<Sequence1>::type + , typename end<Sequence2>::type + , category_ + > end; +}; + +BOOST_MPL_AUX_NA_SPEC(2, pair_view) + +}} + +#endif // BOOST_MPL_PAIR_VIEW_HPP_INCLUDED diff --git a/include/boost/mpl/partition.hpp b/include/boost/mpl/partition.hpp index 5c75f80..7aaba62 100644 --- a/include/boost/mpl/partition.hpp +++ b/include/boost/mpl/partition.hpp @@ -1,57 +1,46 @@ -//----------------------------------------------------------------------------- -// boost mpl/partition.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002-2003 -// Eric Friedman -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_PARTITION_HPP_INCLUDED #define BOOST_MPL_PARTITION_HPP_INCLUDED -#include "boost/mpl/aux_/partition_op.hpp" -#include "boost/mpl/clear.hpp" -#include "boost/mpl/iter_fold.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/pair.hpp" -#include "boost/mpl/protect.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// Copyright Eric Friedman 2002-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN +#include <boost/mpl/aux_/partition_op.hpp> +#include <boost/mpl/clear.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 { template < - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Predicate) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(Predicate) > struct partition { -private: - typedef typename lambda<Predicate>::type pred_; typedef typename clear<Sequence>::type cleared_; - -public: typedef typename iter_fold< Sequence , pair< cleared_,cleared_ > - , protect< aux::partition_op<pred_> > + , aux::partition_op<Predicate> >::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2,partition,(Sequence,Predicate)) }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END +BOOST_MPL_AUX_NA_SPEC(2, partition) -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, partition) - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_PARTITION_HPP_INCLUDED diff --git a/include/boost/mpl/placeholders.hpp b/include/boost/mpl/placeholders.hpp index 2e4655b..17918af 100644 --- a/include/boost/mpl/placeholders.hpp +++ b/include/boost/mpl/placeholders.hpp @@ -6,59 +6,61 @@ #ifndef BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED #define BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED -// + file: boost/mpl/placeholders.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2001-03 -// Peter Dimov, Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2001-2003 +// Copyright Peter Dimov 2001-2003 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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/arg.hpp" +# include <boost/mpl/arg.hpp> +# include <boost/mpl/aux_/adl_barrier.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER placeholders.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" +# include <boost/mpl/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/aux_/config/nttp.hpp" -# include "boost/mpl/limits/arity.hpp" -# include "boost/preprocessor/iterate.hpp" -# include "boost/preprocessor/cat.hpp" - -namespace boost { -namespace mpl { +# include <boost/mpl/aux_/nttp_decl.hpp> +# include <boost/mpl/limits/arity.hpp> +# include <boost/preprocessor/iterate.hpp> +# include <boost/preprocessor/cat.hpp> // watch out for GNU gettext users, who #define _(x) -#if !defined(_) || defined(BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT) +#if !defined(_) || defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + typedef arg<-1> _; -namespace placeholders { -using boost::mpl::_; -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(_) + +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +}}} #endif -//: agurt, 17/mar/02: one more placeholder for the last 'apply#' -//: specialization +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization #define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(1, BOOST_MPL_METAFUNCTION_MAX_ARITY + 1, "boost/mpl/placeholders.hpp")) + (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY + 1, <boost/mpl/placeholders.hpp>)) #include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED ///// iteration @@ -66,11 +68,16 @@ using boost::mpl::_; #else #define i BOOST_PP_FRAME_ITERATION(1) +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + typedef arg<i> BOOST_PP_CAT(_,i); -namespace placeholders { -using boost::mpl::BOOST_PP_CAT(_,i); -} +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(BOOST_PP_CAT(_,i)) + +namespace boost { namespace mpl { namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::BOOST_PP_CAT(_,i); +}}} #undef i #endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/plus.hpp b/include/boost/mpl/plus.hpp index dd4e4b9..6183a7f 100644 --- a/include/boost/mpl/plus.hpp +++ b/include/boost/mpl/plus.hpp @@ -2,66 +2,20 @@ #ifndef BOOST_MPL_PLUS_HPP_INCLUDED #define BOOST_MPL_PLUS_HPP_INCLUDED -// + file: boost/mpl/plus.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/aux_/typeof.hpp" -#include "boost/mpl/aux_/value_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/config.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { - -template< - typename T, T N1, T N2, T N3 = 0, T N4 = 0, T N5 = 0 - > -struct plus_c -{ - BOOST_STATIC_CONSTANT(T, value = (N1 + N2 + N3 + N4 + N5)); -#if !defined(__BORLANDC__) - typedef integral_c<T,value> type; -#else - typedef integral_c<T,(N1 + N2 + N3 + N4 + N5)> type; -#endif -}; - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) - , typename T3 = integral_c<int,0> - , typename T4 = integral_c<int,0> - , typename T5 = integral_c<int,0> - > -struct plus - : plus_c< - BOOST_MPL_AUX_TYPEOF(T1, - T1::value + T2::value + T3::value + T4::value + T5::value - ) - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T1)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T2)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T3)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T4)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T5)::value - >::type -{ - BOOST_MPL_AUX_LAMBDA_SUPPORT(5, plus, (T1,T2,T3,T4,T5)) -}; - -BOOST_MPL_AUX_VOID_SPEC_EXT(2,5,plus) - -} // namespace mpl -} // namespace boost +#define AUX778076_OP_NAME plus +#define AUX778076_OP_TOKEN + +#include <boost/mpl/aux_/arithmetic_op.hpp> #endif // BOOST_MPL_PLUS_HPP_INCLUDED diff --git a/include/boost/mpl/pop_back.hpp b/include/boost/mpl/pop_back.hpp index bd2c745..10604be 100644 --- a/include/boost/mpl/pop_back.hpp +++ b/include/boost/mpl/pop_back.hpp @@ -1,40 +1,39 @@ -//----------------------------------------------------------------------------- -// boost mpl/pop_back.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_POP_BACK_HPP_INCLUDED #define BOOST_MPL_POP_BACK_HPP_INCLUDED -#include "boost/mpl/pop_back_fwd.hpp" -#include "boost/mpl/aux_/pop_back_impl.hpp" -#include "boost/mpl/aux_/sequence_tag.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/pop_back_fwd.hpp> +#include <boost/mpl/aux_/pop_back_impl.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct pop_back - : pop_back_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) > - ::template algorithm< Sequence > + : pop_back_impl< typename sequence_tag<Sequence>::type > + ::template apply< Sequence > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,pop_back,(Sequence)) }; -BOOST_MPL_AUX_VOID_SPEC(1, pop_back) +BOOST_MPL_AUX_NA_SPEC(1, pop_back) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_POP_BACK_HPP_INCLUDED diff --git a/include/boost/mpl/pop_back_fwd.hpp b/include/boost/mpl/pop_back_fwd.hpp index 48c12a0..2a156fd 100644 --- a/include/boost/mpl/pop_back_fwd.hpp +++ b/include/boost/mpl/pop_back_fwd.hpp @@ -1,25 +1,24 @@ -//----------------------------------------------------------------------------- -// boost mpl/pop_back_fwd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_POP_BACK_FWD_HPP_INCLUDED #define BOOST_MPL_POP_BACK_FWD_HPP_INCLUDED -namespace boost { -namespace mpl { +// 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. -template< typename Tag > struct pop_back_traits; +// $Source$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct pop_back_impl; template< typename Sequence > struct pop_back; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_POP_BACK_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/pop_front.hpp b/include/boost/mpl/pop_front.hpp index a65fb9a..08f6618 100644 --- a/include/boost/mpl/pop_front.hpp +++ b/include/boost/mpl/pop_front.hpp @@ -1,40 +1,39 @@ -//----------------------------------------------------------------------------- -// boost mpl/pop_front.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_POP_FRONT_HPP_INCLUDED #define BOOST_MPL_POP_FRONT_HPP_INCLUDED -#include "boost/mpl/pop_front_fwd.hpp" -#include "boost/mpl/aux_/pop_front_impl.hpp" -#include "boost/mpl/aux_/sequence_tag.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/pop_front_fwd.hpp> +#include <boost/mpl/aux_/pop_front_impl.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct pop_front - : pop_front_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) > - ::template algorithm< Sequence > + : pop_front_impl< typename sequence_tag<Sequence>::type > + ::template apply< Sequence > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,pop_front,(Sequence)) }; -BOOST_MPL_AUX_VOID_SPEC(1, pop_front) +BOOST_MPL_AUX_NA_SPEC(1, pop_front) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_POP_FRONT_HPP_INCLUDED diff --git a/include/boost/mpl/pop_front_fwd.hpp b/include/boost/mpl/pop_front_fwd.hpp index 16917e2..07791cf 100644 --- a/include/boost/mpl/pop_front_fwd.hpp +++ b/include/boost/mpl/pop_front_fwd.hpp @@ -1,25 +1,24 @@ -//----------------------------------------------------------------------------- -// boost mpl/pop_front_fwd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_POP_FRONT_FWD_HPP_INCLUDED #define BOOST_MPL_POP_FRONT_FWD_HPP_INCLUDED -namespace boost { -namespace mpl { +// 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. -template< typename Tag > struct pop_front_traits; +// $Source$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct pop_front_impl; template< typename Sequence > struct pop_front; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_POP_FRONT_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/prev.hpp b/include/boost/mpl/prev.hpp deleted file mode 100755 index 0e883e9..0000000 --- a/include/boost/mpl/prev.hpp +++ /dev/null @@ -1,44 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/prev.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-03 -// Aleksey Gurtovoy, Dave Abrahams -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_PREV_HPP_INCLUDED -#define BOOST_MPL_PREV_HPP_INCLUDED - -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/mpl/aux_/config/eti.hpp" - -namespace boost { -namespace mpl { - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) - > -struct prev -{ - typedef typename T::prev type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,prev,(T)) -}; - -#if defined(BOOST_MPL_MSVC_ETI_BUG) -template<> struct prev<int> -{ - typedef int type; -}; -#endif - -BOOST_MPL_AUX_VOID_SPEC(1, prev) - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_PREV_HPP_INCLUDED diff --git a/include/boost/mpl/print.hpp b/include/boost/mpl/print.hpp index d099e9c..151212c 100755 --- a/include/boost/mpl/print.hpp +++ b/include/boost/mpl/print.hpp @@ -1,64 +1,74 @@ -// Copyright David Abrahams 2003. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef PRINT_DWA20031231_HPP -# define PRINT_DWA20031231_HPP +#ifndef BOOST_MPL_PRINT_HPP_INCLUDED +#define BOOST_MPL_PRINT_HPP_INCLUDED + +// Copyright David Abrahams 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_/config/msvc.hpp> #include <boost/mpl/identity.hpp> -namespace boost { namespace mpl -{ +namespace boost { namespace mpl { -namespace aux -{ -#if BOOST_MSVC +namespace aux { +#if defined(BOOST_MSVC) # pragma warning(push, 3) // we only want one warning from MSVC, so turn off the other one # pragma warning(disable: 4307) -#elif __MWERKS__ +#elif defined(__MWERKS__) # pragma warn_hidevirtual on struct print_base { virtual void f() {} }; #endif -#if __EDG_VERSION__ +#if defined(__EDG_VERSION__) template <class T> struct dependent_unsigned { static const unsigned value = 1; }; #endif -} +} // namespace aux + - template <class T> struct print - : mpl::identity<T> -#if __MWERKS__ + : mpl::identity<T> +#if defined(__MWERKS__) , aux::print_base #endif { -#if BOOST_MSVC +#if defined(BOOST_MSVC) enum { n = sizeof(T) + -1 }; -#elif __MWERKS__ +#elif defined(__MWERKS__) void f(int); #else enum { n = -# if __EDG_VERSION__ - aux::dependent_unsigned<T>::value +# if defined(__EDG_VERSION__) + aux::dependent_unsigned<T>::value > -1 # else - sizeof(T) + sizeof(T) > -1, # endif - > -1, }; + }; #endif }; -}} // namespace boost::mpl - -#if BOOST_MSVC +#if defined(BOOST_MSVC) # pragma warning(pop) -#elif __MWERKS__ +#elif defined(__MWERKS__) # pragma warn_hidevirtual reset #endif -#endif // PRINT_DWA20031231_HPP +}} + +#endif // BOOST_MPL_PRINT_HPP_INCLUDED diff --git a/include/boost/mpl/prior.hpp b/include/boost/mpl/prior.hpp index 73fb409..0245fa2 100644 --- a/include/boost/mpl/prior.hpp +++ b/include/boost/mpl/prior.hpp @@ -1,44 +1,19 @@ -//----------------------------------------------------------------------------- -// boost mpl/prior.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_PRIOR_HPP_INCLUDED #define BOOST_MPL_PRIOR_HPP_INCLUDED -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/mpl/aux_/config/eti.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) - > -struct prior -{ - typedef typename T::prior type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,prior,(T)) -}; - -#if defined(BOOST_MPL_MSVC_ETI_BUG) -template<> struct prior<int> -{ - typedef int type; -}; -#endif - -BOOST_MPL_AUX_VOID_SPEC(1, prior) - -} // namespace mpl -} // namespace boost +#include <boost/mpl/next_prior.hpp> #endif // BOOST_MPL_PRIOR_HPP_INCLUDED diff --git a/include/boost/mpl/project1st.hpp b/include/boost/mpl/project1st.hpp deleted file mode 100644 index e1eff48..0000000 --- a/include/boost/mpl/project1st.hpp +++ /dev/null @@ -1,37 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/project1st.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_PROJECT1ST_HPP_INCLUDED -#define BOOST_MPL_PROJECT1ST_HPP_INCLUDED - -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" - -namespace boost { -namespace mpl { - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) - > -struct project1st -{ - typedef T1 type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(2,project1st,(T1,T2)) -}; - -BOOST_MPL_AUX_VOID_SPEC(2, project1st) - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_PROJECT1ST_HPP_INCLUDED diff --git a/include/boost/mpl/project2nd.hpp b/include/boost/mpl/project2nd.hpp deleted file mode 100644 index e50d8ae..0000000 --- a/include/boost/mpl/project2nd.hpp +++ /dev/null @@ -1,37 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/project2nd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_PROJECT2ND_HPP_INCLUDED -#define BOOST_MPL_PROJECT2ND_HPP_INCLUDED - -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" - -namespace boost { -namespace mpl { - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) - > -struct project2nd -{ - typedef T2 type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(2,project2nd,(T1,T2)) -}; - -BOOST_MPL_AUX_VOID_SPEC(2, project2nd) - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_PROJECT2ND_HPP_INCLUDED diff --git a/include/boost/mpl/protect.hpp b/include/boost/mpl/protect.hpp index d9c2eac..5e1ec3e 100644 --- a/include/boost/mpl/protect.hpp +++ b/include/boost/mpl/protect.hpp @@ -1,34 +1,37 @@ -//----------------------------------------------------------------------------- -// boost mpl/protect.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Peter Dimov, Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_PROTECT_HPP_INCLUDED #define BOOST_MPL_PROTECT_HPP_INCLUDED -#include "boost/mpl/aux_/arity.hpp" -#include "boost/mpl/aux_/config/dtp.hpp" -#include "boost/mpl/aux_/void_spec.hpp" +// Copyright Peter Dimov 2001 +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/arity.hpp> +#include <boost/mpl/aux_/config/dtp.hpp> +#include <boost/mpl/aux_/nttp_decl.hpp> +#include <boost/mpl/aux_/na_spec.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(T) + , int not_le_ = 0 > struct protect : T { - typedef struct protect type; + typedef protect type; }; -#if defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) +#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) namespace aux { template< BOOST_MPL_AUX_NTTP_DECL(int, N), typename T > struct arity< protect<T>, N > @@ -38,12 +41,11 @@ struct arity< protect<T>, N > } // namespace aux #endif -BOOST_MPL_AUX_VOID_SPEC_MAIN(1, protect) -#if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) -BOOST_MPL_AUX_VOID_SPEC_TEMPLATE_ARITY(1, 1, protect) +BOOST_MPL_AUX_NA_SPEC_MAIN(1, protect) +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(1, 1, protect) #endif -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_PROTECT_HPP_INCLUDED diff --git a/include/boost/mpl/push_back.hpp b/include/boost/mpl/push_back.hpp index 6d80471..4b42f9a 100644 --- a/include/boost/mpl/push_back.hpp +++ b/include/boost/mpl/push_back.hpp @@ -1,41 +1,53 @@ -//----------------------------------------------------------------------------- -// boost mpl/push_back.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_PUSH_BACK_HPP_INCLUDED #define BOOST_MPL_PUSH_BACK_HPP_INCLUDED -#include "boost/mpl/push_back_fwd.hpp" -#include "boost/mpl/aux_/push_back_impl.hpp" -#include "boost/mpl/aux_/sequence_tag.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/push_back_fwd.hpp> +#include <boost/mpl/aux_/push_back_impl.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(T) > struct push_back - : push_back_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) > - ::template algorithm< Sequence,T > + : push_back_impl< typename sequence_tag<Sequence>::type > + ::template apply< Sequence,T > { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,push_back,(Sequence,T)) }; -BOOST_MPL_AUX_VOID_SPEC(2, push_back) -} // namespace mpl -} // namespace boost +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + > +struct has_push_back + : has_push_back_impl< typename sequence_tag<Sequence>::type > + ::template apply< Sequence > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,has_push_back,(Sequence)) +}; + + +BOOST_MPL_AUX_NA_SPEC(2, push_back) +BOOST_MPL_AUX_NA_SPEC(1, has_push_back) + +}} #endif // BOOST_MPL_PUSH_BACK_HPP_INCLUDED diff --git a/include/boost/mpl/push_back_fwd.hpp b/include/boost/mpl/push_back_fwd.hpp index 6fc9bf8..6370604 100644 --- a/include/boost/mpl/push_back_fwd.hpp +++ b/include/boost/mpl/push_back_fwd.hpp @@ -1,25 +1,24 @@ -//----------------------------------------------------------------------------- -// boost mpl/push_back_fwd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_PUSH_BACK_FWD_HPP_INCLUDED #define BOOST_MPL_PUSH_BACK_FWD_HPP_INCLUDED -namespace boost { -namespace mpl { +// 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. -template< typename Tag > struct push_back_traits; +// $Source$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct push_back_impl; template< typename Sequence, typename T > struct push_back; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_PUSH_BACK_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/push_front.hpp b/include/boost/mpl/push_front.hpp index a987357..f4d4738 100644 --- a/include/boost/mpl/push_front.hpp +++ b/include/boost/mpl/push_front.hpp @@ -1,41 +1,52 @@ -//----------------------------------------------------------------------------- -// boost mpl/push_front.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_PUSH_FRONT_HPP_INCLUDED #define BOOST_MPL_PUSH_FRONT_HPP_INCLUDED -#include "boost/mpl/push_front_fwd.hpp" -#include "boost/mpl/aux_/push_front_impl.hpp" -#include "boost/mpl/aux_/sequence_tag.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/push_front_fwd.hpp> +#include <boost/mpl/aux_/push_front_impl.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(T) > struct push_front - : push_front_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) > - ::template algorithm< Sequence,T > + : push_front_impl< typename sequence_tag<Sequence>::type > + ::template apply< Sequence,T > { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,push_front,(Sequence,T)) }; -BOOST_MPL_AUX_VOID_SPEC(2, push_front) -} // namespace mpl -} // namespace boost +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + > +struct has_push_front + : has_push_front_impl< typename sequence_tag<Sequence>::type > + ::template apply< Sequence > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,has_push_front,(Sequence)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, push_front) +BOOST_MPL_AUX_NA_SPEC(1, has_push_front) + +}} #endif // BOOST_MPL_PUSH_FRONT_HPP_INCLUDED diff --git a/include/boost/mpl/push_front_fwd.hpp b/include/boost/mpl/push_front_fwd.hpp index ef8178f..a300c94 100644 --- a/include/boost/mpl/push_front_fwd.hpp +++ b/include/boost/mpl/push_front_fwd.hpp @@ -1,25 +1,24 @@ -//----------------------------------------------------------------------------- -// boost mpl/push_front_fwd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_PUSH_FRONT_FWD_HPP_INCLUDED #define BOOST_MPL_PUSH_FRONT_FWD_HPP_INCLUDED -namespace boost { -namespace mpl { +// 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. -template< typename Tag > struct push_front_traits; +// $Source$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct push_front_impl; template< typename Sequence, typename T > struct push_front; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_PUSH_FRONT_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/quote.hpp b/include/boost/mpl/quote.hpp index c23854c..dab448d 100644 --- a/include/boost/mpl/quote.hpp +++ b/include/boost/mpl/quote.hpp @@ -6,58 +6,62 @@ #ifndef BOOST_MPL_QUOTE_HPP_INCLUDED #define BOOST_MPL_QUOTE_HPP_INCLUDED -// + file: boost/mpl/quote.hpp -// + last modified: 02/aug/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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/void.hpp" -# include "boost/mpl/aux_/has_type.hpp" +# include <boost/mpl/void.hpp> +# include <boost/mpl/aux_/has_type.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/ttp.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ +#if defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) +# define BOOST_MPL_CFG_NO_QUOTE_TEMPLATE +#endif + +#if !defined(BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS) \ + && defined(BOOST_MPL_CFG_NO_HAS_XXX) +# define BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS +#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 quote.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" +# include <boost/mpl/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/limits/arity.hpp" -# include "boost/mpl/aux_/preprocessor/params.hpp" -# include "boost/mpl/aux_/config/ttp.hpp" -# include "boost/mpl/aux_/config/ctps.hpp" -# include "boost/mpl/aux_/config/workaround.hpp" +# include <boost/mpl/limits/arity.hpp> +# include <boost/mpl/aux_/preprocessor/params.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# include <boost/mpl/aux_/config/workaround.hpp> -# include "boost/preprocessor/iterate.hpp" -# include "boost/preprocessor/cat.hpp" +# include <boost/preprocessor/iterate.hpp> +# include <boost/preprocessor/cat.hpp> -#if !defined(BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS) +#if !defined(BOOST_MPL_CFG_NO_QUOTE_TEMPLATE) -namespace boost { -namespace mpl { +namespace boost { namespace mpl { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -template< typename T, bool has_type_ = aux::has_type<T>::value > +template< typename T, bool has_type_ > struct quote_impl -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) : T { -#else -{ - typedef typename T::type type; -#endif }; template< typename T > @@ -66,7 +70,7 @@ struct quote_impl<T,false> typedef T type; }; -#else +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template< bool > struct quote_impl { @@ -84,41 +88,43 @@ template<> struct quote_impl<false> }; }; -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#endif #define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(1, BOOST_MPL_METAFUNCTION_MAX_ARITY, "boost/mpl/quote.hpp")) + (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/quote.hpp>)) #include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS +#endif // BOOST_MPL_CFG_NO_QUOTE_TEMPLATE -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_QUOTE_HPP_INCLUDED ///// iteration #else -#define i BOOST_PP_FRAME_ITERATION(1) +#define i_ BOOST_PP_FRAME_ITERATION(1) template< - template< BOOST_MPL_PP_PARAMS(i, typename P) > class F + template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F , typename Tag = void_ > -struct BOOST_PP_CAT(quote,i) +struct BOOST_PP_CAT(quote,i_) { - template< BOOST_MPL_PP_PARAMS(i, typename U) > struct apply + template< BOOST_MPL_PP_PARAMS(i_, typename U) > struct apply #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - : quote_impl< F< BOOST_MPL_PP_PARAMS(i, U) > > + : quote_impl< + F< BOOST_MPL_PP_PARAMS(i_, U) > + , aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value + > #else - : quote_impl< aux::has_type< F< BOOST_MPL_PP_PARAMS(i, U) > >::value > - ::template result_< F< BOOST_MPL_PP_PARAMS(i, U) > > + : quote_impl< aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value > + ::template result_< F< BOOST_MPL_PP_PARAMS(i_, U) > > #endif { }; }; -#undef i +#undef i_ #endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/range_c.hpp b/include/boost/mpl/range_c.hpp index 1515bb6..948a4cd 100644 --- a/include/boost/mpl/range_c.hpp +++ b/include/boost/mpl/range_c.hpp @@ -1,29 +1,30 @@ -//----------------------------------------------------------------------------- -// boost mpl/range_c.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_RANGE_C_HPP_INCLUDED #define BOOST_MPL_RANGE_C_HPP_INCLUDED -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/aux_/range_c/front.hpp" -#include "boost/mpl/aux_/range_c/back.hpp" -#include "boost/mpl/aux_/range_c/size.hpp" -#include "boost/mpl/aux_/range_c/O1_size.hpp" -#include "boost/mpl/aux_/range_c/empty.hpp" -#include "boost/mpl/aux_/range_c/iterator.hpp" -#include "boost/mpl/aux_/range_c/tag.hpp" +// Copyright Aleksey Gurtovoy 2000-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + + +#include <boost/mpl/integral_c.hpp> +#include <boost/mpl/aux_/range_c/front.hpp> +#include <boost/mpl/aux_/range_c/back.hpp> +#include <boost/mpl/aux_/range_c/size.hpp> +#include <boost/mpl/aux_/range_c/O1_size.hpp> +#include <boost/mpl/aux_/range_c/empty.hpp> +#include <boost/mpl/aux_/range_c/iterator.hpp> +#include <boost/mpl/aux_/range_c/tag.hpp> + +namespace boost { namespace mpl { template< typename T @@ -38,11 +39,10 @@ struct range_c typedef integral_c<T,Start> start; typedef integral_c<T,Finish> finish; - typedef range_c_iterator<start> begin; - typedef range_c_iterator<finish> end; + typedef rc_iter<start> begin; + typedef rc_iter<finish> end; }; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_RANGE_C_HPP_INCLUDED diff --git a/include/boost/mpl/remove.hpp b/include/boost/mpl/remove.hpp index 932c770..3827cdf 100644 --- a/include/boost/mpl/remove.hpp +++ b/include/boost/mpl/remove.hpp @@ -1,41 +1,52 @@ -//----------------------------------------------------------------------------- -// boost mpl/remove.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_REMOVE_HPP_INCLUDED #define BOOST_MPL_REMOVE_HPP_INCLUDED -#include "boost/mpl/remove_if.hpp" -#include "boost/mpl/same_as.hpp" -#include "boost/mpl/aux_/void_spec.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN +#include <boost/mpl/remove_if.hpp> +#include <boost/mpl/same_as.hpp> +#include <boost/mpl/aux_/inserter_algorithm.hpp> + +namespace boost { namespace mpl { + +namespace aux { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename Sequence + , typename T + , typename Inserter > -struct remove - : remove_if< Sequence, same_as<T> > +struct remove_impl + : remove_if_impl< Sequence, same_as<T>, Inserter > { }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END +template< + typename Sequence + , typename T + , typename Inserter + > +struct reverse_remove_impl + : reverse_remove_if_impl< Sequence, same_as<T>, Inserter > +{ +}; -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, remove) +} // namespace aux -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, remove) + +}} #endif // BOOST_MPL_REMOVE_HPP_INCLUDED diff --git a/include/boost/mpl/remove_if.hpp b/include/boost/mpl/remove_if.hpp index 5c95f6a..5412618 100644 --- a/include/boost/mpl/remove_if.hpp +++ b/include/boost/mpl/remove_if.hpp @@ -2,71 +2,82 @@ #ifndef BOOST_MPL_REMOVE_IF_HPP_INCLUDED #define BOOST_MPL_REMOVE_IF_HPP_INCLUDED -// + file: boost/mpl/remove_if.hpp -// + last modified: 10/mar/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// 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 +// 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. -#include "boost/mpl/fold_backward.hpp" -#include "boost/mpl/clear.hpp" -#include "boost/mpl/apply_if.hpp" -#include "boost/mpl/push_front.hpp" -#include "boost/mpl/identity.hpp" -#include "boost/mpl/protect.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/apply.hpp" -#include "boost/mpl/aux_/void_spec.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { +#include <boost/mpl/fold.hpp> +#include <boost/mpl/reverse_fold.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/protect.hpp> +#include <boost/mpl/lambda.hpp> +#include <boost/mpl/apply.hpp> +#include <boost/mpl/aux_/inserter_algorithm.hpp> + +namespace boost { namespace mpl { namespace aux { -template< typename Pred > struct remove_if_helper +template< typename Pred, typename InsertOp > struct remove_if_helper { template< typename Sequence, typename U > struct apply { - typedef typename apply_if< + typedef typename eval_if< typename apply1<Pred,U>::type , identity<Sequence> - , push_front<Sequence,U> + , apply2<InsertOp,Sequence,U> >::type type; }; }; -} // namespace aux - -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN - template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Predicate) + typename Sequence + , typename Predicate + , typename Inserter > -struct remove_if -{ - private: - typedef typename lambda<Predicate>::type pred_; - - public: - typedef typename fold_backward< +struct remove_if_impl + : fold< Sequence - , typename clear<Sequence>::type - , protect< aux::remove_if_helper<pred_> > - >::type type; + , typename Inserter::state + , protect< aux::remove_if_helper< + typename lambda<Predicate>::type + , typename Inserter::operation + > > + > +{ }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END +template< + typename Sequence + , typename Predicate + , typename Inserter + > +struct reverse_remove_if_impl + : reverse_fold< + Sequence + , typename Inserter::state + , protect< aux::remove_if_helper< + typename lambda<Predicate>::type + , typename Inserter::operation + > > + > +{ +}; -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, remove_if) +} // namespace aux -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, remove_if) + +}} #endif // BOOST_MPL_REMOVE_IF_HPP_INCLUDED diff --git a/include/boost/mpl/replace.hpp b/include/boost/mpl/replace.hpp index f54519a..74323ce 100644 --- a/include/boost/mpl/replace.hpp +++ b/include/boost/mpl/replace.hpp @@ -1,46 +1,42 @@ -//----------------------------------------------------------------------------- -// boost mpl/replace.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy and John R. Bandela -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_REPLACE_HPP_INCLUDED #define BOOST_MPL_REPLACE_HPP_INCLUDED -#include "boost/mpl/replace_if.hpp" -#include "boost/mpl/protect.hpp" -#include "boost/mpl/same_as.hpp" -#include "boost/mpl/aux_/common_name_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright John R. Bandela 2000-2002 +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/replace_if.hpp> +#include <boost/mpl/same_as.hpp> +#include <boost/mpl/aux_/common_name_wknd.hpp> +#include <boost/mpl/aux_/na_spec.hpp> + +namespace boost { namespace mpl { BOOST_MPL_AUX_COMMON_NAME_WKND(replace) -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN - template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(OldType) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(NewType) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(OldType) + , typename BOOST_MPL_AUX_NA_PARAM(NewType) > struct replace - : replace_if< Sequence, protect< same_as<OldType> >, NewType > + : replace_if< Sequence, same_as<OldType>, NewType > { }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END +BOOST_MPL_AUX_NA_SPEC(3, replace) -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(3, replace) - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_REPLACE_HPP_INCLUDED diff --git a/include/boost/mpl/replace_if.hpp b/include/boost/mpl/replace_if.hpp index 1ae9317..0920757 100644 --- a/include/boost/mpl/replace_if.hpp +++ b/include/boost/mpl/replace_if.hpp @@ -1,28 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/replace_if.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy and John R. Bandela -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_REPLACE_IF_HPP_INCLUDED #define BOOST_MPL_REPLACE_IF_HPP_INCLUDED -#include "boost/mpl/transform.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/apply.hpp" -#include "boost/mpl/if.hpp" -#include "boost/mpl/protect.hpp" -#include "boost/mpl/aux_/common_name_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright John R. Bandela 2000-2002 +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/transform.hpp> +#include <boost/mpl/apply.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/aux_/common_name_wknd.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/config/forwarding.hpp> + +namespace boost { namespace mpl { BOOST_MPL_AUX_COMMON_NAME_WKND(replace_if) @@ -32,41 +33,43 @@ template< typename Predicate, typename T > struct replace_if_op { template< typename U > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) + : if_< + typename apply1<Predicate,U>::type + , T + , U + > + { +#else { typedef typename if_< typename apply1<Predicate,U>::type , T , U >::type type; +#endif }; }; } // namespace aux -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN - template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Predicate) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(Predicate) + , typename BOOST_MPL_AUX_NA_PARAM(T) + , typename BOOST_MPL_AUX_NA_PARAM(Inserter) > struct replace_if -{ - private: - typedef typename lambda<Predicate>::type pred_; - - public: - typedef typename transform< + : transform1< Sequence - , protect< aux::replace_if_op<pred_,T> > - >::type type; + , protect< aux::replace_if_op<Predicate,T> > + , Inserter + > +{ }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END +BOOST_MPL_AUX_NA_SPEC(3, replace_if) -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(3, replace_if) - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_REPLACE_IF_HPP_INCLUDED diff --git a/include/boost/mpl/reverse.hpp b/include/boost/mpl/reverse.hpp index da610f8..86b54f0 100644 --- a/include/boost/mpl/reverse.hpp +++ b/include/boost/mpl/reverse.hpp @@ -1,49 +1,38 @@ -//----------------------------------------------------------------------------- -// boost mpl/reverse.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_REVERSE_HPP_INCLUDED #define BOOST_MPL_REVERSE_HPP_INCLUDED -#include "boost/mpl/copy.hpp" -#include "boost/mpl/clear.hpp" -#include "boost/mpl/push_front.hpp" -#include "boost/mpl/aux_/void_spec.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN +#include <boost/mpl/copy.hpp> +#include <boost/mpl/aux_/na_spec.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(Inserter) > struct reverse -{ - private: - typedef typename clear<Sequence>::type result_; - - public: - typedef typename copy< + : reverse_copy< Sequence - , result_ - , push_front<_,_> - >::type type; + , Inserter + > +{ }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END +BOOST_MPL_AUX_NA_SPEC(1, reverse) -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(1, reverse) - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_REVERSE_HPP_INCLUDED diff --git a/include/boost/mpl/reverse_fold.hpp b/include/boost/mpl/reverse_fold.hpp new file mode 100644 index 0000000..2a68caa --- /dev/null +++ b/include/boost/mpl/reverse_fold.hpp @@ -0,0 +1,50 @@ + +#ifndef BOOST_MPL_REVERSE_FOLD_HPP_INCLUDED +#define BOOST_MPL_REVERSE_FOLD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/O1_size.hpp> +#include <boost/mpl/arg.hpp> +#include <boost/mpl/aux_/reverse_fold_impl.hpp> +#include <boost/mpl/aux_/na_spec.hpp> + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(State) + , typename BOOST_MPL_AUX_NA_PARAM(BackwardOp) + , typename ForwardOp = arg<1> + > +struct reverse_fold +{ + typedef typename aux::reverse_fold_impl< + ::boost::mpl::O1_size<Sequence>::value + , typename begin<Sequence>::type + , typename end<Sequence>::type + , State + , BackwardOp + , ForwardOp + >::state type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(3,reverse_fold,(Sequence,State,BackwardOp)) +}; + +BOOST_MPL_AUX_NA_SPEC(3, reverse_fold) + +}} + +#endif // BOOST_MPL_REVERSE_FOLD_HPP_INCLUDED diff --git a/include/boost/mpl/reverse_iter_fold.hpp b/include/boost/mpl/reverse_iter_fold.hpp new file mode 100644 index 0000000..b4aa8fa --- /dev/null +++ b/include/boost/mpl/reverse_iter_fold.hpp @@ -0,0 +1,56 @@ + +#ifndef BOOST_MPL_ITER_FOLD_BACKWARD_HPP_INCLUDED +#define BOOST_MPL_ITER_FOLD_BACKWARD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Dave Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/O1_size.hpp> +#include <boost/mpl/arg.hpp> +#include <boost/mpl/lambda.hpp> +#include <boost/mpl/aux_/reverse_iter_fold_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(State) + , typename BOOST_MPL_AUX_NA_PARAM(BackwardOp) + , typename ForwardOp = arg<1> + > +struct reverse_iter_fold +{ + typedef typename aux::reverse_iter_fold_impl< + ::boost::mpl::O1_size<Sequence>::value + , typename begin<Sequence>::type + , typename end<Sequence>::type + , State + , typename lambda<BackwardOp>::type + , typename lambda<ForwardOp>::type + >::state type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT( + 4 + , reverse_iter_fold + , (Sequence,State,BackwardOp,ForwardOp) + ) +}; + +BOOST_MPL_AUX_NA_SPEC(3, reverse_iter_fold) + +}} + +#endif // BOOST_MPL_ITER_FOLD_BACKWARD_HPP_INCLUDED diff --git a/include/boost/mpl/same_as.hpp b/include/boost/mpl/same_as.hpp index 3742dea..d164273 100644 --- a/include/boost/mpl/same_as.hpp +++ b/include/boost/mpl/same_as.hpp @@ -1,30 +1,32 @@ -//----------------------------------------------------------------------------- -// boost mpl/same_as.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_SAME_AS_HPP_INCLUDED #define BOOST_MPL_SAME_AS_HPP_INCLUDED -#include "boost/mpl/not.hpp" -#include "boost/mpl/aux_/lambda_spec.hpp" -#include "boost/type_traits/is_same.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/not.hpp> +#include <boost/mpl/aux_/lambda_spec.hpp> +#include <boost/mpl/aux_/config/forwarding.hpp> + +#include <boost/type_traits/is_same.hpp> + +namespace boost { namespace mpl { template< typename T1 > struct same_as { template< typename T2 > struct apply -#if !defined(__BORLANDC__) || (__BORLANDC__ > 0x551 && defined(BOOST_STRICT_CONFIG)) +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) : is_same<T1,T2> { #else @@ -38,7 +40,7 @@ template< typename T1 > struct not_same_as { template< typename T2 > struct apply -#if !defined(__BORLANDC__) || (__BORLANDC__ > 0x51 && defined(BOOST_STRICT_CONFIG)) +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) : not_< is_same<T1,T2> > { #else @@ -48,10 +50,6 @@ struct not_same_as }; }; -BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1,same_as) -BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1,not_same_as) - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_SAME_AS_HPP_INCLUDED diff --git a/include/boost/mpl/select1st.hpp b/include/boost/mpl/select1st.hpp deleted file mode 100644 index 57f33fb..0000000 --- a/include/boost/mpl/select1st.hpp +++ /dev/null @@ -1,44 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/select1st.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_SELECT1ST_HPP_INCLUDED -#define BOOST_MPL_SELECT1ST_HPP_INCLUDED - -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/mpl/aux_/config/eti.hpp" - -namespace boost { -namespace mpl { - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Pair) - > -struct select1st -{ - typedef typename Pair::first type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,select1st,(Pair)) -}; - -#if defined(BOOST_MPL_MSVC_60_ETI_BUG) -template<> struct select1st<int> -{ - typedef int type; -}; -#endif - -BOOST_MPL_AUX_VOID_SPEC(1, select1st) - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_SELECT1ST_HPP_INCLUDED diff --git a/include/boost/mpl/select2nd.hpp b/include/boost/mpl/select2nd.hpp deleted file mode 100644 index cef2953..0000000 --- a/include/boost/mpl/select2nd.hpp +++ /dev/null @@ -1,44 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/select2nd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-03 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_SELECT2ND_HPP_INCLUDED -#define BOOST_MPL_SELECT2ND_HPP_INCLUDED - -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/mpl/aux_/config/eti.hpp" - -namespace boost { -namespace mpl { - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Pair) - > -struct select2nd -{ - typedef typename Pair::second type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,select2nd,(Pair)) -}; - -#if defined(BOOST_MPL_MSVC_60_ETI_BUG) -template<> struct select2nd<int> -{ - typedef int type; -}; -#endif - -BOOST_MPL_AUX_VOID_SPEC(1, select2nd) - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_SELECT2ND_HPP_INCLUDED diff --git a/include/boost/mpl/sequence_tag.hpp b/include/boost/mpl/sequence_tag.hpp index 10721af..7cb6476 100644 --- a/include/boost/mpl/sequence_tag.hpp +++ b/include/boost/mpl/sequence_tag.hpp @@ -1,35 +1,37 @@ -//----------------------------------------------------------------------------- -// boost mpl/sequence_tag.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_SEQUENCE_TAG_HPP_INCLUDED #define BOOST_MPL_SEQUENCE_TAG_HPP_INCLUDED -#include "boost/mpl/sequence_tag_fwd.hpp" -#include "boost/mpl/aux_/has_tag.hpp" -#include "boost/mpl/aux_/has_begin.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/is_msvc_eti_arg.hpp" -#include "boost/mpl/aux_/config/eti.hpp" -#include "boost/mpl/aux_/yes_no.hpp" -#include "boost/mpl/aux_/config/workaround.hpp" +// 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/mpl/sequence_tag_fwd.hpp> +#include <boost/mpl/aux_/has_tag.hpp> +#include <boost/mpl/aux_/has_begin.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/is_msvc_eti_arg.hpp> +#include <boost/mpl/aux_/config/eti.hpp> +#include <boost/mpl/aux_/yes_no.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> namespace boost { namespace mpl { // agurt, 27/nov/02: have to use a simplistic 'sequence_tag' implementation // on MSVC to avoid dreadful "internal structure overflow" error -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ + || defined(BOOST_MPL_CFG_NO_HAS_XXX) template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct sequence_tag { @@ -63,7 +65,7 @@ struct sequence_tag_impl<false> } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct sequence_tag : aux::sequence_tag_impl< !aux::is_msvc_eti_arg<Sequence>::value > @@ -103,7 +105,7 @@ AUX_CLASS_SEQUENCE_TAG_SPEC(false, false, non_sequence_tag) } // namespace aux template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct sequence_tag : aux::sequence_tag_impl< @@ -115,15 +117,8 @@ struct sequence_tag #endif // BOOST_MSVC -#if defined(BOOST_MPL_MSVC_60_ETI_BUG) -template<> struct sequence_tag<int> -{ - typedef int type; -}; -#endif +BOOST_MPL_AUX_NA_SPEC(1, sequence_tag) -BOOST_MPL_AUX_VOID_SPEC(1, sequence_tag) - -}} // namespace boost::mpl +}} #endif // BOOST_MPL_SEQUENCE_TAG_HPP_INCLUDED diff --git a/include/boost/mpl/sequence_tag_fwd.hpp b/include/boost/mpl/sequence_tag_fwd.hpp index 8af4953..59d56d4 100644 --- a/include/boost/mpl/sequence_tag_fwd.hpp +++ b/include/boost/mpl/sequence_tag_fwd.hpp @@ -1,18 +1,19 @@ -//----------------------------------------------------------------------------- -// boost mpl/sequence_tag_fwd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_SEQUENCE_TAG_FWD_HPP_INCLUDED #define BOOST_MPL_SEQUENCE_TAG_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. + +// $Source$ +// $Date$ +// $Revision$ + namespace boost { namespace mpl { struct nested_begin_end_tag; @@ -20,6 +21,6 @@ struct non_sequence_tag; template< typename Sequence > struct sequence_tag; -}} // namespace boost::mpl +}} #endif // BOOST_MPL_SEQUENCE_TAG_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/set.hpp b/include/boost/mpl/set.hpp new file mode 100644 index 0000000..638beea --- /dev/null +++ b/include/boost/mpl/set.hpp @@ -0,0 +1,57 @@ + +#ifndef BOOST_MPL_SET_HPP_INCLUDED +#define BOOST_MPL_SET_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_/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_SET_HEADER \ + BOOST_PP_CAT(set, BOOST_MPL_LIMIT_SET_SIZE).hpp \ + /**/ +#else +# define AUX778076_SET_HEADER \ + BOOST_PP_CAT(set, BOOST_MPL_LIMIT_SET_SIZE)##.hpp \ + /**/ +#endif + +# include BOOST_PP_STRINGIZE(boost/mpl/set/AUX778076_SET_HEADER) +# undef AUX778076_SET_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 set.hpp +# include <boost/mpl/aux_/include_preprocessed.hpp> + +#else + +# include <boost/mpl/limits/set.hpp> + +# define AUX778076_SEQUENCE_NAME set +# define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_SET_SIZE +# include <boost/mpl/aux_/sequence_wrapper.hpp> + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_SET_HPP_INCLUDED diff --git a/include/boost/mpl/set/aux_/at_impl.hpp b/include/boost/mpl/set/aux_/at_impl.hpp new file mode 100644 index 0000000..d1ca34c --- /dev/null +++ b/include/boost/mpl/set/aux_/at_impl.hpp @@ -0,0 +1,40 @@ + +#ifndef BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED +#define BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/at_fwd.hpp> +#include <boost/mpl/set/aux_/has_key_impl.hpp> +#include <boost/mpl/set/aux_/tag.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/void.hpp> + +namespace boost { namespace mpl { + +template<> +struct at_impl< aux::set_tag > +{ + template< typename Set, typename T > struct apply + { + typedef typename if_< + has_key_impl<aux::set_tag>::apply<Set,T> + , T + , void_ + >::type type; + }; +}; + +}} + +#endif // BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/set/aux_/begin_end_impl.hpp b/include/boost/mpl/set/aux_/begin_end_impl.hpp index 5e45c49..22a21b3 100644 --- a/include/boost/mpl/set/aux_/begin_end_impl.hpp +++ b/include/boost/mpl/set/aux_/begin_end_impl.hpp @@ -2,38 +2,39 @@ #ifndef BOOST_MPL_SET_AUX_BEGIN_END_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_BEGIN_END_IMPL_HPP_INCLUDED -// + file: boost/mpl/aux_/begin_end_impl.hpp -// + last modified: 03/may/03 - -// Copyright (c) 2002-03 -// David Abrahams, Aleksey Gurtovoy +// 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 +// 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. -#include "boost/mpl/begin_end_fwd.hpp" -#include "boost/mpl/set/aux_/iterator.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/begin_end_fwd.hpp> +#include <boost/mpl/set/aux_/iterator.hpp> namespace boost { namespace mpl { template<> -struct begin_traits< aux::set_tag > +struct begin_impl< aux::set_tag > { - template< typename Set > struct algorithm + template< typename Set > struct apply { - typedef set_iter<Set,Set> type; + typedef s_iter<Set,Set> type; }; }; template<> -struct end_traits< aux::set_tag > +struct end_impl< aux::set_tag > { - template< typename Set > struct algorithm + template< typename Set > struct apply { - typedef set_iter< Set,set0<> > type; + typedef s_iter< Set,set0<> > type; }; }; diff --git a/include/boost/mpl/set/aux_/clear_impl.hpp b/include/boost/mpl/set/aux_/clear_impl.hpp new file mode 100644 index 0000000..1c6825d --- /dev/null +++ b/include/boost/mpl/set/aux_/clear_impl.hpp @@ -0,0 +1,35 @@ + +#ifndef BOOST_MPL_SET_AUX_CLEAR_IMPL_HPP_INCLUDED +#define BOOST_MPL_SET_AUX_CLEAR_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/clear_fwd.hpp> +#include <boost/mpl/set/aux_/set0.hpp> +#include <boost/mpl/set/aux_/tag.hpp> + +namespace boost { namespace mpl { + +template<> +struct clear_impl< aux::set_tag > +{ + template< typename Set > struct apply + { + typedef set0<> type; + }; +}; + +}} + +#endif // BOOST_MPL_SET_AUX_CLEAR_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/set/aux_/empty_impl.hpp b/include/boost/mpl/set/aux_/empty_impl.hpp new file mode 100644 index 0000000..45918ec --- /dev/null +++ b/include/boost/mpl/set/aux_/empty_impl.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED +#define BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/empty_fwd.hpp> +#include <boost/mpl/not.hpp> +#include <boost/mpl/set/aux_/tag.hpp> + +namespace boost { namespace mpl { + +template<> +struct empty_impl< aux::set_tag > +{ + template< typename Set > struct apply + : not_< typename Set::size > + { + }; +}; + +}} + +#endif // BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/set/aux_/erase_impl.hpp b/include/boost/mpl/set/aux_/erase_impl.hpp new file mode 100644 index 0000000..ae06e9f --- /dev/null +++ b/include/boost/mpl/set/aux_/erase_impl.hpp @@ -0,0 +1,41 @@ + +#ifndef BOOST_MPL_SET_AUX_ERASE_IMPL_HPP_INCLUDED +#define BOOST_MPL_SET_AUX_ERASE_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/erase_fwd.hpp> +#include <boost/mpl/set/aux_/erase_key_impl.hpp> +#include <boost/mpl/set/aux_/tag.hpp> + +namespace boost { namespace mpl { + +template<> +struct erase_impl< aux::set_tag > +{ + template< + typename Set + , typename Pos + , typename unused_ + > + struct apply + : erase_key_impl<aux::set_tag> + ::apply<Set,typename Pos::type> + { + }; +}; + +}} + +#endif // BOOST_MPL_SET_AUX_ERASE_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/set/aux_/erase_key_impl.hpp b/include/boost/mpl/set/aux_/erase_key_impl.hpp new file mode 100644 index 0000000..128c17d --- /dev/null +++ b/include/boost/mpl/set/aux_/erase_key_impl.hpp @@ -0,0 +1,53 @@ + +#ifndef BOOST_MPL_SET_AUX_ERASE_KEY_IMPL_HPP_INCLUDED +#define BOOST_MPL_SET_AUX_ERASE_KEY_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-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/erase_key_fwd.hpp> +#include <boost/mpl/set/aux_/has_key_impl.hpp> +#include <boost/mpl/set/aux_/item.hpp> +#include <boost/mpl/set/aux_/tag.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/base.hpp> +#include <boost/mpl/eval_if.hpp> + +#include <boost/type_traits/is_same.hpp> + +namespace boost { namespace mpl { + +template<> +struct erase_key_impl< aux::set_tag > +{ + template< + typename Set + , typename T + > + struct apply + : eval_if< + has_key_impl<aux::set_tag>::apply<Set,T> + , eval_if< + is_same< T,typename Set::item_type_ > + , base<Set> + , identity< s_mask<T,Set> > + > + , identity<Set> + > + { + }; +}; + +}} + +#endif // BOOST_MPL_SET_AUX_ERASE_KEY_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/set/aux_/has_key_impl.hpp b/include/boost/mpl/set/aux_/has_key_impl.hpp index b25aff2..527226d 100644 --- a/include/boost/mpl/set/aux_/has_key_impl.hpp +++ b/include/boost/mpl/set/aux_/has_key_impl.hpp @@ -2,29 +2,29 @@ #ifndef BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED -// + file: boost/mpl/aux_/has_key_impl.hpp -// + last modified: 02/may/03 - -// Copyright (c) 2002-03 -// David Abrahams, Aleksey Gurtovoy +// 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 +// 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. -#include "boost/mpl/set/aux_/tag.hpp" -#include "boost/mpl/has_key_fwd.hpp" -#include "boost/mpl/bool.hpp" -#include "boost/mpl/aux_/static_cast.hpp" -#include "boost/mpl/aux_/yes_no.hpp" -#include "boost/mpl/aux_/type_wrapper.hpp" -#include "boost/mpl/aux_/ptr_to_ref.hpp" -#include "boost/mpl/aux_/config/workaround.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { +#include <boost/mpl/set/aux_/tag.hpp> +#include <boost/mpl/has_key_fwd.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/aux_/static_cast.hpp> +#include <boost/mpl/aux_/yes_no.hpp> +#include <boost/mpl/aux_/type_wrapper.hpp> +#include <boost/mpl/aux_/ptr_to_ref.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +namespace boost { namespace mpl { template<> struct has_key_impl< aux::set_tag > @@ -45,7 +45,7 @@ struct has_key_impl< aux::set_tag > typedef bool_<value> type; # endif -#else +#else // ISO98 C++ : bool_< ( sizeof( aux::ptr_to_ref(BOOST_MPL_AUX_STATIC_CAST(Set*, 0)) diff --git a/include/boost/mpl/set/aux_/include_preprocessed.hpp b/include/boost/mpl/set/aux_/include_preprocessed.hpp new file mode 100644 index 0000000..08f66a0 --- /dev/null +++ b/include/boost/mpl/set/aux_/include_preprocessed.hpp @@ -0,0 +1,36 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2001-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_/config/preprocessor.hpp> + +#include <boost/preprocessor/cat.hpp> +#include <boost/preprocessor/stringize.hpp> + +#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) +# define AUX778076_HEADER \ + plain/BOOST_MPL_PREPROCESSED_HEADER \ +/**/ +#else +# define AUX778076_HEADER \ + BOOST_PP_CAT(plain,/)##BOOST_MPL_PREPROCESSED_HEADER \ +/**/ +#endif + + +# include BOOST_PP_STRINGIZE(boost/mpl/set/aux_/preprocessed/AUX778076_HEADER) + +# undef AUX778076_HEADER + +#undef BOOST_MPL_PREPROCESSED_HEADER diff --git a/include/boost/mpl/set/aux_/insert_impl.hpp b/include/boost/mpl/set/aux_/insert_impl.hpp index 3872fd9..420d0fd 100644 --- a/include/boost/mpl/set/aux_/insert_impl.hpp +++ b/include/boost/mpl/set/aux_/insert_impl.hpp @@ -2,44 +2,43 @@ #ifndef BOOST_MPL_SET_AUX_INSERT_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_INSERT_IMPL_HPP_INCLUDED -// + file: boost/mpl/aux_/insert_impl.hpp -// + last modified: 05/may/03 - -// Copyright (c) 2002-03 -// David Abrahams, Aleksey Gurtovoy +// 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 +// 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. -#include "boost/mpl/set/aux_/has_key_impl.hpp" -#include "boost/mpl/set/aux_/item.hpp" -#include "boost/mpl/set/aux_/tag.hpp" -#include "boost/mpl/insert_fwd.hpp" -#include "boost/mpl/identity.hpp" -#include "boost/mpl/base.hpp" -#include "boost/mpl/apply_if.hpp" +// $Source$ +// $Date$ +// $Revision$ -#include "boost/type_traits/is_same.hpp" +#include <boost/mpl/insert_fwd.hpp> +#include <boost/mpl/set/aux_/has_key_impl.hpp> +#include <boost/mpl/set/aux_/item.hpp> +#include <boost/mpl/set/aux_/tag.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/base.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/aux_/na.hpp> -namespace boost { -namespace mpl { +#include <boost/type_traits/is_same.hpp> -template<> -struct insert_traits< aux::set_tag > -{ - template< typename Set, typename T, typename unused_ > struct algorithm - : apply_if< - has_key_impl<aux::set_tag>::apply<Set,T> - , apply_if< - is_same< T,typename Set::last_masked > - , base<Set> - , identity<Set> - > +namespace boost { namespace mpl { + +namespace aux { +template< typename Set, typename T > struct set_insert_impl + : eval_if< + has_key_impl<aux::set_tag>::apply<Set,T> + , identity<Set> + , eval_if< + is_same< T,typename Set::last_masked_ > + , base<Set> , identity< s_item<T,Set> > > + > /* : eval< if_< has_key<Set,T> @@ -47,6 +46,23 @@ struct insert_traits< aux::set_tag > , Set > > */ +{ +}; +} + +template<> +struct insert_impl< aux::set_tag > +{ + template< + typename Set + , typename PosOrKey + , typename KeyOrNA + > + struct apply + : aux::set_insert_impl< + Set + , typename if_na<KeyOrNA,PosOrKey>::type + > { }; }; diff --git a/include/boost/mpl/set/aux_/item.hpp b/include/boost/mpl/set/aux_/item.hpp index 57f99be..34508d5 100644 --- a/include/boost/mpl/set/aux_/item.hpp +++ b/include/boost/mpl/set/aux_/item.hpp @@ -2,82 +2,83 @@ #ifndef BOOST_MPL_SET_AUX_ITEM_HPP_INCLUDED #define BOOST_MPL_SET_AUX_ITEM_HPP_INCLUDED -// + file: boost/mpl/aux_/item.hpp -// + last modified: 03/may/03 - -// Copyright (c) 2002-03 -// David Abrahams, Aleksey Gurtovoy +// 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 +// 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. -#include "boost/mpl/long.hpp" -#include "boost/mpl/void_fwd.hpp" -#include "boost/mpl/set/aux_/set0.hpp" -#include "boost/mpl/aux_/yes_no.hpp" -#include "boost/mpl/aux_/type_wrapper.hpp" -#include "boost/mpl/aux_/config/static_constant.hpp" -#include "boost/mpl/aux_/config/workaround.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { +#include <boost/mpl/long.hpp> +#include <boost/mpl/void.hpp> +#include <boost/mpl/next.hpp> +#include <boost/mpl/prior.hpp> +#include <boost/mpl/set/aux_/set0.hpp> +#include <boost/mpl/aux_/yes_no.hpp> +#include <boost/mpl/aux_/type_wrapper.hpp> +#include <boost/mpl/aux_/config/arrays.hpp> +#include <boost/mpl/aux_/config/operators.hpp> +#include <boost/mpl/aux_/config/static_constant.hpp> + +namespace boost { namespace mpl { aux::no_tag operator/(set0<> const&, void*); aux::no_tag operator%(set0<> const&, void*); -// agurt, 03/may/03: forward declarations of operators, to supressing a GCC warning, -// see below; breaks 2.95.x! -#if BOOST_WORKAROUND(__GNUC__, > 2) && BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(3)) +#if defined(BOOST_MPL_CFG_USE_OPERATORS_SPECIALIZATION) + template< typename T, typename Base > struct s_item; template< typename T, typename Base > struct s_mask; +template< typename T, typename Base > struct s_unmask; template< typename T, typename Base > -typename s_item<T,Base>::order_tag +typename s_item<T,Base>::order_tag_ operator/(s_item<T,Base> const&, aux::type_wrapper<T>*); template< typename T, typename Base > aux::yes_tag operator%(s_item<T,Base> const&, aux::type_wrapper<T>*); +template< typename T, typename Base > +aux::yes_tag operator%(s_unmask<T,Base> const&, aux::type_wrapper<T>*); + template< typename T, typename Base > aux::no_tag operator%(s_mask<T,Base> const&, aux::type_wrapper<T>*); + +# define MPL_AUX_SET_OPERATOR(x) operator x <> + +#else +# define MPL_AUX_SET_OPERATOR(x) operator x #endif -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) -namespace aux { -template< long n_ > struct order_tag_ -{ - typedef char (&type)[n_]; -}; -} -#endif template< typename T, typename Base > struct s_item : Base { - typedef void_ last_masked; - typedef T item; - typedef Base base; + typedef void_ last_masked_; + typedef Base next_; + typedef T item_type_; + typedef item_type_ type; + typedef Base base; + + typedef typename next< typename Base::size >::type size; BOOST_STATIC_CONSTANT(long, order = Base::order + 1); #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) - typedef typename aux::order_tag_<(Base::order + 1)>::type order_tag; + typedef typename aux::weighted_tag<(Base::order + 1)>::type order_tag_; #else - typedef char (&order_tag)[order]; + typedef char (&order_tag_)[order]; #endif -#if BOOST_WORKAROUND(__GNUC__, > 2) && BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(3)) - // to make GCC happy - friend order_tag operator/<>(s_item const&, aux::type_wrapper<T>*); - friend aux::yes_tag operator%<>(s_item const&, aux::type_wrapper<T>*); -#else - friend order_tag operator/(s_item const&, aux::type_wrapper<T>*); - friend aux::yes_tag operator%(s_item const&, aux::type_wrapper<T>*); -#endif + friend order_tag_ MPL_AUX_SET_OPERATOR(/)(s_item const&, aux::type_wrapper<T>*); + friend aux::yes_tag MPL_AUX_SET_OPERATOR(%)(s_item const&, aux::type_wrapper<T>*); }; @@ -85,15 +86,29 @@ template< typename T, typename Base > struct s_mask : Base { - typedef T last_masked; -#if BOOST_WORKAROUND(__GNUC__, > 2) && BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(3)) - // to make GCC happy - friend aux::no_tag operator%<>(s_mask const&, aux::type_wrapper<T>*); -#else - friend aux::no_tag operator%(s_mask const&, aux::type_wrapper<T>*); -#endif + typedef T last_masked_; + typedef void_ item_type_; + typedef Base base; + typedef typename prior< typename Base::size >::type size; + + friend aux::no_tag MPL_AUX_SET_OPERATOR(%)(s_mask const&, aux::type_wrapper<T>*); }; + +template< typename T, typename Base > +struct s_unmask + : Base +{ + typedef void_ last_masked_; + typedef T item_type_; + typedef Base base; + typedef typename next< typename Base::size >::type size; + + friend aux::yes_tag MPL_AUX_SET_OPERATOR(%)(s_unmask const&, aux::type_wrapper<T>*); +}; + +#undef MPL_AUX_SET_OPERATOR + }} #endif // BOOST_MPL_SET_AUX_ITEM_HPP_INCLUDED diff --git a/include/boost/mpl/set/aux_/iterator.hpp b/include/boost/mpl/set/aux_/iterator.hpp index e358f8f..30464d0 100644 --- a/include/boost/mpl/set/aux_/iterator.hpp +++ b/include/boost/mpl/set/aux_/iterator.hpp @@ -2,77 +2,95 @@ #ifndef BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED #define BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED -// + file: boost/mpl/aux_/iterator.hpp -// + last modified: 03/may/03 - -// Copyright (c) 2002-03 -// David Abrahams, Aleksey Gurtovoy +// 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 +// 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. -#include "boost/mpl/set/aux_/set0.hpp" -#include "boost/mpl/has_key.hpp" -#include "boost/mpl/iterator_tag.hpp" -#include "boost/mpl/next.hpp" -#include "boost/mpl/apply_if.hpp" -#include "boost/mpl/if.hpp" -#include "boost/mpl/identity.hpp" -#include "boost/mpl/aux_/config/ctps.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/set/aux_/set0.hpp> +#include <boost/mpl/has_key.hpp> +#include <boost/mpl/iterator_tags.hpp> +#include <boost/mpl/next.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> namespace boost { namespace mpl { -// used by 'set_iter_impl' -template< typename Set, typename Tail > struct set_iter; +// used by 's_iter_impl' +template< typename Set, typename Tail > struct s_iter; -template< typename Set, typename Tail > struct set_iter_impl +template< typename Set, typename Tail > struct s_iter_impl { - typedef Tail tail_; - typedef fwd_iter_tag_ category; - typedef typename Tail::item type; - - typedef typename apply_if< - has_key< Set,typename Tail::base::item > - , identity< set_iter<Set,typename Tail::base> > - , next< set_iter<Set,typename Tail::base> > - >::type next; -}; + typedef Tail tail_; + typedef forward_iterator_tag category; + typedef typename Tail::type type; #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - -template< typename Set > -struct set_end_iter -{ - typedef fwd_iter_tag_ category; - typedef set_iter<Set,set0<> > next; + typedef typename eval_if< + has_key< Set,typename Tail::next_::type > + , identity< s_iter<Set,typename Tail::next_> > + , next< s_iter<Set,typename Tail::next_> > + >::type next; +#endif }; -template< typename Set, typename Tail > struct set_iter - : if_< - is_same< Tail,set0<> > - , set_end_iter<Set> - , set_iter_impl<Set,Tail> - >::type +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< typename Set, typename Tail > +struct next< s_iter<Set,Tail> > + : eval_if< + has_key< Set,typename Tail::next_::type > + , identity< s_iter<Set,typename Tail::next_> > + , next< s_iter<Set,typename Tail::next_> > + > { }; +template< typename Set > +struct next< s_iter<Set,set0<> > > +{ + typedef s_iter<Set,set0<> > type; +}; + +template< typename Set, typename Tail > struct s_iter + : s_iter_impl<Set,Tail> +{ +}; + +template< typename Set > struct s_iter<Set, set0<> > +{ + typedef forward_iterator_tag category; +}; + #else -template< typename Set, typename Tail > struct set_iter - : set_iter_impl<Set,Tail> +template< typename Set > +struct s_end_iter +{ + typedef forward_iterator_tag category; + typedef s_iter<Set,set0<> > next; +}; + +template< typename Set, typename Tail > struct s_iter + : if_< + is_same< Tail,set0<> > + , s_end_iter<Set> + , s_iter_impl<Set,Tail> + >::type { }; -template< typename Set > struct set_iter<Set, set0<> > -{ - typedef fwd_iter_tag_ category; - typedef set_iter next; -}; - -#endif +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION }} diff --git a/include/boost/mpl/set/aux_/key_type_impl.hpp b/include/boost/mpl/set/aux_/key_type_impl.hpp new file mode 100644 index 0000000..65e4941 --- /dev/null +++ b/include/boost/mpl/set/aux_/key_type_impl.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_SET_AUX_KEY_TYPE_IMPL_HPP_INCLUDED +#define BOOST_MPL_SET_AUX_KEY_TYPE_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/key_type_fwd.hpp> +#include <boost/mpl/set/aux_/tag.hpp> + +namespace boost { namespace mpl { + +template<> +struct key_type_impl< aux::set_tag > +{ + template< typename Set, typename T > struct apply + { + typedef T type; + }; +}; + +}} + +#endif // BOOST_MPL_SET_AUX_KEY_TYPE_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/set/aux_/numbered.hpp b/include/boost/mpl/set/aux_/numbered.hpp new file mode 100644 index 0000000..99afb3c --- /dev/null +++ b/include/boost/mpl/set/aux_/numbered.hpp @@ -0,0 +1,47 @@ + +// 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/enum_params.hpp> +#include <boost/preprocessor/dec.hpp> +#include <boost/preprocessor/cat.hpp> + +#define i_ BOOST_PP_FRAME_ITERATION(1) + +# define AUX778076_SET_TAIL(set, i_, T) \ + BOOST_PP_CAT(set,i_)< \ + BOOST_PP_ENUM_PARAMS(i_, T) \ + > \ + /**/ + +#if i_ > 0 +template< + BOOST_PP_ENUM_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(set,i_) + : s_item< + BOOST_PP_CAT(T,BOOST_PP_DEC(i_)) + , AUX778076_SET_TAIL(set,BOOST_PP_DEC(i_),T) + > +{ +}; +#endif + +# undef AUX778076_SET_TAIL + +#undef i_ + +#endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/set/aux_/order_impl.hpp b/include/boost/mpl/set/aux_/order_impl.hpp deleted file mode 100644 index 5763ead..0000000 --- a/include/boost/mpl/set/aux_/order_impl.hpp +++ /dev/null @@ -1,70 +0,0 @@ - -#ifndef BOOST_MPL_SET_AUX_ORDER_IMPL_HPP_INCLUDED -#define BOOST_MPL_SET_AUX_ORDER_IMPL_HPP_INCLUDED - -// + file: boost/mpl/aux_/item.hpp -// + last modified: 03/may/03 - -// Copyright (c) 2002-03 -// David Abrahams, Aleksey Gurtovoy -// -// 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. - -#include "boost/mpl/set/aux_/tag.hpp" -#include "boost/mpl/order_fwd.hpp" -#include "boost/mpl/long.hpp" -#include "boost/mpl/void.hpp" -#include "boost/mpl/aux_/static_cast.hpp" -#include "boost/mpl/aux_/type_wrapper.hpp" -#include "boost/mpl/aux_/ptr_to_ref.hpp" -#include "boost/mpl/aux_/config/static_constant.hpp" -#include "boost/mpl/aux_/config/workaround.hpp" - -namespace boost { -namespace mpl { - -namespace aux { -template< long n_ > struct long_or_void : long_<n_> {}; -template<> struct long_or_void<0> : void_ {}; -} - -template<> -struct order_impl< aux::set_tag > -{ - - template< typename Set, typename T > struct apply -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) - { - BOOST_STATIC_CONSTANT(long, value = - sizeof( - *BOOST_MPL_AUX_STATIC_CAST(Set*, 0) - / BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<T>*, 0) - ) - 1 - ); - -# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) - typedef typename aux::long_or_void<(apply::value)>::type type; -# else - typedef typename aux::long_or_void<value>::type type; -# endif - -#else - : aux::long_or_void< - sizeof( - aux::ptr_to_ref(BOOST_MPL_AUX_STATIC_CAST(Set*, 0)) - / BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<T>*, 0) - ) - 1 - > - { -#endif - }; - -}; - -}} - -#endif // BOOST_MPL_SET_AUX_ORDER_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/set/aux_/preprocessed/plain/set10.hpp b/include/boost/mpl/set/aux_/preprocessed/plain/set10.hpp new file mode 100644 index 0000000..040140b --- /dev/null +++ b/include/boost/mpl/set/aux_/preprocessed/plain/set10.hpp @@ -0,0 +1,130 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/set/Attic/set10.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0 + > +struct set1 + : s_item< + T0 + , set0< > + > +{ +}; + +template< + typename T0, typename T1 + > +struct set2 + : s_item< + T1 + , set1<T0> + > +{ +}; + +template< + typename T0, typename T1, typename T2 + > +struct set3 + : s_item< + T2 + , set2< T0,T1 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct set4 + : s_item< + T3 + , set3< T0,T1,T2 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct set5 + : s_item< + T4 + , set4< T0,T1,T2,T3 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct set6 + : s_item< + T5 + , set5< T0,T1,T2,T3,T4 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct set7 + : s_item< + T6 + , set6< T0,T1,T2,T3,T4,T5 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct set8 + : s_item< + T7 + , set7< T0,T1,T2,T3,T4,T5,T6 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct set9 + : s_item< + T8 + , set8< T0,T1,T2,T3,T4,T5,T6,T7 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct set10 + : s_item< + T9 + , set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > + > +{ +}; + +}} diff --git a/include/boost/mpl/set/aux_/preprocessed/plain/set20.hpp b/include/boost/mpl/set/aux_/preprocessed/plain/set20.hpp new file mode 100644 index 0000000..6696d42 --- /dev/null +++ b/include/boost/mpl/set/aux_/preprocessed/plain/set20.hpp @@ -0,0 +1,150 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/set/Attic/set20.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct set11 + : s_item< + T10 + , set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct set12 + : s_item< + T11 + , set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct set13 + : s_item< + T12 + , set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct set14 + : s_item< + T13 + , set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct set15 + : s_item< + T14 + , set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct set16 + : s_item< + T15 + , set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct set17 + : s_item< + T16 + , set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct set18 + : s_item< + T17 + , set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct set19 + : s_item< + T18 + , set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct set20 + : s_item< + T19 + , set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 > + > +{ +}; + +}} diff --git a/include/boost/mpl/set/aux_/preprocessed/plain/set30.hpp b/include/boost/mpl/set/aux_/preprocessed/plain/set30.hpp new file mode 100644 index 0000000..9342036 --- /dev/null +++ b/include/boost/mpl/set/aux_/preprocessed/plain/set30.hpp @@ -0,0 +1,170 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/set/Attic/set30.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20 + > +struct set21 + : s_item< + T20 + , set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21 + > +struct set22 + : s_item< + T21 + , set21< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22 + > +struct set23 + : s_item< + T22 + , set22< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23 + > +struct set24 + : s_item< + T23 + , set23< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + > +struct set25 + : s_item< + T24 + , set24< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25 + > +struct set26 + : s_item< + T25 + , set25< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26 + > +struct set27 + : s_item< + T26 + , set26< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27 + > +struct set28 + : s_item< + T27 + , set27< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28 + > +struct set29 + : s_item< + T28 + , set28< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + > +struct set30 + : s_item< + T29 + , set29< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28 > + > +{ +}; + +}} diff --git a/include/boost/mpl/set/aux_/preprocessed/plain/set40.hpp b/include/boost/mpl/set/aux_/preprocessed/plain/set40.hpp new file mode 100644 index 0000000..84dd70b --- /dev/null +++ b/include/boost/mpl/set/aux_/preprocessed/plain/set40.hpp @@ -0,0 +1,190 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/set/Attic/set40.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30 + > +struct set31 + : s_item< + T30 + , set30< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31 + > +struct set32 + : s_item< + T31 + , set31< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32 + > +struct set33 + : s_item< + T32 + , set32< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33 + > +struct set34 + : s_item< + T33 + , set33< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + > +struct set35 + : s_item< + T34 + , set34< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35 + > +struct set36 + : s_item< + T35 + , set35< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36 + > +struct set37 + : s_item< + T36 + , set36< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37 + > +struct set38 + : s_item< + T37 + , set37< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38 + > +struct set39 + : s_item< + T38 + , set38< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + > +struct set40 + : s_item< + T39 + , set39< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38 > + > +{ +}; + +}} diff --git a/include/boost/mpl/set/aux_/preprocessed/plain/set50.hpp b/include/boost/mpl/set/aux_/preprocessed/plain/set50.hpp new file mode 100644 index 0000000..bbe2115 --- /dev/null +++ b/include/boost/mpl/set/aux_/preprocessed/plain/set50.hpp @@ -0,0 +1,210 @@ + +// 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) +// + +// Preprocessed version of "boost/mpl/set/Attic/set50.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40 + > +struct set41 + : s_item< + T40 + , set40< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41 + > +struct set42 + : s_item< + T41 + , set41< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42 + > +struct set43 + : s_item< + T42 + , set42< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43 + > +struct set44 + : s_item< + T43 + , set43< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + > +struct set45 + : s_item< + T44 + , set44< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45 + > +struct set46 + : s_item< + T45 + , set45< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45, typename T46 + > +struct set47 + : s_item< + T46 + , set46< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45, typename T46, typename T47 + > +struct set48 + : s_item< + T47 + , set47< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45, typename T46, typename T47, typename T48 + > +struct set49 + : s_item< + T48 + , set48< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47 > + > +{ +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + , typename T20, typename T21, typename T22, typename T23, typename T24 + , typename T25, typename T26, typename T27, typename T28, typename T29 + , typename T30, typename T31, typename T32, typename T33, typename T34 + , typename T35, typename T36, typename T37, typename T38, typename T39 + , typename T40, typename T41, typename T42, typename T43, typename T44 + , typename T45, typename T46, typename T47, typename T48, typename T49 + > +struct set50 + : s_item< + T49 + , set49< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48 > + > +{ +}; + +}} diff --git a/include/boost/mpl/set/aux_/set0.hpp b/include/boost/mpl/set/aux_/set0.hpp index 1450855..3973cd0 100644 --- a/include/boost/mpl/set/aux_/set0.hpp +++ b/include/boost/mpl/set/aux_/set0.hpp @@ -2,31 +2,34 @@ #ifndef BOOST_MPL_SET_AUX_SET0_HPP_INCLUDED #define BOOST_MPL_SET_AUX_SET0_HPP_INCLUDED -// + file: boost/mpl/aux_/set0.hpp -// + last modified: 03/may/03 - -// Copyright (c) 2002-03 -// David Abrahams, Aleksey Gurtovoy +// 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 +// 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. -#include "boost/mpl/void_fwd.hpp" -#include "boost/mpl/set/aux_/tag.hpp" -#include "boost/mpl/aux_/config/static_constant.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { +#include <boost/mpl/long.hpp> +#include <boost/mpl/void.hpp> +#include <boost/mpl/set/aux_/tag.hpp> +#include <boost/mpl/aux_/config/static_constant.hpp> -template< int p_ = 0 > struct set0 +namespace boost { namespace mpl { + +template< int dummy_ = 0 > struct set0 { typedef aux::set_tag tag; - typedef void_ last_masked; - typedef void_ item; - + typedef void_ last_masked_; + typedef void_ item_type_; + typedef item_type_ type; + typedef long_<0> size; + BOOST_STATIC_CONSTANT(long, order = 0); }; diff --git a/include/boost/mpl/set/aux_/size_impl.hpp b/include/boost/mpl/set/aux_/size_impl.hpp new file mode 100644 index 0000000..7a14b99 --- /dev/null +++ b/include/boost/mpl/set/aux_/size_impl.hpp @@ -0,0 +1,33 @@ + +#ifndef BOOST_MPL_SET_AUX_SIZE_IMPL_HPP_INCLUDED +#define BOOST_MPL_SET_AUX_SIZE_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/size_fwd.hpp> +#include <boost/mpl/set/aux_/tag.hpp> + +namespace boost { namespace mpl { + +template<> +struct size_impl< aux::set_tag > +{ + template< typename Set > struct apply + : Set::size + { + }; +}; + +}} + +#endif // BOOST_MPL_SET_AUX_SIZE_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/set/aux_/tag.hpp b/include/boost/mpl/set/aux_/tag.hpp index 44ffb0a..21a44eb 100644 --- a/include/boost/mpl/set/aux_/tag.hpp +++ b/include/boost/mpl/set/aux_/tag.hpp @@ -2,18 +2,19 @@ #ifndef BOOST_MPL_SET_AUX_TAG_HPP_INCLUDED #define BOOST_MPL_SET_AUX_TAG_HPP_INCLUDED -// + file: boost/mpl/aux_/tag.hpp -// + last modified: 02/may/03 - -// Copyright (c) 2002-03 -// David Abrahams, Aleksey Gurtovoy +// 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 +// 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$ + namespace boost { namespace mpl { namespace aux { struct set_tag; diff --git a/include/boost/mpl/set/aux_/value_type_impl.hpp b/include/boost/mpl/set/aux_/value_type_impl.hpp new file mode 100755 index 0000000..39487a8 --- /dev/null +++ b/include/boost/mpl/set/aux_/value_type_impl.hpp @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_SET_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED +#define BOOST_MPL_SET_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/value_type_fwd.hpp> +#include <boost/mpl/set/aux_/tag.hpp> + +namespace boost { namespace mpl { + +template<> +struct value_type_impl< aux::set_tag > +{ + template< typename Set, typename T > struct apply + { + typedef T type; + }; +}; + +}} + +#endif // BOOST_MPL_SET_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED diff --git a/include/boost/mpl/set/set0.hpp b/include/boost/mpl/set/set0.hpp index 2a166e4..780e7a2 100644 --- a/include/boost/mpl/set/set0.hpp +++ b/include/boost/mpl/set/set0.hpp @@ -2,35 +2,34 @@ #ifndef BOOST_MPL_SET_SET0_HPP_INCLUDED #define BOOST_MPL_SET_SET0_HPP_INCLUDED -// + file: boost/mpl/set0.hpp -// + last modified: 02/may/03 - -// Copyright (c) 2002-03 -// David Abrahams, Aleksey Gurtovoy +// 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 +// 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. -//#include "boost/mpl/set/aux_/at.hpp" -//#include "boost/mpl/set/aux_/front.hpp" -//#include "boost/mpl/set/aux_/push_front.hpp" -//#include "boost/mpl/set/aux_/pop_front.hpp" -//#include "boost/mpl/set/aux_/back.hpp" -//#include "boost/mpl/set/aux_/clear.hpp" -//#include "boost/mpl/set/aux_/O1_size.hpp" -//#include "boost/mpl/set/aux_/size.hpp" -//#include "boost/mpl/set/aux_/empty.hpp" -//#include "boost/mpl/set/aux_/empty.hpp" -#include "boost/mpl/set/aux_/insert_impl.hpp" -#include "boost/mpl/set/aux_/order_impl.hpp" -#include "boost/mpl/set/aux_/has_key_impl.hpp" -#include "boost/mpl/set/aux_/begin_end_impl.hpp" -#include "boost/mpl/set/aux_/iterator.hpp" -#include "boost/mpl/set/aux_/item.hpp" -#include "boost/mpl/set/aux_/set0.hpp" -#include "boost/mpl/set/aux_/tag.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/set/aux_/at_impl.hpp> +#include <boost/mpl/set/aux_/clear_impl.hpp> +//#include <boost/mpl/set/aux_/O1_size.hpp> +#include <boost/mpl/set/aux_/size_impl.hpp> +#include <boost/mpl/set/aux_/empty_impl.hpp> +#include <boost/mpl/set/aux_/insert_impl.hpp> +#include <boost/mpl/set/aux_/erase_impl.hpp> +#include <boost/mpl/set/aux_/erase_key_impl.hpp> +#include <boost/mpl/set/aux_/has_key_impl.hpp> +#include <boost/mpl/set/aux_/key_type_impl.hpp> +#include <boost/mpl/set/aux_/value_type_impl.hpp> +#include <boost/mpl/set/aux_/begin_end_impl.hpp> +#include <boost/mpl/set/aux_/iterator.hpp> +#include <boost/mpl/set/aux_/item.hpp> +#include <boost/mpl/set/aux_/set0.hpp> +#include <boost/mpl/set/aux_/tag.hpp> #endif // BOOST_MPL_SET_SET0_HPP_INCLUDED diff --git a/include/boost/mpl/set/set10.hpp b/include/boost/mpl/set/set10.hpp new file mode 100644 index 0000000..5bce8bb --- /dev/null +++ b/include/boost/mpl/set/set10.hpp @@ -0,0 +1,44 @@ + +#ifndef BOOST_MPL_SET_SET10_HPP_INCLUDED +#define BOOST_MPL_SET_SET10_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.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.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,(0, 10, <boost/mpl/set/aux_/numbered.hpp>)) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_SET_SET10_HPP_INCLUDED diff --git a/include/boost/mpl/set/set20.hpp b/include/boost/mpl/set/set20.hpp new file mode 100644 index 0000000..0e41d56 --- /dev/null +++ b/include/boost/mpl/set/set20.hpp @@ -0,0 +1,44 @@ + +#ifndef BOOST_MPL_SET_SET20_HPP_INCLUDED +#define BOOST_MPL_SET_SET20_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.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.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.hpp>)) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_SET_SET20_HPP_INCLUDED diff --git a/include/boost/mpl/set/set30.hpp b/include/boost/mpl/set/set30.hpp new file mode 100644 index 0000000..be69feb --- /dev/null +++ b/include/boost/mpl/set/set30.hpp @@ -0,0 +1,44 @@ + +#ifndef BOOST_MPL_SET_SET30_HPP_INCLUDED +#define BOOST_MPL_SET_SET30_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.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.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.hpp>)) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_SET_SET30_HPP_INCLUDED diff --git a/include/boost/mpl/set/set40.hpp b/include/boost/mpl/set/set40.hpp new file mode 100644 index 0000000..1720557 --- /dev/null +++ b/include/boost/mpl/set/set40.hpp @@ -0,0 +1,44 @@ + +#ifndef BOOST_MPL_SET_SET40_HPP_INCLUDED +#define BOOST_MPL_SET_SET40_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.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.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.hpp>)) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_SET_SET40_HPP_INCLUDED diff --git a/include/boost/mpl/set/set50.hpp b/include/boost/mpl/set/set50.hpp new file mode 100644 index 0000000..ba2ba9f --- /dev/null +++ b/include/boost/mpl/set/set50.hpp @@ -0,0 +1,44 @@ + +#ifndef BOOST_MPL_SET_SET50_HPP_INCLUDED +#define BOOST_MPL_SET_SET50_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.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.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.hpp>)) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_SET_SET50_HPP_INCLUDED diff --git a/include/boost/mpl/shift_left.hpp b/include/boost/mpl/shift_left.hpp index fd40182..966545d 100644 --- a/include/boost/mpl/shift_left.hpp +++ b/include/boost/mpl/shift_left.hpp @@ -2,63 +2,21 @@ #ifndef BOOST_MPL_SHIFT_LEFT_HPP_INCLUDED #define BOOST_MPL_SHIFT_LEFT_HPP_INCLUDED -// + file: boost/mpl/shift_left.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy, Jaap Suter +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appears in all copies and -// that both the copyright notice and this permission notice appear in -// supporting documentation. No representations are made about the -// suitability of this software for any purpose. It is provided "as is" -// without express or implied warranty. +// 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. -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/aux_/typeof.hpp" -#include "boost/mpl/aux_/value_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/config.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { - -template< - typename T, T N, typename ShiftT, ShiftT Shift - > -struct shift_left_c -{ - BOOST_STATIC_CONSTANT(T, value = (N << Shift)); -#if !defined(__BORLANDC__) - typedef integral_c<T,value> type; -#else - typedef integral_c<T,(N << Shift)> type; -#endif -}; - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Shift) - > -struct shift_left - : shift_left_c< - BOOST_MPL_AUX_TYPEOF(T, T::value) - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T)::value - , BOOST_MPL_AUX_TYPEOF(Shift, Shift::value) - , BOOST_MPL_AUX_MSVC_VALUE_WKND(Shift)::value - > -{ - BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (T,Shift)) -}; - -BOOST_MPL_AUX_VOID_SPEC(2,shift_left) - -} // namespace mpl -} // namespace boost +#define AUX778076_OP_NAME shift_left +#define AUX778076_OP_TOKEN << +#include <boost/mpl/aux_/shift_op.hpp> #endif // BOOST_MPL_SHIFT_LEFT_HPP_INCLUDED diff --git a/include/boost/mpl/shift_right.hpp b/include/boost/mpl/shift_right.hpp index 263cf80..5a23a92 100644 --- a/include/boost/mpl/shift_right.hpp +++ b/include/boost/mpl/shift_right.hpp @@ -2,63 +2,21 @@ #ifndef BOOST_MPL_SHIFT_RIGHT_HPP_INCLUDED #define BOOST_MPL_SHIFT_RIGHT_HPP_INCLUDED -// + file: boost/mpl/shift_right.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy, Jaap Suter +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright Jaap Suter 2003 // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appears in all copies and -// that both the copyright notice and this permission notice appear in -// supporting documentation. No representations are made about the -// suitability of this software for any purpose. It is provided "as is" -// without express or implied warranty. +// 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. -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/aux_/typeof.hpp" -#include "boost/mpl/aux_/value_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/config.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { - -template< - typename T, T N, typename ShiftT, ShiftT Shift - > -struct shift_right_c -{ - BOOST_STATIC_CONSTANT(T, value = (N >> Shift)); -#if !defined(__BORLANDC__) - typedef integral_c<T,value> type; -#else - typedef integral_c<T,(N >> Shift)> type; -#endif -}; - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Shift) - > -struct shift_right - : shift_right_c< - BOOST_MPL_AUX_TYPEOF(T, T::value) - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T)::value - , BOOST_MPL_AUX_TYPEOF(Shift, Shift::value) - , BOOST_MPL_AUX_MSVC_VALUE_WKND(Shift)::value - > -{ - BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (T,Shift)) -}; - -BOOST_MPL_AUX_VOID_SPEC(2,shift_right) - -} // namespace mpl -} // namespace boost +#define AUX778076_OP_NAME shift_right +#define AUX778076_OP_TOKEN >> +#include <boost/mpl/aux_/shift_op.hpp> #endif // BOOST_MPL_SHIFT_RIGHT_HPP_INCLUDED diff --git a/include/boost/mpl/single_view.hpp b/include/boost/mpl/single_view.hpp index ff9083e..e419147 100644 --- a/include/boost/mpl/single_view.hpp +++ b/include/boost/mpl/single_view.hpp @@ -1,27 +1,27 @@ -//----------------------------------------------------------------------------- -// boost mpl/single_view.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_SINGLE_VIEW_HPP_INCLUDED #define BOOST_MPL_SINGLE_VIEW_HPP_INCLUDED -#include "boost/mpl/aux_/single_element_iter.hpp" -#include "boost/mpl/iterator_range.hpp" -#include "boost/mpl/aux_/void_spec.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/single_element_iter.hpp> +#include <boost/mpl/iterator_range.hpp> +#include <boost/mpl/aux_/na_spec.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(T) > struct single_view : iterator_range< @@ -31,9 +31,8 @@ struct single_view { }; -BOOST_MPL_AUX_VOID_SPEC(1, single_view) +BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, single_view) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_SINGLE_VIEW_HPP_INCLUDED diff --git a/include/boost/mpl/size.hpp b/include/boost/mpl/size.hpp index 8794d46..da0beeb 100644 --- a/include/boost/mpl/size.hpp +++ b/include/boost/mpl/size.hpp @@ -1,43 +1,42 @@ -//----------------------------------------------------------------------------- -// boost mpl/size.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_SIZE_HPP_INCLUDED #define BOOST_MPL_SIZE_HPP_INCLUDED -#include "boost/mpl/size_fwd.hpp" -#include "boost/mpl/aux_/size_impl.hpp" -#include "boost/mpl/aux_/sequence_tag.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" -#include "boost/mpl/aux_/msvc_eti_base.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/size_fwd.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/size_impl.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> +#include <boost/mpl/aux_/msvc_eti_base.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct size : aux::msvc_eti_base< - typename size_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) > - ::template algorithm< Sequence >::type + typename size_impl< typename sequence_tag<Sequence>::type > + ::template apply< Sequence >::type >::type { - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,size,(Sequence)) + BOOST_MPL_AUX_LAMBDA_SUPPORT(1, size, (Sequence)) }; -BOOST_MPL_AUX_VOID_SPEC(1, size) +BOOST_MPL_AUX_NA_SPEC(1, size) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_SIZE_HPP_INCLUDED diff --git a/include/boost/mpl/size_fwd.hpp b/include/boost/mpl/size_fwd.hpp index 5e301d3..1f21a1e 100644 --- a/include/boost/mpl/size_fwd.hpp +++ b/include/boost/mpl/size_fwd.hpp @@ -1,25 +1,24 @@ -//----------------------------------------------------------------------------- -// boost mpl/size_fwd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_SIZE_FWD_HPP_INCLUDED #define BOOST_MPL_SIZE_FWD_HPP_INCLUDED -namespace boost { -namespace mpl { +// 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. -template< typename Tag > struct size_traits; +// $Source$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct size_impl; template< typename Sequence > struct size; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_SIZE_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/size_t.hpp b/include/boost/mpl/size_t.hpp index f130c77..2316945 100644 --- a/include/boost/mpl/size_t.hpp +++ b/include/boost/mpl/size_t.hpp @@ -2,24 +2,24 @@ #ifndef BOOST_MPL_SIZE_T_HPP_INCLUDED #define BOOST_MPL_SIZE_T_HPP_INCLUDED -// + file: boost/mpl/size_t.hpp -// + last modified: 08/mar/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/size_t_fwd.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/size_t_fwd.hpp> #define AUX_WRAPPER_VALUE_TYPE std::size_t #define AUX_WRAPPER_NAME size_t #define AUX_WRAPPER_PARAMS(N) std::size_t N -#include "boost/mpl/aux_/integral_wrapper.hpp" +#include <boost/mpl/aux_/integral_wrapper.hpp> #endif // BOOST_MPL_SIZE_T_HPP_INCLUDED diff --git a/include/boost/mpl/size_t_fwd.hpp b/include/boost/mpl/size_t_fwd.hpp index 32d3e0a..3ea74dc 100644 --- a/include/boost/mpl/size_t_fwd.hpp +++ b/include/boost/mpl/size_t_fwd.hpp @@ -2,23 +2,27 @@ #ifndef BOOST_MPL_SIZE_T_FWD_HPP_INCLUDED #define BOOST_MPL_SIZE_T_FWD_HPP_INCLUDED -// + file: boost/mpl/size_t_fwd.hpp -// + last modified: 08/mar/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/config.hpp" // make sure 'size_t' is placed into 'std' +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/adl_barrier.hpp> +#include <boost/config.hpp> // make sure 'size_t' is placed into 'std' #include <cstddef> -namespace boost { namespace mpl { +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + template< std::size_t N > struct size_t; -}} + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(size_t) #endif // BOOST_MPL_SIZE_T_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/sizeof.hpp b/include/boost/mpl/sizeof.hpp index 50af7ca..97eb273 100644 --- a/include/boost/mpl/sizeof.hpp +++ b/include/boost/mpl/sizeof.hpp @@ -2,35 +2,35 @@ #ifndef BOOST_MPL_SIZEOF_HPP_INCLUDED #define BOOST_MPL_SIZEOF_HPP_INCLUDED -// + file: boost/mpl/sizeof.hpp -// + last modified: 08/mar/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2003 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/size_t.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/size_t.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(T) > struct sizeof_ - : size_t< sizeof(T) > + : mpl::size_t< sizeof(T) > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,sizeof_,(T)) }; -BOOST_MPL_AUX_VOID_SPEC(1, sizeof_) +BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, sizeof_) -}} // namespace boost::mpl +}} #endif // BOOST_MPL_SIZEOF_HPP_INCLUDED diff --git a/include/boost/mpl/sort.hpp b/include/boost/mpl/sort.hpp index e286dbe..2930aa2 100644 --- a/include/boost/mpl/sort.hpp +++ b/include/boost/mpl/sort.hpp @@ -1,49 +1,42 @@ -//----------------------------------------------------------------------------- -// boost mpl/sort.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002-2003 -// Eric Friedman -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_SORT_HPP_INCLUDED #define BOOST_MPL_SORT_HPP_INCLUDED -#include "boost/mpl/sort_fwd.hpp" -#include "boost/mpl/aux_/sort_impl.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/aux_/sequence_tag.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN +#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_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> -template < typename Sequence, typename Predicate > // see sort_fwd.hpp +namespace boost { namespace mpl { + +template < + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename Predicate = less<_,_> + > struct sort + : sort_impl< typename sequence_tag<Sequence>::type > + ::template apply< Sequence,Predicate > { -private: - typedef typename lambda<Predicate>::type pred_; - -public: - typedef typename sort_traits< - typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) - >::template algorithm< - Sequence, pred_ - >::type type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(2,sort,(Sequence,Predicate)) }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END +BOOST_MPL_AUX_NA_SPEC(1, sort) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_SORT_HPP_INCLUDED diff --git a/include/boost/mpl/sort_fwd.hpp b/include/boost/mpl/sort_fwd.hpp index 126f081..2806baf 100644 --- a/include/boost/mpl/sort_fwd.hpp +++ b/include/boost/mpl/sort_fwd.hpp @@ -1,40 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/sort_fwd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002-2003 -// Eric Friedman -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_SORT_FWD_HPP_INCLUDED #define BOOST_MPL_SORT_FWD_HPP_INCLUDED -#include "boost/mpl/less.hpp" -#include "boost/mpl/placeholders.hpp" -#include "boost/mpl/aux_/void_spec.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -template< typename Tag > struct sort_traits; +#include <boost/mpl/aux_/common_name_wknd.hpp> -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN +namespace boost { namespace mpl { -template < - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename Predicate = less<_,_> - > -struct sort; +BOOST_MPL_AUX_COMMON_NAME_WKND(sort) -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END +template< typename Tag > struct sort_impl; +template< typename Sequence, typename Predicate > struct sort; -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(1, sort) - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_SORT_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/stable_partition.hpp b/include/boost/mpl/stable_partition.hpp index 484d76d..39ba7ef 100644 --- a/include/boost/mpl/stable_partition.hpp +++ b/include/boost/mpl/stable_partition.hpp @@ -1,57 +1,46 @@ -//----------------------------------------------------------------------------- -// boost mpl/stable_partition.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002-2003 -// Eric Friedman -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED #define BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED -#include "boost/mpl/aux_/partition_op.hpp" -#include "boost/mpl/clear.hpp" -#include "boost/mpl/iter_fold_backward.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/pair.hpp" -#include "boost/mpl/protect.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// Copyright Eric Friedman 2002-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN +#include <boost/mpl/aux_/partition_op.hpp> +#include <boost/mpl/clear.hpp> +#include <boost/mpl/reverse_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 { template < - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Predicate) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(Predicate) > struct stable_partition { -private: - typedef typename lambda<Predicate>::type pred_; typedef typename clear<Sequence>::type cleared_; - -public: - typedef typename iter_fold_backward< + typedef typename reverse_iter_fold< Sequence , pair< cleared_,cleared_ > - , protect< aux::partition_op<pred_> > + , aux::partition_op<Predicate> >::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2,stable_partition,(Sequence,Predicate)) }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END +BOOST_MPL_AUX_NA_SPEC(2, stable_partition) -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, stable_partition) - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED diff --git a/include/boost/mpl/switch.hpp b/include/boost/mpl/switch.hpp index a1fa243..ce30dfc 100644 --- a/include/boost/mpl/switch.hpp +++ b/include/boost/mpl/switch.hpp @@ -1,51 +1,49 @@ -//----------------------------------------------------------------------------- -// boost mpl/switch.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2003 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_SWITCH_HPP_INCLUDED #define BOOST_MPL_SWITCH_HPP_INCLUDED -#include "boost/mpl/find_if.hpp" -#include "boost/mpl/select1st.hpp" -#include "boost/mpl/select2nd.hpp" -#include "boost/mpl/deref.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/apply.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_support.hpp" +// Copyright Aleksey Gurtovoy 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/find_if.hpp> +#include <boost/mpl/deref.hpp> +#include <boost/mpl/lambda.hpp> +#include <boost/mpl/apply.hpp> +#include <boost/mpl/pair.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Body) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(Body) + , typename BOOST_MPL_AUX_NA_PARAM(T) > struct switch_ { typedef typename find_if< Body - , apply1< lambda< select1st<_1> >, T > + , apply1< lambda< first<_1> >, T > >::type iter_; typedef typename deref<iter_>::type pair_; - typedef typename lambda< typename select2nd<pair_>::type >::type f_; + typedef typename lambda< typename second<pair_>::type >::type f_; typedef typename apply1<f_,T>::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2,switch_,(Body,T)) }; -BOOST_MPL_AUX_VOID_SPEC(2, switch_) +BOOST_MPL_AUX_NA_SPEC(2, switch_) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_SWITCH_HPP_INCLUDED diff --git a/include/boost/mpl/tag.hpp b/include/boost/mpl/tag.hpp new file mode 100644 index 0000000..49df5d5 --- /dev/null +++ b/include/boost/mpl/tag.hpp @@ -0,0 +1,52 @@ + +#ifndef BOOST_MPL_TAG_HPP_INCLUDED +#define BOOST_MPL_TAG_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/eval_if.hpp> +#include <boost/mpl/void.hpp> +#include <boost/mpl/aux_/has_tag.hpp> +#include <boost/mpl/aux_/config/eti.hpp> + +namespace boost { namespace mpl { + +namespace aux { +template< typename T > struct tag_impl +{ + typedef typename T::tag type; +}; +} + +template< typename T, typename Default = void_ > struct tag +#if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) + : if_< + aux::has_tag<T> + , aux::tag_impl<T> + , Default + >::type +{ +#else +{ + typedef typename eval_if< + aux::has_tag<T> + , aux::tag_impl<T> + , Default + >::type type; + +#endif +}; + +}} + +#endif // BOOST_MPL_TAG_HPP_INCLUDED diff --git a/include/boost/mpl/times.hpp b/include/boost/mpl/times.hpp new file mode 100644 index 0000000..684e156 --- /dev/null +++ b/include/boost/mpl/times.hpp @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_TIMES_HPP_INCLUDED +#define BOOST_MPL_TIMES_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$ + +#define AUX778076_OP_NAME times +#define AUX778076_OP_TOKEN * +#include <boost/mpl/aux_/arithmetic_op.hpp> + +#endif // BOOST_MPL_TIMES_HPP_INCLUDED diff --git a/include/boost/mpl/transform.hpp b/include/boost/mpl/transform.hpp index 2e08cd7..781ea64 100644 --- a/include/boost/mpl/transform.hpp +++ b/include/boost/mpl/transform.hpp @@ -1,154 +1,145 @@ -//----------------------------------------------------------------------------- -// boost mpl/transform.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-03 -// Dave Abrahams, Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_TRANSFORM_HPP_INCLUDED #define BOOST_MPL_TRANSFORM_HPP_INCLUDED -#include "boost/mpl/fold_backward.hpp" -#include "boost/mpl/push_front.hpp" -#include "boost/mpl/clear.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/apply.hpp" -#include "boost/mpl/pair.hpp" -#include "boost/mpl/protect.hpp" -#include "boost/mpl/iterator_tag.hpp" -#include "boost/mpl/apply_if.hpp" -#include "boost/mpl/aux_/common_name_wknd.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/type_traits/is_same.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -BOOST_MPL_AUX_COMMON_NAME_WKND(transform) +#include <boost/mpl/fold.hpp> +#include <boost/mpl/reverse_fold.hpp> +#include <boost/mpl/pair_view.hpp> +#include <boost/mpl/is_sequence.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/lambda.hpp> +#include <boost/mpl/bind.hpp> +#include <boost/mpl/or.hpp> +#include <boost/mpl/not.hpp> +#include <boost/mpl/aux_/na.hpp> +#include <boost/mpl/aux_/inserter_algorithm.hpp> -namespace aux { +namespace boost { namespace mpl { -template< typename Op > -struct transform_op -{ - template< typename Sequence, typename T > struct apply - { - typedef typename push_front< - Sequence - , typename apply1<Op,T>::type - >::type type; - }; -}; +namespace aux { -template< typename Op > -struct transform2_op -{ - template< typename Sequence, typename T > struct apply - { - typedef typename push_front< - Sequence - , typename apply2< - Op - , typename T::first - , typename T::second - >::type - >::type type; - }; -}; - -template< typename I1, typename I2 > -struct pair_iterator -{ - typedef input_iter_tag_ category; - typedef pair<typename I1::type, typename I2::type> type; - typedef pair_iterator<typename I1::next, typename I2::next> next; -}; - -template< - typename Seq1, typename Seq2 +template< + typename Seq + , typename Op + , typename In > -struct pair_view +struct transform1_impl + : fold< + Seq + , typename In::state + , bind2< typename lambda< typename In::operation >::type + , _1 + , bind1< typename lambda<Op>::type, _2> + > + > { - public: - typedef nested_begin_end_tag tag; - typedef pair_iterator< - typename mpl::begin<Seq1>::type - , typename mpl::begin<Seq2>::type - > begin; +}; + +template< + typename Seq + , typename Op + , typename In + > +struct reverse_transform1_impl + : reverse_fold< + Seq + , typename In::state + , bind2< typename lambda< typename In::operation >::type + , _1 + , bind1< typename lambda<Op>::type, _2> + > + > +{ +}; + +template< + typename Seq1 + , typename Seq2 + , typename Op + , typename In + > +struct transform2_impl + : fold< + pair_view<Seq1,Seq2> + , typename In::state + , bind2< typename lambda< typename In::operation >::type + , _1 + , bind2< + typename lambda<Op>::type + , bind1<first<>,_2> + , bind1<second<>,_2> + > + > + > +{ +}; + +template< + typename Seq1 + , typename Seq2 + , typename Op + , typename In + > +struct reverse_transform2_impl + : reverse_fold< + pair_view<Seq1,Seq2> + , typename In::state + , bind2< typename lambda< typename In::operation >::type + , _1 + , bind2< typename lambda< Op >::type + , bind1<first<>,_2> + , bind1<second<>,_2> + > + > + > +{ +}; + +} // namespace aux + +BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, transform1) +BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, transform2) - typedef pair_iterator< - typename mpl::end<Seq1>::type - , typename mpl::end<Seq2>::type - > end; -}; +#define AUX778076_TRANSFORM_DEF(name) \ +template< \ + typename BOOST_MPL_AUX_NA_PARAM(Seq1) \ + , typename BOOST_MPL_AUX_NA_PARAM(Seq2OrOperation) \ + , typename BOOST_MPL_AUX_NA_PARAM(OperationOrInserter) \ + , typename BOOST_MPL_AUX_NA_PARAM(Inserter) \ + > \ +struct name \ + : if_< \ + or_< \ + is_na<OperationOrInserter> \ + , is_lambda_expression< Seq2OrOperation > \ + , not_< is_sequence<Seq2OrOperation> > \ + > \ + , name##1<Seq1,Seq2OrOperation,OperationOrInserter> \ + , name##2<Seq1,Seq2OrOperation,OperationOrInserter,Inserter> \ + >::type \ +{ \ +}; \ +BOOST_MPL_AUX_NA_SPEC(4, name) \ +/**/ -} // namespace aux +AUX778076_TRANSFORM_DEF(transform) +AUX778076_TRANSFORM_DEF(reverse_transform) -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN +#undef AUX778076_TRANSFORM_DEF -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Operation) - > -struct transform1 -{ - private: - typedef typename lambda<Operation>::type op_; - typedef typename clear<Sequence>::type result_; - - public: - typedef typename fold_backward< - Sequence - , result_ - , protect< aux::transform_op<op_> > - >::type type; -}; - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Seq1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Seq2) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Operation) - > -struct transform2 -{ - private: - typedef typename lambda<Operation>::type op_; - typedef typename clear<Seq1>::type result_; - - public: - typedef typename fold_backward< - aux::pair_view<Seq1,Seq2> - , result_ - , protect< aux::transform2_op<op_> > - >::type type; -}; - -template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Seq1) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Seq2OrOperation) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Operation) - > -struct transform - : apply_if< - is_same<Operation,void_> - , transform1<Seq1,Seq2OrOperation> - , transform2<Seq1,Seq2OrOperation,Operation> - > -{ -}; - -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END - -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, transform1) -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(3, transform2) -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(3, transform) - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_TRANSFORM_HPP_INCLUDED diff --git a/include/boost/mpl/transform_view.hpp b/include/boost/mpl/transform_view.hpp index 79a8229..74860d8 100644 --- a/include/boost/mpl/transform_view.hpp +++ b/include/boost/mpl/transform_view.hpp @@ -1,29 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/transform_view.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_TRANSFORM_VIEW_HPP_INCLUDED #define BOOST_MPL_TRANSFORM_VIEW_HPP_INCLUDED -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/aux_/transform_iter.hpp" -#include "boost/mpl/aux_/void_spec.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/lambda.hpp> +#include <boost/mpl/aux_/transform_iter.hpp> +#include <boost/mpl/aux_/na_spec.hpp> + +namespace boost { namespace mpl { template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(F) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(F) > struct transform_view { @@ -34,13 +34,13 @@ struct transform_view public: struct tag; + typedef transform_view type; typedef aux::transform_iter< first_,last_,f_ > begin; typedef aux::transform_iter< last_,last_,f_ > end; }; -BOOST_MPL_AUX_VOID_SPEC(2, transform_view) +BOOST_MPL_AUX_NA_SPEC(2, transform_view) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_TRANSFORM_VIEW_HPP_INCLUDED diff --git a/include/boost/mpl/unique.hpp b/include/boost/mpl/unique.hpp index 6d8bd83..ba4b934 100644 --- a/include/boost/mpl/unique.hpp +++ b/include/boost/mpl/unique.hpp @@ -1,93 +1,85 @@ -//----------------------------------------------------------------------------- -// boost mpl/unique.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy and John R. Bandela -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_UNIQUE_HPP_INCLUDED #define BOOST_MPL_UNIQUE_HPP_INCLUDED -#include "boost/mpl/fold_backward.hpp" -#include "boost/mpl/push_front.hpp" -#include "boost/mpl/clear.hpp" -#include "boost/mpl/front.hpp" -#include "boost/mpl/identity.hpp" -#include "boost/mpl/pair.hpp" -#include "boost/mpl/select1st.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/apply_if.hpp" -#include "boost/mpl/apply.hpp" -#include "boost/mpl/void.hpp" -#include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_spec.hpp" -#include "boost/mpl/aux_/config/eti.hpp" -#include "boost/type_traits/is_same.hpp" +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright John R. Bandela 2000-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/fold.hpp> +#include <boost/mpl/reverse_fold.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/and.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/pair.hpp> +#include <boost/mpl/apply.hpp> +#include <boost/mpl/aux_/inserter_algorithm.hpp> +#include <boost/mpl/aux_/na.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_spec.hpp> + +namespace boost { namespace mpl { namespace aux { -template< typename Predicate > +template< typename Predicate, typename Operation > struct unique_op { template< typename Pair, typename T > struct apply { typedef typename Pair::first seq_; typedef typename Pair::second prior_; - typedef typename apply_if< - typename apply2<Predicate,prior_,T>::type + typedef typename eval_if< + and_< is_not_na<prior_>, apply2<Predicate,prior_,T> > , identity<seq_> - , push_front<seq_,T> + , apply2<Operation,seq_,T> >::type new_seq_; typedef pair<new_seq_,T> type; }; }; -} // namespace aux - -BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1,aux::unique_op) - -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN - template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename Predicate = is_same<_,_> + typename Sequence + , typename Predicate + , typename Inserter > -struct unique -{ - private: - struct none_; - typedef typename lambda<Predicate>::type pred_; - typedef typename clear<Sequence>::type result_; - typedef typename fold_backward< +struct unique_impl + : first< typename fold< Sequence - , pair<result_,none_> - , aux::unique_op<pred_> - >::type fold_result_; - - public: -#if defined(BOOST_MPL_MSVC_60_ETI_BUG) - // MSVC6.5 forces us to use 'select1st<fold_result_>::type' instead of - // simple 'fold_result_::first' here - typedef typename select1st<fold_result_>::type type; -#else - typedef typename fold_result_::first type; -#endif + , pair< typename Inserter::state,na > + , protect< aux::unique_op<Predicate,typename Inserter::operation> > + >::type > +{ }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END +template< + typename Sequence + , typename Predicate + , typename Inserter + > +struct reverse_unique_impl + : first< typename reverse_fold< + Sequence + , pair< typename Inserter::state,na > + , protect< aux::unique_op<Predicate,typename Inserter::operation> > + >::type > +{ +}; -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(1, unique) +} // namespace aux -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, unique) + +}} #endif // BOOST_MPL_UNIQUE_HPP_INCLUDED diff --git a/include/boost/mpl/unpack_args.hpp b/include/boost/mpl/unpack_args.hpp new file mode 100644 index 0000000..1a0880a --- /dev/null +++ b/include/boost/mpl/unpack_args.hpp @@ -0,0 +1,146 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_UNPACK_ARGS_HPP_INCLUDED +#define BOOST_MPL_UNPACK_ARGS_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. + +// $Source$ +// $Date$ +// $Revision$ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include <boost/mpl/apply.hpp> +# include <boost/mpl/at.hpp> +# include <boost/mpl/size.hpp> +# include <boost/mpl/aux_/nttp_decl.hpp> +# include <boost/mpl/aux_/lambda_spec.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 unpack_args.hpp +# include <boost/mpl/aux_/include_preprocessed.hpp> + +#else + +# include <boost/mpl/limits/arity.hpp> +# include <boost/mpl/aux_/preprocessor/repeat.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# include <boost/mpl/aux_/config/forwarding.hpp> +# include <boost/preprocessor/iterate.hpp> +# include <boost/preprocessor/cat.hpp> + + +namespace boost { namespace mpl { + +// local macros, #undef-ined at the end of the header + +# define AUX778076_UNPACK(unused, i, Args) \ + , typename at_c<Args,i>::type \ + /**/ + +# define AUX778076_UNPACKED_ARGS(n, Args) \ + BOOST_MPL_PP_REPEAT(n, AUX778076_UNPACK, Args) \ + /**/ + +namespace aux { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +template< int size, typename F, typename Args > +struct unpack_args_impl; +#else +template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl +{ + template< typename F, typename Args > struct apply; +}; +#endif + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/unpack_args.hpp>)) +#include BOOST_PP_ITERATE() + +} + +template< + typename F + > +struct unpack_args +{ + template< typename Args > struct apply +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) +# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + : aux::unpack_args_impl< size<Args>::value,F,Args > +# else + : aux::unpack_args_impl< size<Args>::value > + ::template apply< F,Args > +# endif + { +#else // BOOST_MPL_CFG_NO_NESTED_FORWARDING + { + typedef typename aux::unpack_args_impl< + size<Args>::value + , F + , Args + >::type type; +#endif + }; +}; + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) + +# undef AUX778076_UNPACK +# undef AUX778076_UNPACKED_ARGS + +}} + +#endif // BOOST_MPL_CFG_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_UNPACK_ARGS_HPP_INCLUDED + +///// iteration, depth == 1 + +#elif BOOST_PP_ITERATION_DEPTH() == 1 + +# define i_ BOOST_PP_FRAME_ITERATION(1) + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< typename F, typename Args > +struct unpack_args_impl<i_,F,Args> + : BOOST_PP_CAT(apply,i_)< + F + AUX778076_UNPACKED_ARGS(i_, Args) + > +{ +}; + +#else + +template<> struct unpack_args_impl<i_> +{ + template< typename F, typename Args > struct apply + : BOOST_PP_CAT(apply,i_)< + F + AUX778076_UNPACKED_ARGS(i_, Args) + > + { + }; +}; + +#endif + +# undef i_ + +#endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/upper_bound.hpp b/include/boost/mpl/upper_bound.hpp index d2ae81a..6d92981 100644 --- a/include/boost/mpl/upper_bound.hpp +++ b/include/boost/mpl/upper_bound.hpp @@ -1,58 +1,56 @@ -//----------------------------------------------------------------------------- -// boost mpl/upper_bound.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_UPPER_BOUND_HPP_INCLUDED #define BOOST_MPL_UPPER_BOUND_HPP_INCLUDED -#include "boost/mpl/less.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/aux_/void_spec.hpp" +// Copyright Aleksey Gurtovoy 2001-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. -#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/less.hpp> +#include <boost/mpl/lambda.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) # define BOOST_MPL_CFG_STRIPPED_DOWN_UPPER_BOUND_IMPL #endif #if !defined(BOOST_MPL_CFG_STRIPPED_DOWN_UPPER_BOUND_IMPL) -# include "boost/mpl/minus.hpp" -# include "boost/mpl/divides.hpp" -# include "boost/mpl/size.hpp" -# include "boost/mpl/advance.hpp" -# include "boost/mpl/begin_end.hpp" -# include "boost/mpl/integral_c.hpp" -# include "boost/mpl/int.hpp" -# include "boost/mpl/apply_if.hpp" -# include "boost/mpl/apply.hpp" -# include "boost/mpl/aux_/apply.hpp" -# include "boost/mpl/aux_/deref_wknd.hpp" -# include "boost/mpl/aux_/value_wknd.hpp" +# include <boost/mpl/minus.hpp> +# include <boost/mpl/divides.hpp> +# include <boost/mpl/size.hpp> +# include <boost/mpl/advance.hpp> +# include <boost/mpl/begin_end.hpp> +# include <boost/mpl/long.hpp> +# include <boost/mpl/eval_if.hpp> +# include <boost/mpl/prior.hpp> +# include <boost/mpl/deref.hpp> +# include <boost/mpl/apply.hpp> +# include <boost/mpl/aux_/value_wknd.hpp> #else -# include "boost/mpl/find.hpp" -# include "boost/mpl/bind.hpp" +# include <boost/mpl/find.hpp> +# include <boost/mpl/bind.hpp> #endif -#include "boost/config.hpp" +#include <boost/config.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { #if defined(BOOST_MPL_CFG_STRIPPED_DOWN_UPPER_BOUND_IMPL) -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN - // agurt 23/oct/02: has a wrong complexity etc., but at least it works; // feel free to contribute a better implementation! template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(T) , typename Predicate = less<> , typename pred_ = typename lambda<Predicate>::type > @@ -61,8 +59,6 @@ struct upper_bound { }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END - #else namespace aux { @@ -83,10 +79,10 @@ template< > struct upper_bound_step { - typedef typename apply_if< + typedef typename eval_if< Distance , upper_bound_step_impl<Distance,Predicate,T,DeferredIterator> - , apply0<DeferredIterator> + , DeferredIterator >::type type; }; @@ -98,19 +94,19 @@ template< > struct upper_bound_step_impl { - typedef typename divides< Distance, integral_c<long,2> >::type offset_; + typedef typename divides< Distance, long_<2> >::type offset_; typedef typename DeferredIterator::type iter_; typedef typename advance< iter_,offset_ >::type middle_; - typedef typename BOOST_MPL_AUX_APPLY2( + typedef typename apply2< Predicate , T - , typename BOOST_MPL_AUX_DEREF_WNKD(middle_) - )::type cond_; + , typename deref<middle_>::type + >::type cond_; - typedef typename minus< Distance, offset_, integral_c<long,1> >::type step_; + typedef typename prior< minus< Distance, offset_ > >::type step_; typedef upper_bound_step< offset_,Predicate,T,DeferredIterator > step_forward_; typedef upper_bound_step< step_,Predicate,T,next<middle_> > step_backward_; - typedef typename apply_if< + typedef typename eval_if< cond_ , step_forward_ , step_backward_ @@ -119,11 +115,9 @@ struct upper_bound_step_impl } // namespace aux -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN - template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) - , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + typename BOOST_MPL_AUX_NA_PARAM(Sequence) + , typename BOOST_MPL_AUX_NA_PARAM(T) , typename Predicate = less<> > struct upper_bound @@ -138,13 +132,10 @@ struct upper_bound >::type type; }; -BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END - #endif // BOOST_MPL_CFG_STRIPPED_DOWN_UPPER_BOUND_IMPL -BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, upper_bound) +BOOST_MPL_AUX_NA_SPEC(2, upper_bound) -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_UPPER_BOUND_HPP_INCLUDED diff --git a/include/boost/mpl/value_type.hpp b/include/boost/mpl/value_type.hpp new file mode 100755 index 0000000..953fd63 --- /dev/null +++ b/include/boost/mpl/value_type.hpp @@ -0,0 +1,40 @@ + +#ifndef BOOST_MPL_VALUE_TYPE_HPP_INCLUDED +#define BOOST_MPL_VALUE_TYPE_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/value_type_fwd.hpp> +#include <boost/mpl/sequence_tag.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/lambda_support.hpp> + +namespace boost { namespace mpl { + +template< + typename BOOST_MPL_AUX_NA_PARAM(AssociativeSequence) + , typename BOOST_MPL_AUX_NA_PARAM(T) + > +struct value_type + : value_type_impl< typename sequence_tag<AssociativeSequence>::type > + ::template apply<AssociativeSequence,T> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,value_type,(AssociativeSequence,T)) +}; + +BOOST_MPL_AUX_NA_SPEC(2, value_type) + +}} + +#endif // BOOST_MPL_VALUE_TYPE_HPP_INCLUDED diff --git a/include/boost/mpl/value_type_fwd.hpp b/include/boost/mpl/value_type_fwd.hpp new file mode 100755 index 0000000..1132975 --- /dev/null +++ b/include/boost/mpl/value_type_fwd.hpp @@ -0,0 +1,25 @@ + +#ifndef BOOST_MPL_VALUE_TYPE_FWD_HPP_INCLUDED +#define BOOST_MPL_VALUE_TYPE_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +namespace boost { namespace mpl { + +template< typename Tag > struct value_type_impl; +template< typename AssociativeSequence, typename T > struct value_type; + +}} + +#endif // BOOST_MPL_VALUE_TYPE_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/vector.hpp b/include/boost/mpl/vector.hpp index 25738a0..be9cacf 100644 --- a/include/boost/mpl/vector.hpp +++ b/include/boost/mpl/vector.hpp @@ -1,16 +1,12 @@ -#if !defined(BOOST_PP_IS_ITERATING) - -///// header body - #ifndef BOOST_MPL_VECTOR_HPP_INCLUDED #define BOOST_MPL_VECTOR_HPP_INCLUDED -// Copyright (c) 2000-04 Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. @@ -18,203 +14,44 @@ // $Date$ // $Revision$ -// no include guards, the header is intended for multiple inclusion! - #if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include "boost/mpl/limits/vector.hpp" -# include "boost/mpl/void.hpp" -# include "boost/mpl/aux_/config/preprocessor.hpp" +# 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" +# 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 MPL_AUX_VECTOR_HEADER \ +# define AUX778076_HEADER \ BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE).hpp \ /**/ #else -# define MPL_AUX_VECTOR_HEADER \ +# define AUX778076_HEADER \ BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE)##.hpp \ /**/ #endif -# include BOOST_PP_STRINGIZE(boost/mpl/vector/MPL_AUX_VECTOR_HEADER) -# undef MPL_AUX_VECTOR_HEADER +# include BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_HEADER) +# undef AUX778076_HEADER #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \ - !defined(BOOST_MPL_PREPROCESSING_MODE) +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" +# include <boost/mpl/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/limits/vector.hpp" -# include "boost/mpl/aux_/config/nttp.hpp" +# include <boost/mpl/limits/vector.hpp> -# include "boost/preprocessor/arithmetic/sub.hpp" -# include "boost/preprocessor/tuple/elem.hpp" -# include "boost/preprocessor/enum_params_with_a_default.hpp" -# include "boost/preprocessor/enum_params.hpp" -# include "boost/preprocessor/enum.hpp" -# include "boost/preprocessor/repeat.hpp" -# include "boost/preprocessor/comma_if.hpp" -# include "boost/preprocessor/iterate.hpp" +# define AUX778076_SEQUENCE_NAME vector +# define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_VECTOR_SIZE +# include <boost/mpl/aux_/sequence_wrapper.hpp> -# include "boost/config.hpp" - -namespace boost { -namespace mpl { - -# define AUX_VECTOR_PARAMS(param) \ - BOOST_PP_ENUM_PARAMS( \ - BOOST_MPL_LIMIT_VECTOR_SIZE \ - , param \ - ) \ - /**/ - -# define AUX_VECTOR_DEFAULT_PARAMS(param, value) \ - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( \ - BOOST_MPL_LIMIT_VECTOR_SIZE \ - , param \ - , value \ - ) \ - /**/ - -# define AUX_VECTOR_N_PARAMS(n, param) \ - BOOST_PP_ENUM_PARAMS(n, param) \ - /**/ - -# define AUX_VECTOR_N_PARTIAL_SPEC_PARAMS(n, param, def) \ - BOOST_PP_ENUM_PARAMS(n, param) \ - BOOST_PP_COMMA_IF(n) \ - BOOST_PP_ENUM( \ - BOOST_PP_SUB_D(1,BOOST_MPL_LIMIT_VECTOR_SIZE,n) \ - , BOOST_PP_TUPLE_ELEM_3_2 \ - , def \ - ) \ - /**/ - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -// forward declaration -template< - AUX_VECTOR_DEFAULT_PARAMS(typename T, void_) - > -struct vector; -#else -namespace aux { -template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct vector_impl_chooser; -} -#endif - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(0, BOOST_MPL_LIMIT_VECTOR_SIZE, "boost/mpl/vector.hpp")) -#include BOOST_PP_ITERATE() - -// real C++ version is already taken care of -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - -namespace aux { -// vector_count_args -#define BOOST_MPL_AUX_COUNT_ARGS_PREFIX vector -#define BOOST_MPL_AUX_COUNT_ARGS_DEFAULT void_ -#define BOOST_MPL_AUX_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_VECTOR_SIZE -#define BOOST_MPL_AUX_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES -#include "boost/mpl/aux_/count_args.hpp" - -template< - AUX_VECTOR_PARAMS(typename T) - > -struct vector_impl -{ - typedef aux::vector_count_args< AUX_VECTOR_PARAMS(T) > arg_num_; - typedef typename aux::vector_impl_chooser< arg_num_::value > - ::template result_< AUX_VECTOR_PARAMS(T) >::type type; -}; - -} // namespace aux - -template< - AUX_VECTOR_DEFAULT_PARAMS(typename T, void_) - > -struct vector - : aux::vector_impl< AUX_VECTOR_PARAMS(T) >::type -{ - typedef typename aux::vector_impl< - AUX_VECTOR_PARAMS(T) - >::type type; -}; - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -# undef AUX_VECTOR_N_PARTIAL_SPEC_PARAMS -# undef AUX_VECTOR_N_PARAMS -# undef AUX_VECTOR_DEFAULT_PARAMS -# undef AUX_VECTOR_PARAMS - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_HPP_INCLUDED - -///// iteration - -#else -#define i BOOST_PP_FRAME_ITERATION(1) - -# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - -#if i == BOOST_MPL_LIMIT_VECTOR_SIZE - -//: primary template (not a specialization!) -template< - AUX_VECTOR_N_PARAMS(i, typename T) - > -struct vector - : BOOST_PP_CAT(vector,i)< AUX_VECTOR_N_PARAMS(i, T) > -{ - typedef BOOST_PP_CAT(vector,i)< AUX_VECTOR_N_PARAMS(i, T) > type; -}; - -#else - -template< - AUX_VECTOR_N_PARAMS(i, typename T) - > -struct vector< AUX_VECTOR_N_PARTIAL_SPEC_PARAMS(i, T, void_) > - : BOOST_PP_CAT(vector,i)< AUX_VECTOR_N_PARAMS(i, T) > -{ - typedef BOOST_PP_CAT(vector,i)< AUX_VECTOR_N_PARAMS(i, T) > type; -}; - -#endif // i == BOOST_MPL_LIMIT_VECTOR_SIZE - -# else - -namespace aux { - -template<> -struct vector_impl_chooser<i> -{ - template< - AUX_VECTOR_PARAMS(typename T) - > - struct result_ - { - typedef BOOST_PP_CAT(vector,i)< - AUX_VECTOR_N_PARAMS(i, T) - > type; - }; -}; - -} // namespace aux - -# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -#undef i -#endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/vector/aux_/O1_size.hpp b/include/boost/mpl/vector/aux_/O1_size.hpp index c590a60..c735bd5 100644 --- a/include/boost/mpl/vector/aux_/O1_size.hpp +++ b/include/boost/mpl/vector/aux_/O1_size.hpp @@ -1,33 +1,34 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/aux_/O1_size.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_AUX_O1_SIZE_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_O1_SIZE_HPP_INCLUDED -#include "boost/mpl/O1_size_fwd.hpp" -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/vector/aux_/tag.hpp" -#include "boost/mpl/aux_/config/vector.hpp" -#include "boost/config.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -#if defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) +#include <boost/mpl/O1_size_fwd.hpp> +#include <boost/mpl/minus.hpp> +#include <boost/mpl/long.hpp> +#include <boost/mpl/vector/aux_/tag.hpp> +#include <boost/mpl/aux_/config/typeof.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) template<> -struct O1_size_traits< aux::vector_tag > +struct O1_size_impl< aux::vector_tag > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : Vector::size { }; @@ -38,19 +39,18 @@ struct O1_size_traits< aux::vector_tag > #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< long N > -struct O1_size_traits< aux::vector_tag<N> > +struct O1_size_impl< aux::vector_tag<N> > { - template< typename Vector > struct algorithm - : integral_c<long,N> + template< typename Vector > struct apply + : long_<N> { }; }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#endif // BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_VECTOR_AUX_O1_SIZE_HPP_INCLUDED diff --git a/include/boost/mpl/vector/aux_/at.hpp b/include/boost/mpl/vector/aux_/at.hpp index f1e4ac9..ce5fe34 100644 --- a/include/boost/mpl/vector/aux_/at.hpp +++ b/include/boost/mpl/vector/aux_/at.hpp @@ -1,35 +1,51 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/aux_/at.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_AUX_AT_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_AT_HPP_INCLUDED -#include "boost/mpl/at_fwd.hpp" -#include "boost/mpl/aux_/value_wknd.hpp" -#include "boost/mpl/vector/aux_/item.hpp" -#include "boost/mpl/vector/aux_/tag.hpp" -#include "boost/mpl/aux_/config/vector.hpp" -#include "boost/mpl/aux_/config/ctps.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -#if defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) +#include <boost/mpl/at_fwd.hpp> +#include <boost/mpl/vector/aux_/tag.hpp> +#include <boost/mpl/long.hpp> +#include <boost/mpl/aux_/nttp_decl.hpp> +#include <boost/mpl/aux_/type_wrapper.hpp> +#include <boost/mpl/aux_/value_wknd.hpp> +#include <boost/mpl/aux_/config/typeof.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +template< typename Vector, long n_ > +struct v_at_impl +{ + typedef long_< (Vector::lower_bound_::value + n_) > index_; + typedef __typeof__( Vector::item_(index_()) ) type; +}; + + +template< typename Vector, long n_ > +struct v_at + : aux::wrapped_type< typename v_at_impl<Vector,n_>::type > +{ +}; template<> -struct at_traits< aux::vector_tag > +struct at_impl< aux::vector_tag > { - template< typename Vector, typename N > struct algorithm - : vector_item< + template< typename Vector, typename N > struct apply + : v_at< Vector , BOOST_MPL_AUX_VALUE_WKND(N)::value > @@ -39,22 +55,24 @@ struct at_traits< aux::vector_tag > #else -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !defined(BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION) +# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) -template< long S > -struct at_traits< aux::vector_tag<S> > +template< typename Vector, BOOST_MPL_AUX_NTTP_DECL(long, n_) > struct v_at; + +template< BOOST_MPL_AUX_NTTP_DECL(long, n_) > +struct at_impl< aux::vector_tag<n_> > { - template< typename Vector, typename N > struct algorithm + template< typename Vector, typename N > struct apply #if !defined(__BORLANDC__) - : vector_item< + : v_at< Vector , BOOST_MPL_AUX_VALUE_WKND(N)::value > { #else { - typedef typename vector_item< + typedef typename v_at< Vector , BOOST_MPL_AUX_VALUE_WKND(N)::value >::type type; @@ -62,11 +80,27 @@ struct at_traits< aux::vector_tag<S> > }; }; -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# else -#endif // BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL +namespace aux { -} // namespace mpl -} // namespace boost +template< BOOST_MPL_AUX_NTTP_DECL(long, n_) > struct v_at_impl +{ + template< typename V > struct result_; +}; + +} // namespace aux + +template< typename T, BOOST_MPL_AUX_NTTP_DECL(long, n_) > +struct v_at + : aux::v_at_impl<n_>::template result_<T> +{ +}; + +# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +}} #endif // BOOST_MPL_VECTOR_AUX_AT_HPP_INCLUDED diff --git a/include/boost/mpl/vector/aux_/back.hpp b/include/boost/mpl/vector/aux_/back.hpp index 8923779..f85ac6d 100644 --- a/include/boost/mpl/vector/aux_/back.hpp +++ b/include/boost/mpl/vector/aux_/back.hpp @@ -1,38 +1,37 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/aux_/back.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_AUX_BACK_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_BACK_HPP_INCLUDED -#include "boost/mpl/back_fwd.hpp" -#include "boost/mpl/aux_/prior.hpp" -#include "boost/mpl/aux_/nested_type_wknd.hpp" -#include "boost/mpl/vector/aux_/item.hpp" -#include "boost/mpl/vector/aux_/tag.hpp" -#include "boost/mpl/aux_/config/vector.hpp" -#include "boost/config.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -#if defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) +#include <boost/mpl/back_fwd.hpp> +#include <boost/mpl/next_prior.hpp> +#include <boost/mpl/vector/aux_/at.hpp> +#include <boost/mpl/vector/aux_/tag.hpp> +#include <boost/mpl/aux_/config/typeof.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) template<> -struct back_traits< aux::vector_tag > +struct back_impl< aux::vector_tag > { - template< typename Vector > struct algorithm - : vector_item< + template< typename Vector > struct apply + : v_at< Vector - , BOOST_MPL_AUX_NESTED_TYPE_WKND(BOOST_MPL_AUX_PRIOR(Vector::size))::value + , prior<typename Vector::size>::type::value > { }; @@ -42,10 +41,10 @@ struct back_traits< aux::vector_tag > #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -template< long N > -struct back_traits< aux::vector_tag<N> > +template< long n_ > +struct back_impl< aux::vector_tag<n_> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; @@ -53,9 +52,8 @@ struct back_traits< aux::vector_tag<N> > #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#endif // BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_VECTOR_AUX_BACK_HPP_INCLUDED diff --git a/include/boost/mpl/vector/aux_/begin_end.hpp b/include/boost/mpl/vector/aux_/begin_end.hpp index 0892c9d..aecd05b 100644 --- a/include/boost/mpl/vector/aux_/begin_end.hpp +++ b/include/boost/mpl/vector/aux_/begin_end.hpp @@ -1,57 +1,49 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/aux_/begin_end.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_AUX_BEGIN_END_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_BEGIN_END_HPP_INCLUDED -#include "boost/mpl/aux_/config/vector.hpp" +// 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. -#if defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) +// $Source$ +// $Date$ +// $Revision$ -# include "boost/mpl/begin_end_fwd.hpp" -# include "boost/mpl/integral_c.hpp" -# include "boost/mpl/vector/aux_/iterator.hpp" -# include "boost/mpl/vector/aux_/tag.hpp" +#include <boost/mpl/aux_/config/typeof.hpp> -namespace boost { -namespace mpl { +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +# include <boost/mpl/begin_end_fwd.hpp> +# include <boost/mpl/vector/aux_/iterator.hpp> +# include <boost/mpl/vector/aux_/tag.hpp> + +namespace boost { namespace mpl { template<> -struct begin_traits< aux::vector_tag > +struct begin_impl< aux::vector_tag > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { - typedef vector_iterator< - Vector - , integral_c<long,0> - > type; + typedef v_iter<Vector,0> type; }; }; template<> -struct end_traits< aux::vector_tag > +struct end_impl< aux::vector_tag > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { - typedef vector_iterator< - Vector - , typename Vector::size - > type; + typedef v_iter<Vector,Vector::size::value> type; }; }; -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES #endif // BOOST_MPL_VECTOR_AUX_BEGIN_END_HPP_INCLUDED diff --git a/include/boost/mpl/vector/aux_/clear.hpp b/include/boost/mpl/vector/aux_/clear.hpp index 7da2d69..c3eccaf 100644 --- a/include/boost/mpl/vector/aux_/clear.hpp +++ b/include/boost/mpl/vector/aux_/clear.hpp @@ -1,33 +1,33 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/aux_/clear.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_AUX_CLEAR_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_CLEAR_HPP_INCLUDED -#include "boost/mpl/clear_fwd.hpp" -#include "boost/mpl/vector/aux_/vector0.hpp" -#include "boost/mpl/vector/aux_/tag.hpp" -#include "boost/mpl/aux_/config/vector.hpp" -#include "boost/config.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -#if defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) +#include <boost/mpl/clear_fwd.hpp> +#include <boost/mpl/vector/aux_/vector0.hpp> +#include <boost/mpl/vector/aux_/tag.hpp> +#include <boost/mpl/aux_/config/typeof.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) template<> -struct clear_traits< aux::vector_tag > +struct clear_impl< aux::vector_tag > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -38,9 +38,9 @@ struct clear_traits< aux::vector_tag > #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< long N > -struct clear_traits< aux::vector_tag<N> > +struct clear_impl< aux::vector_tag<N> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -48,9 +48,8 @@ struct clear_traits< aux::vector_tag<N> > #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#endif // BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_VECTOR_AUX_CLEAR_HPP_INCLUDED diff --git a/include/boost/mpl/vector/aux_/empty.hpp b/include/boost/mpl/vector/aux_/empty.hpp index 71d9fee..6456c94 100644 --- a/include/boost/mpl/vector/aux_/empty.hpp +++ b/include/boost/mpl/vector/aux_/empty.hpp @@ -1,35 +1,38 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/aux_/empty.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_AUX_EMPTY_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_EMPTY_HPP_INCLUDED -#include "boost/mpl/empty_fwd.hpp" -#include "boost/mpl/not.hpp" -#include "boost/mpl/bool.hpp" -#include "boost/mpl/vector/aux_/tag.hpp" -#include "boost/mpl/aux_/config/vector.hpp" -#include "boost/config.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -#if defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) +#include <boost/mpl/empty_fwd.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/vector/aux_/tag.hpp> +#include <boost/mpl/aux_/config/typeof.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> +#include <boost/type_traits/is_same.hpp> + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) template<> -struct empty_traits< aux::vector_tag > +struct empty_impl< aux::vector_tag > { - template< typename Vector > struct algorithm - : not_< typename Vector::size > + template< typename Vector > struct apply + : is_same< + typename Vector::lower_bound_ + , typename Vector::upper_bound_ + > { }; }; @@ -37,9 +40,9 @@ struct empty_traits< aux::vector_tag > #else template<> -struct empty_traits< aux::vector_tag<0> > +struct empty_impl< aux::vector_tag<0> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : true_ { }; @@ -48,9 +51,9 @@ struct empty_traits< aux::vector_tag<0> > #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< long N > -struct empty_traits< aux::vector_tag<N> > +struct empty_impl< aux::vector_tag<N> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; @@ -58,9 +61,8 @@ struct empty_traits< aux::vector_tag<N> > #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#endif // BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_VECTOR_AUX_EMPTY_HPP_INCLUDED diff --git a/include/boost/mpl/vector/aux_/front.hpp b/include/boost/mpl/vector/aux_/front.hpp index 5718bc2..60139f7 100644 --- a/include/boost/mpl/vector/aux_/front.hpp +++ b/include/boost/mpl/vector/aux_/front.hpp @@ -1,34 +1,35 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/aux_/front.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED -#include "boost/mpl/front_fwd.hpp" -#include "boost/mpl/vector/aux_/item.hpp" -#include "boost/mpl/vector/aux_/tag.hpp" -#include "boost/mpl/aux_/config/vector.hpp" -#include "boost/config.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -#if defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) +#include <boost/mpl/front_fwd.hpp> +#include <boost/mpl/vector/aux_/at.hpp> +#include <boost/mpl/vector/aux_/tag.hpp> +#include <boost/mpl/aux_/nttp_decl.hpp> +#include <boost/mpl/aux_/config/typeof.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) template<> -struct front_traits< aux::vector_tag > +struct front_impl< aux::vector_tag > { - template< typename Vector > struct algorithm - : vector_item<Vector,0> + template< typename Vector > struct apply + : v_at<Vector,0> { }; }; @@ -37,10 +38,10 @@ struct front_traits< aux::vector_tag > #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -template< long N > -struct front_traits< aux::vector_tag<N> > +template< BOOST_MPL_AUX_NTTP_DECL(long, n_) > +struct front_impl< aux::vector_tag<n_> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; @@ -48,9 +49,8 @@ struct front_traits< aux::vector_tag<N> > #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#endif // BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED diff --git a/include/boost/mpl/vector/aux_/include_preprocessed.hpp b/include/boost/mpl/vector/aux_/include_preprocessed.hpp index 2fe52e9..479b7e8 100644 --- a/include/boost/mpl/vector/aux_/include_preprocessed.hpp +++ b/include/boost/mpl/vector/aux_/include_preprocessed.hpp @@ -1,9 +1,11 @@ -// Copyright (c) 2001-04 Aleksey Gurtovoy +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. @@ -11,18 +13,17 @@ // $Date$ // $Revision$ -// no include guards, the header is intended for multiple inclusion! +#include <boost/mpl/aux_/config/typeof.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> +#include <boost/mpl/aux_/config/preprocessor.hpp> -#include "boost/mpl/aux_/config/vector.hpp" -#include "boost/mpl/aux_/config/ctps.hpp" -#include "boost/mpl/aux_/config/preprocessor.hpp" -#include "boost/preprocessor/cat.hpp" -#include "boost/preprocessor/stringize.hpp" +#include <boost/preprocessor/cat.hpp> +#include <boost/preprocessor/stringize.hpp> -#if defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) # define AUX_VECTOR_INCLIDE_DIR typeof_based #elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - || defined(BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION) + || defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) # define AUX_VECTOR_INCLIDE_DIR no_ctps #else # define AUX_VECTOR_INCLIDE_DIR plain diff --git a/include/boost/mpl/vector/aux_/item.hpp b/include/boost/mpl/vector/aux_/item.hpp index 4d4d195..b981cc5 100644 --- a/include/boost/mpl/vector/aux_/item.hpp +++ b/include/boost/mpl/vector/aux_/item.hpp @@ -1,67 +1,97 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/aux_/item.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/aux_/config/vector.hpp" -#include "boost/mpl/aux_/config/ctps.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -#if defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) +#include <boost/mpl/long.hpp> +#include <boost/mpl/void.hpp> +#include <boost/mpl/next_prior.hpp> +#include <boost/mpl/aux_/type_wrapper.hpp> +#include <boost/mpl/aux_/config/typeof.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> -template< typename V, long N > -struct vector_item +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +template< + typename T + , typename Base + , int at_front = 0 + > +struct v_item + : Base { - typedef __typeof__(V::item(integral_c<long,V::size::value - N - 1>())) wrapped_type_; - typedef typename wrapped_type_::type type; + typedef typename Base::upper_bound_ index_; + typedef typename next<index_>::type upper_bound_; + typedef typename next<typename Base::size>::type size; + typedef Base base; + + using Base::item_; + static aux::type_wrapper<T> item_(index_); }; -#else - -// agurt, 29/sep/02: Borland 5.5.1 does a poor job on partial -// specialization here -# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !defined(BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION) - -// forward declaration -template< typename T, long N > -struct vector_item; - -# else - -namespace aux { - -template< long N > struct vector_item_impl +template< + typename T + , typename Base + > +struct v_item<T,Base,1> + : Base { - template< typename V > struct result_; + typedef typename prior<typename Base::lower_bound_>::type index_; + typedef index_ lower_bound_; + typedef typename next<typename Base::size>::type size; + typedef Base base; + + using Base::item_; + static aux::type_wrapper<T> item_(index_); }; -} // namespace aux - -template< typename T, long N > -struct vector_item - : aux::vector_item_impl<N>::template result_<T> +// "erasure" item +template< + typename Base + , int at_front + > +struct v_mask + : Base { + typedef typename prior<typename Base::upper_bound_>::type index_; + typedef index_ upper_bound_; + typedef typename prior<typename Base::size>::type size; + typedef Base base; + + using Base::item_; + static aux::type_wrapper<void_> item_(index_); }; -# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +template< + typename Base + > +struct v_mask<Base,1> + : Base +{ + typedef typename Base::lower_bound_ index_; + typedef typename next<index_>::type lower_bound_; + typedef typename prior<typename Base::size>::type size; + typedef Base base; -#endif // BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL + using Base::item_; + static aux::type_wrapper<void_> item_(index_); +}; -} // namespace mpl -} // namespace boost +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +}} #endif // BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED diff --git a/include/boost/mpl/vector/aux_/iterator.hpp b/include/boost/mpl/vector/aux_/iterator.hpp index 4eb3815..3a070e7 100644 --- a/include/boost/mpl/vector/aux_/iterator.hpp +++ b/include/boost/mpl/vector/aux_/iterator.hpp @@ -2,69 +2,120 @@ #ifndef BOOST_MPL_AUX_VECTOR_ITERATOR_HPP_INCLUDED #define BOOST_MPL_AUX_VECTOR_ITERATOR_HPP_INCLUDED -// + file: boost/mpl/aux_/vector/iterator.hpp -// + last modified: 30/may/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/iterator_tag.hpp" -#include "boost/mpl/plus.hpp" -#include "boost/mpl/minus.hpp" -#include "boost/mpl/vector/aux_/item.hpp" -#include "boost/mpl/aux_/iterator_names.hpp" -#include "boost/mpl/aux_/value_wknd.hpp" -#include "boost/mpl/aux_/config/workaround.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { +#include <boost/mpl/vector/aux_/at.hpp> +#include <boost/mpl/iterator_tags.hpp> +#include <boost/mpl/plus.hpp> +#include <boost/mpl/minus.hpp> +#include <boost/mpl/advance_fwd.hpp> +#include <boost/mpl/distance_fwd.hpp> +#include <boost/mpl/next.hpp> +#include <boost/mpl/prior.hpp> +#include <boost/mpl/aux_/iterator_names.hpp> +#include <boost/mpl/aux_/nttp_decl.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +namespace boost { namespace mpl { template< typename Vector - , typename Pos + , BOOST_MPL_AUX_NTTP_DECL(long, n_) > -struct vector_iterator +struct v_iter { - typedef ra_iter_tag_ category; - typedef typename vector_item< - Vector - , BOOST_MPL_AUX_VALUE_WKND(Pos)::value - >::type type; + typedef aux::v_iter_tag tag; + typedef random_access_iterator_tag category; + typedef typename v_at<Vector,n_>::type type; - typedef Pos pos; - typedef vector_iterator<Vector,typename Pos::next> next; - typedef vector_iterator<Vector,typename Pos::prior> prior; + typedef Vector vector_; + typedef long_<n_> pos; - template< typename Distance > - struct BOOST_MPL_AUX_ITERATOR_ADVANCE - { - typedef vector_iterator< - Vector - , typename plus<Pos,Distance>::type - > type; +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + enum { + next_ = n_ + 1 + , prior_ = n_ - 1 + , pos_ = n_ }; - - template< typename Other > - struct BOOST_MPL_AUX_ITERATOR_DISTANCE -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) - : minus<typename Other::pos,Pos> - { -#else - { - typedef typename minus<typename Other::pos,Pos>::type type; - BOOST_STATIC_CONSTANT(typename Pos::value_type - , value = (minus<typename Other::pos,Pos>::value)); + + typedef v_iter<Vector,next_> next; + typedef v_iter<Vector,prior_> prior; #endif + +}; + + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< + typename Vector + , BOOST_MPL_AUX_NTTP_DECL(long, n_) + > +struct next< v_iter<Vector,n_> > +{ + typedef v_iter<Vector,(n_ + 1)> type; +}; + +template< + typename Vector + , BOOST_MPL_AUX_NTTP_DECL(long, n_) + > +struct prior< v_iter<Vector,n_> > +{ + typedef v_iter<Vector,(n_ - 1)> type; +}; + +template< + typename Vector + , BOOST_MPL_AUX_NTTP_DECL(long, n_) + , typename Distance + > +struct advance< v_iter<Vector,n_>,Distance> +{ + typedef v_iter< + Vector + , (n_ + Distance::value) + > type; +}; + +template< + typename Vector + , BOOST_MPL_AUX_NTTP_DECL(long, n_) + , BOOST_MPL_AUX_NTTP_DECL(long, m_) + > +struct distance< v_iter<Vector,n_>, v_iter<Vector,m_> > + : long_<(m_ - n_)> +{ +}; + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +template<> struct advance_impl<aux::v_iter_tag> +{ + template< typename Iterator, typename N > struct apply + { + enum { pos_ = Iterator::pos_, n_ = N::value }; + typedef v_iter< + typename Iterator::vector_ + , (pos_ + n_) + > type; }; }; -} // namespace mpl -} // namespace boost + +#endif + +}} #endif // BOOST_MPL_AUX_VECTOR_ITERATOR_HPP_INCLUDED diff --git a/include/boost/mpl/vector/aux_/node.hpp b/include/boost/mpl/vector/aux_/node.hpp deleted file mode 100644 index 0c9dd31..0000000 --- a/include/boost/mpl/vector/aux_/node.hpp +++ /dev/null @@ -1,49 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/list/aux_/node.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MPL_VECTOR_AUX_NODE_HPP_INCLUDED -#define BOOST_MPL_VECTOR_AUX_NODE_HPP_INCLUDED - -#include "boost/mpl/aux_/config/vector.hpp" - -#if defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) - -# include "boost/mpl/aux_/next.hpp" -# include "boost/mpl/aux_/type_wrapper.hpp" -# include "boost/mpl/vector/aux_/tag.hpp" - -namespace boost { -namespace mpl { - -template< - long Size - , typename T - , typename Base - > -struct vector_node - : Base -{ - using Base::item; - static aux::type_wrapper<T> item(typename Base::size); - - typedef aux::vector_tag tag; - typedef integral_c<long,Size> size; - typedef vector_node type; - typedef Base base; -}; - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL - -#endif // BOOST_MPL_VECTOR_AUX_NODE_HPP_INCLUDED diff --git a/include/boost/mpl/vector/aux_/numbered.hpp b/include/boost/mpl/vector/aux_/numbered.hpp index 9085039..7ad6988 100644 --- a/include/boost/mpl/vector/aux_/numbered.hpp +++ b/include/boost/mpl/vector/aux_/numbered.hpp @@ -1,158 +1,184 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/aux_/numbered.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// 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) -// no include guards, the header is intended for multiple inclusion! +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION #if defined(BOOST_PP_IS_ITERATING) -#include "boost/preprocessor/enum_params.hpp" -#include "boost/preprocessor/enum_shifted_params.hpp" -#include "boost/preprocessor/comma_if.hpp" -#include "boost/preprocessor/repeat.hpp" -#include "boost/preprocessor/dec.hpp" -#include "boost/preprocessor/cat.hpp" +// 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. -#define i BOOST_PP_FRAME_ITERATION(1) +// $Source$ +// $Date$ +// $Revision$ -#if defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) +#include <boost/preprocessor/enum_params.hpp> +#include <boost/preprocessor/enum_shifted_params.hpp> +#include <boost/preprocessor/comma_if.hpp> +#include <boost/preprocessor/repeat.hpp> +#include <boost/preprocessor/dec.hpp> +#include <boost/preprocessor/cat.hpp> -# define MPL_AUX_VECTOR_TAIL(vector, i, T) \ - BOOST_PP_CAT(vector,BOOST_PP_DEC(i))< \ - BOOST_PP_ENUM_SHIFTED_PARAMS(i, T) \ - > \ +#define i_ BOOST_PP_FRAME_ITERATION(1) + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +# define AUX778076_VECTOR_TAIL(vector, i_, T) \ + BOOST_PP_CAT(vector,i_)< \ + BOOST_PP_ENUM_PARAMS(i_, T) \ + > \ /**/ -#if i > 0 +#if i_ > 0 template< - BOOST_PP_ENUM_PARAMS(i, typename T) + BOOST_PP_ENUM_PARAMS(i_, typename T) > -struct BOOST_PP_CAT(vector,i) - : vector_node< - i - , T0 - , MPL_AUX_VECTOR_TAIL(vector,i,T) +struct BOOST_PP_CAT(vector,i_) + : v_item< + BOOST_PP_CAT(T,BOOST_PP_DEC(i_)) + , AUX778076_VECTOR_TAIL(vector,BOOST_PP_DEC(i_),T) > { + typedef BOOST_PP_CAT(vector,i_) type; }; #endif -# undef MPL_AUX_VECTOR_TAIL +# undef AUX778076_VECTOR_TAIL #else // "brute force" implementation -# if i > 0 +# if i_ > 0 template< - BOOST_PP_ENUM_PARAMS(i, typename T) + BOOST_PP_ENUM_PARAMS(i_, typename T) > -struct BOOST_PP_CAT(vector,i) +struct BOOST_PP_CAT(vector,i_) { - typedef aux::vector_tag<i> tag; - typedef BOOST_PP_CAT(vector,i) type; + typedef aux::vector_tag<i_> tag; + typedef BOOST_PP_CAT(vector,i_) type; -# define AUX_VECTOR_ITEM(unused, i, unused2) \ - typedef BOOST_PP_CAT(T,i) BOOST_PP_CAT(item,i); \ +# define AUX778076_VECTOR_ITEM(unused, i_, unused2) \ + typedef BOOST_PP_CAT(T,i_) BOOST_PP_CAT(item,i_); \ /**/ - BOOST_PP_REPEAT_1(i, AUX_VECTOR_ITEM, unused) -# undef AUX_VECTOR_ITEM - typedef void_ BOOST_PP_CAT(item,i); - typedef BOOST_PP_CAT(T,BOOST_PP_DEC(i)) back; + BOOST_PP_REPEAT(i_, AUX778076_VECTOR_ITEM, unused) +# undef AUX778076_VECTOR_ITEM + typedef void_ BOOST_PP_CAT(item,i_); + typedef BOOST_PP_CAT(T,BOOST_PP_DEC(i_)) back; - // Borland forces us to use |type| here (instead of the class name) - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,i> > end; + // Borland forces us to use 'type' here (instead of the class name) + typedef v_iter<type,0> begin; + typedef v_iter<type,i_> end; }; template<> -struct push_front_traits< aux::vector_tag<BOOST_PP_DEC(i)> > +struct push_front_impl< aux::vector_tag<BOOST_PP_DEC(i_)> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { - typedef BOOST_PP_CAT(vector,i)< + typedef BOOST_PP_CAT(vector,i_)< T - BOOST_PP_COMMA_IF(BOOST_PP_DEC(i)) - BOOST_PP_ENUM_PARAMS(BOOST_PP_DEC(i), typename Vector::item) + BOOST_PP_COMMA_IF(BOOST_PP_DEC(i_)) + BOOST_PP_ENUM_PARAMS(BOOST_PP_DEC(i_), typename Vector::item) > type; }; }; template<> -struct pop_front_traits< aux::vector_tag<i> > +struct pop_front_impl< aux::vector_tag<i_> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { - typedef BOOST_PP_CAT(vector,BOOST_PP_DEC(i))< - BOOST_PP_ENUM_SHIFTED_PARAMS(i, typename Vector::item) + typedef BOOST_PP_CAT(vector,BOOST_PP_DEC(i_))< + BOOST_PP_ENUM_SHIFTED_PARAMS(i_, typename Vector::item) > type; }; }; -# endif // i > 0 + +template<> +struct push_back_impl< aux::vector_tag<BOOST_PP_DEC(i_)> > +{ + template< typename Vector, typename T > struct apply + { + typedef BOOST_PP_CAT(vector,i_)< + BOOST_PP_ENUM_PARAMS(BOOST_PP_DEC(i_), typename Vector::item) + BOOST_PP_COMMA_IF(BOOST_PP_DEC(i_)) + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<i_> > +{ + template< typename Vector > struct apply + { + typedef BOOST_PP_CAT(vector,BOOST_PP_DEC(i_))< + BOOST_PP_ENUM_PARAMS(BOOST_PP_DEC(i_), typename Vector::item) + > type; + }; +}; + +# endif // i_ > 0 # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !defined(BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION) + && !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) template< typename V > -struct vector_item<V,i> +struct v_at<V,i_> { - typedef typename V::BOOST_PP_CAT(item,i) type; + typedef typename V::BOOST_PP_CAT(item,i_) type; }; # else namespace aux { -template<> struct vector_item_impl<i> +template<> struct v_at_impl<i_> { template< typename V_ > struct result_ { - typedef typename V_::BOOST_PP_CAT(item,i) type; + typedef typename V_::BOOST_PP_CAT(item,i_) type; }; }; } template<> -struct at_traits< aux::vector_tag<i> > +struct at_impl< aux::vector_tag<i_> > { - template< typename V_, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> ::template result_<V_>::type type; }; }; -#if i > 0 +#if i_ > 0 template<> -struct front_traits< aux::vector_tag<i> > +struct front_impl< aux::vector_tag<i_> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag<i> > +struct back_impl< aux::vector_tag<i_> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag<i> > +struct empty_impl< aux::vector_tag<i_> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; @@ -160,24 +186,24 @@ struct empty_traits< aux::vector_tag<i> > #endif template<> -struct size_traits< aux::vector_tag<i> > +struct size_impl< aux::vector_tag<i_> > { - template< typename Vector > struct algorithm - : integral_c<long,i> + template< typename Vector > struct apply + : long_<i_> { }; }; template<> -struct O1_size_traits< aux::vector_tag<i> > - : size_traits< aux::vector_tag<i> > +struct O1_size_impl< aux::vector_tag<i_> > + : size_impl< aux::vector_tag<i_> > { }; template<> -struct clear_traits< aux::vector_tag<i> > +struct clear_impl< aux::vector_tag<i_> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -185,8 +211,8 @@ struct clear_traits< aux::vector_tag<i> > # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#endif // BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES -#undef i +#undef i_ #endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/vector/aux_/numbered_c.hpp b/include/boost/mpl/vector/aux_/numbered_c.hpp index db80179..37afe54 100644 --- a/include/boost/mpl/vector/aux_/numbered_c.hpp +++ b/include/boost/mpl/vector/aux_/numbered_c.hpp @@ -1,71 +1,74 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/aux_/numbered_c.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// 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) -// no include guards, the header is intended for multiple inclusion! +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION #if defined(BOOST_PP_IS_ITERATING) -#include "boost/preprocessor/enum_params.hpp" -#include "boost/preprocessor/enum_shifted_params.hpp" -#include "boost/preprocessor/comma_if.hpp" -#include "boost/preprocessor/repeat.hpp" -#include "boost/preprocessor/dec.hpp" -#include "boost/preprocessor/cat.hpp" +// 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. -#define i BOOST_PP_FRAME_ITERATION(1) +// $Source$ +// $Date$ +// $Revision$ -#if defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) +#include <boost/preprocessor/enum_params.hpp> +#include <boost/preprocessor/enum_shifted_params.hpp> +#include <boost/preprocessor/comma_if.hpp> +#include <boost/preprocessor/repeat.hpp> +#include <boost/preprocessor/dec.hpp> +#include <boost/preprocessor/cat.hpp> -# define MPL_AUX_VECTOR_TAIL(vector, i, C) \ - BOOST_PP_CAT(BOOST_PP_CAT(vector,BOOST_PP_DEC(i)),_c)<T \ - BOOST_PP_COMMA_IF(BOOST_PP_DEC(i)) BOOST_PP_ENUM_SHIFTED_PARAMS(i, C) \ - > \ +#define i_ BOOST_PP_FRAME_ITERATION(1) + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +# define AUX778076_VECTOR_TAIL(vector, i_, C) \ + BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c)<T \ + BOOST_PP_COMMA_IF(i_) BOOST_PP_ENUM_PARAMS(i_, C) \ + > \ /**/ +#if i_ > 0 template< typename T - , BOOST_PP_ENUM_PARAMS(i, T C) + , BOOST_PP_ENUM_PARAMS(i_, T C) > -struct BOOST_PP_CAT(BOOST_PP_CAT(vector,i),_c) - : vector_node< - i - , integral_c<T,C0> - , MPL_AUX_VECTOR_TAIL(vector,i,C) +struct BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c) + : v_item< + integral_c<T,BOOST_PP_CAT(C,BOOST_PP_DEC(i_))> + , AUX778076_VECTOR_TAIL(vector,BOOST_PP_DEC(i_),C) > { + typedef BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c) type; }; +#endif -# undef MPL_AUX_VECTOR_TAIL +# undef AUX778076_VECTOR_TAIL #else // "brute force" implementation -# define MPL_AUX_VECTOR_C_PARAM_FUNC(unused, i, param) \ - BOOST_PP_COMMA_IF(i) \ - integral_c<T,BOOST_PP_CAT(param,i)> \ +# define AUX778076_VECTOR_C_PARAM_FUNC(unused, i_, param) \ + BOOST_PP_COMMA_IF(i_) \ + integral_c<T,BOOST_PP_CAT(param,i_)> \ /**/ template< typename T - , BOOST_PP_ENUM_PARAMS(i, T C) + , BOOST_PP_ENUM_PARAMS(i_, T C) > -struct BOOST_PP_CAT(BOOST_PP_CAT(vector,i),_c) - : BOOST_PP_CAT(vector,i)< BOOST_PP_REPEAT_1(i,MPL_AUX_VECTOR_C_PARAM_FUNC,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) > { }; -# undef MPL_AUX_VECTOR_C_PARAM_FUNC +# undef AUX778076_VECTOR_C_PARAM_FUNC -#endif // BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES -#undef i +#undef i_ #endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/vector/aux_/pop_back.hpp b/include/boost/mpl/vector/aux_/pop_back.hpp index a9590f0..b2b22fb 100644 --- a/include/boost/mpl/vector/aux_/pop_back.hpp +++ b/include/boost/mpl/vector/aux_/pop_back.hpp @@ -1,40 +1,40 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/aux_/pop_back.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_AUX_POP_BACK_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_POP_BACK_HPP_INCLUDED -#include "boost/mpl/pop_back_fwd.hpp" -#include "boost/mpl/aux_/config/vector.hpp" +// 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. -#if defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) +// $Source$ +// $Date$ +// $Revision$ -# include "boost/mpl/list/aux_/tag.hpp" +#include <boost/mpl/pop_back_fwd.hpp> +#include <boost/mpl/aux_/config/typeof.hpp> -namespace boost { -namespace mpl { +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +# include <boost/mpl/vector/aux_/item.hpp> +# include <boost/mpl/vector/aux_/tag.hpp> + +namespace boost { namespace mpl { template<> -struct pop_back_traits< aux::vector_tag > +struct pop_back_impl< aux::vector_tag > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { - typedef typename Vector::base type; + typedef v_mask<Vector,0> type; }; }; -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES #endif // BOOST_MPL_VECTOR_AUX_POP_BACK_HPP_INCLUDED diff --git a/include/boost/mpl/vector/aux_/pop_front.hpp b/include/boost/mpl/vector/aux_/pop_front.hpp index 6fd98d1..3ad73e3 100644 --- a/include/boost/mpl/vector/aux_/pop_front.hpp +++ b/include/boost/mpl/vector/aux_/pop_front.hpp @@ -1,40 +1,40 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/aux_/pop_front.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_AUX_POP_FRONT_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_POP_FRONT_HPP_INCLUDED -#include "boost/mpl/pop_front_fwd.hpp" -#include "boost/mpl/aux_/config/vector.hpp" +// 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. -#if defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) +// $Source$ +// $Date$ +// $Revision$ -# include "boost/mpl/list/aux_/tag.hpp" +#include <boost/mpl/pop_front_fwd.hpp> +#include <boost/mpl/aux_/config/typeof.hpp> -namespace boost { -namespace mpl { +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +# include <boost/mpl/vector/aux_/item.hpp> +# include <boost/mpl/vector/aux_/tag.hpp> + +namespace boost { namespace mpl { template<> -struct pop_front_traits< aux::vector_tag > +struct pop_front_impl< aux::vector_tag > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { - typedef typename Vector::base type; + typedef v_mask<Vector,1> type; }; }; -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES #endif // BOOST_MPL_VECTOR_AUX_POP_FRONT_HPP_INCLUDED diff --git a/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp b/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp index 83fc721..c79a1ac 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp @@ -1,48 +1,56 @@ -// preprocessed version of 'boost/mpl/vector/vector10.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector10.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { -template<> struct vector_item_impl<0> +template<> struct v_at_impl<0> { template< typename V_ > struct result_ { typedef typename V_::item0 type; }; }; + } template<> -struct at_traits< aux::vector_tag< 0> > +struct at_impl< aux::vector_tag<0> > { - template< typename V_, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> ::template result_<V_>::type type; }; }; template<> -struct size_traits< aux::vector_tag< 0> > +struct size_impl< aux::vector_tag<0> > { - template< typename Vector > struct algorithm - : integral_c< long,0 > + template< typename Vector > struct apply + : long_<0> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 0> > - : size_traits< aux::vector_tag< 0> > +struct O1_size_impl< aux::vector_tag<0> > + : size_impl< aux::vector_tag<0> > { }; template<> -struct clear_traits< aux::vector_tag< 0> > +struct clear_impl< aux::vector_tag<0> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -58,14 +66,14 @@ struct vector1 typedef T0 item0; typedef void_ item1; typedef T0 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,1> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,1 > end; }; template<> -struct push_front_traits< aux::vector_tag< 0> > +struct push_front_impl< aux::vector_tag<0> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector1< T @@ -74,82 +82,106 @@ struct push_front_traits< aux::vector_tag< 0> > }; template<> -struct pop_front_traits< aux::vector_tag< 1> > +struct pop_front_impl< aux::vector_tag<1> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0< - + + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<0> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector1< + + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<1> > +{ + template< typename Vector > struct apply + { + typedef vector0< + > type; }; }; namespace aux { -template<> struct vector_item_impl<1> +template<> struct v_at_impl<1> { template< typename V_ > struct result_ { typedef typename V_::item1 type; }; }; + } template<> -struct at_traits< aux::vector_tag< 1> > +struct at_impl< aux::vector_tag<1> > { - template< typename V_, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 1> > +struct front_impl< aux::vector_tag<1> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 1> > +struct back_impl< aux::vector_tag<1> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 1> > +struct empty_impl< aux::vector_tag<1> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 1> > +struct size_impl< aux::vector_tag<1> > { - template< typename Vector > struct algorithm - : integral_c< long,1 > + template< typename Vector > struct apply + : long_<1> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 1> > - : size_traits< aux::vector_tag< 1> > +struct O1_size_impl< aux::vector_tag<1> > + : size_impl< aux::vector_tag<1> > { }; template<> -struct clear_traits< aux::vector_tag< 1> > +struct clear_impl< aux::vector_tag<1> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -168,14 +200,14 @@ struct vector2 typedef void_ item2; typedef T1 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,2> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,2 > end; }; template<> -struct push_front_traits< aux::vector_tag< 1> > +struct push_front_impl< aux::vector_tag<1> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector2< T @@ -186,9 +218,9 @@ struct push_front_traits< aux::vector_tag< 1> > }; template<> -struct pop_front_traits< aux::vector_tag< 2> > +struct pop_front_impl< aux::vector_tag<2> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector1< typename Vector::item1 @@ -196,72 +228,97 @@ struct pop_front_traits< aux::vector_tag< 2> > }; }; +template<> +struct push_back_impl< aux::vector_tag<1> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector2< + typename Vector::item0 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<2> > +{ + template< typename Vector > struct apply + { + typedef vector1< + typename Vector::item0 + > type; + }; +}; + namespace aux { -template<> struct vector_item_impl<2> +template<> struct v_at_impl<2> { template< typename V_ > struct result_ { typedef typename V_::item2 type; }; }; + } template<> -struct at_traits< aux::vector_tag< 2> > +struct at_impl< aux::vector_tag<2> > { - template< typename V_, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 2> > +struct front_impl< aux::vector_tag<2> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 2> > +struct back_impl< aux::vector_tag<2> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 2> > +struct empty_impl< aux::vector_tag<2> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 2> > +struct size_impl< aux::vector_tag<2> > { - template< typename Vector > struct algorithm - : integral_c< long,2 > + template< typename Vector > struct apply + : long_<2> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 2> > - : size_traits< aux::vector_tag< 2> > +struct O1_size_impl< aux::vector_tag<2> > + : size_impl< aux::vector_tag<2> > { }; template<> -struct clear_traits< aux::vector_tag< 2> > +struct clear_impl< aux::vector_tag<2> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -281,14 +338,14 @@ struct vector3 typedef void_ item3; typedef T2 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,3> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,3 > end; }; template<> -struct push_front_traits< aux::vector_tag< 2> > +struct push_front_impl< aux::vector_tag<2> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector3< T @@ -299,9 +356,9 @@ struct push_front_traits< aux::vector_tag< 2> > }; template<> -struct pop_front_traits< aux::vector_tag< 3> > +struct pop_front_impl< aux::vector_tag<3> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector2< typename Vector::item1, typename Vector::item2 @@ -309,72 +366,97 @@ struct pop_front_traits< aux::vector_tag< 3> > }; }; +template<> +struct push_back_impl< aux::vector_tag<2> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector3< + typename Vector::item0, typename Vector::item1 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<3> > +{ + template< typename Vector > struct apply + { + typedef vector2< + typename Vector::item0, typename Vector::item1 + > type; + }; +}; + namespace aux { -template<> struct vector_item_impl<3> +template<> struct v_at_impl<3> { template< typename V_ > struct result_ { typedef typename V_::item3 type; }; }; + } template<> -struct at_traits< aux::vector_tag< 3> > +struct at_impl< aux::vector_tag<3> > { - template< typename V_, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 3> > +struct front_impl< aux::vector_tag<3> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 3> > +struct back_impl< aux::vector_tag<3> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 3> > +struct empty_impl< aux::vector_tag<3> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 3> > +struct size_impl< aux::vector_tag<3> > { - template< typename Vector > struct algorithm - : integral_c< long,3 > + template< typename Vector > struct apply + : long_<3> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 3> > - : size_traits< aux::vector_tag< 3> > +struct O1_size_impl< aux::vector_tag<3> > + : size_impl< aux::vector_tag<3> > { }; template<> -struct clear_traits< aux::vector_tag< 3> > +struct clear_impl< aux::vector_tag<3> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -395,14 +477,14 @@ struct vector4 typedef void_ item4; typedef T3 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,4> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,4 > end; }; template<> -struct push_front_traits< aux::vector_tag< 3> > +struct push_front_impl< aux::vector_tag<3> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector4< T @@ -414,9 +496,9 @@ struct push_front_traits< aux::vector_tag< 3> > }; template<> -struct pop_front_traits< aux::vector_tag< 4> > +struct pop_front_impl< aux::vector_tag<4> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector3< typename Vector::item1, typename Vector::item2 @@ -425,72 +507,99 @@ struct pop_front_traits< aux::vector_tag< 4> > }; }; +template<> +struct push_back_impl< aux::vector_tag<3> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector4< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<4> > +{ + template< typename Vector > struct apply + { + typedef vector3< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2 + > type; + }; +}; + namespace aux { -template<> struct vector_item_impl<4> +template<> struct v_at_impl<4> { template< typename V_ > struct result_ { typedef typename V_::item4 type; }; }; + } template<> -struct at_traits< aux::vector_tag< 4> > +struct at_impl< aux::vector_tag<4> > { - template< typename V_, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 4> > +struct front_impl< aux::vector_tag<4> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 4> > +struct back_impl< aux::vector_tag<4> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 4> > +struct empty_impl< aux::vector_tag<4> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 4> > +struct size_impl< aux::vector_tag<4> > { - template< typename Vector > struct algorithm - : integral_c< long,4 > + template< typename Vector > struct apply + : long_<4> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 4> > - : size_traits< aux::vector_tag< 4> > +struct O1_size_impl< aux::vector_tag<4> > + : size_impl< aux::vector_tag<4> > { }; template<> -struct clear_traits< aux::vector_tag< 4> > +struct clear_impl< aux::vector_tag<4> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -512,14 +621,14 @@ struct vector5 typedef void_ item5; typedef T4 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,5> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,5 > end; }; template<> -struct push_front_traits< aux::vector_tag< 4> > +struct push_front_impl< aux::vector_tag<4> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector5< T @@ -531,9 +640,9 @@ struct push_front_traits< aux::vector_tag< 4> > }; template<> -struct pop_front_traits< aux::vector_tag< 5> > +struct pop_front_impl< aux::vector_tag<5> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector4< typename Vector::item1, typename Vector::item2 @@ -542,72 +651,99 @@ struct pop_front_traits< aux::vector_tag< 5> > }; }; +template<> +struct push_back_impl< aux::vector_tag<4> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector5< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<5> > +{ + template< typename Vector > struct apply + { + typedef vector4< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + > type; + }; +}; + namespace aux { -template<> struct vector_item_impl<5> +template<> struct v_at_impl<5> { template< typename V_ > struct result_ { typedef typename V_::item5 type; }; }; + } template<> -struct at_traits< aux::vector_tag< 5> > +struct at_impl< aux::vector_tag<5> > { - template< typename V_, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 5> > +struct front_impl< aux::vector_tag<5> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 5> > +struct back_impl< aux::vector_tag<5> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 5> > +struct empty_impl< aux::vector_tag<5> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 5> > +struct size_impl< aux::vector_tag<5> > { - template< typename Vector > struct algorithm - : integral_c< long,5 > + template< typename Vector > struct apply + : long_<5> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 5> > - : size_traits< aux::vector_tag< 5> > +struct O1_size_impl< aux::vector_tag<5> > + : size_impl< aux::vector_tag<5> > { }; template<> -struct clear_traits< aux::vector_tag< 5> > +struct clear_impl< aux::vector_tag<5> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -631,14 +767,14 @@ struct vector6 typedef void_ item6; typedef T5 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,6> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,6 > end; }; template<> -struct push_front_traits< aux::vector_tag< 5> > +struct push_front_impl< aux::vector_tag<5> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector6< T @@ -651,9 +787,9 @@ struct push_front_traits< aux::vector_tag< 5> > }; template<> -struct pop_front_traits< aux::vector_tag< 6> > +struct pop_front_impl< aux::vector_tag<6> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector5< typename Vector::item1, typename Vector::item2 @@ -663,72 +799,101 @@ struct pop_front_traits< aux::vector_tag< 6> > }; }; +template<> +struct push_back_impl< aux::vector_tag<5> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector6< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<6> > +{ + template< typename Vector > struct apply + { + typedef vector5< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4 + > type; + }; +}; + namespace aux { -template<> struct vector_item_impl<6> +template<> struct v_at_impl<6> { template< typename V_ > struct result_ { typedef typename V_::item6 type; }; }; + } template<> -struct at_traits< aux::vector_tag< 6> > +struct at_impl< aux::vector_tag<6> > { - template< typename V_, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 6> > +struct front_impl< aux::vector_tag<6> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 6> > +struct back_impl< aux::vector_tag<6> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 6> > +struct empty_impl< aux::vector_tag<6> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 6> > +struct size_impl< aux::vector_tag<6> > { - template< typename Vector > struct algorithm - : integral_c< long,6 > + template< typename Vector > struct apply + : long_<6> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 6> > - : size_traits< aux::vector_tag< 6> > +struct O1_size_impl< aux::vector_tag<6> > + : size_impl< aux::vector_tag<6> > { }; template<> -struct clear_traits< aux::vector_tag< 6> > +struct clear_impl< aux::vector_tag<6> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -753,14 +918,14 @@ struct vector7 typedef void_ item7; typedef T6 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,7> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,7 > end; }; template<> -struct push_front_traits< aux::vector_tag< 6> > +struct push_front_impl< aux::vector_tag<6> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector7< T @@ -773,9 +938,9 @@ struct push_front_traits< aux::vector_tag< 6> > }; template<> -struct pop_front_traits< aux::vector_tag< 7> > +struct pop_front_impl< aux::vector_tag<7> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector6< typename Vector::item1, typename Vector::item2 @@ -785,72 +950,101 @@ struct pop_front_traits< aux::vector_tag< 7> > }; }; +template<> +struct push_back_impl< aux::vector_tag<6> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector7< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<7> > +{ + template< typename Vector > struct apply + { + typedef vector6< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + > type; + }; +}; + namespace aux { -template<> struct vector_item_impl<7> +template<> struct v_at_impl<7> { template< typename V_ > struct result_ { typedef typename V_::item7 type; }; }; + } template<> -struct at_traits< aux::vector_tag< 7> > +struct at_impl< aux::vector_tag<7> > { - template< typename V_, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 7> > +struct front_impl< aux::vector_tag<7> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 7> > +struct back_impl< aux::vector_tag<7> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 7> > +struct empty_impl< aux::vector_tag<7> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 7> > +struct size_impl< aux::vector_tag<7> > { - template< typename Vector > struct algorithm - : integral_c< long,7 > + template< typename Vector > struct apply + : long_<7> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 7> > - : size_traits< aux::vector_tag< 7> > +struct O1_size_impl< aux::vector_tag<7> > + : size_impl< aux::vector_tag<7> > { }; template<> -struct clear_traits< aux::vector_tag< 7> > +struct clear_impl< aux::vector_tag<7> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -876,14 +1070,14 @@ struct vector8 typedef void_ item8; typedef T7 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,8> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,8 > end; }; template<> -struct push_front_traits< aux::vector_tag< 7> > +struct push_front_impl< aux::vector_tag<7> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector8< T @@ -897,9 +1091,9 @@ struct push_front_traits< aux::vector_tag< 7> > }; template<> -struct pop_front_traits< aux::vector_tag< 8> > +struct pop_front_impl< aux::vector_tag<8> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector7< typename Vector::item1, typename Vector::item2 @@ -910,72 +1104,103 @@ struct pop_front_traits< aux::vector_tag< 8> > }; }; +template<> +struct push_back_impl< aux::vector_tag<7> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector8< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<8> > +{ + template< typename Vector > struct apply + { + typedef vector7< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6 + > type; + }; +}; + namespace aux { -template<> struct vector_item_impl<8> +template<> struct v_at_impl<8> { template< typename V_ > struct result_ { typedef typename V_::item8 type; }; }; + } template<> -struct at_traits< aux::vector_tag< 8> > +struct at_impl< aux::vector_tag<8> > { - template< typename V_, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 8> > +struct front_impl< aux::vector_tag<8> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 8> > +struct back_impl< aux::vector_tag<8> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 8> > +struct empty_impl< aux::vector_tag<8> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 8> > +struct size_impl< aux::vector_tag<8> > { - template< typename Vector > struct algorithm - : integral_c< long,8 > + template< typename Vector > struct apply + : long_<8> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 8> > - : size_traits< aux::vector_tag< 8> > +struct O1_size_impl< aux::vector_tag<8> > + : size_impl< aux::vector_tag<8> > { }; template<> -struct clear_traits< aux::vector_tag< 8> > +struct clear_impl< aux::vector_tag<8> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -1002,14 +1227,14 @@ struct vector9 typedef void_ item9; typedef T8 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,9> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,9 > end; }; template<> -struct push_front_traits< aux::vector_tag< 8> > +struct push_front_impl< aux::vector_tag<8> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector9< T @@ -1023,9 +1248,9 @@ struct push_front_traits< aux::vector_tag< 8> > }; template<> -struct pop_front_traits< aux::vector_tag< 9> > +struct pop_front_impl< aux::vector_tag<9> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector8< typename Vector::item1, typename Vector::item2 @@ -1036,72 +1261,103 @@ struct pop_front_traits< aux::vector_tag< 9> > }; }; +template<> +struct push_back_impl< aux::vector_tag<8> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector9< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<9> > +{ + template< typename Vector > struct apply + { + typedef vector8< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + > type; + }; +}; + namespace aux { -template<> struct vector_item_impl<9> +template<> struct v_at_impl<9> { template< typename V_ > struct result_ { typedef typename V_::item9 type; }; }; + } template<> -struct at_traits< aux::vector_tag< 9> > +struct at_impl< aux::vector_tag<9> > { - template< typename V_, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 9> > +struct front_impl< aux::vector_tag<9> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 9> > +struct back_impl< aux::vector_tag<9> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 9> > +struct empty_impl< aux::vector_tag<9> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 9> > +struct size_impl< aux::vector_tag<9> > { - template< typename Vector > struct algorithm - : integral_c< long,9 > + template< typename Vector > struct apply + : long_<9> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 9> > - : size_traits< aux::vector_tag< 9> > +struct O1_size_impl< aux::vector_tag<9> > + : size_impl< aux::vector_tag<9> > { }; template<> -struct clear_traits< aux::vector_tag< 9> > +struct clear_impl< aux::vector_tag<9> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -1129,14 +1385,14 @@ struct vector10 typedef void_ item10; typedef T9 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,10> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,10 > end; }; template<> -struct push_front_traits< aux::vector_tag< 9> > +struct push_front_impl< aux::vector_tag<9> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector10< T @@ -1151,9 +1407,9 @@ struct push_front_traits< aux::vector_tag< 9> > }; template<> -struct pop_front_traits< aux::vector_tag< 10> > +struct pop_front_impl< aux::vector_tag<10> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector9< typename Vector::item1, typename Vector::item2 @@ -1165,77 +1421,108 @@ struct pop_front_traits< aux::vector_tag< 10> > }; }; +template<> +struct push_back_impl< aux::vector_tag<9> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector10< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<10> > +{ + template< typename Vector > struct apply + { + typedef vector9< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8 + > type; + }; +}; + namespace aux { -template<> struct vector_item_impl<10> +template<> struct v_at_impl<10> { template< typename V_ > struct result_ { typedef typename V_::item10 type; }; }; + } template<> -struct at_traits< aux::vector_tag< 10> > +struct at_impl< aux::vector_tag<10> > { - template< typename V_, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 10> > +struct front_impl< aux::vector_tag<10> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 10> > +struct back_impl< aux::vector_tag<10> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 10> > +struct empty_impl< aux::vector_tag<10> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 10> > +struct size_impl< aux::vector_tag<10> > { - template< typename Vector > struct algorithm - : integral_c< long,10 > + template< typename Vector > struct apply + : long_<10> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 10> > - : size_traits< aux::vector_tag< 10> > +struct O1_size_impl< aux::vector_tag<10> > + : size_impl< aux::vector_tag<10> > { }; template<> -struct clear_traits< aux::vector_tag< 10> > +struct clear_impl< aux::vector_tag<10> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp b/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp index e6c1f43..bb198b2 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp @@ -1,15 +1,22 @@ -// preprocessed version of 'boost/mpl/vector/vector10_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector10_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T , T C0 > struct vector1_c - : vector1< integral_c<T,C0> > + : vector1< integral_c< T,C0 > > { }; @@ -18,7 +25,7 @@ template< , T C0, T C1 > struct vector2_c - : vector2< integral_c<T,C0>,integral_c<T,C1> > + : vector2< integral_c< T,C0 >, integral_c< T,C1 > > { }; @@ -27,7 +34,7 @@ template< , T C0, T C1, T C2 > struct vector3_c - : vector3< integral_c<T,C0>,integral_c<T,C1>,integral_c<T,C2> > + : vector3< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > > { }; @@ -37,9 +44,9 @@ template< > struct vector4_c : vector4< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >, integral_c<T + , C3> + > { }; @@ -49,9 +56,9 @@ template< > struct vector5_c : vector5< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 > + > { }; @@ -61,9 +68,9 @@ template< > struct vector6_c : vector6< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 > + > { }; @@ -73,10 +80,10 @@ template< > struct vector7_c : vector7< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c<T + , C6> + > { }; @@ -86,10 +93,10 @@ template< > struct vector8_c : vector8< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 > + > { }; @@ -99,10 +106,10 @@ template< > struct vector9_c : vector9< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 > + > { }; @@ -112,14 +119,11 @@ template< > struct vector10_c : vector10< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + > { }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp b/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp index 8743a13..eb92a78 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector20.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector20.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 @@ -28,14 +35,14 @@ struct vector11 typedef void_ item11; typedef T10 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,11> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,11 > end; }; template<> -struct push_front_traits< aux::vector_tag< 10> > +struct push_front_impl< aux::vector_tag<10> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector11< T @@ -50,9 +57,9 @@ struct push_front_traits< aux::vector_tag< 10> > }; template<> -struct pop_front_traits< aux::vector_tag< 11> > +struct pop_front_impl< aux::vector_tag<11> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector10< typename Vector::item1, typename Vector::item2 @@ -64,72 +71,105 @@ struct pop_front_traits< aux::vector_tag< 11> > }; }; -namespace aux { -template<> struct vector_item_impl<11> +template<> +struct push_back_impl< aux::vector_tag<10> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item11 type; + typedef vector11< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<11> > +{ + template< typename Vector > struct apply + { + typedef vector10< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<11> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item11 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 11> > +struct at_impl< aux::vector_tag<11> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 11> > +struct front_impl< aux::vector_tag<11> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 11> > +struct back_impl< aux::vector_tag<11> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 11> > +struct empty_impl< aux::vector_tag<11> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 11> > +struct size_impl< aux::vector_tag<11> > { - template< typename Vector > struct algorithm - : integral_c< long,11 > + template< typename Vector > struct apply + : long_<11> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 11> > - : size_traits< aux::vector_tag< 11> > +struct O1_size_impl< aux::vector_tag<11> > + : size_impl< aux::vector_tag<11> > { }; template<> -struct clear_traits< aux::vector_tag< 11> > +struct clear_impl< aux::vector_tag<11> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -160,14 +200,14 @@ struct vector12 typedef void_ item12; typedef T11 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,12> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,12 > end; }; template<> -struct push_front_traits< aux::vector_tag< 11> > +struct push_front_impl< aux::vector_tag<11> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector12< T @@ -183,9 +223,9 @@ struct push_front_traits< aux::vector_tag< 11> > }; template<> -struct pop_front_traits< aux::vector_tag< 12> > +struct pop_front_impl< aux::vector_tag<12> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector11< typename Vector::item1, typename Vector::item2 @@ -198,72 +238,107 @@ struct pop_front_traits< aux::vector_tag< 12> > }; }; -namespace aux { -template<> struct vector_item_impl<12> +template<> +struct push_back_impl< aux::vector_tag<11> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item12 type; + typedef vector12< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<12> > +{ + template< typename Vector > struct apply + { + typedef vector11< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<12> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item12 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 12> > +struct at_impl< aux::vector_tag<12> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 12> > +struct front_impl< aux::vector_tag<12> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 12> > +struct back_impl< aux::vector_tag<12> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 12> > +struct empty_impl< aux::vector_tag<12> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 12> > +struct size_impl< aux::vector_tag<12> > { - template< typename Vector > struct algorithm - : integral_c< long,12 > + template< typename Vector > struct apply + : long_<12> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 12> > - : size_traits< aux::vector_tag< 12> > +struct O1_size_impl< aux::vector_tag<12> > + : size_impl< aux::vector_tag<12> > { }; template<> -struct clear_traits< aux::vector_tag< 12> > +struct clear_impl< aux::vector_tag<12> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -295,14 +370,14 @@ struct vector13 typedef void_ item13; typedef T12 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,13> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,13 > end; }; template<> -struct push_front_traits< aux::vector_tag< 12> > +struct push_front_impl< aux::vector_tag<12> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector13< T @@ -318,9 +393,9 @@ struct push_front_traits< aux::vector_tag< 12> > }; template<> -struct pop_front_traits< aux::vector_tag< 13> > +struct pop_front_impl< aux::vector_tag<13> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector12< typename Vector::item1, typename Vector::item2 @@ -333,72 +408,107 @@ struct pop_front_traits< aux::vector_tag< 13> > }; }; -namespace aux { -template<> struct vector_item_impl<13> +template<> +struct push_back_impl< aux::vector_tag<12> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item13 type; + typedef vector13< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<13> > +{ + template< typename Vector > struct apply + { + typedef vector12< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<13> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item13 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 13> > +struct at_impl< aux::vector_tag<13> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 13> > +struct front_impl< aux::vector_tag<13> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 13> > +struct back_impl< aux::vector_tag<13> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 13> > +struct empty_impl< aux::vector_tag<13> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 13> > +struct size_impl< aux::vector_tag<13> > { - template< typename Vector > struct algorithm - : integral_c< long,13 > + template< typename Vector > struct apply + : long_<13> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 13> > - : size_traits< aux::vector_tag< 13> > +struct O1_size_impl< aux::vector_tag<13> > + : size_impl< aux::vector_tag<13> > { }; template<> -struct clear_traits< aux::vector_tag< 13> > +struct clear_impl< aux::vector_tag<13> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -431,14 +541,14 @@ struct vector14 typedef void_ item14; typedef T13 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,14> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,14 > end; }; template<> -struct push_front_traits< aux::vector_tag< 13> > +struct push_front_impl< aux::vector_tag<13> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector14< T @@ -455,9 +565,9 @@ struct push_front_traits< aux::vector_tag< 13> > }; template<> -struct pop_front_traits< aux::vector_tag< 14> > +struct pop_front_impl< aux::vector_tag<14> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector13< typename Vector::item1, typename Vector::item2 @@ -471,72 +581,109 @@ struct pop_front_traits< aux::vector_tag< 14> > }; }; -namespace aux { -template<> struct vector_item_impl<14> +template<> +struct push_back_impl< aux::vector_tag<13> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item14 type; + typedef vector14< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<14> > +{ + template< typename Vector > struct apply + { + typedef vector13< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<14> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item14 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 14> > +struct at_impl< aux::vector_tag<14> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 14> > +struct front_impl< aux::vector_tag<14> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 14> > +struct back_impl< aux::vector_tag<14> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 14> > +struct empty_impl< aux::vector_tag<14> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 14> > +struct size_impl< aux::vector_tag<14> > { - template< typename Vector > struct algorithm - : integral_c< long,14 > + template< typename Vector > struct apply + : long_<14> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 14> > - : size_traits< aux::vector_tag< 14> > +struct O1_size_impl< aux::vector_tag<14> > + : size_impl< aux::vector_tag<14> > { }; template<> -struct clear_traits< aux::vector_tag< 14> > +struct clear_impl< aux::vector_tag<14> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -570,14 +717,14 @@ struct vector15 typedef void_ item15; typedef T14 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,15> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,15 > end; }; template<> -struct push_front_traits< aux::vector_tag< 14> > +struct push_front_impl< aux::vector_tag<14> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector15< T @@ -594,9 +741,9 @@ struct push_front_traits< aux::vector_tag< 14> > }; template<> -struct pop_front_traits< aux::vector_tag< 15> > +struct pop_front_impl< aux::vector_tag<15> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector14< typename Vector::item1, typename Vector::item2 @@ -610,72 +757,109 @@ struct pop_front_traits< aux::vector_tag< 15> > }; }; -namespace aux { -template<> struct vector_item_impl<15> +template<> +struct push_back_impl< aux::vector_tag<14> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item15 type; + typedef vector15< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<15> > +{ + template< typename Vector > struct apply + { + typedef vector14< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<15> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item15 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 15> > +struct at_impl< aux::vector_tag<15> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 15> > +struct front_impl< aux::vector_tag<15> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 15> > +struct back_impl< aux::vector_tag<15> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 15> > +struct empty_impl< aux::vector_tag<15> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 15> > +struct size_impl< aux::vector_tag<15> > { - template< typename Vector > struct algorithm - : integral_c< long,15 > + template< typename Vector > struct apply + : long_<15> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 15> > - : size_traits< aux::vector_tag< 15> > +struct O1_size_impl< aux::vector_tag<15> > + : size_impl< aux::vector_tag<15> > { }; template<> -struct clear_traits< aux::vector_tag< 15> > +struct clear_impl< aux::vector_tag<15> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -711,14 +895,14 @@ struct vector16 typedef void_ item16; typedef T15 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,16> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,16 > end; }; template<> -struct push_front_traits< aux::vector_tag< 15> > +struct push_front_impl< aux::vector_tag<15> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector16< T @@ -736,9 +920,9 @@ struct push_front_traits< aux::vector_tag< 15> > }; template<> -struct pop_front_traits< aux::vector_tag< 16> > +struct pop_front_impl< aux::vector_tag<16> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector15< typename Vector::item1, typename Vector::item2 @@ -753,72 +937,111 @@ struct pop_front_traits< aux::vector_tag< 16> > }; }; -namespace aux { -template<> struct vector_item_impl<16> +template<> +struct push_back_impl< aux::vector_tag<15> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item16 type; + typedef vector16< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<16> > +{ + template< typename Vector > struct apply + { + typedef vector15< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<16> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item16 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 16> > +struct at_impl< aux::vector_tag<16> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 16> > +struct front_impl< aux::vector_tag<16> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 16> > +struct back_impl< aux::vector_tag<16> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 16> > +struct empty_impl< aux::vector_tag<16> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 16> > +struct size_impl< aux::vector_tag<16> > { - template< typename Vector > struct algorithm - : integral_c< long,16 > + template< typename Vector > struct apply + : long_<16> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 16> > - : size_traits< aux::vector_tag< 16> > +struct O1_size_impl< aux::vector_tag<16> > + : size_impl< aux::vector_tag<16> > { }; template<> -struct clear_traits< aux::vector_tag< 16> > +struct clear_impl< aux::vector_tag<16> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -855,14 +1078,14 @@ struct vector17 typedef void_ item17; typedef T16 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,17> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,17 > end; }; template<> -struct push_front_traits< aux::vector_tag< 16> > +struct push_front_impl< aux::vector_tag<16> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector17< T @@ -880,9 +1103,9 @@ struct push_front_traits< aux::vector_tag< 16> > }; template<> -struct pop_front_traits< aux::vector_tag< 17> > +struct pop_front_impl< aux::vector_tag<17> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector16< typename Vector::item1, typename Vector::item2 @@ -897,72 +1120,111 @@ struct pop_front_traits< aux::vector_tag< 17> > }; }; -namespace aux { -template<> struct vector_item_impl<17> +template<> +struct push_back_impl< aux::vector_tag<16> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item17 type; + typedef vector17< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<17> > +{ + template< typename Vector > struct apply + { + typedef vector16< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<17> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item17 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 17> > +struct at_impl< aux::vector_tag<17> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 17> > +struct front_impl< aux::vector_tag<17> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 17> > +struct back_impl< aux::vector_tag<17> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 17> > +struct empty_impl< aux::vector_tag<17> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 17> > +struct size_impl< aux::vector_tag<17> > { - template< typename Vector > struct algorithm - : integral_c< long,17 > + template< typename Vector > struct apply + : long_<17> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 17> > - : size_traits< aux::vector_tag< 17> > +struct O1_size_impl< aux::vector_tag<17> > + : size_impl< aux::vector_tag<17> > { }; template<> -struct clear_traits< aux::vector_tag< 17> > +struct clear_impl< aux::vector_tag<17> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -1000,14 +1262,14 @@ struct vector18 typedef void_ item18; typedef T17 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,18> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,18 > end; }; template<> -struct push_front_traits< aux::vector_tag< 17> > +struct push_front_impl< aux::vector_tag<17> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector18< T @@ -1026,9 +1288,9 @@ struct push_front_traits< aux::vector_tag< 17> > }; template<> -struct pop_front_traits< aux::vector_tag< 18> > +struct pop_front_impl< aux::vector_tag<18> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector17< typename Vector::item1, typename Vector::item2 @@ -1044,72 +1306,113 @@ struct pop_front_traits< aux::vector_tag< 18> > }; }; -namespace aux { -template<> struct vector_item_impl<18> +template<> +struct push_back_impl< aux::vector_tag<17> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item18 type; + typedef vector18< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<18> > +{ + template< typename Vector > struct apply + { + typedef vector17< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<18> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item18 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 18> > +struct at_impl< aux::vector_tag<18> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 18> > +struct front_impl< aux::vector_tag<18> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 18> > +struct back_impl< aux::vector_tag<18> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 18> > +struct empty_impl< aux::vector_tag<18> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 18> > +struct size_impl< aux::vector_tag<18> > { - template< typename Vector > struct algorithm - : integral_c< long,18 > + template< typename Vector > struct apply + : long_<18> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 18> > - : size_traits< aux::vector_tag< 18> > +struct O1_size_impl< aux::vector_tag<18> > + : size_impl< aux::vector_tag<18> > { }; template<> -struct clear_traits< aux::vector_tag< 18> > +struct clear_impl< aux::vector_tag<18> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -1148,14 +1451,14 @@ struct vector19 typedef void_ item19; typedef T18 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,19> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,19 > end; }; template<> -struct push_front_traits< aux::vector_tag< 18> > +struct push_front_impl< aux::vector_tag<18> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector19< T @@ -1174,9 +1477,9 @@ struct push_front_traits< aux::vector_tag< 18> > }; template<> -struct pop_front_traits< aux::vector_tag< 19> > +struct pop_front_impl< aux::vector_tag<19> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector18< typename Vector::item1, typename Vector::item2 @@ -1192,72 +1495,113 @@ struct pop_front_traits< aux::vector_tag< 19> > }; }; -namespace aux { -template<> struct vector_item_impl<19> +template<> +struct push_back_impl< aux::vector_tag<18> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item19 type; + typedef vector19< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<19> > +{ + template< typename Vector > struct apply + { + typedef vector18< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<19> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item19 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 19> > +struct at_impl< aux::vector_tag<19> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 19> > +struct front_impl< aux::vector_tag<19> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 19> > +struct back_impl< aux::vector_tag<19> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 19> > +struct empty_impl< aux::vector_tag<19> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 19> > +struct size_impl< aux::vector_tag<19> > { - template< typename Vector > struct algorithm - : integral_c< long,19 > + template< typename Vector > struct apply + : long_<19> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 19> > - : size_traits< aux::vector_tag< 19> > +struct O1_size_impl< aux::vector_tag<19> > + : size_impl< aux::vector_tag<19> > { }; template<> -struct clear_traits< aux::vector_tag< 19> > +struct clear_impl< aux::vector_tag<19> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -1297,14 +1641,14 @@ struct vector20 typedef void_ item20; typedef T19 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,20> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,20 > end; }; template<> -struct push_front_traits< aux::vector_tag< 19> > +struct push_front_impl< aux::vector_tag<19> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector20< T @@ -1324,9 +1668,9 @@ struct push_front_traits< aux::vector_tag< 19> > }; template<> -struct pop_front_traits< aux::vector_tag< 20> > +struct pop_front_impl< aux::vector_tag<20> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector19< typename Vector::item1, typename Vector::item2 @@ -1343,77 +1687,118 @@ struct pop_front_traits< aux::vector_tag< 20> > }; }; -namespace aux { -template<> struct vector_item_impl<20> +template<> +struct push_back_impl< aux::vector_tag<19> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item20 type; + typedef vector20< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<20> > +{ + template< typename Vector > struct apply + { + typedef vector19< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<20> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item20 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 20> > +struct at_impl< aux::vector_tag<20> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 20> > +struct front_impl< aux::vector_tag<20> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 20> > +struct back_impl< aux::vector_tag<20> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 20> > +struct empty_impl< aux::vector_tag<20> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 20> > +struct size_impl< aux::vector_tag<20> > { - template< typename Vector > struct algorithm - : integral_c< long,20 > + template< typename Vector > struct apply + : long_<20> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 20> > - : size_traits< aux::vector_tag< 20> > +struct O1_size_impl< aux::vector_tag<20> > + : size_impl< aux::vector_tag<20> > { }; template<> -struct clear_traits< aux::vector_tag< 20> > +struct clear_impl< aux::vector_tag<20> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp b/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp index 20b2b94..797ecae 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector20_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector20_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T @@ -10,11 +17,11 @@ template< > struct vector11_c : vector11< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >, integral_c<T + , C10> + > { }; @@ -25,11 +32,11 @@ template< > struct vector12_c : vector12< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 > + > { }; @@ -40,12 +47,11 @@ template< > struct vector13_c : vector13< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + > { }; @@ -56,12 +62,12 @@ template< > struct vector14_c : vector14< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >, integral_c<T + , C13> + > { }; @@ -72,12 +78,12 @@ template< > struct vector15_c : vector15< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 > + > { }; @@ -88,13 +94,12 @@ template< > struct vector16_c : vector16< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + > { }; @@ -105,13 +110,13 @@ template< > struct vector17_c : vector17< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >, integral_c<T + , C16> + > { }; @@ -122,13 +127,13 @@ template< > struct vector18_c : vector18< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 > + > { }; @@ -139,14 +144,13 @@ template< > struct vector19_c : vector19< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + > { }; @@ -157,17 +161,15 @@ template< > struct vector20_c : vector20< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >, integral_c<T + , C19> + > { }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp b/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp index f8f4777..a685019 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector30.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector30.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 @@ -40,14 +47,14 @@ struct vector21 typedef void_ item21; typedef T20 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,21> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,21 > end; }; template<> -struct push_front_traits< aux::vector_tag< 20> > +struct push_front_impl< aux::vector_tag<20> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector21< T @@ -67,9 +74,9 @@ struct push_front_traits< aux::vector_tag< 20> > }; template<> -struct pop_front_traits< aux::vector_tag< 21> > +struct pop_front_impl< aux::vector_tag<21> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector20< typename Vector::item1, typename Vector::item2 @@ -86,72 +93,115 @@ struct pop_front_traits< aux::vector_tag< 21> > }; }; -namespace aux { -template<> struct vector_item_impl<21> +template<> +struct push_back_impl< aux::vector_tag<20> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item21 type; + typedef vector21< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<21> > +{ + template< typename Vector > struct apply + { + typedef vector20< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<21> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item21 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 21> > +struct at_impl< aux::vector_tag<21> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 21> > +struct front_impl< aux::vector_tag<21> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 21> > +struct back_impl< aux::vector_tag<21> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 21> > +struct empty_impl< aux::vector_tag<21> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 21> > +struct size_impl< aux::vector_tag<21> > { - template< typename Vector > struct algorithm - : integral_c< long,21 > + template< typename Vector > struct apply + : long_<21> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 21> > - : size_traits< aux::vector_tag< 21> > +struct O1_size_impl< aux::vector_tag<21> > + : size_impl< aux::vector_tag<21> > { }; template<> -struct clear_traits< aux::vector_tag< 21> > +struct clear_impl< aux::vector_tag<21> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -194,14 +244,14 @@ struct vector22 typedef void_ item22; typedef T21 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,22> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,22 > end; }; template<> -struct push_front_traits< aux::vector_tag< 21> > +struct push_front_impl< aux::vector_tag<21> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector22< T @@ -222,9 +272,9 @@ struct push_front_traits< aux::vector_tag< 21> > }; template<> -struct pop_front_traits< aux::vector_tag< 22> > +struct pop_front_impl< aux::vector_tag<22> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector21< typename Vector::item1, typename Vector::item2 @@ -242,72 +292,117 @@ struct pop_front_traits< aux::vector_tag< 22> > }; }; -namespace aux { -template<> struct vector_item_impl<22> +template<> +struct push_back_impl< aux::vector_tag<21> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item22 type; + typedef vector22< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<22> > +{ + template< typename Vector > struct apply + { + typedef vector21< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<22> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item22 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 22> > +struct at_impl< aux::vector_tag<22> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 22> > +struct front_impl< aux::vector_tag<22> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 22> > +struct back_impl< aux::vector_tag<22> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 22> > +struct empty_impl< aux::vector_tag<22> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 22> > +struct size_impl< aux::vector_tag<22> > { - template< typename Vector > struct algorithm - : integral_c< long,22 > + template< typename Vector > struct apply + : long_<22> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 22> > - : size_traits< aux::vector_tag< 22> > +struct O1_size_impl< aux::vector_tag<22> > + : size_impl< aux::vector_tag<22> > { }; template<> -struct clear_traits< aux::vector_tag< 22> > +struct clear_impl< aux::vector_tag<22> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -351,14 +446,14 @@ struct vector23 typedef void_ item23; typedef T22 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,23> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,23 > end; }; template<> -struct push_front_traits< aux::vector_tag< 22> > +struct push_front_impl< aux::vector_tag<22> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector23< T @@ -379,9 +474,9 @@ struct push_front_traits< aux::vector_tag< 22> > }; template<> -struct pop_front_traits< aux::vector_tag< 23> > +struct pop_front_impl< aux::vector_tag<23> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector22< typename Vector::item1, typename Vector::item2 @@ -399,72 +494,117 @@ struct pop_front_traits< aux::vector_tag< 23> > }; }; -namespace aux { -template<> struct vector_item_impl<23> +template<> +struct push_back_impl< aux::vector_tag<22> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item23 type; + typedef vector23< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<23> > +{ + template< typename Vector > struct apply + { + typedef vector22< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<23> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item23 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 23> > +struct at_impl< aux::vector_tag<23> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 23> > +struct front_impl< aux::vector_tag<23> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 23> > +struct back_impl< aux::vector_tag<23> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 23> > +struct empty_impl< aux::vector_tag<23> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 23> > +struct size_impl< aux::vector_tag<23> > { - template< typename Vector > struct algorithm - : integral_c< long,23 > + template< typename Vector > struct apply + : long_<23> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 23> > - : size_traits< aux::vector_tag< 23> > +struct O1_size_impl< aux::vector_tag<23> > + : size_impl< aux::vector_tag<23> > { }; template<> -struct clear_traits< aux::vector_tag< 23> > +struct clear_impl< aux::vector_tag<23> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -509,14 +649,14 @@ struct vector24 typedef void_ item24; typedef T23 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,24> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,24 > end; }; template<> -struct push_front_traits< aux::vector_tag< 23> > +struct push_front_impl< aux::vector_tag<23> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector24< T @@ -538,9 +678,9 @@ struct push_front_traits< aux::vector_tag< 23> > }; template<> -struct pop_front_traits< aux::vector_tag< 24> > +struct pop_front_impl< aux::vector_tag<24> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector23< typename Vector::item1, typename Vector::item2 @@ -559,72 +699,119 @@ struct pop_front_traits< aux::vector_tag< 24> > }; }; -namespace aux { -template<> struct vector_item_impl<24> +template<> +struct push_back_impl< aux::vector_tag<23> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item24 type; + typedef vector24< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<24> > +{ + template< typename Vector > struct apply + { + typedef vector23< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<24> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item24 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 24> > +struct at_impl< aux::vector_tag<24> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 24> > +struct front_impl< aux::vector_tag<24> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 24> > +struct back_impl< aux::vector_tag<24> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 24> > +struct empty_impl< aux::vector_tag<24> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 24> > +struct size_impl< aux::vector_tag<24> > { - template< typename Vector > struct algorithm - : integral_c< long,24 > + template< typename Vector > struct apply + : long_<24> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 24> > - : size_traits< aux::vector_tag< 24> > +struct O1_size_impl< aux::vector_tag<24> > + : size_impl< aux::vector_tag<24> > { }; template<> -struct clear_traits< aux::vector_tag< 24> > +struct clear_impl< aux::vector_tag<24> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -670,14 +857,14 @@ struct vector25 typedef void_ item25; typedef T24 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,25> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,25 > end; }; template<> -struct push_front_traits< aux::vector_tag< 24> > +struct push_front_impl< aux::vector_tag<24> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector25< T @@ -699,9 +886,9 @@ struct push_front_traits< aux::vector_tag< 24> > }; template<> -struct pop_front_traits< aux::vector_tag< 25> > +struct pop_front_impl< aux::vector_tag<25> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector24< typename Vector::item1, typename Vector::item2 @@ -720,72 +907,119 @@ struct pop_front_traits< aux::vector_tag< 25> > }; }; -namespace aux { -template<> struct vector_item_impl<25> +template<> +struct push_back_impl< aux::vector_tag<24> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item25 type; + typedef vector25< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<25> > +{ + template< typename Vector > struct apply + { + typedef vector24< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<25> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item25 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 25> > +struct at_impl< aux::vector_tag<25> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 25> > +struct front_impl< aux::vector_tag<25> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 25> > +struct back_impl< aux::vector_tag<25> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 25> > +struct empty_impl< aux::vector_tag<25> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 25> > +struct size_impl< aux::vector_tag<25> > { - template< typename Vector > struct algorithm - : integral_c< long,25 > + template< typename Vector > struct apply + : long_<25> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 25> > - : size_traits< aux::vector_tag< 25> > +struct O1_size_impl< aux::vector_tag<25> > + : size_impl< aux::vector_tag<25> > { }; template<> -struct clear_traits< aux::vector_tag< 25> > +struct clear_impl< aux::vector_tag<25> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -833,14 +1067,14 @@ struct vector26 typedef void_ item26; typedef T25 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,26> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,26 > end; }; template<> -struct push_front_traits< aux::vector_tag< 25> > +struct push_front_impl< aux::vector_tag<25> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector26< T @@ -863,9 +1097,9 @@ struct push_front_traits< aux::vector_tag< 25> > }; template<> -struct pop_front_traits< aux::vector_tag< 26> > +struct pop_front_impl< aux::vector_tag<26> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector25< typename Vector::item1, typename Vector::item2 @@ -885,72 +1119,121 @@ struct pop_front_traits< aux::vector_tag< 26> > }; }; -namespace aux { -template<> struct vector_item_impl<26> +template<> +struct push_back_impl< aux::vector_tag<25> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item26 type; + typedef vector26< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<26> > +{ + template< typename Vector > struct apply + { + typedef vector25< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<26> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item26 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 26> > +struct at_impl< aux::vector_tag<26> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 26> > +struct front_impl< aux::vector_tag<26> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 26> > +struct back_impl< aux::vector_tag<26> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 26> > +struct empty_impl< aux::vector_tag<26> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 26> > +struct size_impl< aux::vector_tag<26> > { - template< typename Vector > struct algorithm - : integral_c< long,26 > + template< typename Vector > struct apply + : long_<26> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 26> > - : size_traits< aux::vector_tag< 26> > +struct O1_size_impl< aux::vector_tag<26> > + : size_impl< aux::vector_tag<26> > { }; template<> -struct clear_traits< aux::vector_tag< 26> > +struct clear_impl< aux::vector_tag<26> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -999,14 +1282,14 @@ struct vector27 typedef void_ item27; typedef T26 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,27> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,27 > end; }; template<> -struct push_front_traits< aux::vector_tag< 26> > +struct push_front_impl< aux::vector_tag<26> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector27< T @@ -1029,9 +1312,9 @@ struct push_front_traits< aux::vector_tag< 26> > }; template<> -struct pop_front_traits< aux::vector_tag< 27> > +struct pop_front_impl< aux::vector_tag<27> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector26< typename Vector::item1, typename Vector::item2 @@ -1051,72 +1334,121 @@ struct pop_front_traits< aux::vector_tag< 27> > }; }; -namespace aux { -template<> struct vector_item_impl<27> +template<> +struct push_back_impl< aux::vector_tag<26> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item27 type; + typedef vector27< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<27> > +{ + template< typename Vector > struct apply + { + typedef vector26< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<27> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item27 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 27> > +struct at_impl< aux::vector_tag<27> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 27> > +struct front_impl< aux::vector_tag<27> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 27> > +struct back_impl< aux::vector_tag<27> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 27> > +struct empty_impl< aux::vector_tag<27> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 27> > +struct size_impl< aux::vector_tag<27> > { - template< typename Vector > struct algorithm - : integral_c< long,27 > + template< typename Vector > struct apply + : long_<27> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 27> > - : size_traits< aux::vector_tag< 27> > +struct O1_size_impl< aux::vector_tag<27> > + : size_impl< aux::vector_tag<27> > { }; template<> -struct clear_traits< aux::vector_tag< 27> > +struct clear_impl< aux::vector_tag<27> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -1166,14 +1498,14 @@ struct vector28 typedef void_ item28; typedef T27 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,28> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,28 > end; }; template<> -struct push_front_traits< aux::vector_tag< 27> > +struct push_front_impl< aux::vector_tag<27> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector28< T @@ -1197,9 +1529,9 @@ struct push_front_traits< aux::vector_tag< 27> > }; template<> -struct pop_front_traits< aux::vector_tag< 28> > +struct pop_front_impl< aux::vector_tag<28> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector27< typename Vector::item1, typename Vector::item2 @@ -1220,72 +1552,123 @@ struct pop_front_traits< aux::vector_tag< 28> > }; }; -namespace aux { -template<> struct vector_item_impl<28> +template<> +struct push_back_impl< aux::vector_tag<27> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item28 type; + typedef vector28< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<28> > +{ + template< typename Vector > struct apply + { + typedef vector27< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<28> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item28 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 28> > +struct at_impl< aux::vector_tag<28> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 28> > +struct front_impl< aux::vector_tag<28> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 28> > +struct back_impl< aux::vector_tag<28> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 28> > +struct empty_impl< aux::vector_tag<28> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 28> > +struct size_impl< aux::vector_tag<28> > { - template< typename Vector > struct algorithm - : integral_c< long,28 > + template< typename Vector > struct apply + : long_<28> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 28> > - : size_traits< aux::vector_tag< 28> > +struct O1_size_impl< aux::vector_tag<28> > + : size_impl< aux::vector_tag<28> > { }; template<> -struct clear_traits< aux::vector_tag< 28> > +struct clear_impl< aux::vector_tag<28> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -1336,14 +1719,14 @@ struct vector29 typedef void_ item29; typedef T28 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,29> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,29 > end; }; template<> -struct push_front_traits< aux::vector_tag< 28> > +struct push_front_impl< aux::vector_tag<28> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector29< T @@ -1367,9 +1750,9 @@ struct push_front_traits< aux::vector_tag< 28> > }; template<> -struct pop_front_traits< aux::vector_tag< 29> > +struct pop_front_impl< aux::vector_tag<29> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector28< typename Vector::item1, typename Vector::item2 @@ -1390,72 +1773,123 @@ struct pop_front_traits< aux::vector_tag< 29> > }; }; -namespace aux { -template<> struct vector_item_impl<29> +template<> +struct push_back_impl< aux::vector_tag<28> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item29 type; + typedef vector29< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<29> > +{ + template< typename Vector > struct apply + { + typedef vector28< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<29> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item29 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 29> > +struct at_impl< aux::vector_tag<29> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 29> > +struct front_impl< aux::vector_tag<29> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 29> > +struct back_impl< aux::vector_tag<29> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 29> > +struct empty_impl< aux::vector_tag<29> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 29> > +struct size_impl< aux::vector_tag<29> > { - template< typename Vector > struct algorithm - : integral_c< long,29 > + template< typename Vector > struct apply + : long_<29> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 29> > - : size_traits< aux::vector_tag< 29> > +struct O1_size_impl< aux::vector_tag<29> > + : size_impl< aux::vector_tag<29> > { }; template<> -struct clear_traits< aux::vector_tag< 29> > +struct clear_impl< aux::vector_tag<29> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -1507,14 +1941,14 @@ struct vector30 typedef void_ item30; typedef T29 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,30> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,30 > end; }; template<> -struct push_front_traits< aux::vector_tag< 29> > +struct push_front_impl< aux::vector_tag<29> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector30< T @@ -1539,9 +1973,9 @@ struct push_front_traits< aux::vector_tag< 29> > }; template<> -struct pop_front_traits< aux::vector_tag< 30> > +struct pop_front_impl< aux::vector_tag<30> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector29< typename Vector::item1, typename Vector::item2 @@ -1563,77 +1997,128 @@ struct pop_front_traits< aux::vector_tag< 30> > }; }; -namespace aux { -template<> struct vector_item_impl<30> +template<> +struct push_back_impl< aux::vector_tag<29> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item30 type; + typedef vector30< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<30> > +{ + template< typename Vector > struct apply + { + typedef vector29< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<30> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item30 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 30> > +struct at_impl< aux::vector_tag<30> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 30> > +struct front_impl< aux::vector_tag<30> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 30> > +struct back_impl< aux::vector_tag<30> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 30> > +struct empty_impl< aux::vector_tag<30> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 30> > +struct size_impl< aux::vector_tag<30> > { - template< typename Vector > struct algorithm - : integral_c< long,30 > + template< typename Vector > struct apply + : long_<30> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 30> > - : size_traits< aux::vector_tag< 30> > +struct O1_size_impl< aux::vector_tag<30> > + : size_impl< aux::vector_tag<30> > { }; template<> -struct clear_traits< aux::vector_tag< 30> > +struct clear_impl< aux::vector_tag<30> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp b/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp index 77ed91c..a4b2e24 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector30_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector30_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T @@ -11,14 +18,14 @@ template< > struct vector21_c : vector21< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 > + > { }; @@ -30,15 +37,14 @@ template< > struct vector22_c : vector22< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + > { }; @@ -50,15 +56,15 @@ template< > struct vector23_c : vector23< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >, integral_c<T + , C22> + > { }; @@ -70,15 +76,15 @@ template< > struct vector24_c : vector24< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 > + > { }; @@ -90,16 +96,15 @@ template< > struct vector25_c : vector25< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + > { }; @@ -111,16 +116,16 @@ template< > struct vector26_c : vector26< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >, integral_c<T + , C25> + > { }; @@ -132,16 +137,16 @@ template< > struct vector27_c : vector27< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 > + > { }; @@ -153,17 +158,16 @@ template< > struct vector28_c : vector28< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + > { }; @@ -175,17 +179,17 @@ template< > struct vector29_c : vector29< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >, integral_c<T + , C28> + > { }; @@ -197,20 +201,18 @@ template< > struct vector30_c : vector30< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 > + > { }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp b/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp index bbf9ef6..1ed648a 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector40.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector40.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 @@ -52,14 +59,14 @@ struct vector31 typedef void_ item31; typedef T30 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,31> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,31 > end; }; template<> -struct push_front_traits< aux::vector_tag< 30> > +struct push_front_impl< aux::vector_tag<30> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector31< T @@ -84,9 +91,9 @@ struct push_front_traits< aux::vector_tag< 30> > }; template<> -struct pop_front_traits< aux::vector_tag< 31> > +struct pop_front_impl< aux::vector_tag<31> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector30< typename Vector::item1, typename Vector::item2 @@ -108,72 +115,125 @@ struct pop_front_traits< aux::vector_tag< 31> > }; }; -namespace aux { -template<> struct vector_item_impl<31> +template<> +struct push_back_impl< aux::vector_tag<30> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item31 type; + typedef vector31< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<31> > +{ + template< typename Vector > struct apply + { + typedef vector30< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<31> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item31 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 31> > +struct at_impl< aux::vector_tag<31> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 31> > +struct front_impl< aux::vector_tag<31> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 31> > +struct back_impl< aux::vector_tag<31> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 31> > +struct empty_impl< aux::vector_tag<31> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 31> > +struct size_impl< aux::vector_tag<31> > { - template< typename Vector > struct algorithm - : integral_c< long,31 > + template< typename Vector > struct apply + : long_<31> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 31> > - : size_traits< aux::vector_tag< 31> > +struct O1_size_impl< aux::vector_tag<31> > + : size_impl< aux::vector_tag<31> > { }; template<> -struct clear_traits< aux::vector_tag< 31> > +struct clear_impl< aux::vector_tag<31> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -228,14 +288,14 @@ struct vector32 typedef void_ item32; typedef T31 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,32> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,32 > end; }; template<> -struct push_front_traits< aux::vector_tag< 31> > +struct push_front_impl< aux::vector_tag<31> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector32< T @@ -261,9 +321,9 @@ struct push_front_traits< aux::vector_tag< 31> > }; template<> -struct pop_front_traits< aux::vector_tag< 32> > +struct pop_front_impl< aux::vector_tag<32> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector31< typename Vector::item1, typename Vector::item2 @@ -286,72 +346,127 @@ struct pop_front_traits< aux::vector_tag< 32> > }; }; -namespace aux { -template<> struct vector_item_impl<32> +template<> +struct push_back_impl< aux::vector_tag<31> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item32 type; + typedef vector32< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<32> > +{ + template< typename Vector > struct apply + { + typedef vector31< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<32> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item32 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 32> > +struct at_impl< aux::vector_tag<32> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 32> > +struct front_impl< aux::vector_tag<32> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 32> > +struct back_impl< aux::vector_tag<32> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 32> > +struct empty_impl< aux::vector_tag<32> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 32> > +struct size_impl< aux::vector_tag<32> > { - template< typename Vector > struct algorithm - : integral_c< long,32 > + template< typename Vector > struct apply + : long_<32> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 32> > - : size_traits< aux::vector_tag< 32> > +struct O1_size_impl< aux::vector_tag<32> > + : size_impl< aux::vector_tag<32> > { }; template<> -struct clear_traits< aux::vector_tag< 32> > +struct clear_impl< aux::vector_tag<32> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -407,14 +522,14 @@ struct vector33 typedef void_ item33; typedef T32 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,33> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,33 > end; }; template<> -struct push_front_traits< aux::vector_tag< 32> > +struct push_front_impl< aux::vector_tag<32> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector33< T @@ -440,9 +555,9 @@ struct push_front_traits< aux::vector_tag< 32> > }; template<> -struct pop_front_traits< aux::vector_tag< 33> > +struct pop_front_impl< aux::vector_tag<33> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector32< typename Vector::item1, typename Vector::item2 @@ -465,72 +580,127 @@ struct pop_front_traits< aux::vector_tag< 33> > }; }; -namespace aux { -template<> struct vector_item_impl<33> +template<> +struct push_back_impl< aux::vector_tag<32> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item33 type; + typedef vector33< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<33> > +{ + template< typename Vector > struct apply + { + typedef vector32< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<33> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item33 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 33> > +struct at_impl< aux::vector_tag<33> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 33> > +struct front_impl< aux::vector_tag<33> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 33> > +struct back_impl< aux::vector_tag<33> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 33> > +struct empty_impl< aux::vector_tag<33> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 33> > +struct size_impl< aux::vector_tag<33> > { - template< typename Vector > struct algorithm - : integral_c< long,33 > + template< typename Vector > struct apply + : long_<33> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 33> > - : size_traits< aux::vector_tag< 33> > +struct O1_size_impl< aux::vector_tag<33> > + : size_impl< aux::vector_tag<33> > { }; template<> -struct clear_traits< aux::vector_tag< 33> > +struct clear_impl< aux::vector_tag<33> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -587,14 +757,14 @@ struct vector34 typedef void_ item34; typedef T33 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,34> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,34 > end; }; template<> -struct push_front_traits< aux::vector_tag< 33> > +struct push_front_impl< aux::vector_tag<33> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector34< T @@ -621,9 +791,9 @@ struct push_front_traits< aux::vector_tag< 33> > }; template<> -struct pop_front_traits< aux::vector_tag< 34> > +struct pop_front_impl< aux::vector_tag<34> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector33< typename Vector::item1, typename Vector::item2 @@ -647,72 +817,129 @@ struct pop_front_traits< aux::vector_tag< 34> > }; }; -namespace aux { -template<> struct vector_item_impl<34> +template<> +struct push_back_impl< aux::vector_tag<33> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item34 type; + typedef vector34< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<34> > +{ + template< typename Vector > struct apply + { + typedef vector33< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<34> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item34 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 34> > +struct at_impl< aux::vector_tag<34> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 34> > +struct front_impl< aux::vector_tag<34> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 34> > +struct back_impl< aux::vector_tag<34> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 34> > +struct empty_impl< aux::vector_tag<34> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 34> > +struct size_impl< aux::vector_tag<34> > { - template< typename Vector > struct algorithm - : integral_c< long,34 > + template< typename Vector > struct apply + : long_<34> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 34> > - : size_traits< aux::vector_tag< 34> > +struct O1_size_impl< aux::vector_tag<34> > + : size_impl< aux::vector_tag<34> > { }; template<> -struct clear_traits< aux::vector_tag< 34> > +struct clear_impl< aux::vector_tag<34> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -770,14 +997,14 @@ struct vector35 typedef void_ item35; typedef T34 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,35> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,35 > end; }; template<> -struct push_front_traits< aux::vector_tag< 34> > +struct push_front_impl< aux::vector_tag<34> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector35< T @@ -804,9 +1031,9 @@ struct push_front_traits< aux::vector_tag< 34> > }; template<> -struct pop_front_traits< aux::vector_tag< 35> > +struct pop_front_impl< aux::vector_tag<35> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector34< typename Vector::item1, typename Vector::item2 @@ -830,72 +1057,129 @@ struct pop_front_traits< aux::vector_tag< 35> > }; }; -namespace aux { -template<> struct vector_item_impl<35> +template<> +struct push_back_impl< aux::vector_tag<34> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item35 type; + typedef vector35< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<35> > +{ + template< typename Vector > struct apply + { + typedef vector34< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<35> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item35 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 35> > +struct at_impl< aux::vector_tag<35> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 35> > +struct front_impl< aux::vector_tag<35> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 35> > +struct back_impl< aux::vector_tag<35> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 35> > +struct empty_impl< aux::vector_tag<35> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 35> > +struct size_impl< aux::vector_tag<35> > { - template< typename Vector > struct algorithm - : integral_c< long,35 > + template< typename Vector > struct apply + : long_<35> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 35> > - : size_traits< aux::vector_tag< 35> > +struct O1_size_impl< aux::vector_tag<35> > + : size_impl< aux::vector_tag<35> > { }; template<> -struct clear_traits< aux::vector_tag< 35> > +struct clear_impl< aux::vector_tag<35> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -955,14 +1239,14 @@ struct vector36 typedef void_ item36; typedef T35 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,36> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,36 > end; }; template<> -struct push_front_traits< aux::vector_tag< 35> > +struct push_front_impl< aux::vector_tag<35> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector36< T @@ -990,9 +1274,9 @@ struct push_front_traits< aux::vector_tag< 35> > }; template<> -struct pop_front_traits< aux::vector_tag< 36> > +struct pop_front_impl< aux::vector_tag<36> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector35< typename Vector::item1, typename Vector::item2 @@ -1017,72 +1301,131 @@ struct pop_front_traits< aux::vector_tag< 36> > }; }; -namespace aux { -template<> struct vector_item_impl<36> +template<> +struct push_back_impl< aux::vector_tag<35> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item36 type; + typedef vector36< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<36> > +{ + template< typename Vector > struct apply + { + typedef vector35< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<36> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item36 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 36> > +struct at_impl< aux::vector_tag<36> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 36> > +struct front_impl< aux::vector_tag<36> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 36> > +struct back_impl< aux::vector_tag<36> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 36> > +struct empty_impl< aux::vector_tag<36> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 36> > +struct size_impl< aux::vector_tag<36> > { - template< typename Vector > struct algorithm - : integral_c< long,36 > + template< typename Vector > struct apply + : long_<36> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 36> > - : size_traits< aux::vector_tag< 36> > +struct O1_size_impl< aux::vector_tag<36> > + : size_impl< aux::vector_tag<36> > { }; template<> -struct clear_traits< aux::vector_tag< 36> > +struct clear_impl< aux::vector_tag<36> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -1143,14 +1486,14 @@ struct vector37 typedef void_ item37; typedef T36 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,37> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,37 > end; }; template<> -struct push_front_traits< aux::vector_tag< 36> > +struct push_front_impl< aux::vector_tag<36> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector37< T @@ -1178,9 +1521,9 @@ struct push_front_traits< aux::vector_tag< 36> > }; template<> -struct pop_front_traits< aux::vector_tag< 37> > +struct pop_front_impl< aux::vector_tag<37> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector36< typename Vector::item1, typename Vector::item2 @@ -1205,72 +1548,131 @@ struct pop_front_traits< aux::vector_tag< 37> > }; }; -namespace aux { -template<> struct vector_item_impl<37> +template<> +struct push_back_impl< aux::vector_tag<36> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item37 type; + typedef vector37< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<37> > +{ + template< typename Vector > struct apply + { + typedef vector36< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<37> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item37 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 37> > +struct at_impl< aux::vector_tag<37> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 37> > +struct front_impl< aux::vector_tag<37> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 37> > +struct back_impl< aux::vector_tag<37> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 37> > +struct empty_impl< aux::vector_tag<37> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 37> > +struct size_impl< aux::vector_tag<37> > { - template< typename Vector > struct algorithm - : integral_c< long,37 > + template< typename Vector > struct apply + : long_<37> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 37> > - : size_traits< aux::vector_tag< 37> > +struct O1_size_impl< aux::vector_tag<37> > + : size_impl< aux::vector_tag<37> > { }; template<> -struct clear_traits< aux::vector_tag< 37> > +struct clear_impl< aux::vector_tag<37> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -1332,14 +1734,14 @@ struct vector38 typedef void_ item38; typedef T37 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,38> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,38 > end; }; template<> -struct push_front_traits< aux::vector_tag< 37> > +struct push_front_impl< aux::vector_tag<37> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector38< T @@ -1368,9 +1770,9 @@ struct push_front_traits< aux::vector_tag< 37> > }; template<> -struct pop_front_traits< aux::vector_tag< 38> > +struct pop_front_impl< aux::vector_tag<38> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector37< typename Vector::item1, typename Vector::item2 @@ -1396,72 +1798,133 @@ struct pop_front_traits< aux::vector_tag< 38> > }; }; -namespace aux { -template<> struct vector_item_impl<38> +template<> +struct push_back_impl< aux::vector_tag<37> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item38 type; + typedef vector38< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<38> > +{ + template< typename Vector > struct apply + { + typedef vector37< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<38> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item38 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 38> > +struct at_impl< aux::vector_tag<38> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 38> > +struct front_impl< aux::vector_tag<38> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 38> > +struct back_impl< aux::vector_tag<38> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 38> > +struct empty_impl< aux::vector_tag<38> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 38> > +struct size_impl< aux::vector_tag<38> > { - template< typename Vector > struct algorithm - : integral_c< long,38 > + template< typename Vector > struct apply + : long_<38> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 38> > - : size_traits< aux::vector_tag< 38> > +struct O1_size_impl< aux::vector_tag<38> > + : size_impl< aux::vector_tag<38> > { }; template<> -struct clear_traits< aux::vector_tag< 38> > +struct clear_impl< aux::vector_tag<38> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -1524,14 +1987,14 @@ struct vector39 typedef void_ item39; typedef T38 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,39> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,39 > end; }; template<> -struct push_front_traits< aux::vector_tag< 38> > +struct push_front_impl< aux::vector_tag<38> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector39< T @@ -1560,9 +2023,9 @@ struct push_front_traits< aux::vector_tag< 38> > }; template<> -struct pop_front_traits< aux::vector_tag< 39> > +struct pop_front_impl< aux::vector_tag<39> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector38< typename Vector::item1, typename Vector::item2 @@ -1588,72 +2051,133 @@ struct pop_front_traits< aux::vector_tag< 39> > }; }; -namespace aux { -template<> struct vector_item_impl<39> +template<> +struct push_back_impl< aux::vector_tag<38> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item39 type; + typedef vector39< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<39> > +{ + template< typename Vector > struct apply + { + typedef vector38< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<39> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item39 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 39> > +struct at_impl< aux::vector_tag<39> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 39> > +struct front_impl< aux::vector_tag<39> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 39> > +struct back_impl< aux::vector_tag<39> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 39> > +struct empty_impl< aux::vector_tag<39> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 39> > +struct size_impl< aux::vector_tag<39> > { - template< typename Vector > struct algorithm - : integral_c< long,39 > + template< typename Vector > struct apply + : long_<39> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 39> > - : size_traits< aux::vector_tag< 39> > +struct O1_size_impl< aux::vector_tag<39> > + : size_impl< aux::vector_tag<39> > { }; template<> -struct clear_traits< aux::vector_tag< 39> > +struct clear_impl< aux::vector_tag<39> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -1717,14 +2241,14 @@ struct vector40 typedef void_ item40; typedef T39 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,40> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,40 > end; }; template<> -struct push_front_traits< aux::vector_tag< 39> > +struct push_front_impl< aux::vector_tag<39> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector40< T @@ -1754,9 +2278,9 @@ struct push_front_traits< aux::vector_tag< 39> > }; template<> -struct pop_front_traits< aux::vector_tag< 40> > +struct pop_front_impl< aux::vector_tag<40> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector39< typename Vector::item1, typename Vector::item2 @@ -1783,77 +2307,138 @@ struct pop_front_traits< aux::vector_tag< 40> > }; }; -namespace aux { -template<> struct vector_item_impl<40> +template<> +struct push_back_impl< aux::vector_tag<39> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item40 type; + typedef vector40< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<40> > +{ + template< typename Vector > struct apply + { + typedef vector39< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<40> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item40 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 40> > +struct at_impl< aux::vector_tag<40> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 40> > +struct front_impl< aux::vector_tag<40> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 40> > +struct back_impl< aux::vector_tag<40> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 40> > +struct empty_impl< aux::vector_tag<40> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 40> > +struct size_impl< aux::vector_tag<40> > { - template< typename Vector > struct algorithm - : integral_c< long,40 > + template< typename Vector > struct apply + : long_<40> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 40> > - : size_traits< aux::vector_tag< 40> > +struct O1_size_impl< aux::vector_tag<40> > + : size_impl< aux::vector_tag<40> > { }; template<> -struct clear_traits< aux::vector_tag< 40> > +struct clear_impl< aux::vector_tag<40> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp b/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp index 15e1960..7f77259 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector40_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector40_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T @@ -12,18 +19,17 @@ template< > struct vector31_c : vector31< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + > { }; @@ -36,18 +42,18 @@ template< > struct vector32_c : vector32< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >, integral_c<T + , C31> + > { }; @@ -60,18 +66,18 @@ template< > struct vector33_c : vector33< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 > + > { }; @@ -84,19 +90,18 @@ template< > struct vector34_c : vector34< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + > { }; @@ -109,19 +114,19 @@ template< > struct vector35_c : vector35< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >, integral_c<T + , C34> + > { }; @@ -134,19 +139,19 @@ template< > struct vector36_c : vector36< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 > + > { }; @@ -159,20 +164,19 @@ template< > struct vector37_c : vector37< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + > { }; @@ -185,20 +189,20 @@ template< > struct vector38_c : vector38< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >, integral_c<T + , C37> + > { }; @@ -211,20 +215,20 @@ template< > struct vector39_c : vector39< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 > + > { }; @@ -237,24 +241,21 @@ template< > struct vector40_c : vector40< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + > { }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp b/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp index a6a8170..3da323a 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector50.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector50.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 @@ -64,14 +71,14 @@ struct vector41 typedef void_ item41; typedef T40 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,41> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,41 > end; }; template<> -struct push_front_traits< aux::vector_tag< 40> > +struct push_front_impl< aux::vector_tag<40> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector41< T @@ -101,9 +108,9 @@ struct push_front_traits< aux::vector_tag< 40> > }; template<> -struct pop_front_traits< aux::vector_tag< 41> > +struct pop_front_impl< aux::vector_tag<41> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector40< typename Vector::item1, typename Vector::item2 @@ -130,72 +137,135 @@ struct pop_front_traits< aux::vector_tag< 41> > }; }; -namespace aux { -template<> struct vector_item_impl<41> +template<> +struct push_back_impl< aux::vector_tag<40> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item41 type; + typedef vector41< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<41> > +{ + template< typename Vector > struct apply + { + typedef vector40< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<41> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item41 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 41> > +struct at_impl< aux::vector_tag<41> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 41> > +struct front_impl< aux::vector_tag<41> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 41> > +struct back_impl< aux::vector_tag<41> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 41> > +struct empty_impl< aux::vector_tag<41> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 41> > +struct size_impl< aux::vector_tag<41> > { - template< typename Vector > struct algorithm - : integral_c< long,41 > + template< typename Vector > struct apply + : long_<41> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 41> > - : size_traits< aux::vector_tag< 41> > +struct O1_size_impl< aux::vector_tag<41> > + : size_impl< aux::vector_tag<41> > { }; template<> -struct clear_traits< aux::vector_tag< 41> > +struct clear_impl< aux::vector_tag<41> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -262,14 +332,14 @@ struct vector42 typedef void_ item42; typedef T41 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,42> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,42 > end; }; template<> -struct push_front_traits< aux::vector_tag< 41> > +struct push_front_impl< aux::vector_tag<41> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector42< T @@ -300,9 +370,9 @@ struct push_front_traits< aux::vector_tag< 41> > }; template<> -struct pop_front_traits< aux::vector_tag< 42> > +struct pop_front_impl< aux::vector_tag<42> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector41< typename Vector::item1, typename Vector::item2 @@ -330,72 +400,137 @@ struct pop_front_traits< aux::vector_tag< 42> > }; }; -namespace aux { -template<> struct vector_item_impl<42> +template<> +struct push_back_impl< aux::vector_tag<41> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item42 type; + typedef vector42< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<42> > +{ + template< typename Vector > struct apply + { + typedef vector41< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<42> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item42 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 42> > +struct at_impl< aux::vector_tag<42> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 42> > +struct front_impl< aux::vector_tag<42> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 42> > +struct back_impl< aux::vector_tag<42> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 42> > +struct empty_impl< aux::vector_tag<42> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 42> > +struct size_impl< aux::vector_tag<42> > { - template< typename Vector > struct algorithm - : integral_c< long,42 > + template< typename Vector > struct apply + : long_<42> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 42> > - : size_traits< aux::vector_tag< 42> > +struct O1_size_impl< aux::vector_tag<42> > + : size_impl< aux::vector_tag<42> > { }; template<> -struct clear_traits< aux::vector_tag< 42> > +struct clear_impl< aux::vector_tag<42> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -463,14 +598,14 @@ struct vector43 typedef void_ item43; typedef T42 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,43> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,43 > end; }; template<> -struct push_front_traits< aux::vector_tag< 42> > +struct push_front_impl< aux::vector_tag<42> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector43< T @@ -501,9 +636,9 @@ struct push_front_traits< aux::vector_tag< 42> > }; template<> -struct pop_front_traits< aux::vector_tag< 43> > +struct pop_front_impl< aux::vector_tag<43> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector42< typename Vector::item1, typename Vector::item2 @@ -531,72 +666,137 @@ struct pop_front_traits< aux::vector_tag< 43> > }; }; -namespace aux { -template<> struct vector_item_impl<43> +template<> +struct push_back_impl< aux::vector_tag<42> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item43 type; + typedef vector43< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<43> > +{ + template< typename Vector > struct apply + { + typedef vector42< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<43> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item43 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 43> > +struct at_impl< aux::vector_tag<43> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 43> > +struct front_impl< aux::vector_tag<43> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 43> > +struct back_impl< aux::vector_tag<43> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 43> > +struct empty_impl< aux::vector_tag<43> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 43> > +struct size_impl< aux::vector_tag<43> > { - template< typename Vector > struct algorithm - : integral_c< long,43 > + template< typename Vector > struct apply + : long_<43> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 43> > - : size_traits< aux::vector_tag< 43> > +struct O1_size_impl< aux::vector_tag<43> > + : size_impl< aux::vector_tag<43> > { }; template<> -struct clear_traits< aux::vector_tag< 43> > +struct clear_impl< aux::vector_tag<43> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -665,14 +865,14 @@ struct vector44 typedef void_ item44; typedef T43 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,44> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,44 > end; }; template<> -struct push_front_traits< aux::vector_tag< 43> > +struct push_front_impl< aux::vector_tag<43> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector44< T @@ -704,9 +904,9 @@ struct push_front_traits< aux::vector_tag< 43> > }; template<> -struct pop_front_traits< aux::vector_tag< 44> > +struct pop_front_impl< aux::vector_tag<44> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector43< typename Vector::item1, typename Vector::item2 @@ -735,72 +935,139 @@ struct pop_front_traits< aux::vector_tag< 44> > }; }; -namespace aux { -template<> struct vector_item_impl<44> +template<> +struct push_back_impl< aux::vector_tag<43> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item44 type; + typedef vector44< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<44> > +{ + template< typename Vector > struct apply + { + typedef vector43< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<44> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item44 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 44> > +struct at_impl< aux::vector_tag<44> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 44> > +struct front_impl< aux::vector_tag<44> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 44> > +struct back_impl< aux::vector_tag<44> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 44> > +struct empty_impl< aux::vector_tag<44> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 44> > +struct size_impl< aux::vector_tag<44> > { - template< typename Vector > struct algorithm - : integral_c< long,44 > + template< typename Vector > struct apply + : long_<44> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 44> > - : size_traits< aux::vector_tag< 44> > +struct O1_size_impl< aux::vector_tag<44> > + : size_impl< aux::vector_tag<44> > { }; template<> -struct clear_traits< aux::vector_tag< 44> > +struct clear_impl< aux::vector_tag<44> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -870,14 +1137,14 @@ struct vector45 typedef void_ item45; typedef T44 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,45> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,45 > end; }; template<> -struct push_front_traits< aux::vector_tag< 44> > +struct push_front_impl< aux::vector_tag<44> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector45< T @@ -909,9 +1176,9 @@ struct push_front_traits< aux::vector_tag< 44> > }; template<> -struct pop_front_traits< aux::vector_tag< 45> > +struct pop_front_impl< aux::vector_tag<45> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector44< typename Vector::item1, typename Vector::item2 @@ -940,72 +1207,139 @@ struct pop_front_traits< aux::vector_tag< 45> > }; }; -namespace aux { -template<> struct vector_item_impl<45> +template<> +struct push_back_impl< aux::vector_tag<44> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item45 type; + typedef vector45< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<45> > +{ + template< typename Vector > struct apply + { + typedef vector44< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<45> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item45 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 45> > +struct at_impl< aux::vector_tag<45> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 45> > +struct front_impl< aux::vector_tag<45> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 45> > +struct back_impl< aux::vector_tag<45> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 45> > +struct empty_impl< aux::vector_tag<45> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 45> > +struct size_impl< aux::vector_tag<45> > { - template< typename Vector > struct algorithm - : integral_c< long,45 > + template< typename Vector > struct apply + : long_<45> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 45> > - : size_traits< aux::vector_tag< 45> > +struct O1_size_impl< aux::vector_tag<45> > + : size_impl< aux::vector_tag<45> > { }; template<> -struct clear_traits< aux::vector_tag< 45> > +struct clear_impl< aux::vector_tag<45> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -1077,14 +1411,14 @@ struct vector46 typedef void_ item46; typedef T45 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,46> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,46 > end; }; template<> -struct push_front_traits< aux::vector_tag< 45> > +struct push_front_impl< aux::vector_tag<45> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector46< T @@ -1117,9 +1451,9 @@ struct push_front_traits< aux::vector_tag< 45> > }; template<> -struct pop_front_traits< aux::vector_tag< 46> > +struct pop_front_impl< aux::vector_tag<46> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector45< typename Vector::item1, typename Vector::item2 @@ -1149,72 +1483,141 @@ struct pop_front_traits< aux::vector_tag< 46> > }; }; -namespace aux { -template<> struct vector_item_impl<46> +template<> +struct push_back_impl< aux::vector_tag<45> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item46 type; + typedef vector46< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<46> > +{ + template< typename Vector > struct apply + { + typedef vector45< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<46> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item46 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 46> > +struct at_impl< aux::vector_tag<46> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 46> > +struct front_impl< aux::vector_tag<46> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 46> > +struct back_impl< aux::vector_tag<46> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 46> > +struct empty_impl< aux::vector_tag<46> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 46> > +struct size_impl< aux::vector_tag<46> > { - template< typename Vector > struct algorithm - : integral_c< long,46 > + template< typename Vector > struct apply + : long_<46> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 46> > - : size_traits< aux::vector_tag< 46> > +struct O1_size_impl< aux::vector_tag<46> > + : size_impl< aux::vector_tag<46> > { }; template<> -struct clear_traits< aux::vector_tag< 46> > +struct clear_impl< aux::vector_tag<46> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -1287,14 +1690,14 @@ struct vector47 typedef void_ item47; typedef T46 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,47> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,47 > end; }; template<> -struct push_front_traits< aux::vector_tag< 46> > +struct push_front_impl< aux::vector_tag<46> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector47< T @@ -1327,9 +1730,9 @@ struct push_front_traits< aux::vector_tag< 46> > }; template<> -struct pop_front_traits< aux::vector_tag< 47> > +struct pop_front_impl< aux::vector_tag<47> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector46< typename Vector::item1, typename Vector::item2 @@ -1359,72 +1762,141 @@ struct pop_front_traits< aux::vector_tag< 47> > }; }; -namespace aux { -template<> struct vector_item_impl<47> +template<> +struct push_back_impl< aux::vector_tag<46> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item47 type; + typedef vector47< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<47> > +{ + template< typename Vector > struct apply + { + typedef vector46< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<47> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item47 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 47> > +struct at_impl< aux::vector_tag<47> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 47> > +struct front_impl< aux::vector_tag<47> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 47> > +struct back_impl< aux::vector_tag<47> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 47> > +struct empty_impl< aux::vector_tag<47> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 47> > +struct size_impl< aux::vector_tag<47> > { - template< typename Vector > struct algorithm - : integral_c< long,47 > + template< typename Vector > struct apply + : long_<47> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 47> > - : size_traits< aux::vector_tag< 47> > +struct O1_size_impl< aux::vector_tag<47> > + : size_impl< aux::vector_tag<47> > { }; template<> -struct clear_traits< aux::vector_tag< 47> > +struct clear_impl< aux::vector_tag<47> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -1498,14 +1970,14 @@ struct vector48 typedef void_ item48; typedef T47 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,48> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,48 > end; }; template<> -struct push_front_traits< aux::vector_tag< 47> > +struct push_front_impl< aux::vector_tag<47> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector48< T @@ -1539,9 +2011,9 @@ struct push_front_traits< aux::vector_tag< 47> > }; template<> -struct pop_front_traits< aux::vector_tag< 48> > +struct pop_front_impl< aux::vector_tag<48> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector47< typename Vector::item1, typename Vector::item2 @@ -1572,72 +2044,143 @@ struct pop_front_traits< aux::vector_tag< 48> > }; }; -namespace aux { -template<> struct vector_item_impl<48> +template<> +struct push_back_impl< aux::vector_tag<47> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item48 type; + typedef vector48< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<48> > +{ + template< typename Vector > struct apply + { + typedef vector47< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<48> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item48 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 48> > +struct at_impl< aux::vector_tag<48> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 48> > +struct front_impl< aux::vector_tag<48> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 48> > +struct back_impl< aux::vector_tag<48> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 48> > +struct empty_impl< aux::vector_tag<48> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 48> > +struct size_impl< aux::vector_tag<48> > { - template< typename Vector > struct algorithm - : integral_c< long,48 > + template< typename Vector > struct apply + : long_<48> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 48> > - : size_traits< aux::vector_tag< 48> > +struct O1_size_impl< aux::vector_tag<48> > + : size_impl< aux::vector_tag<48> > { }; template<> -struct clear_traits< aux::vector_tag< 48> > +struct clear_impl< aux::vector_tag<48> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -1712,14 +2255,14 @@ struct vector49 typedef void_ item49; typedef T48 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,49> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,49 > end; }; template<> -struct push_front_traits< aux::vector_tag< 48> > +struct push_front_impl< aux::vector_tag<48> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector49< T @@ -1753,9 +2296,9 @@ struct push_front_traits< aux::vector_tag< 48> > }; template<> -struct pop_front_traits< aux::vector_tag< 49> > +struct pop_front_impl< aux::vector_tag<49> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector48< typename Vector::item1, typename Vector::item2 @@ -1786,72 +2329,143 @@ struct pop_front_traits< aux::vector_tag< 49> > }; }; -namespace aux { -template<> struct vector_item_impl<49> +template<> +struct push_back_impl< aux::vector_tag<48> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item49 type; + typedef vector49< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46, typename Vector::item47 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<49> > +{ + template< typename Vector > struct apply + { + typedef vector48< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46, typename Vector::item47 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<49> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item49 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 49> > +struct at_impl< aux::vector_tag<49> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 49> > +struct front_impl< aux::vector_tag<49> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 49> > +struct back_impl< aux::vector_tag<49> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 49> > +struct empty_impl< aux::vector_tag<49> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 49> > +struct size_impl< aux::vector_tag<49> > { - template< typename Vector > struct algorithm - : integral_c< long,49 > + template< typename Vector > struct apply + : long_<49> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 49> > - : size_traits< aux::vector_tag< 49> > +struct O1_size_impl< aux::vector_tag<49> > + : size_impl< aux::vector_tag<49> > { }; template<> -struct clear_traits< aux::vector_tag< 49> > +struct clear_impl< aux::vector_tag<49> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; @@ -1927,14 +2541,14 @@ struct vector50 typedef void_ item50; typedef T49 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,50> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,50 > end; }; template<> -struct push_front_traits< aux::vector_tag< 49> > +struct push_front_impl< aux::vector_tag<49> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector50< T @@ -1969,9 +2583,9 @@ struct push_front_traits< aux::vector_tag< 49> > }; template<> -struct pop_front_traits< aux::vector_tag< 50> > +struct pop_front_impl< aux::vector_tag<50> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector49< typename Vector::item1, typename Vector::item2 @@ -2003,77 +2617,148 @@ struct pop_front_traits< aux::vector_tag< 50> > }; }; -namespace aux { -template<> struct vector_item_impl<50> +template<> +struct push_back_impl< aux::vector_tag<49> > { - template< typename V > struct result_ + template< typename Vector, typename T > struct apply { - typedef typename V::item50 type; + typedef vector50< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46, typename Vector::item47 + , typename Vector::item48 + , + T + > type; }; }; + +template<> +struct pop_back_impl< aux::vector_tag<50> > +{ + template< typename Vector > struct apply + { + typedef vector49< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46, typename Vector::item47 + , typename Vector::item48 + > type; + }; +}; + +namespace aux { +template<> struct v_at_impl<50> +{ + template< typename V_ > struct result_ + { + typedef typename V_::item50 type; + }; +}; + } template<> -struct at_traits< aux::vector_tag< 50> > +struct at_impl< aux::vector_tag<50> > { - template< typename V, typename N > struct algorithm + template< typename V_, typename N > struct apply { - typedef typename aux::vector_item_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> - ::template result_<V>::type type; + typedef typename aux::v_at_impl<BOOST_MPL_AUX_VALUE_WKND(N)::value> + ::template result_<V_>::type type; }; }; template<> -struct front_traits< aux::vector_tag< 50> > +struct front_impl< aux::vector_tag<50> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> -struct back_traits< aux::vector_tag< 50> > +struct back_impl< aux::vector_tag<50> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> -struct empty_traits< aux::vector_tag< 50> > +struct empty_impl< aux::vector_tag<50> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply : false_ { }; }; template<> -struct size_traits< aux::vector_tag< 50> > +struct size_impl< aux::vector_tag<50> > { - template< typename Vector > struct algorithm - : integral_c< long,50 > + template< typename Vector > struct apply + : long_<50> { }; }; template<> -struct O1_size_traits< aux::vector_tag< 50> > - : size_traits< aux::vector_tag< 50> > +struct O1_size_impl< aux::vector_tag<50> > + : size_impl< aux::vector_tag<50> > { }; template<> -struct clear_traits< aux::vector_tag< 50> > +struct clear_impl< aux::vector_tag<50> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0<> type; }; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp b/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp index b15c384..2b4e133 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector50_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector50_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T @@ -13,21 +20,21 @@ template< > struct vector41_c : vector41< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39>,integral_c<T,C40 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >, integral_c<T + , C40> + > { }; @@ -41,21 +48,21 @@ template< > struct vector42_c : vector42< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39>,integral_c<T,C40>,integral_c<T,C41 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 > + > { }; @@ -69,22 +76,21 @@ template< > struct vector43_c : vector43< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39>,integral_c<T,C40>,integral_c<T,C41 > - ,integral_c< T,C42 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + > { }; @@ -98,22 +104,22 @@ template< > struct vector44_c : vector44< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39>,integral_c<T,C40>,integral_c<T,C41 > - ,integral_c< T,C42>,integral_c<T,C43 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 >, integral_c<T + , C43> + > { }; @@ -127,22 +133,22 @@ template< > struct vector45_c : vector45< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39>,integral_c<T,C40>,integral_c<T,C41 > - ,integral_c< T,C42>,integral_c<T,C43>,integral_c<T,C44 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 > + > { }; @@ -156,23 +162,22 @@ template< > struct vector46_c : vector46< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39>,integral_c<T,C40>,integral_c<T,C41 > - ,integral_c< T,C42>,integral_c<T,C43>,integral_c<T,C44 > - ,integral_c< T,C45 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > + > { }; @@ -186,23 +191,23 @@ template< > struct vector47_c : vector47< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39>,integral_c<T,C40>,integral_c<T,C41 > - ,integral_c< T,C42>,integral_c<T,C43>,integral_c<T,C44 > - ,integral_c< T,C45>,integral_c<T,C46 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 >, integral_c<T + , C46> + > { }; @@ -216,23 +221,23 @@ template< > struct vector48_c : vector48< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39>,integral_c<T,C40>,integral_c<T,C41 > - ,integral_c< T,C42>,integral_c<T,C43>,integral_c<T,C44 > - ,integral_c< T,C45>,integral_c<T,C46>,integral_c<T,C47 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > + , integral_c< T,C46 >, integral_c< T,C47 > + > { }; @@ -246,24 +251,23 @@ template< > struct vector49_c : vector49< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39>,integral_c<T,C40>,integral_c<T,C41 > - ,integral_c< T,C42>,integral_c<T,C43>,integral_c<T,C44 > - ,integral_c< T,C45>,integral_c<T,C46>,integral_c<T,C47 > - ,integral_c< T,C48 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > + , integral_c< T,C46 >, integral_c< T,C47 >, integral_c< T,C48 > + > { }; @@ -277,27 +281,25 @@ template< > struct vector50_c : vector50< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39>,integral_c<T,C40>,integral_c<T,C41 > - ,integral_c< T,C42>,integral_c<T,C43>,integral_c<T,C44 > - ,integral_c< T,C45>,integral_c<T,C46>,integral_c<T,C47 > - ,integral_c< T,C48>,integral_c<T,C49 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > + , integral_c< T,C46 >, integral_c< T,C47 >, integral_c< T,C48 >, integral_c<T + , C49> + > { }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp b/include/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp index 5ee41f2..88bbd3b 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp @@ -1,11 +1,18 @@ -// preprocessed version of 'boost/mpl/vector/vector10.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector10.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename V > -struct vector_item< V,0 > +struct v_at< V,0 > { typedef typename V::item0 type; }; @@ -20,14 +27,14 @@ struct vector1 typedef T0 item0; typedef void_ item1; typedef T0 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,1> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,1 > end; }; template<> -struct push_front_traits< aux::vector_tag< 0> > +struct push_front_impl< aux::vector_tag<0> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector1< T @@ -36,18 +43,41 @@ struct push_front_traits< aux::vector_tag< 0> > }; template<> -struct pop_front_traits< aux::vector_tag< 1> > +struct pop_front_impl< aux::vector_tag<1> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector0< - + + > type; + }; +}; + +template<> +struct push_back_impl< aux::vector_tag<0> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector1< + + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<1> > +{ + template< typename Vector > struct apply + { + typedef vector0< + > type; }; }; template< typename V > -struct vector_item< V,1 > +struct v_at< V,1 > { typedef typename V::item1 type; }; @@ -65,14 +95,14 @@ struct vector2 typedef void_ item2; typedef T1 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,2> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,2 > end; }; template<> -struct push_front_traits< aux::vector_tag< 1> > +struct push_front_impl< aux::vector_tag<1> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector2< T @@ -83,9 +113,9 @@ struct push_front_traits< aux::vector_tag< 1> > }; template<> -struct pop_front_traits< aux::vector_tag< 2> > +struct pop_front_impl< aux::vector_tag<2> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector1< typename Vector::item1 @@ -93,8 +123,32 @@ struct pop_front_traits< aux::vector_tag< 2> > }; }; +template<> +struct push_back_impl< aux::vector_tag<1> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector2< + typename Vector::item0 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<2> > +{ + template< typename Vector > struct apply + { + typedef vector1< + typename Vector::item0 + > type; + }; +}; + template< typename V > -struct vector_item< V,2 > +struct v_at< V,2 > { typedef typename V::item2 type; }; @@ -113,14 +167,14 @@ struct vector3 typedef void_ item3; typedef T2 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,3> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,3 > end; }; template<> -struct push_front_traits< aux::vector_tag< 2> > +struct push_front_impl< aux::vector_tag<2> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector3< T @@ -131,9 +185,9 @@ struct push_front_traits< aux::vector_tag< 2> > }; template<> -struct pop_front_traits< aux::vector_tag< 3> > +struct pop_front_impl< aux::vector_tag<3> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector2< typename Vector::item1, typename Vector::item2 @@ -141,8 +195,32 @@ struct pop_front_traits< aux::vector_tag< 3> > }; }; +template<> +struct push_back_impl< aux::vector_tag<2> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector3< + typename Vector::item0, typename Vector::item1 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<3> > +{ + template< typename Vector > struct apply + { + typedef vector2< + typename Vector::item0, typename Vector::item1 + > type; + }; +}; + template< typename V > -struct vector_item< V,3 > +struct v_at< V,3 > { typedef typename V::item3 type; }; @@ -162,14 +240,14 @@ struct vector4 typedef void_ item4; typedef T3 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,4> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,4 > end; }; template<> -struct push_front_traits< aux::vector_tag< 3> > +struct push_front_impl< aux::vector_tag<3> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector4< T @@ -181,9 +259,9 @@ struct push_front_traits< aux::vector_tag< 3> > }; template<> -struct pop_front_traits< aux::vector_tag< 4> > +struct pop_front_impl< aux::vector_tag<4> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector3< typename Vector::item1, typename Vector::item2 @@ -192,8 +270,34 @@ struct pop_front_traits< aux::vector_tag< 4> > }; }; +template<> +struct push_back_impl< aux::vector_tag<3> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector4< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<4> > +{ + template< typename Vector > struct apply + { + typedef vector3< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2 + > type; + }; +}; + template< typename V > -struct vector_item< V,4 > +struct v_at< V,4 > { typedef typename V::item4 type; }; @@ -214,14 +318,14 @@ struct vector5 typedef void_ item5; typedef T4 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,5> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,5 > end; }; template<> -struct push_front_traits< aux::vector_tag< 4> > +struct push_front_impl< aux::vector_tag<4> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector5< T @@ -233,9 +337,9 @@ struct push_front_traits< aux::vector_tag< 4> > }; template<> -struct pop_front_traits< aux::vector_tag< 5> > +struct pop_front_impl< aux::vector_tag<5> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector4< typename Vector::item1, typename Vector::item2 @@ -244,8 +348,34 @@ struct pop_front_traits< aux::vector_tag< 5> > }; }; +template<> +struct push_back_impl< aux::vector_tag<4> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector5< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<5> > +{ + template< typename Vector > struct apply + { + typedef vector4< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + > type; + }; +}; + template< typename V > -struct vector_item< V,5 > +struct v_at< V,5 > { typedef typename V::item5 type; }; @@ -268,14 +398,14 @@ struct vector6 typedef void_ item6; typedef T5 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,6> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,6 > end; }; template<> -struct push_front_traits< aux::vector_tag< 5> > +struct push_front_impl< aux::vector_tag<5> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector6< T @@ -288,9 +418,9 @@ struct push_front_traits< aux::vector_tag< 5> > }; template<> -struct pop_front_traits< aux::vector_tag< 6> > +struct pop_front_impl< aux::vector_tag<6> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector5< typename Vector::item1, typename Vector::item2 @@ -300,8 +430,36 @@ struct pop_front_traits< aux::vector_tag< 6> > }; }; +template<> +struct push_back_impl< aux::vector_tag<5> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector6< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<6> > +{ + template< typename Vector > struct apply + { + typedef vector5< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4 + > type; + }; +}; + template< typename V > -struct vector_item< V,6 > +struct v_at< V,6 > { typedef typename V::item6 type; }; @@ -325,14 +483,14 @@ struct vector7 typedef void_ item7; typedef T6 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,7> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,7 > end; }; template<> -struct push_front_traits< aux::vector_tag< 6> > +struct push_front_impl< aux::vector_tag<6> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector7< T @@ -345,9 +503,9 @@ struct push_front_traits< aux::vector_tag< 6> > }; template<> -struct pop_front_traits< aux::vector_tag< 7> > +struct pop_front_impl< aux::vector_tag<7> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector6< typename Vector::item1, typename Vector::item2 @@ -357,8 +515,36 @@ struct pop_front_traits< aux::vector_tag< 7> > }; }; +template<> +struct push_back_impl< aux::vector_tag<6> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector7< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<7> > +{ + template< typename Vector > struct apply + { + typedef vector6< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + > type; + }; +}; + template< typename V > -struct vector_item< V,7 > +struct v_at< V,7 > { typedef typename V::item7 type; }; @@ -383,14 +569,14 @@ struct vector8 typedef void_ item8; typedef T7 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,8> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,8 > end; }; template<> -struct push_front_traits< aux::vector_tag< 7> > +struct push_front_impl< aux::vector_tag<7> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector8< T @@ -404,9 +590,9 @@ struct push_front_traits< aux::vector_tag< 7> > }; template<> -struct pop_front_traits< aux::vector_tag< 8> > +struct pop_front_impl< aux::vector_tag<8> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector7< typename Vector::item1, typename Vector::item2 @@ -417,8 +603,38 @@ struct pop_front_traits< aux::vector_tag< 8> > }; }; +template<> +struct push_back_impl< aux::vector_tag<7> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector8< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<8> > +{ + template< typename Vector > struct apply + { + typedef vector7< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6 + > type; + }; +}; + template< typename V > -struct vector_item< V,8 > +struct v_at< V,8 > { typedef typename V::item8 type; }; @@ -444,14 +660,14 @@ struct vector9 typedef void_ item9; typedef T8 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,9> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,9 > end; }; template<> -struct push_front_traits< aux::vector_tag< 8> > +struct push_front_impl< aux::vector_tag<8> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector9< T @@ -465,9 +681,9 @@ struct push_front_traits< aux::vector_tag< 8> > }; template<> -struct pop_front_traits< aux::vector_tag< 9> > +struct pop_front_impl< aux::vector_tag<9> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector8< typename Vector::item1, typename Vector::item2 @@ -478,8 +694,38 @@ struct pop_front_traits< aux::vector_tag< 9> > }; }; +template<> +struct push_back_impl< aux::vector_tag<8> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector9< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<9> > +{ + template< typename Vector > struct apply + { + typedef vector8< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + > type; + }; +}; + template< typename V > -struct vector_item< V,9 > +struct v_at< V,9 > { typedef typename V::item9 type; }; @@ -506,14 +752,14 @@ struct vector10 typedef void_ item10; typedef T9 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,10> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,10 > end; }; template<> -struct push_front_traits< aux::vector_tag< 9> > +struct push_front_impl< aux::vector_tag<9> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector10< T @@ -528,9 +774,9 @@ struct push_front_traits< aux::vector_tag< 9> > }; template<> -struct pop_front_traits< aux::vector_tag< 10> > +struct pop_front_impl< aux::vector_tag<10> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector9< typename Vector::item1, typename Vector::item2 @@ -542,12 +788,42 @@ struct pop_front_traits< aux::vector_tag< 10> > }; }; +template<> +struct push_back_impl< aux::vector_tag<9> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector10< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<10> > +{ + template< typename Vector > struct apply + { + typedef vector9< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8 + > type; + }; +}; + template< typename V > -struct vector_item< V,10 > +struct v_at< V,10 > { typedef typename V::item10 type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp b/include/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp index e6c1f43..bb198b2 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp @@ -1,15 +1,22 @@ -// preprocessed version of 'boost/mpl/vector/vector10_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector10_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T , T C0 > struct vector1_c - : vector1< integral_c<T,C0> > + : vector1< integral_c< T,C0 > > { }; @@ -18,7 +25,7 @@ template< , T C0, T C1 > struct vector2_c - : vector2< integral_c<T,C0>,integral_c<T,C1> > + : vector2< integral_c< T,C0 >, integral_c< T,C1 > > { }; @@ -27,7 +34,7 @@ template< , T C0, T C1, T C2 > struct vector3_c - : vector3< integral_c<T,C0>,integral_c<T,C1>,integral_c<T,C2> > + : vector3< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > > { }; @@ -37,9 +44,9 @@ template< > struct vector4_c : vector4< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >, integral_c<T + , C3> + > { }; @@ -49,9 +56,9 @@ template< > struct vector5_c : vector5< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 > + > { }; @@ -61,9 +68,9 @@ template< > struct vector6_c : vector6< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 > + > { }; @@ -73,10 +80,10 @@ template< > struct vector7_c : vector7< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c<T + , C6> + > { }; @@ -86,10 +93,10 @@ template< > struct vector8_c : vector8< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 > + > { }; @@ -99,10 +106,10 @@ template< > struct vector9_c : vector9< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 > + > { }; @@ -112,14 +119,11 @@ template< > struct vector10_c : vector10< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + > { }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp b/include/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp index 17a6e78..8c6c8bb 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector20.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector20.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 @@ -28,14 +35,14 @@ struct vector11 typedef void_ item11; typedef T10 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,11> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,11 > end; }; template<> -struct push_front_traits< aux::vector_tag< 10> > +struct push_front_impl< aux::vector_tag<10> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector11< T @@ -50,9 +57,9 @@ struct push_front_traits< aux::vector_tag< 10> > }; template<> -struct pop_front_traits< aux::vector_tag< 11> > +struct pop_front_impl< aux::vector_tag<11> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector10< typename Vector::item1, typename Vector::item2 @@ -64,8 +71,40 @@ struct pop_front_traits< aux::vector_tag< 11> > }; }; +template<> +struct push_back_impl< aux::vector_tag<10> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector11< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<11> > +{ + template< typename Vector > struct apply + { + typedef vector10< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + > type; + }; +}; + template< typename V > -struct vector_item< V,11 > +struct v_at< V,11 > { typedef typename V::item11 type; }; @@ -95,14 +134,14 @@ struct vector12 typedef void_ item12; typedef T11 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,12> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,12 > end; }; template<> -struct push_front_traits< aux::vector_tag< 11> > +struct push_front_impl< aux::vector_tag<11> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector12< T @@ -118,9 +157,9 @@ struct push_front_traits< aux::vector_tag< 11> > }; template<> -struct pop_front_traits< aux::vector_tag< 12> > +struct pop_front_impl< aux::vector_tag<12> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector11< typename Vector::item1, typename Vector::item2 @@ -133,8 +172,42 @@ struct pop_front_traits< aux::vector_tag< 12> > }; }; +template<> +struct push_back_impl< aux::vector_tag<11> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector12< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<12> > +{ + template< typename Vector > struct apply + { + typedef vector11< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10 + > type; + }; +}; + template< typename V > -struct vector_item< V,12 > +struct v_at< V,12 > { typedef typename V::item12 type; }; @@ -165,14 +238,14 @@ struct vector13 typedef void_ item13; typedef T12 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,13> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,13 > end; }; template<> -struct push_front_traits< aux::vector_tag< 12> > +struct push_front_impl< aux::vector_tag<12> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector13< T @@ -188,9 +261,9 @@ struct push_front_traits< aux::vector_tag< 12> > }; template<> -struct pop_front_traits< aux::vector_tag< 13> > +struct pop_front_impl< aux::vector_tag<13> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector12< typename Vector::item1, typename Vector::item2 @@ -203,8 +276,42 @@ struct pop_front_traits< aux::vector_tag< 13> > }; }; +template<> +struct push_back_impl< aux::vector_tag<12> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector13< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<13> > +{ + template< typename Vector > struct apply + { + typedef vector12< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + > type; + }; +}; + template< typename V > -struct vector_item< V,13 > +struct v_at< V,13 > { typedef typename V::item13 type; }; @@ -236,14 +343,14 @@ struct vector14 typedef void_ item14; typedef T13 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,14> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,14 > end; }; template<> -struct push_front_traits< aux::vector_tag< 13> > +struct push_front_impl< aux::vector_tag<13> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector14< T @@ -260,9 +367,9 @@ struct push_front_traits< aux::vector_tag< 13> > }; template<> -struct pop_front_traits< aux::vector_tag< 14> > +struct pop_front_impl< aux::vector_tag<14> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector13< typename Vector::item1, typename Vector::item2 @@ -276,8 +383,44 @@ struct pop_front_traits< aux::vector_tag< 14> > }; }; +template<> +struct push_back_impl< aux::vector_tag<13> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector14< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<14> > +{ + template< typename Vector > struct apply + { + typedef vector13< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12 + > type; + }; +}; + template< typename V > -struct vector_item< V,14 > +struct v_at< V,14 > { typedef typename V::item14 type; }; @@ -310,14 +453,14 @@ struct vector15 typedef void_ item15; typedef T14 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,15> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,15 > end; }; template<> -struct push_front_traits< aux::vector_tag< 14> > +struct push_front_impl< aux::vector_tag<14> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector15< T @@ -334,9 +477,9 @@ struct push_front_traits< aux::vector_tag< 14> > }; template<> -struct pop_front_traits< aux::vector_tag< 15> > +struct pop_front_impl< aux::vector_tag<15> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector14< typename Vector::item1, typename Vector::item2 @@ -350,8 +493,44 @@ struct pop_front_traits< aux::vector_tag< 15> > }; }; +template<> +struct push_back_impl< aux::vector_tag<14> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector15< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<15> > +{ + template< typename Vector > struct apply + { + typedef vector14< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + > type; + }; +}; + template< typename V > -struct vector_item< V,15 > +struct v_at< V,15 > { typedef typename V::item15 type; }; @@ -386,14 +565,14 @@ struct vector16 typedef void_ item16; typedef T15 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,16> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,16 > end; }; template<> -struct push_front_traits< aux::vector_tag< 15> > +struct push_front_impl< aux::vector_tag<15> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector16< T @@ -411,9 +590,9 @@ struct push_front_traits< aux::vector_tag< 15> > }; template<> -struct pop_front_traits< aux::vector_tag< 16> > +struct pop_front_impl< aux::vector_tag<16> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector15< typename Vector::item1, typename Vector::item2 @@ -428,8 +607,46 @@ struct pop_front_traits< aux::vector_tag< 16> > }; }; +template<> +struct push_back_impl< aux::vector_tag<15> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector16< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<16> > +{ + template< typename Vector > struct apply + { + typedef vector15< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14 + > type; + }; +}; + template< typename V > -struct vector_item< V,16 > +struct v_at< V,16 > { typedef typename V::item16 type; }; @@ -465,14 +682,14 @@ struct vector17 typedef void_ item17; typedef T16 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,17> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,17 > end; }; template<> -struct push_front_traits< aux::vector_tag< 16> > +struct push_front_impl< aux::vector_tag<16> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector17< T @@ -490,9 +707,9 @@ struct push_front_traits< aux::vector_tag< 16> > }; template<> -struct pop_front_traits< aux::vector_tag< 17> > +struct pop_front_impl< aux::vector_tag<17> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector16< typename Vector::item1, typename Vector::item2 @@ -507,8 +724,46 @@ struct pop_front_traits< aux::vector_tag< 17> > }; }; +template<> +struct push_back_impl< aux::vector_tag<16> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector17< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<17> > +{ + template< typename Vector > struct apply + { + typedef vector16< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + > type; + }; +}; + template< typename V > -struct vector_item< V,17 > +struct v_at< V,17 > { typedef typename V::item17 type; }; @@ -545,14 +800,14 @@ struct vector18 typedef void_ item18; typedef T17 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,18> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,18 > end; }; template<> -struct push_front_traits< aux::vector_tag< 17> > +struct push_front_impl< aux::vector_tag<17> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector18< T @@ -571,9 +826,9 @@ struct push_front_traits< aux::vector_tag< 17> > }; template<> -struct pop_front_traits< aux::vector_tag< 18> > +struct pop_front_impl< aux::vector_tag<18> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector17< typename Vector::item1, typename Vector::item2 @@ -589,8 +844,48 @@ struct pop_front_traits< aux::vector_tag< 18> > }; }; +template<> +struct push_back_impl< aux::vector_tag<17> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector18< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<18> > +{ + template< typename Vector > struct apply + { + typedef vector17< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16 + > type; + }; +}; + template< typename V > -struct vector_item< V,18 > +struct v_at< V,18 > { typedef typename V::item18 type; }; @@ -628,14 +923,14 @@ struct vector19 typedef void_ item19; typedef T18 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,19> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,19 > end; }; template<> -struct push_front_traits< aux::vector_tag< 18> > +struct push_front_impl< aux::vector_tag<18> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector19< T @@ -654,9 +949,9 @@ struct push_front_traits< aux::vector_tag< 18> > }; template<> -struct pop_front_traits< aux::vector_tag< 19> > +struct pop_front_impl< aux::vector_tag<19> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector18< typename Vector::item1, typename Vector::item2 @@ -672,8 +967,48 @@ struct pop_front_traits< aux::vector_tag< 19> > }; }; +template<> +struct push_back_impl< aux::vector_tag<18> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector19< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<19> > +{ + template< typename Vector > struct apply + { + typedef vector18< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + > type; + }; +}; + template< typename V > -struct vector_item< V,19 > +struct v_at< V,19 > { typedef typename V::item19 type; }; @@ -712,14 +1047,14 @@ struct vector20 typedef void_ item20; typedef T19 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,20> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,20 > end; }; template<> -struct push_front_traits< aux::vector_tag< 19> > +struct push_front_impl< aux::vector_tag<19> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector20< T @@ -739,9 +1074,9 @@ struct push_front_traits< aux::vector_tag< 19> > }; template<> -struct pop_front_traits< aux::vector_tag< 20> > +struct pop_front_impl< aux::vector_tag<20> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector19< typename Vector::item1, typename Vector::item2 @@ -758,12 +1093,52 @@ struct pop_front_traits< aux::vector_tag< 20> > }; }; +template<> +struct push_back_impl< aux::vector_tag<19> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector20< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<20> > +{ + template< typename Vector > struct apply + { + typedef vector19< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18 + > type; + }; +}; + template< typename V > -struct vector_item< V,20 > +struct v_at< V,20 > { typedef typename V::item20 type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp b/include/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp index 20b2b94..797ecae 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector20_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector20_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T @@ -10,11 +17,11 @@ template< > struct vector11_c : vector11< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >, integral_c<T + , C10> + > { }; @@ -25,11 +32,11 @@ template< > struct vector12_c : vector12< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 > + > { }; @@ -40,12 +47,11 @@ template< > struct vector13_c : vector13< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + > { }; @@ -56,12 +62,12 @@ template< > struct vector14_c : vector14< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >, integral_c<T + , C13> + > { }; @@ -72,12 +78,12 @@ template< > struct vector15_c : vector15< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 > + > { }; @@ -88,13 +94,12 @@ template< > struct vector16_c : vector16< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + > { }; @@ -105,13 +110,13 @@ template< > struct vector17_c : vector17< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >, integral_c<T + , C16> + > { }; @@ -122,13 +127,13 @@ template< > struct vector18_c : vector18< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 > + > { }; @@ -139,14 +144,13 @@ template< > struct vector19_c : vector19< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + > { }; @@ -157,17 +161,15 @@ template< > struct vector20_c : vector20< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >, integral_c<T + , C19> + > { }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp b/include/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp index 5bc85c7..b7da8e7 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector30.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector30.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 @@ -40,14 +47,14 @@ struct vector21 typedef void_ item21; typedef T20 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,21> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,21 > end; }; template<> -struct push_front_traits< aux::vector_tag< 20> > +struct push_front_impl< aux::vector_tag<20> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector21< T @@ -67,9 +74,9 @@ struct push_front_traits< aux::vector_tag< 20> > }; template<> -struct pop_front_traits< aux::vector_tag< 21> > +struct pop_front_impl< aux::vector_tag<21> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector20< typename Vector::item1, typename Vector::item2 @@ -86,8 +93,50 @@ struct pop_front_traits< aux::vector_tag< 21> > }; }; +template<> +struct push_back_impl< aux::vector_tag<20> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector21< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<21> > +{ + template< typename Vector > struct apply + { + typedef vector20< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + > type; + }; +}; + template< typename V > -struct vector_item< V,21 > +struct v_at< V,21 > { typedef typename V::item21 type; }; @@ -129,14 +178,14 @@ struct vector22 typedef void_ item22; typedef T21 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,22> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,22 > end; }; template<> -struct push_front_traits< aux::vector_tag< 21> > +struct push_front_impl< aux::vector_tag<21> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector22< T @@ -157,9 +206,9 @@ struct push_front_traits< aux::vector_tag< 21> > }; template<> -struct pop_front_traits< aux::vector_tag< 22> > +struct pop_front_impl< aux::vector_tag<22> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector21< typename Vector::item1, typename Vector::item2 @@ -177,8 +226,52 @@ struct pop_front_traits< aux::vector_tag< 22> > }; }; +template<> +struct push_back_impl< aux::vector_tag<21> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector22< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<22> > +{ + template< typename Vector > struct apply + { + typedef vector21< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20 + > type; + }; +}; + template< typename V > -struct vector_item< V,22 > +struct v_at< V,22 > { typedef typename V::item22 type; }; @@ -221,14 +314,14 @@ struct vector23 typedef void_ item23; typedef T22 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,23> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,23 > end; }; template<> -struct push_front_traits< aux::vector_tag< 22> > +struct push_front_impl< aux::vector_tag<22> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector23< T @@ -249,9 +342,9 @@ struct push_front_traits< aux::vector_tag< 22> > }; template<> -struct pop_front_traits< aux::vector_tag< 23> > +struct pop_front_impl< aux::vector_tag<23> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector22< typename Vector::item1, typename Vector::item2 @@ -269,8 +362,52 @@ struct pop_front_traits< aux::vector_tag< 23> > }; }; +template<> +struct push_back_impl< aux::vector_tag<22> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector23< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<23> > +{ + template< typename Vector > struct apply + { + typedef vector22< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + > type; + }; +}; + template< typename V > -struct vector_item< V,23 > +struct v_at< V,23 > { typedef typename V::item23 type; }; @@ -314,14 +451,14 @@ struct vector24 typedef void_ item24; typedef T23 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,24> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,24 > end; }; template<> -struct push_front_traits< aux::vector_tag< 23> > +struct push_front_impl< aux::vector_tag<23> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector24< T @@ -343,9 +480,9 @@ struct push_front_traits< aux::vector_tag< 23> > }; template<> -struct pop_front_traits< aux::vector_tag< 24> > +struct pop_front_impl< aux::vector_tag<24> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector23< typename Vector::item1, typename Vector::item2 @@ -364,8 +501,54 @@ struct pop_front_traits< aux::vector_tag< 24> > }; }; +template<> +struct push_back_impl< aux::vector_tag<23> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector24< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<24> > +{ + template< typename Vector > struct apply + { + typedef vector23< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22 + > type; + }; +}; + template< typename V > -struct vector_item< V,24 > +struct v_at< V,24 > { typedef typename V::item24 type; }; @@ -410,14 +593,14 @@ struct vector25 typedef void_ item25; typedef T24 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,25> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,25 > end; }; template<> -struct push_front_traits< aux::vector_tag< 24> > +struct push_front_impl< aux::vector_tag<24> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector25< T @@ -439,9 +622,9 @@ struct push_front_traits< aux::vector_tag< 24> > }; template<> -struct pop_front_traits< aux::vector_tag< 25> > +struct pop_front_impl< aux::vector_tag<25> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector24< typename Vector::item1, typename Vector::item2 @@ -460,8 +643,54 @@ struct pop_front_traits< aux::vector_tag< 25> > }; }; +template<> +struct push_back_impl< aux::vector_tag<24> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector25< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<25> > +{ + template< typename Vector > struct apply + { + typedef vector24< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + > type; + }; +}; + template< typename V > -struct vector_item< V,25 > +struct v_at< V,25 > { typedef typename V::item25 type; }; @@ -508,14 +737,14 @@ struct vector26 typedef void_ item26; typedef T25 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,26> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,26 > end; }; template<> -struct push_front_traits< aux::vector_tag< 25> > +struct push_front_impl< aux::vector_tag<25> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector26< T @@ -538,9 +767,9 @@ struct push_front_traits< aux::vector_tag< 25> > }; template<> -struct pop_front_traits< aux::vector_tag< 26> > +struct pop_front_impl< aux::vector_tag<26> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector25< typename Vector::item1, typename Vector::item2 @@ -560,8 +789,56 @@ struct pop_front_traits< aux::vector_tag< 26> > }; }; +template<> +struct push_back_impl< aux::vector_tag<25> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector26< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<26> > +{ + template< typename Vector > struct apply + { + typedef vector25< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24 + > type; + }; +}; + template< typename V > -struct vector_item< V,26 > +struct v_at< V,26 > { typedef typename V::item26 type; }; @@ -609,14 +886,14 @@ struct vector27 typedef void_ item27; typedef T26 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,27> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,27 > end; }; template<> -struct push_front_traits< aux::vector_tag< 26> > +struct push_front_impl< aux::vector_tag<26> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector27< T @@ -639,9 +916,9 @@ struct push_front_traits< aux::vector_tag< 26> > }; template<> -struct pop_front_traits< aux::vector_tag< 27> > +struct pop_front_impl< aux::vector_tag<27> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector26< typename Vector::item1, typename Vector::item2 @@ -661,8 +938,56 @@ struct pop_front_traits< aux::vector_tag< 27> > }; }; +template<> +struct push_back_impl< aux::vector_tag<26> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector27< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<27> > +{ + template< typename Vector > struct apply + { + typedef vector26< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + > type; + }; +}; + template< typename V > -struct vector_item< V,27 > +struct v_at< V,27 > { typedef typename V::item27 type; }; @@ -711,14 +1036,14 @@ struct vector28 typedef void_ item28; typedef T27 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,28> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,28 > end; }; template<> -struct push_front_traits< aux::vector_tag< 27> > +struct push_front_impl< aux::vector_tag<27> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector28< T @@ -742,9 +1067,9 @@ struct push_front_traits< aux::vector_tag< 27> > }; template<> -struct pop_front_traits< aux::vector_tag< 28> > +struct pop_front_impl< aux::vector_tag<28> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector27< typename Vector::item1, typename Vector::item2 @@ -765,8 +1090,58 @@ struct pop_front_traits< aux::vector_tag< 28> > }; }; +template<> +struct push_back_impl< aux::vector_tag<27> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector28< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<28> > +{ + template< typename Vector > struct apply + { + typedef vector27< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26 + > type; + }; +}; + template< typename V > -struct vector_item< V,28 > +struct v_at< V,28 > { typedef typename V::item28 type; }; @@ -816,14 +1191,14 @@ struct vector29 typedef void_ item29; typedef T28 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,29> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,29 > end; }; template<> -struct push_front_traits< aux::vector_tag< 28> > +struct push_front_impl< aux::vector_tag<28> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector29< T @@ -847,9 +1222,9 @@ struct push_front_traits< aux::vector_tag< 28> > }; template<> -struct pop_front_traits< aux::vector_tag< 29> > +struct pop_front_impl< aux::vector_tag<29> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector28< typename Vector::item1, typename Vector::item2 @@ -870,8 +1245,58 @@ struct pop_front_traits< aux::vector_tag< 29> > }; }; +template<> +struct push_back_impl< aux::vector_tag<28> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector29< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<29> > +{ + template< typename Vector > struct apply + { + typedef vector28< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + > type; + }; +}; + template< typename V > -struct vector_item< V,29 > +struct v_at< V,29 > { typedef typename V::item29 type; }; @@ -922,14 +1347,14 @@ struct vector30 typedef void_ item30; typedef T29 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,30> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,30 > end; }; template<> -struct push_front_traits< aux::vector_tag< 29> > +struct push_front_impl< aux::vector_tag<29> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector30< T @@ -954,9 +1379,9 @@ struct push_front_traits< aux::vector_tag< 29> > }; template<> -struct pop_front_traits< aux::vector_tag< 30> > +struct pop_front_impl< aux::vector_tag<30> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector29< typename Vector::item1, typename Vector::item2 @@ -978,12 +1403,62 @@ struct pop_front_traits< aux::vector_tag< 30> > }; }; +template<> +struct push_back_impl< aux::vector_tag<29> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector30< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<30> > +{ + template< typename Vector > struct apply + { + typedef vector29< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28 + > type; + }; +}; + template< typename V > -struct vector_item< V,30 > +struct v_at< V,30 > { typedef typename V::item30 type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp b/include/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp index 77ed91c..a4b2e24 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector30_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector30_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T @@ -11,14 +18,14 @@ template< > struct vector21_c : vector21< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 > + > { }; @@ -30,15 +37,14 @@ template< > struct vector22_c : vector22< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + > { }; @@ -50,15 +56,15 @@ template< > struct vector23_c : vector23< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >, integral_c<T + , C22> + > { }; @@ -70,15 +76,15 @@ template< > struct vector24_c : vector24< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 > + > { }; @@ -90,16 +96,15 @@ template< > struct vector25_c : vector25< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + > { }; @@ -111,16 +116,16 @@ template< > struct vector26_c : vector26< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >, integral_c<T + , C25> + > { }; @@ -132,16 +137,16 @@ template< > struct vector27_c : vector27< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 > + > { }; @@ -153,17 +158,16 @@ template< > struct vector28_c : vector28< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + > { }; @@ -175,17 +179,17 @@ template< > struct vector29_c : vector29< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >, integral_c<T + , C28> + > { }; @@ -197,20 +201,18 @@ template< > struct vector30_c : vector30< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 > + > { }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp b/include/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp index 0342b82..7487be4 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector40.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector40.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 @@ -52,14 +59,14 @@ struct vector31 typedef void_ item31; typedef T30 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,31> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,31 > end; }; template<> -struct push_front_traits< aux::vector_tag< 30> > +struct push_front_impl< aux::vector_tag<30> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector31< T @@ -84,9 +91,9 @@ struct push_front_traits< aux::vector_tag< 30> > }; template<> -struct pop_front_traits< aux::vector_tag< 31> > +struct pop_front_impl< aux::vector_tag<31> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector30< typename Vector::item1, typename Vector::item2 @@ -108,8 +115,60 @@ struct pop_front_traits< aux::vector_tag< 31> > }; }; +template<> +struct push_back_impl< aux::vector_tag<30> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector31< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<31> > +{ + template< typename Vector > struct apply + { + typedef vector30< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + > type; + }; +}; + template< typename V > -struct vector_item< V,31 > +struct v_at< V,31 > { typedef typename V::item31 type; }; @@ -163,14 +222,14 @@ struct vector32 typedef void_ item32; typedef T31 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,32> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,32 > end; }; template<> -struct push_front_traits< aux::vector_tag< 31> > +struct push_front_impl< aux::vector_tag<31> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector32< T @@ -196,9 +255,9 @@ struct push_front_traits< aux::vector_tag< 31> > }; template<> -struct pop_front_traits< aux::vector_tag< 32> > +struct pop_front_impl< aux::vector_tag<32> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector31< typename Vector::item1, typename Vector::item2 @@ -221,8 +280,62 @@ struct pop_front_traits< aux::vector_tag< 32> > }; }; +template<> +struct push_back_impl< aux::vector_tag<31> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector32< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<32> > +{ + template< typename Vector > struct apply + { + typedef vector31< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30 + > type; + }; +}; + template< typename V > -struct vector_item< V,32 > +struct v_at< V,32 > { typedef typename V::item32 type; }; @@ -277,14 +390,14 @@ struct vector33 typedef void_ item33; typedef T32 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,33> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,33 > end; }; template<> -struct push_front_traits< aux::vector_tag< 32> > +struct push_front_impl< aux::vector_tag<32> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector33< T @@ -310,9 +423,9 @@ struct push_front_traits< aux::vector_tag< 32> > }; template<> -struct pop_front_traits< aux::vector_tag< 33> > +struct pop_front_impl< aux::vector_tag<33> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector32< typename Vector::item1, typename Vector::item2 @@ -335,8 +448,62 @@ struct pop_front_traits< aux::vector_tag< 33> > }; }; +template<> +struct push_back_impl< aux::vector_tag<32> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector33< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<33> > +{ + template< typename Vector > struct apply + { + typedef vector32< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + > type; + }; +}; + template< typename V > -struct vector_item< V,33 > +struct v_at< V,33 > { typedef typename V::item33 type; }; @@ -392,14 +559,14 @@ struct vector34 typedef void_ item34; typedef T33 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,34> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,34 > end; }; template<> -struct push_front_traits< aux::vector_tag< 33> > +struct push_front_impl< aux::vector_tag<33> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector34< T @@ -426,9 +593,9 @@ struct push_front_traits< aux::vector_tag< 33> > }; template<> -struct pop_front_traits< aux::vector_tag< 34> > +struct pop_front_impl< aux::vector_tag<34> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector33< typename Vector::item1, typename Vector::item2 @@ -452,8 +619,64 @@ struct pop_front_traits< aux::vector_tag< 34> > }; }; +template<> +struct push_back_impl< aux::vector_tag<33> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector34< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<34> > +{ + template< typename Vector > struct apply + { + typedef vector33< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32 + > type; + }; +}; + template< typename V > -struct vector_item< V,34 > +struct v_at< V,34 > { typedef typename V::item34 type; }; @@ -510,14 +733,14 @@ struct vector35 typedef void_ item35; typedef T34 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,35> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,35 > end; }; template<> -struct push_front_traits< aux::vector_tag< 34> > +struct push_front_impl< aux::vector_tag<34> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector35< T @@ -544,9 +767,9 @@ struct push_front_traits< aux::vector_tag< 34> > }; template<> -struct pop_front_traits< aux::vector_tag< 35> > +struct pop_front_impl< aux::vector_tag<35> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector34< typename Vector::item1, typename Vector::item2 @@ -570,8 +793,64 @@ struct pop_front_traits< aux::vector_tag< 35> > }; }; +template<> +struct push_back_impl< aux::vector_tag<34> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector35< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<35> > +{ + template< typename Vector > struct apply + { + typedef vector34< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + > type; + }; +}; + template< typename V > -struct vector_item< V,35 > +struct v_at< V,35 > { typedef typename V::item35 type; }; @@ -630,14 +909,14 @@ struct vector36 typedef void_ item36; typedef T35 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,36> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,36 > end; }; template<> -struct push_front_traits< aux::vector_tag< 35> > +struct push_front_impl< aux::vector_tag<35> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector36< T @@ -665,9 +944,9 @@ struct push_front_traits< aux::vector_tag< 35> > }; template<> -struct pop_front_traits< aux::vector_tag< 36> > +struct pop_front_impl< aux::vector_tag<36> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector35< typename Vector::item1, typename Vector::item2 @@ -692,8 +971,66 @@ struct pop_front_traits< aux::vector_tag< 36> > }; }; +template<> +struct push_back_impl< aux::vector_tag<35> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector36< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<36> > +{ + template< typename Vector > struct apply + { + typedef vector35< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34 + > type; + }; +}; + template< typename V > -struct vector_item< V,36 > +struct v_at< V,36 > { typedef typename V::item36 type; }; @@ -753,14 +1090,14 @@ struct vector37 typedef void_ item37; typedef T36 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,37> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,37 > end; }; template<> -struct push_front_traits< aux::vector_tag< 36> > +struct push_front_impl< aux::vector_tag<36> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector37< T @@ -788,9 +1125,9 @@ struct push_front_traits< aux::vector_tag< 36> > }; template<> -struct pop_front_traits< aux::vector_tag< 37> > +struct pop_front_impl< aux::vector_tag<37> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector36< typename Vector::item1, typename Vector::item2 @@ -815,8 +1152,66 @@ struct pop_front_traits< aux::vector_tag< 37> > }; }; +template<> +struct push_back_impl< aux::vector_tag<36> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector37< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<37> > +{ + template< typename Vector > struct apply + { + typedef vector36< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + > type; + }; +}; + template< typename V > -struct vector_item< V,37 > +struct v_at< V,37 > { typedef typename V::item37 type; }; @@ -877,14 +1272,14 @@ struct vector38 typedef void_ item38; typedef T37 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,38> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,38 > end; }; template<> -struct push_front_traits< aux::vector_tag< 37> > +struct push_front_impl< aux::vector_tag<37> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector38< T @@ -913,9 +1308,9 @@ struct push_front_traits< aux::vector_tag< 37> > }; template<> -struct pop_front_traits< aux::vector_tag< 38> > +struct pop_front_impl< aux::vector_tag<38> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector37< typename Vector::item1, typename Vector::item2 @@ -941,8 +1336,68 @@ struct pop_front_traits< aux::vector_tag< 38> > }; }; +template<> +struct push_back_impl< aux::vector_tag<37> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector38< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<38> > +{ + template< typename Vector > struct apply + { + typedef vector37< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36 + > type; + }; +}; + template< typename V > -struct vector_item< V,38 > +struct v_at< V,38 > { typedef typename V::item38 type; }; @@ -1004,14 +1459,14 @@ struct vector39 typedef void_ item39; typedef T38 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,39> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,39 > end; }; template<> -struct push_front_traits< aux::vector_tag< 38> > +struct push_front_impl< aux::vector_tag<38> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector39< T @@ -1040,9 +1495,9 @@ struct push_front_traits< aux::vector_tag< 38> > }; template<> -struct pop_front_traits< aux::vector_tag< 39> > +struct pop_front_impl< aux::vector_tag<39> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector38< typename Vector::item1, typename Vector::item2 @@ -1068,8 +1523,68 @@ struct pop_front_traits< aux::vector_tag< 39> > }; }; +template<> +struct push_back_impl< aux::vector_tag<38> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector39< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<39> > +{ + template< typename Vector > struct apply + { + typedef vector38< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + > type; + }; +}; + template< typename V > -struct vector_item< V,39 > +struct v_at< V,39 > { typedef typename V::item39 type; }; @@ -1132,14 +1647,14 @@ struct vector40 typedef void_ item40; typedef T39 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,40> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,40 > end; }; template<> -struct push_front_traits< aux::vector_tag< 39> > +struct push_front_impl< aux::vector_tag<39> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector40< T @@ -1169,9 +1684,9 @@ struct push_front_traits< aux::vector_tag< 39> > }; template<> -struct pop_front_traits< aux::vector_tag< 40> > +struct pop_front_impl< aux::vector_tag<40> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector39< typename Vector::item1, typename Vector::item2 @@ -1198,12 +1713,72 @@ struct pop_front_traits< aux::vector_tag< 40> > }; }; +template<> +struct push_back_impl< aux::vector_tag<39> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector40< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<40> > +{ + template< typename Vector > struct apply + { + typedef vector39< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38 + > type; + }; +}; + template< typename V > -struct vector_item< V,40 > +struct v_at< V,40 > { typedef typename V::item40 type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp b/include/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp index 15e1960..7f77259 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector40_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector40_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T @@ -12,18 +19,17 @@ template< > struct vector31_c : vector31< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + > { }; @@ -36,18 +42,18 @@ template< > struct vector32_c : vector32< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >, integral_c<T + , C31> + > { }; @@ -60,18 +66,18 @@ template< > struct vector33_c : vector33< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 > + > { }; @@ -84,19 +90,18 @@ template< > struct vector34_c : vector34< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + > { }; @@ -109,19 +114,19 @@ template< > struct vector35_c : vector35< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >, integral_c<T + , C34> + > { }; @@ -134,19 +139,19 @@ template< > struct vector36_c : vector36< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 > + > { }; @@ -159,20 +164,19 @@ template< > struct vector37_c : vector37< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + > { }; @@ -185,20 +189,20 @@ template< > struct vector38_c : vector38< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >, integral_c<T + , C37> + > { }; @@ -211,20 +215,20 @@ template< > struct vector39_c : vector39< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 > + > { }; @@ -237,24 +241,21 @@ template< > struct vector40_c : vector40< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + > { }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp b/include/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp index ed4e92c..5a4c6d7 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector50.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector50.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 @@ -64,14 +71,14 @@ struct vector41 typedef void_ item41; typedef T40 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,41> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,41 > end; }; template<> -struct push_front_traits< aux::vector_tag< 40> > +struct push_front_impl< aux::vector_tag<40> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector41< T @@ -101,9 +108,9 @@ struct push_front_traits< aux::vector_tag< 40> > }; template<> -struct pop_front_traits< aux::vector_tag< 41> > +struct pop_front_impl< aux::vector_tag<41> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector40< typename Vector::item1, typename Vector::item2 @@ -130,8 +137,70 @@ struct pop_front_traits< aux::vector_tag< 41> > }; }; +template<> +struct push_back_impl< aux::vector_tag<40> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector41< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<41> > +{ + template< typename Vector > struct apply + { + typedef vector40< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + > type; + }; +}; + template< typename V > -struct vector_item< V,41 > +struct v_at< V,41 > { typedef typename V::item41 type; }; @@ -197,14 +266,14 @@ struct vector42 typedef void_ item42; typedef T41 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,42> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,42 > end; }; template<> -struct push_front_traits< aux::vector_tag< 41> > +struct push_front_impl< aux::vector_tag<41> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector42< T @@ -235,9 +304,9 @@ struct push_front_traits< aux::vector_tag< 41> > }; template<> -struct pop_front_traits< aux::vector_tag< 42> > +struct pop_front_impl< aux::vector_tag<42> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector41< typename Vector::item1, typename Vector::item2 @@ -265,8 +334,72 @@ struct pop_front_traits< aux::vector_tag< 42> > }; }; +template<> +struct push_back_impl< aux::vector_tag<41> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector42< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<42> > +{ + template< typename Vector > struct apply + { + typedef vector41< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40 + > type; + }; +}; + template< typename V > -struct vector_item< V,42 > +struct v_at< V,42 > { typedef typename V::item42 type; }; @@ -333,14 +466,14 @@ struct vector43 typedef void_ item43; typedef T42 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,43> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,43 > end; }; template<> -struct push_front_traits< aux::vector_tag< 42> > +struct push_front_impl< aux::vector_tag<42> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector43< T @@ -371,9 +504,9 @@ struct push_front_traits< aux::vector_tag< 42> > }; template<> -struct pop_front_traits< aux::vector_tag< 43> > +struct pop_front_impl< aux::vector_tag<43> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector42< typename Vector::item1, typename Vector::item2 @@ -401,8 +534,72 @@ struct pop_front_traits< aux::vector_tag< 43> > }; }; +template<> +struct push_back_impl< aux::vector_tag<42> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector43< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<43> > +{ + template< typename Vector > struct apply + { + typedef vector42< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + > type; + }; +}; + template< typename V > -struct vector_item< V,43 > +struct v_at< V,43 > { typedef typename V::item43 type; }; @@ -470,14 +667,14 @@ struct vector44 typedef void_ item44; typedef T43 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,44> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,44 > end; }; template<> -struct push_front_traits< aux::vector_tag< 43> > +struct push_front_impl< aux::vector_tag<43> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector44< T @@ -509,9 +706,9 @@ struct push_front_traits< aux::vector_tag< 43> > }; template<> -struct pop_front_traits< aux::vector_tag< 44> > +struct pop_front_impl< aux::vector_tag<44> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector43< typename Vector::item1, typename Vector::item2 @@ -540,8 +737,74 @@ struct pop_front_traits< aux::vector_tag< 44> > }; }; +template<> +struct push_back_impl< aux::vector_tag<43> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector44< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<44> > +{ + template< typename Vector > struct apply + { + typedef vector43< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42 + > type; + }; +}; + template< typename V > -struct vector_item< V,44 > +struct v_at< V,44 > { typedef typename V::item44 type; }; @@ -610,14 +873,14 @@ struct vector45 typedef void_ item45; typedef T44 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,45> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,45 > end; }; template<> -struct push_front_traits< aux::vector_tag< 44> > +struct push_front_impl< aux::vector_tag<44> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector45< T @@ -649,9 +912,9 @@ struct push_front_traits< aux::vector_tag< 44> > }; template<> -struct pop_front_traits< aux::vector_tag< 45> > +struct pop_front_impl< aux::vector_tag<45> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector44< typename Vector::item1, typename Vector::item2 @@ -680,8 +943,74 @@ struct pop_front_traits< aux::vector_tag< 45> > }; }; +template<> +struct push_back_impl< aux::vector_tag<44> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector45< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<45> > +{ + template< typename Vector > struct apply + { + typedef vector44< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + > type; + }; +}; + template< typename V > -struct vector_item< V,45 > +struct v_at< V,45 > { typedef typename V::item45 type; }; @@ -752,14 +1081,14 @@ struct vector46 typedef void_ item46; typedef T45 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,46> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,46 > end; }; template<> -struct push_front_traits< aux::vector_tag< 45> > +struct push_front_impl< aux::vector_tag<45> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector46< T @@ -792,9 +1121,9 @@ struct push_front_traits< aux::vector_tag< 45> > }; template<> -struct pop_front_traits< aux::vector_tag< 46> > +struct pop_front_impl< aux::vector_tag<46> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector45< typename Vector::item1, typename Vector::item2 @@ -824,8 +1153,76 @@ struct pop_front_traits< aux::vector_tag< 46> > }; }; +template<> +struct push_back_impl< aux::vector_tag<45> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector46< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<46> > +{ + template< typename Vector > struct apply + { + typedef vector45< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44 + > type; + }; +}; + template< typename V > -struct vector_item< V,46 > +struct v_at< V,46 > { typedef typename V::item46 type; }; @@ -897,14 +1294,14 @@ struct vector47 typedef void_ item47; typedef T46 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,47> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,47 > end; }; template<> -struct push_front_traits< aux::vector_tag< 46> > +struct push_front_impl< aux::vector_tag<46> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector47< T @@ -937,9 +1334,9 @@ struct push_front_traits< aux::vector_tag< 46> > }; template<> -struct pop_front_traits< aux::vector_tag< 47> > +struct pop_front_impl< aux::vector_tag<47> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector46< typename Vector::item1, typename Vector::item2 @@ -969,8 +1366,76 @@ struct pop_front_traits< aux::vector_tag< 47> > }; }; +template<> +struct push_back_impl< aux::vector_tag<46> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector47< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<47> > +{ + template< typename Vector > struct apply + { + typedef vector46< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + > type; + }; +}; + template< typename V > -struct vector_item< V,47 > +struct v_at< V,47 > { typedef typename V::item47 type; }; @@ -1043,14 +1508,14 @@ struct vector48 typedef void_ item48; typedef T47 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,48> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,48 > end; }; template<> -struct push_front_traits< aux::vector_tag< 47> > +struct push_front_impl< aux::vector_tag<47> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector48< T @@ -1084,9 +1549,9 @@ struct push_front_traits< aux::vector_tag< 47> > }; template<> -struct pop_front_traits< aux::vector_tag< 48> > +struct pop_front_impl< aux::vector_tag<48> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector47< typename Vector::item1, typename Vector::item2 @@ -1117,8 +1582,78 @@ struct pop_front_traits< aux::vector_tag< 48> > }; }; +template<> +struct push_back_impl< aux::vector_tag<47> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector48< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<48> > +{ + template< typename Vector > struct apply + { + typedef vector47< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46 + > type; + }; +}; + template< typename V > -struct vector_item< V,48 > +struct v_at< V,48 > { typedef typename V::item48 type; }; @@ -1192,14 +1727,14 @@ struct vector49 typedef void_ item49; typedef T48 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,49> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,49 > end; }; template<> -struct push_front_traits< aux::vector_tag< 48> > +struct push_front_impl< aux::vector_tag<48> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector49< T @@ -1233,9 +1768,9 @@ struct push_front_traits< aux::vector_tag< 48> > }; template<> -struct pop_front_traits< aux::vector_tag< 49> > +struct pop_front_impl< aux::vector_tag<49> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector48< typename Vector::item1, typename Vector::item2 @@ -1266,8 +1801,78 @@ struct pop_front_traits< aux::vector_tag< 49> > }; }; +template<> +struct push_back_impl< aux::vector_tag<48> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector49< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46, typename Vector::item47 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<49> > +{ + template< typename Vector > struct apply + { + typedef vector48< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46, typename Vector::item47 + > type; + }; +}; + template< typename V > -struct vector_item< V,49 > +struct v_at< V,49 > { typedef typename V::item49 type; }; @@ -1342,14 +1947,14 @@ struct vector50 typedef void_ item50; typedef T49 back; - typedef vector_iterator< type,integral_c<long,0> > begin; - typedef vector_iterator< type,integral_c<long,50> > end; + typedef v_iter< type,0 > begin; + typedef v_iter< type,50 > end; }; template<> -struct push_front_traits< aux::vector_tag< 49> > +struct push_front_impl< aux::vector_tag<49> > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { typedef vector50< T @@ -1384,9 +1989,9 @@ struct push_front_traits< aux::vector_tag< 49> > }; template<> -struct pop_front_traits< aux::vector_tag< 50> > +struct pop_front_impl< aux::vector_tag<50> > { - template< typename Vector > struct algorithm + template< typename Vector > struct apply { typedef vector49< typename Vector::item1, typename Vector::item2 @@ -1418,12 +2023,82 @@ struct pop_front_traits< aux::vector_tag< 50> > }; }; +template<> +struct push_back_impl< aux::vector_tag<49> > +{ + template< typename Vector, typename T > struct apply + { + typedef vector50< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46, typename Vector::item47 + , typename Vector::item48 + , + T + > type; + }; +}; + +template<> +struct pop_back_impl< aux::vector_tag<50> > +{ + template< typename Vector > struct apply + { + typedef vector49< + typename Vector::item0, typename Vector::item1 + , typename Vector::item2, typename Vector::item3 + , typename Vector::item4, typename Vector::item5 + , typename Vector::item6, typename Vector::item7 + , typename Vector::item8, typename Vector::item9 + , typename Vector::item10, typename Vector::item11 + , typename Vector::item12, typename Vector::item13 + , typename Vector::item14, typename Vector::item15 + , typename Vector::item16, typename Vector::item17 + , typename Vector::item18, typename Vector::item19 + , typename Vector::item20, typename Vector::item21 + , typename Vector::item22, typename Vector::item23 + , typename Vector::item24, typename Vector::item25 + , typename Vector::item26, typename Vector::item27 + , typename Vector::item28, typename Vector::item29 + , typename Vector::item30, typename Vector::item31 + , typename Vector::item32, typename Vector::item33 + , typename Vector::item34, typename Vector::item35 + , typename Vector::item36, typename Vector::item37 + , typename Vector::item38, typename Vector::item39 + , typename Vector::item40, typename Vector::item41 + , typename Vector::item42, typename Vector::item43 + , typename Vector::item44, typename Vector::item45 + , typename Vector::item46, typename Vector::item47 + , typename Vector::item48 + > type; + }; +}; + template< typename V > -struct vector_item< V,50 > +struct v_at< V,50 > { typedef typename V::item50 type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp b/include/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp index b15c384..2b4e133 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector50_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector50_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T @@ -13,21 +20,21 @@ template< > struct vector41_c : vector41< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39>,integral_c<T,C40 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >, integral_c<T + , C40> + > { }; @@ -41,21 +48,21 @@ template< > struct vector42_c : vector42< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39>,integral_c<T,C40>,integral_c<T,C41 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 > + > { }; @@ -69,22 +76,21 @@ template< > struct vector43_c : vector43< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39>,integral_c<T,C40>,integral_c<T,C41 > - ,integral_c< T,C42 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + > { }; @@ -98,22 +104,22 @@ template< > struct vector44_c : vector44< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39>,integral_c<T,C40>,integral_c<T,C41 > - ,integral_c< T,C42>,integral_c<T,C43 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 >, integral_c<T + , C43> + > { }; @@ -127,22 +133,22 @@ template< > struct vector45_c : vector45< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39>,integral_c<T,C40>,integral_c<T,C41 > - ,integral_c< T,C42>,integral_c<T,C43>,integral_c<T,C44 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 > + > { }; @@ -156,23 +162,22 @@ template< > struct vector46_c : vector46< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39>,integral_c<T,C40>,integral_c<T,C41 > - ,integral_c< T,C42>,integral_c<T,C43>,integral_c<T,C44 > - ,integral_c< T,C45 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > + > { }; @@ -186,23 +191,23 @@ template< > struct vector47_c : vector47< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39>,integral_c<T,C40>,integral_c<T,C41 > - ,integral_c< T,C42>,integral_c<T,C43>,integral_c<T,C44 > - ,integral_c< T,C45>,integral_c<T,C46 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 >, integral_c<T + , C46> + > { }; @@ -216,23 +221,23 @@ template< > struct vector48_c : vector48< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39>,integral_c<T,C40>,integral_c<T,C41 > - ,integral_c< T,C42>,integral_c<T,C43>,integral_c<T,C44 > - ,integral_c< T,C45>,integral_c<T,C46>,integral_c<T,C47 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > + , integral_c< T,C46 >, integral_c< T,C47 > + > { }; @@ -246,24 +251,23 @@ template< > struct vector49_c : vector49< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39>,integral_c<T,C40>,integral_c<T,C41 > - ,integral_c< T,C42>,integral_c<T,C43>,integral_c<T,C44 > - ,integral_c< T,C45>,integral_c<T,C46>,integral_c<T,C47 > - ,integral_c< T,C48 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > + , integral_c< T,C46 >, integral_c< T,C47 >, integral_c< T,C48 > + > { }; @@ -277,27 +281,25 @@ template< > struct vector50_c : vector50< - integral_c< T,C0>,integral_c<T,C1>,integral_c<T,C2 > - ,integral_c< T,C3>,integral_c<T,C4>,integral_c<T,C5 > - ,integral_c< T,C6>,integral_c<T,C7>,integral_c<T,C8 > - ,integral_c< T,C9>,integral_c<T,C10>,integral_c<T,C11 > - ,integral_c< T,C12>,integral_c<T,C13>,integral_c<T,C14 > - ,integral_c< T,C15>,integral_c<T,C16>,integral_c<T,C17 > - ,integral_c< T,C18>,integral_c<T,C19>,integral_c<T,C20 > - ,integral_c< T,C21>,integral_c<T,C22>,integral_c<T,C23 > - ,integral_c< T,C24>,integral_c<T,C25>,integral_c<T,C26 > - ,integral_c< T,C27>,integral_c<T,C28>,integral_c<T,C29 > - ,integral_c< T,C30>,integral_c<T,C31>,integral_c<T,C32 > - ,integral_c< T,C33>,integral_c<T,C34>,integral_c<T,C35 > - ,integral_c< T,C36>,integral_c<T,C37>,integral_c<T,C38 > - ,integral_c< T,C39>,integral_c<T,C40>,integral_c<T,C41 > - ,integral_c< T,C42>,integral_c<T,C43>,integral_c<T,C44 > - ,integral_c< T,C45>,integral_c<T,C46>,integral_c<T,C47 > - ,integral_c< T,C48>,integral_c<T,C49 > - > + integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > + , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > + , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > + , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > + , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > + , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > + , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > + , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > + , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > + , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > + , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > + , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > + , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > + , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > + , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > + , integral_c< T,C46 >, integral_c< T,C47 >, integral_c< T,C48 >, integral_c<T + , C49> + > { }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp b/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp index 2193850..e4c6407 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp @@ -1,67 +1,74 @@ -// preprocessed version of 'boost/mpl/vector/vector10.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector10.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T0 > struct vector1 - : vector_node< - 1 - , T0 + : v_item< + T0 , vector0< > > { + typedef vector1 type; }; template< typename T0, typename T1 > struct vector2 - : vector_node< - 2 - , T0 - , vector1<T1> + : v_item< + T1 + , vector1<T0> > { + typedef vector2 type; }; template< typename T0, typename T1, typename T2 > struct vector3 - : vector_node< - 3 - , T0 - , vector2< T1,T2 > + : v_item< + T2 + , vector2< T0,T1 > > { + typedef vector3 type; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector4 - : vector_node< - 4 - , T0 - , vector3< T1,T2,T3 > + : v_item< + T3 + , vector3< T0,T1,T2 > > { + typedef vector4 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector5 - : vector_node< - 5 - , T0 - , vector4< T1,T2,T3,T4 > + : v_item< + T4 + , vector4< T0,T1,T2,T3 > > { + typedef vector5 type; }; template< @@ -69,12 +76,12 @@ template< , typename T5 > struct vector6 - : vector_node< - 6 - , T0 - , vector5< T1,T2,T3,T4,T5 > + : v_item< + T5 + , vector5< T0,T1,T2,T3,T4 > > { + typedef vector6 type; }; template< @@ -82,12 +89,12 @@ template< , typename T5, typename T6 > struct vector7 - : vector_node< - 7 - , T0 - , vector6< T1,T2,T3,T4,T5,T6 > + : v_item< + T6 + , vector6< T0,T1,T2,T3,T4,T5 > > { + typedef vector7 type; }; template< @@ -95,12 +102,12 @@ template< , typename T5, typename T6, typename T7 > struct vector8 - : vector_node< - 8 - , T0 - , vector7< T1,T2,T3,T4,T5,T6,T7 > + : v_item< + T7 + , vector7< T0,T1,T2,T3,T4,T5,T6 > > { + typedef vector8 type; }; template< @@ -108,12 +115,12 @@ template< , typename T5, typename T6, typename T7, typename T8 > struct vector9 - : vector_node< - 9 - , T0 - , vector8< T1,T2,T3,T4,T5,T6,T7,T8 > + : v_item< + T8 + , vector8< T0,T1,T2,T3,T4,T5,T6,T7 > > { + typedef vector9 type; }; template< @@ -121,14 +128,12 @@ template< , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector10 - : vector_node< - 10 - , T0 - , vector9< T1,T2,T3,T4,T5,T6,T7,T8,T9 > + : v_item< + T9 + , vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > > { + typedef vector10 type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp b/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp index cbf03ed..8ddfb96 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp @@ -1,20 +1,27 @@ -// preprocessed version of 'boost/mpl/vector/vector10_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector10_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T , T C0 > struct vector1_c - : vector_node< - 1 - , integral_c< T,C0 > + : v_item< + integral_c< T,C0 > , vector0_c<T> > { + typedef vector1_c type; }; template< @@ -22,12 +29,12 @@ template< , T C0, T C1 > struct vector2_c - : vector_node< - 2 - , integral_c< T,C0 > - , vector1_c< T,C1 > + : v_item< + integral_c< T,C1 > + , vector1_c< T,C0 > > { + typedef vector2_c type; }; template< @@ -35,12 +42,12 @@ template< , T C0, T C1, T C2 > struct vector3_c - : vector_node< - 3 - , integral_c< T,C0 > - , vector2_c< T,C1,C2 > + : v_item< + integral_c< T,C2 > + , vector2_c< T,C0,C1 > > { + typedef vector3_c type; }; template< @@ -48,12 +55,12 @@ template< , T C0, T C1, T C2, T C3 > struct vector4_c - : vector_node< - 4 - , integral_c< T,C0 > - , vector3_c< T,C1,C2,C3 > + : v_item< + integral_c< T,C3 > + , vector3_c< T,C0,C1,C2 > > { + typedef vector4_c type; }; template< @@ -61,12 +68,12 @@ template< , T C0, T C1, T C2, T C3, T C4 > struct vector5_c - : vector_node< - 5 - , integral_c< T,C0 > - , vector4_c< T,C1,C2,C3,C4 > + : v_item< + integral_c< T,C4 > + , vector4_c< T,C0,C1,C2,C3 > > { + typedef vector5_c type; }; template< @@ -74,12 +81,12 @@ template< , T C0, T C1, T C2, T C3, T C4, T C5 > struct vector6_c - : vector_node< - 6 - , integral_c< T,C0 > - , vector5_c< T,C1,C2,C3,C4,C5 > + : v_item< + integral_c< T,C5 > + , vector5_c< T,C0,C1,C2,C3,C4 > > { + typedef vector6_c type; }; template< @@ -87,12 +94,12 @@ template< , T C0, T C1, T C2, T C3, T C4, T C5, T C6 > struct vector7_c - : vector_node< - 7 - , integral_c< T,C0 > - , vector6_c< T,C1,C2,C3,C4,C5,C6 > + : v_item< + integral_c< T,C6 > + , vector6_c< T,C0,C1,C2,C3,C4,C5 > > { + typedef vector7_c type; }; template< @@ -100,12 +107,12 @@ template< , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7 > struct vector8_c - : vector_node< - 8 - , integral_c< T,C0 > - , vector7_c< T,C1,C2,C3,C4,C5,C6,C7 > + : v_item< + integral_c< T,C7 > + , vector7_c< T,C0,C1,C2,C3,C4,C5,C6 > > { + typedef vector8_c type; }; template< @@ -113,12 +120,12 @@ template< , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8 > struct vector9_c - : vector_node< - 9 - , integral_c< T,C0 > - , vector8_c< T,C1,C2,C3,C4,C5,C6,C7,C8 > + : v_item< + integral_c< T,C8 > + , vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > > { + typedef vector9_c type; }; template< @@ -126,14 +133,12 @@ template< , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9 > struct vector10_c - : vector_node< - 10 - , integral_c< T,C0 > - , vector9_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9 > + : v_item< + integral_c< T,C9 > + , vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > > { + typedef vector10_c type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp b/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp index eeec911..78ccac4 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector20.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector20.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 @@ -10,12 +17,12 @@ template< , typename T10 > struct vector11 - : vector_node< - 11 - , T0 - , vector10< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > + : v_item< + T10 + , vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > > { + typedef vector11 type; }; template< @@ -24,12 +31,12 @@ template< , typename T10, typename T11 > struct vector12 - : vector_node< - 12 - , T0 - , vector11< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > + : v_item< + T11 + , vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > > { + typedef vector12 type; }; template< @@ -38,12 +45,12 @@ template< , typename T10, typename T11, typename T12 > struct vector13 - : vector_node< - 13 - , T0 - , vector12< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > + : v_item< + T12 + , vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > > { + typedef vector13 type; }; template< @@ -52,12 +59,12 @@ template< , typename T10, typename T11, typename T12, typename T13 > struct vector14 - : vector_node< - 14 - , T0 - , vector13< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > + : v_item< + T13 + , vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > > { + typedef vector14 type; }; template< @@ -66,12 +73,12 @@ template< , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector15 - : vector_node< - 15 - , T0 - , vector14< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 > + : v_item< + T14 + , vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > > { + typedef vector15 type; }; template< @@ -81,12 +88,12 @@ template< , typename T15 > struct vector16 - : vector_node< - 16 - , T0 - , vector15< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 > + : v_item< + T15 + , vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 > > { + typedef vector16 type; }; template< @@ -96,12 +103,12 @@ template< , typename T15, typename T16 > struct vector17 - : vector_node< - 17 - , T0 - , vector16< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 > + : v_item< + T16 + , vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 > > { + typedef vector17 type; }; template< @@ -111,12 +118,12 @@ template< , typename T15, typename T16, typename T17 > struct vector18 - : vector_node< - 18 - , T0 - , vector17< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 > + : v_item< + T17 + , vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 > > { + typedef vector18 type; }; template< @@ -126,12 +133,12 @@ template< , typename T15, typename T16, typename T17, typename T18 > struct vector19 - : vector_node< - 19 - , T0 - , vector18< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 > + : v_item< + T18 + , vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 > > { + typedef vector19 type; }; template< @@ -141,14 +148,12 @@ template< , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector20 - : vector_node< - 20 - , T0 - , vector19< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 > + : v_item< + T19 + , vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 > > { + typedef vector20 type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp b/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp index 0821656..a6b6b0d 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp @@ -1,20 +1,27 @@ -// preprocessed version of 'boost/mpl/vector/vector20_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector20_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 > struct vector11_c - : vector_node< - 11 - , integral_c< T,C0 > - , vector10_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > + : v_item< + integral_c< T,C10 > + , vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > > { + typedef vector11_c type; }; template< @@ -23,12 +30,12 @@ template< , T C11 > struct vector12_c - : vector_node< - 12 - , integral_c< T,C0 > - , vector11_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > + : v_item< + integral_c< T,C11 > + , vector11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > > { + typedef vector12_c type; }; template< @@ -37,12 +44,12 @@ template< , T C11, T C12 > struct vector13_c - : vector_node< - 13 - , integral_c< T,C0 > - , vector12_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > + : v_item< + integral_c< T,C12 > + , vector12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > > { + typedef vector13_c type; }; template< @@ -51,12 +58,12 @@ template< , T C11, T C12, T C13 > struct vector14_c - : vector_node< - 14 - , integral_c< T,C0 > - , vector13_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 > + : v_item< + integral_c< T,C13 > + , vector13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > > { + typedef vector14_c type; }; template< @@ -65,12 +72,12 @@ template< , T C11, T C12, T C13, T C14 > struct vector15_c - : vector_node< - 15 - , integral_c< T,C0 > - , vector14_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 > + : v_item< + integral_c< T,C14 > + , vector14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 > > { + typedef vector15_c type; }; template< @@ -79,12 +86,12 @@ template< , T C11, T C12, T C13, T C14, T C15 > struct vector16_c - : vector_node< - 16 - , integral_c< T,C0 > - , vector15_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 > + : v_item< + integral_c< T,C15 > + , vector15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 > > { + typedef vector16_c type; }; template< @@ -93,12 +100,12 @@ template< , T C11, T C12, T C13, T C14, T C15, T C16 > struct vector17_c - : vector_node< - 17 - , integral_c< T,C0 > - , vector16_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 > + : v_item< + integral_c< T,C16 > + , vector16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 > > { + typedef vector17_c type; }; template< @@ -107,12 +114,12 @@ template< , T C11, T C12, T C13, T C14, T C15, T C16, T C17 > struct vector18_c - : vector_node< - 18 - , integral_c< T,C0 > - , vector17_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 > + : v_item< + integral_c< T,C17 > + , vector17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 > > { + typedef vector18_c type; }; template< @@ -121,12 +128,12 @@ template< , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18 > struct vector19_c - : vector_node< - 19 - , integral_c< T,C0 > - , vector18_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 > + : v_item< + integral_c< T,C18 > + , vector18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 > > { + typedef vector19_c type; }; template< @@ -135,14 +142,12 @@ template< , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19 > struct vector20_c - : vector_node< - 20 - , integral_c< T,C0 > - , vector19_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 > + : v_item< + integral_c< T,C19 > + , vector19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 > > { + typedef vector20_c type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp b/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp index a20cd35..c404990 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector30.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector30.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 @@ -12,12 +19,12 @@ template< , typename T20 > struct vector21 - : vector_node< - 21 - , T0 - , vector20< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20 > + : v_item< + T20 + , vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 > > { + typedef vector21 type; }; template< @@ -28,12 +35,12 @@ template< , typename T20, typename T21 > struct vector22 - : vector_node< - 22 - , T0 - , vector21< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21 > + : v_item< + T21 + , vector21< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20 > > { + typedef vector22 type; }; template< @@ -44,12 +51,12 @@ template< , typename T20, typename T21, typename T22 > struct vector23 - : vector_node< - 23 - , T0 - , vector22< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22 > + : v_item< + T22 + , vector22< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21 > > { + typedef vector23 type; }; template< @@ -60,12 +67,12 @@ template< , typename T20, typename T21, typename T22, typename T23 > struct vector24 - : vector_node< - 24 - , T0 - , vector23< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23 > + : v_item< + T23 + , vector23< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22 > > { + typedef vector24 type; }; template< @@ -76,12 +83,12 @@ template< , typename T20, typename T21, typename T22, typename T23, typename T24 > struct vector25 - : vector_node< - 25 - , T0 - , vector24< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24 > + : v_item< + T24 + , vector24< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23 > > { + typedef vector25 type; }; template< @@ -93,12 +100,12 @@ template< , typename T25 > struct vector26 - : vector_node< - 26 - , T0 - , vector25< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25 > + : v_item< + T25 + , vector25< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24 > > { + typedef vector26 type; }; template< @@ -110,12 +117,12 @@ template< , typename T25, typename T26 > struct vector27 - : vector_node< - 27 - , T0 - , vector26< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26 > + : v_item< + T26 + , vector26< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25 > > { + typedef vector27 type; }; template< @@ -127,12 +134,12 @@ template< , typename T25, typename T26, typename T27 > struct vector28 - : vector_node< - 28 - , T0 - , vector27< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27 > + : v_item< + T27 + , vector27< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26 > > { + typedef vector28 type; }; template< @@ -144,12 +151,12 @@ template< , typename T25, typename T26, typename T27, typename T28 > struct vector29 - : vector_node< - 29 - , T0 - , vector28< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28 > + : v_item< + T28 + , vector28< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27 > > { + typedef vector29 type; }; template< @@ -161,14 +168,12 @@ template< , typename T25, typename T26, typename T27, typename T28, typename T29 > struct vector30 - : vector_node< - 30 - , T0 - , vector29< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29 > + : v_item< + T29 + , vector29< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28 > > { + typedef vector30 type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp b/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp index c92c683..d58606e 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector30_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector30_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T @@ -10,12 +17,12 @@ template< , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 > struct vector21_c - : vector_node< - 21 - , integral_c< T,C0 > - , vector20_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20 > + : v_item< + integral_c< T,C20 > + , vector20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 > > { + typedef vector21_c type; }; template< @@ -25,12 +32,12 @@ template< , T C21 > struct vector22_c - : vector_node< - 22 - , integral_c< T,C0 > - , vector21_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21 > + : v_item< + integral_c< T,C21 > + , vector21_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20 > > { + typedef vector22_c type; }; template< @@ -40,12 +47,12 @@ template< , T C21, T C22 > struct vector23_c - : vector_node< - 23 - , integral_c< T,C0 > - , vector22_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22 > + : v_item< + integral_c< T,C22 > + , vector22_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21 > > { + typedef vector23_c type; }; template< @@ -55,12 +62,12 @@ template< , T C21, T C22, T C23 > struct vector24_c - : vector_node< - 24 - , integral_c< T,C0 > - , vector23_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23 > + : v_item< + integral_c< T,C23 > + , vector23_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22 > > { + typedef vector24_c type; }; template< @@ -70,12 +77,12 @@ template< , T C21, T C22, T C23, T C24 > struct vector25_c - : vector_node< - 25 - , integral_c< T,C0 > - , vector24_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24 > + : v_item< + integral_c< T,C24 > + , vector24_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23 > > { + typedef vector25_c type; }; template< @@ -85,12 +92,12 @@ template< , T C21, T C22, T C23, T C24, T C25 > struct vector26_c - : vector_node< - 26 - , integral_c< T,C0 > - , vector25_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25 > + : v_item< + integral_c< T,C25 > + , vector25_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24 > > { + typedef vector26_c type; }; template< @@ -100,12 +107,12 @@ template< , T C21, T C22, T C23, T C24, T C25, T C26 > struct vector27_c - : vector_node< - 27 - , integral_c< T,C0 > - , vector26_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26 > + : v_item< + integral_c< T,C26 > + , vector26_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25 > > { + typedef vector27_c type; }; template< @@ -115,12 +122,12 @@ template< , T C21, T C22, T C23, T C24, T C25, T C26, T C27 > struct vector28_c - : vector_node< - 28 - , integral_c< T,C0 > - , vector27_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27 > + : v_item< + integral_c< T,C27 > + , vector27_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26 > > { + typedef vector28_c type; }; template< @@ -130,12 +137,12 @@ template< , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28 > struct vector29_c - : vector_node< - 29 - , integral_c< T,C0 > - , vector28_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28 > + : v_item< + integral_c< T,C28 > + , vector28_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27 > > { + typedef vector29_c type; }; template< @@ -145,14 +152,12 @@ template< , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29 > struct vector30_c - : vector_node< - 30 - , integral_c< T,C0 > - , vector29_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29 > + : v_item< + integral_c< T,C29 > + , vector29_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28 > > { + typedef vector30_c type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp b/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp index bfeb5be..debcf70 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector40.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector40.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 @@ -14,12 +21,12 @@ template< , typename T30 > struct vector31 - : vector_node< - 31 - , T0 - , vector30< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30 > + : v_item< + T30 + , vector30< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29 > > { + typedef vector31 type; }; template< @@ -32,12 +39,12 @@ template< , typename T30, typename T31 > struct vector32 - : vector_node< - 32 - , T0 - , vector31< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31 > + : v_item< + T31 + , vector31< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30 > > { + typedef vector32 type; }; template< @@ -50,12 +57,12 @@ template< , typename T30, typename T31, typename T32 > struct vector33 - : vector_node< - 33 - , T0 - , vector32< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32 > + : v_item< + T32 + , vector32< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31 > > { + typedef vector33 type; }; template< @@ -68,12 +75,12 @@ template< , typename T30, typename T31, typename T32, typename T33 > struct vector34 - : vector_node< - 34 - , T0 - , vector33< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33 > + : v_item< + T33 + , vector33< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32 > > { + typedef vector34 type; }; template< @@ -86,12 +93,12 @@ template< , typename T30, typename T31, typename T32, typename T33, typename T34 > struct vector35 - : vector_node< - 35 - , T0 - , vector34< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34 > + : v_item< + T34 + , vector34< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33 > > { + typedef vector35 type; }; template< @@ -105,12 +112,12 @@ template< , typename T35 > struct vector36 - : vector_node< - 36 - , T0 - , vector35< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35 > + : v_item< + T35 + , vector35< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34 > > { + typedef vector36 type; }; template< @@ -124,12 +131,12 @@ template< , typename T35, typename T36 > struct vector37 - : vector_node< - 37 - , T0 - , vector36< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36 > + : v_item< + T36 + , vector36< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35 > > { + typedef vector37 type; }; template< @@ -143,12 +150,12 @@ template< , typename T35, typename T36, typename T37 > struct vector38 - : vector_node< - 38 - , T0 - , vector37< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37 > + : v_item< + T37 + , vector37< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36 > > { + typedef vector38 type; }; template< @@ -162,12 +169,12 @@ template< , typename T35, typename T36, typename T37, typename T38 > struct vector39 - : vector_node< - 39 - , T0 - , vector38< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38 > + : v_item< + T38 + , vector38< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37 > > { + typedef vector39 type; }; template< @@ -181,14 +188,12 @@ template< , typename T35, typename T36, typename T37, typename T38, typename T39 > struct vector40 - : vector_node< - 40 - , T0 - , vector39< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39 > + : v_item< + T39 + , vector39< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38 > > { + typedef vector40 type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp b/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp index b745761..8d4ab0b 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector40_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector40_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T @@ -11,12 +18,12 @@ template< , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 > struct vector31_c - : vector_node< - 31 - , integral_c< T,C0 > - , vector30_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30 > + : v_item< + integral_c< T,C30 > + , vector30_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29 > > { + typedef vector31_c type; }; template< @@ -27,12 +34,12 @@ template< , T C31 > struct vector32_c - : vector_node< - 32 - , integral_c< T,C0 > - , vector31_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31 > + : v_item< + integral_c< T,C31 > + , vector31_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30 > > { + typedef vector32_c type; }; template< @@ -43,12 +50,12 @@ template< , T C31, T C32 > struct vector33_c - : vector_node< - 33 - , integral_c< T,C0 > - , vector32_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32 > + : v_item< + integral_c< T,C32 > + , vector32_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31 > > { + typedef vector33_c type; }; template< @@ -59,12 +66,12 @@ template< , T C31, T C32, T C33 > struct vector34_c - : vector_node< - 34 - , integral_c< T,C0 > - , vector33_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33 > + : v_item< + integral_c< T,C33 > + , vector33_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32 > > { + typedef vector34_c type; }; template< @@ -75,12 +82,12 @@ template< , T C31, T C32, T C33, T C34 > struct vector35_c - : vector_node< - 35 - , integral_c< T,C0 > - , vector34_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34 > + : v_item< + integral_c< T,C34 > + , vector34_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33 > > { + typedef vector35_c type; }; template< @@ -91,12 +98,12 @@ template< , T C31, T C32, T C33, T C34, T C35 > struct vector36_c - : vector_node< - 36 - , integral_c< T,C0 > - , vector35_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35 > + : v_item< + integral_c< T,C35 > + , vector35_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34 > > { + typedef vector36_c type; }; template< @@ -107,12 +114,12 @@ template< , T C31, T C32, T C33, T C34, T C35, T C36 > struct vector37_c - : vector_node< - 37 - , integral_c< T,C0 > - , vector36_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36 > + : v_item< + integral_c< T,C36 > + , vector36_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35 > > { + typedef vector37_c type; }; template< @@ -123,12 +130,12 @@ template< , T C31, T C32, T C33, T C34, T C35, T C36, T C37 > struct vector38_c - : vector_node< - 38 - , integral_c< T,C0 > - , vector37_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37 > + : v_item< + integral_c< T,C37 > + , vector37_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36 > > { + typedef vector38_c type; }; template< @@ -139,12 +146,12 @@ template< , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38 > struct vector39_c - : vector_node< - 39 - , integral_c< T,C0 > - , vector38_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38 > + : v_item< + integral_c< T,C38 > + , vector38_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37 > > { + typedef vector39_c type; }; template< @@ -155,14 +162,12 @@ template< , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39 > struct vector40_c - : vector_node< - 40 - , integral_c< T,C0 > - , vector39_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39 > + : v_item< + integral_c< T,C39 > + , vector39_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38 > > { + typedef vector40_c type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp b/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp index b3590e2..8db06df 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector50.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector50.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 @@ -16,12 +23,12 @@ template< , typename T40 > struct vector41 - : vector_node< - 41 - , T0 - , vector40< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40 > + : v_item< + T40 + , vector40< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39 > > { + typedef vector41 type; }; template< @@ -36,12 +43,12 @@ template< , typename T40, typename T41 > struct vector42 - : vector_node< - 42 - , T0 - , vector41< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41 > + : v_item< + T41 + , vector41< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40 > > { + typedef vector42 type; }; template< @@ -56,12 +63,12 @@ template< , typename T40, typename T41, typename T42 > struct vector43 - : vector_node< - 43 - , T0 - , vector42< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42 > + : v_item< + T42 + , vector42< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41 > > { + typedef vector43 type; }; template< @@ -76,12 +83,12 @@ template< , typename T40, typename T41, typename T42, typename T43 > struct vector44 - : vector_node< - 44 - , T0 - , vector43< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43 > + : v_item< + T43 + , vector43< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42 > > { + typedef vector44 type; }; template< @@ -96,12 +103,12 @@ template< , typename T40, typename T41, typename T42, typename T43, typename T44 > struct vector45 - : vector_node< - 45 - , T0 - , vector44< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44 > + : v_item< + T44 + , vector44< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43 > > { + typedef vector45 type; }; template< @@ -117,12 +124,12 @@ template< , typename T45 > struct vector46 - : vector_node< - 46 - , T0 - , vector45< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45 > + : v_item< + T45 + , vector45< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44 > > { + typedef vector46 type; }; template< @@ -138,12 +145,12 @@ template< , typename T45, typename T46 > struct vector47 - : vector_node< - 47 - , T0 - , vector46< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46 > + : v_item< + T46 + , vector46< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45 > > { + typedef vector47 type; }; template< @@ -159,12 +166,12 @@ template< , typename T45, typename T46, typename T47 > struct vector48 - : vector_node< - 48 - , T0 - , vector47< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47 > + : v_item< + T47 + , vector47< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46 > > { + typedef vector48 type; }; template< @@ -180,12 +187,12 @@ template< , typename T45, typename T46, typename T47, typename T48 > struct vector49 - : vector_node< - 49 - , T0 - , vector48< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48 > + : v_item< + T48 + , vector48< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47 > > { + typedef vector49 type; }; template< @@ -201,14 +208,12 @@ template< , typename T45, typename T46, typename T47, typename T48, typename T49 > struct vector50 - : vector_node< - 50 - , T0 - , vector49< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49 > + : v_item< + T49 + , vector49< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48 > > { + typedef vector50 type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp b/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp index 67294f0..54b73e8 100644 --- a/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp +++ b/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp @@ -1,8 +1,15 @@ -// preprocessed version of 'boost/mpl/vector/vector50_c.hpp' header -// see the original for copyright information -namespace boost { -namespace mpl { +// 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) +// + +// Preprocessed version of "boost/mpl/vector/vector50_c.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { template< typename T @@ -12,12 +19,12 @@ template< , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 > struct vector41_c - : vector_node< - 41 - , integral_c< T,C0 > - , vector40_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40 > + : v_item< + integral_c< T,C40 > + , vector40_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39 > > { + typedef vector41_c type; }; template< @@ -29,12 +36,12 @@ template< , T C41 > struct vector42_c - : vector_node< - 42 - , integral_c< T,C0 > - , vector41_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41 > + : v_item< + integral_c< T,C41 > + , vector41_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40 > > { + typedef vector42_c type; }; template< @@ -46,12 +53,12 @@ template< , T C41, T C42 > struct vector43_c - : vector_node< - 43 - , integral_c< T,C0 > - , vector42_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42 > + : v_item< + integral_c< T,C42 > + , vector42_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41 > > { + typedef vector43_c type; }; template< @@ -63,12 +70,12 @@ template< , T C41, T C42, T C43 > struct vector44_c - : vector_node< - 44 - , integral_c< T,C0 > - , vector43_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43 > + : v_item< + integral_c< T,C43 > + , vector43_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42 > > { + typedef vector44_c type; }; template< @@ -80,12 +87,12 @@ template< , T C41, T C42, T C43, T C44 > struct vector45_c - : vector_node< - 45 - , integral_c< T,C0 > - , vector44_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44 > + : v_item< + integral_c< T,C44 > + , vector44_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43 > > { + typedef vector45_c type; }; template< @@ -97,12 +104,12 @@ template< , T C41, T C42, T C43, T C44, T C45 > struct vector46_c - : vector_node< - 46 - , integral_c< T,C0 > - , vector45_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45 > + : v_item< + integral_c< T,C45 > + , vector45_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44 > > { + typedef vector46_c type; }; template< @@ -114,12 +121,12 @@ template< , T C41, T C42, T C43, T C44, T C45, T C46 > struct vector47_c - : vector_node< - 47 - , integral_c< T,C0 > - , vector46_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46 > + : v_item< + integral_c< T,C46 > + , vector46_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45 > > { + typedef vector47_c type; }; template< @@ -131,12 +138,12 @@ template< , T C41, T C42, T C43, T C44, T C45, T C46, T C47 > struct vector48_c - : vector_node< - 48 - , integral_c< T,C0 > - , vector47_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47 > + : v_item< + integral_c< T,C47 > + , vector47_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46 > > { + typedef vector48_c type; }; template< @@ -148,12 +155,12 @@ template< , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48 > struct vector49_c - : vector_node< - 49 - , integral_c< T,C0 > - , vector48_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48 > + : v_item< + integral_c< T,C48 > + , vector48_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47 > > { + typedef vector49_c type; }; template< @@ -165,14 +172,12 @@ template< , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48, T C49 > struct vector50_c - : vector_node< - 50 - , integral_c< T,C0 > - , vector49_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48,C49 > + : v_item< + integral_c< T,C49 > + , vector49_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48 > > { + typedef vector50_c type; }; -} // namespace mpl -} // namespace boost - +}} diff --git a/include/boost/mpl/vector/aux_/push_back.hpp b/include/boost/mpl/vector/aux_/push_back.hpp index 79182e8..ce85f49 100644 --- a/include/boost/mpl/vector/aux_/push_back.hpp +++ b/include/boost/mpl/vector/aux_/push_back.hpp @@ -1,41 +1,40 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/aux_/push_back.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_AUX_PUSH_BACK_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_PUSH_BACK_HPP_INCLUDED -#include "boost/mpl/push_back_fwd.hpp" -#include "boost/mpl/aux_/config/vector.hpp" +// 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. -#if defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) +// $Source$ +// $Date$ +// $Revision$ -# include "boost/mpl/vector/aux_/node.hpp" -# include "boost/mpl/list/aux_/tag.hpp" +#include <boost/mpl/push_back_fwd.hpp> +#include <boost/mpl/aux_/config/typeof.hpp> -namespace boost { -namespace mpl { +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +# include <boost/mpl/vector/aux_/item.hpp> +# include <boost/mpl/vector/aux_/tag.hpp> + +namespace boost { namespace mpl { template<> -struct push_back_traits< aux::vector_tag > +struct push_back_impl< aux::vector_tag > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { - typedef vector_node<T,Vector> type; + typedef v_item<T,Vector,0> type; }; }; -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL +#endif #endif // BOOST_MPL_VECTOR_AUX_PUSH_BACK_HPP_INCLUDED diff --git a/include/boost/mpl/vector/aux_/push_front.hpp b/include/boost/mpl/vector/aux_/push_front.hpp index 8bac33e..2ded7f8 100644 --- a/include/boost/mpl/vector/aux_/push_front.hpp +++ b/include/boost/mpl/vector/aux_/push_front.hpp @@ -1,46 +1,40 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/aux_/push_front.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_AUX_PUSH_FRONT_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_PUSH_FRONT_HPP_INCLUDED -#include "boost/mpl/push_front_fwd.hpp" -#include "boost/mpl/aux_/config/vector.hpp" +// 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. -#if defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) +// $Source$ +// $Date$ +// $Revision$ -# include "boost/mpl/aux_/next.hpp" -# include "boost/mpl/vector/aux_/node.hpp" -# include "boost/mpl/list/aux_/tag.hpp" +#include <boost/mpl/push_front_fwd.hpp> +#include <boost/mpl/aux_/config/typeof.hpp> -namespace boost { -namespace mpl { +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +# include <boost/mpl/vector/aux_/item.hpp> +# include <boost/mpl/vector/aux_/tag.hpp> + +namespace boost { namespace mpl { template<> -struct push_front_traits< aux::vector_tag > +struct push_front_impl< aux::vector_tag > { - template< typename Vector, typename T > struct algorithm + template< typename Vector, typename T > struct apply { - typedef vector_node< - BOOST_MPL_AUX_NEXT(Vector::size)::value - , T - , Vector - > type; + typedef v_item<T,Vector,1> type; }; }; -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES #endif // BOOST_MPL_VECTOR_AUX_PUSH_FRONT_HPP_INCLUDED diff --git a/include/boost/mpl/vector/aux_/size.hpp b/include/boost/mpl/vector/aux_/size.hpp index fd0faa2..ed062df 100644 --- a/include/boost/mpl/vector/aux_/size.hpp +++ b/include/boost/mpl/vector/aux_/size.hpp @@ -1,36 +1,33 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/aux_/size.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_AUX_SIZE_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_SIZE_HPP_INCLUDED -#include "boost/mpl/size_fwd.hpp" -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/vector/aux_/tag.hpp" -#include "boost/mpl/aux_/config/vector.hpp" -#include "boost/config.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ -#if defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) +#include <boost/mpl/size_fwd.hpp> +#include <boost/mpl/vector/aux_/O1_size.hpp> +#include <boost/mpl/vector/aux_/tag.hpp> +#include <boost/mpl/aux_/config/typeof.hpp> +#include <boost/mpl/aux_/config/ctps.hpp> + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) template<> -struct size_traits< aux::vector_tag > +struct size_impl< aux::vector_tag > + : O1_size_impl< aux::vector_tag > { - template< typename Vector > struct algorithm - : Vector::size - { - }; }; #else @@ -38,19 +35,15 @@ struct size_traits< aux::vector_tag > #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< long N > -struct size_traits< aux::vector_tag<N> > +struct size_impl< aux::vector_tag<N> > + : O1_size_impl< aux::vector_tag<N> > { - template< typename Vector > struct algorithm - : integral_c<long,N> - { - }; }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#endif // BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_VECTOR_AUX_SIZE_HPP_INCLUDED diff --git a/include/boost/mpl/vector/aux_/tag.hpp b/include/boost/mpl/vector/aux_/tag.hpp index 398b620..940f490 100644 --- a/include/boost/mpl/vector/aux_/tag.hpp +++ b/include/boost/mpl/vector/aux_/tag.hpp @@ -1,32 +1,31 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/aux_/tag.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_AUX_TAG_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_TAG_HPP_INCLUDED -#include "boost/mpl/aux_/config/vector.hpp" +// 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. -namespace boost { -namespace mpl { -namespace aux { +// $Source$ +// $Date$ +// $Revision$ -#if defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) +#include <boost/mpl/aux_/config/typeof.hpp> + +namespace boost { namespace mpl { namespace aux { + +struct v_iter_tag; + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) struct vector_tag; #else template< long N > struct vector_tag; #endif -} // namespace aux -} // namespace mpl -} // namespace boost +}}} #endif // BOOST_MPL_VECTOR_AUX_TAG_HPP_INCLUDED diff --git a/include/boost/mpl/vector/aux_/vector0.hpp b/include/boost/mpl/vector/aux_/vector0.hpp index c3603c3..ca5b0cf 100644 --- a/include/boost/mpl/vector/aux_/vector0.hpp +++ b/include/boost/mpl/vector/aux_/vector0.hpp @@ -1,57 +1,52 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/aux_/vector0.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_AUX_VECTOR0_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_VECTOR0_HPP_INCLUDED -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/void.hpp" -#include "boost/mpl/aux_/type_wrapper.hpp" +// 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. -#include "boost/mpl/vector/aux_/iterator.hpp" -#include "boost/mpl/vector/aux_/tag.hpp" -#include "boost/mpl/aux_/config/vector.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { +#include <boost/mpl/long.hpp> +#include <boost/mpl/void.hpp> +#include <boost/mpl/aux_/na.hpp> +#include <boost/mpl/aux_/type_wrapper.hpp> -#if defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) +#include <boost/mpl/vector/aux_/iterator.hpp> +#include <boost/mpl/vector/aux_/tag.hpp> +#include <boost/mpl/aux_/config/typeof.hpp> -template< typename Dummy = void_ > struct vector0; -template<> struct vector0<void_> +namespace boost { namespace mpl { + +template< typename Dummy = na > struct vector0; + +template<> struct vector0<na> { - static aux::type_wrapper<void_> item(...); - +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) typedef aux::vector_tag tag; - typedef integral_c<long,0> size; - typedef vector0 type; -}; + typedef vector0 type; + typedef long_<32768> lower_bound_; + typedef lower_bound_ upper_bound_; + typedef long_<0> size; + static aux::type_wrapper<void_> item_(...); #else - -template< typename Dummy = void_ > struct vector0; -template<> struct vector0<void_> -{ typedef aux::vector_tag<0> tag; typedef vector0 type; typedef void_ item0; - typedef vector_iterator< vector0,integral_c<long,0> > begin; - typedef vector_iterator< vector0,integral_c<long,0> > end; + typedef v_iter<vector0<>,0> begin; + typedef v_iter<vector0<>,0> end; +#endif }; -#endif // BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL - -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_VECTOR_AUX_VECTOR0_HPP_INCLUDED diff --git a/include/boost/mpl/vector/vector0.hpp b/include/boost/mpl/vector/vector0.hpp index e95081f..0962616 100644 --- a/include/boost/mpl/vector/vector0.hpp +++ b/include/boost/mpl/vector/vector0.hpp @@ -1,31 +1,34 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/vector0.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_VECTOR0_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR0_HPP_INCLUDED -#include "boost/mpl/vector/aux_/at.hpp" -#include "boost/mpl/vector/aux_/front.hpp" -#include "boost/mpl/vector/aux_/push_front.hpp" -#include "boost/mpl/vector/aux_/pop_front.hpp" -#include "boost/mpl/vector/aux_/back.hpp" -#include "boost/mpl/vector/aux_/clear.hpp" -#include "boost/mpl/vector/aux_/O1_size.hpp" -#include "boost/mpl/vector/aux_/size.hpp" -#include "boost/mpl/vector/aux_/empty.hpp" -#include "boost/mpl/vector/aux_/item.hpp" -#include "boost/mpl/vector/aux_/iterator.hpp" -#include "boost/mpl/vector/aux_/vector0.hpp" -#include "boost/mpl/vector/aux_/begin_end.hpp" -#include "boost/mpl/vector/aux_/tag.hpp" +// 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/mpl/vector/aux_/at.hpp> +#include <boost/mpl/vector/aux_/front.hpp> +#include <boost/mpl/vector/aux_/push_front.hpp> +#include <boost/mpl/vector/aux_/pop_front.hpp> +#include <boost/mpl/vector/aux_/push_back.hpp> +#include <boost/mpl/vector/aux_/pop_back.hpp> +#include <boost/mpl/vector/aux_/back.hpp> +#include <boost/mpl/vector/aux_/clear.hpp> +#include <boost/mpl/vector/aux_/O1_size.hpp> +#include <boost/mpl/vector/aux_/size.hpp> +#include <boost/mpl/vector/aux_/empty.hpp> +#include <boost/mpl/vector/aux_/item.hpp> +#include <boost/mpl/vector/aux_/iterator.hpp> +#include <boost/mpl/vector/aux_/vector0.hpp> +#include <boost/mpl/vector/aux_/begin_end.hpp> +#include <boost/mpl/vector/aux_/tag.hpp> #endif // BOOST_MPL_VECTOR_VECTOR0_HPP_INCLUDED diff --git a/include/boost/mpl/vector/vector0_c.hpp b/include/boost/mpl/vector/vector0_c.hpp index 0887064..3f2255a 100644 --- a/include/boost/mpl/vector/vector0_c.hpp +++ b/include/boost/mpl/vector/vector0_c.hpp @@ -1,22 +1,22 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/vector0_c.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_VECTOR0_C_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR0_C_HPP_INCLUDED -#include "boost/mpl/vector/vector0.hpp" +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/vector/vector0.hpp> + +namespace boost { namespace mpl { template< typename T > struct vector0_c : vector0<> @@ -24,7 +24,6 @@ template< typename T > struct vector0_c typedef vector0_c type; }; -} // namespace mpl -} // namespace boost +}} #endif // BOOST_MPL_VECTOR_VECTOR0_C_HPP_INCLUDED diff --git a/include/boost/mpl/vector/vector10.hpp b/include/boost/mpl/vector/vector10.hpp index 1658826..d3dcbea 100644 --- a/include/boost/mpl/vector/vector10.hpp +++ b/include/boost/mpl/vector/vector10.hpp @@ -1,47 +1,45 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/vector10.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_VECTOR10_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR10_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/vector/vector0.hpp" +# include <boost/mpl/vector/vector0.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector10.hpp -# include "boost/mpl/vector/aux_/include_preprocessed.hpp" +# include <boost/mpl/vector/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/aux_/config/vector.hpp" -# include "boost/mpl/aux_/config/ctps.hpp" -# include "boost/preprocessor/iterate.hpp" -# include "boost/config.hpp" +# include <boost/mpl/aux_/config/typeof.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# include <boost/preprocessor/iterate.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(0, 10, "boost/mpl/vector/aux_/numbered.hpp")) + (3,(0, 10, <boost/mpl/vector/aux_/numbered.hpp>)) # include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR10_HPP_INCLUDED diff --git a/include/boost/mpl/vector/vector10_c.hpp b/include/boost/mpl/vector/vector10_c.hpp index 4a94289..6ecbd24 100644 --- a/include/boost/mpl/vector/vector10_c.hpp +++ b/include/boost/mpl/vector/vector10_c.hpp @@ -1,48 +1,46 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/vector10_c.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_VECTOR10_C_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR10_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/vector/vector0_c.hpp" -# include "boost/mpl/vector/vector10.hpp" +# include <boost/mpl/vector/vector0_c.hpp> +# include <boost/mpl/vector/vector10.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector10_c.hpp -# include "boost/mpl/vector/aux_/include_preprocessed.hpp" +# include <boost/mpl/vector/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/aux_/config/vector.hpp" -# include "boost/mpl/aux_/config/ctps.hpp" -# include "boost/preprocessor/iterate.hpp" -# include "boost/config.hpp" +# include <boost/mpl/aux_/config/typeof.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# include <boost/preprocessor/iterate.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(1, 10, "boost/mpl/vector/aux_/numbered_c.hpp")) + (3,(1, 10, <boost/mpl/vector/aux_/numbered_c.hpp>)) # include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR10_C_HPP_INCLUDED diff --git a/include/boost/mpl/vector/vector20.hpp b/include/boost/mpl/vector/vector20.hpp index a8edc18..e4513ff 100644 --- a/include/boost/mpl/vector/vector20.hpp +++ b/include/boost/mpl/vector/vector20.hpp @@ -1,47 +1,45 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/vector20.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_VECTOR20_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR20_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/vector/vector10.hpp" +# include <boost/mpl/vector/vector10.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector20.hpp -# include "boost/mpl/vector/aux_/include_preprocessed.hpp" +# include <boost/mpl/vector/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/aux_/config/vector.hpp" -# include "boost/mpl/aux_/config/ctps.hpp" -# include "boost/preprocessor/iterate.hpp" -# include "boost/config.hpp" +# include <boost/mpl/aux_/config/typeof.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# include <boost/preprocessor/iterate.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(11, 20, "boost/mpl/vector/aux_/numbered.hpp")) + (3,(11, 20, <boost/mpl/vector/aux_/numbered.hpp>)) # include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR20_HPP_INCLUDED diff --git a/include/boost/mpl/vector/vector20_c.hpp b/include/boost/mpl/vector/vector20_c.hpp index d60da98..0d55f42 100644 --- a/include/boost/mpl/vector/vector20_c.hpp +++ b/include/boost/mpl/vector/vector20_c.hpp @@ -1,48 +1,46 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/vector20_c.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_VECTOR20_C_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR20_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/vector/vector10_c.hpp" -# include "boost/mpl/vector/vector20.hpp" +# include <boost/mpl/vector/vector10_c.hpp> +# include <boost/mpl/vector/vector20.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector20_c.hpp -# include "boost/mpl/vector/aux_/include_preprocessed.hpp" +# include <boost/mpl/vector/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/aux_/config/vector.hpp" -# include "boost/mpl/aux_/config/ctps.hpp" -# include "boost/preprocessor/iterate.hpp" -# include "boost/config.hpp" +# include <boost/mpl/aux_/config/typeof.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# include <boost/preprocessor/iterate.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(11, 20, "boost/mpl/vector/aux_/numbered_c.hpp")) + (3,(11, 20, <boost/mpl/vector/aux_/numbered_c.hpp>)) # include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR20_C_HPP_INCLUDED diff --git a/include/boost/mpl/vector/vector30.hpp b/include/boost/mpl/vector/vector30.hpp index e4e68a1..3a8ede7 100644 --- a/include/boost/mpl/vector/vector30.hpp +++ b/include/boost/mpl/vector/vector30.hpp @@ -1,47 +1,45 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/vector30.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_VECTOR30_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR30_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/vector/vector20.hpp" +# include <boost/mpl/vector/vector20.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector30.hpp -# include "boost/mpl/vector/aux_/include_preprocessed.hpp" +# include <boost/mpl/vector/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/aux_/config/vector.hpp" -# include "boost/mpl/aux_/config/ctps.hpp" -# include "boost/preprocessor/iterate.hpp" -# include "boost/config.hpp" +# include <boost/mpl/aux_/config/typeof.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# include <boost/preprocessor/iterate.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(21, 30, "boost/mpl/vector/aux_/numbered.hpp")) + (3,(21, 30, <boost/mpl/vector/aux_/numbered.hpp>)) # include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR30_HPP_INCLUDED diff --git a/include/boost/mpl/vector/vector30_c.hpp b/include/boost/mpl/vector/vector30_c.hpp index 1305773..cc0f5d9 100644 --- a/include/boost/mpl/vector/vector30_c.hpp +++ b/include/boost/mpl/vector/vector30_c.hpp @@ -1,48 +1,47 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/vector30_c.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_VECTOR30_C_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR30_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/vector/vector20_c.hpp" -# include "boost/mpl/vector/vector30.hpp" +# include <boost/mpl/vector/vector20_c.hpp> +# include <boost/mpl/vector/vector30.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector30_c.hpp -# include "boost/mpl/vector/aux_/include_preprocessed.hpp" +# include <boost/mpl/vector/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/aux_/config/vector.hpp" -# include "boost/mpl/aux_/config/ctps.hpp" -# include "boost/preprocessor/iterate.hpp" -# include "boost/config.hpp" +# include <boost/mpl/aux_/config/typeof.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# include <boost/preprocessor/iterate.hpp> +# include <boost/config.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(21, 30, "boost/mpl/vector/aux_/numbered_c.hpp")) + (3,(21, 30, <boost/mpl/vector/aux_/numbered_c.hpp>)) # include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_USE_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR30_C_HPP_INCLUDED diff --git a/include/boost/mpl/vector/vector40.hpp b/include/boost/mpl/vector/vector40.hpp index 1ea4650..e72b748 100644 --- a/include/boost/mpl/vector/vector40.hpp +++ b/include/boost/mpl/vector/vector40.hpp @@ -1,47 +1,45 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/vector40.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_VECTOR40_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR40_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/vector/vector30.hpp" +# include <boost/mpl/vector/vector30.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector40.hpp -# include "boost/mpl/vector/aux_/include_preprocessed.hpp" +# include <boost/mpl/vector/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/aux_/config/vector.hpp" -# include "boost/mpl/aux_/config/ctps.hpp" -# include "boost/preprocessor/iterate.hpp" -# include "boost/config.hpp" +# include <boost/mpl/aux_/config/typeof.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# include <boost/preprocessor/iterate.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(31, 40, "boost/mpl/vector/aux_/numbered.hpp")) + (3,(31, 40, <boost/mpl/vector/aux_/numbered.hpp>)) # include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR40_HPP_INCLUDED diff --git a/include/boost/mpl/vector/vector40_c.hpp b/include/boost/mpl/vector/vector40_c.hpp index 4f0205b..28b3551 100644 --- a/include/boost/mpl/vector/vector40_c.hpp +++ b/include/boost/mpl/vector/vector40_c.hpp @@ -1,48 +1,46 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/vector40_c.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_VECTOR40_C_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR40_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/vector/vector30_c.hpp" -# include "boost/mpl/vector/vector40.hpp" +# include <boost/mpl/vector/vector30_c.hpp> +# include <boost/mpl/vector/vector40.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector40_c.hpp -# include "boost/mpl/vector/aux_/include_preprocessed.hpp" +# include <boost/mpl/vector/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/aux_/config/vector.hpp" -# include "boost/mpl/aux_/config/ctps.hpp" -# include "boost/preprocessor/iterate.hpp" -# include "boost/config.hpp" +# include <boost/mpl/aux_/config/typeof.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# include <boost/preprocessor/iterate.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(31, 40, "boost/mpl/vector/aux_/numbered_c.hpp")) + (3,(31, 40, <boost/mpl/vector/aux_/numbered_c.hpp>)) # include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR40_C_HPP_INCLUDED diff --git a/include/boost/mpl/vector/vector50.hpp b/include/boost/mpl/vector/vector50.hpp index f40d0f6..dce8a0e 100644 --- a/include/boost/mpl/vector/vector50.hpp +++ b/include/boost/mpl/vector/vector50.hpp @@ -1,47 +1,45 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/vector50.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_VECTOR50_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR50_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/vector/vector40.hpp" +# include <boost/mpl/vector/vector40.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector50.hpp -# include "boost/mpl/vector/aux_/include_preprocessed.hpp" +# include <boost/mpl/vector/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/aux_/config/vector.hpp" -# include "boost/mpl/aux_/config/ctps.hpp" -# include "boost/preprocessor/iterate.hpp" -# include "boost/config.hpp" +# include <boost/mpl/aux_/config/typeof.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# include <boost/preprocessor/iterate.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(41, 50, "boost/mpl/vector/aux_/numbered.hpp")) + (3,(41, 50, <boost/mpl/vector/aux_/numbered.hpp>)) # include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR50_HPP_INCLUDED diff --git a/include/boost/mpl/vector/vector50_c.hpp b/include/boost/mpl/vector/vector50_c.hpp index b18c26a..60c33eb 100644 --- a/include/boost/mpl/vector/vector50_c.hpp +++ b/include/boost/mpl/vector/vector50_c.hpp @@ -1,48 +1,46 @@ -//----------------------------------------------------------------------------- -// boost mpl/vector/vector50_c.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_VECTOR_VECTOR50_C_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR50_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/vector/vector40_c.hpp" -# include "boost/mpl/vector/vector50.hpp" +# include <boost/mpl/vector/vector40_c.hpp> +# include <boost/mpl/vector/vector50.hpp> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \ +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector50_c.hpp -# include "boost/mpl/vector/aux_/include_preprocessed.hpp" +# include <boost/mpl/vector/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/aux_/config/vector.hpp" -# include "boost/mpl/aux_/config/ctps.hpp" -# include "boost/preprocessor/iterate.hpp" -# include "boost/config.hpp" +# include <boost/mpl/aux_/config/typeof.hpp> +# include <boost/mpl/aux_/config/ctps.hpp> +# include <boost/preprocessor/iterate.hpp> -namespace boost { -namespace mpl { +namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(41, 50, "boost/mpl/vector/aux_/numbered_c.hpp")) + (3,(41, 50, <boost/mpl/vector/aux_/numbered_c.hpp>)) # include BOOST_PP_ITERATE() -} // namespace mpl -} // namespace boost +}} -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR50_C_HPP_INCLUDED diff --git a/include/boost/mpl/vector_c.hpp b/include/boost/mpl/vector_c.hpp index d79fdae..450760d 100644 --- a/include/boost/mpl/vector_c.hpp +++ b/include/boost/mpl/vector_c.hpp @@ -1,16 +1,12 @@ -#if !defined(BOOST_PP_IS_ITERATING) - -///// header body - #ifndef BOOST_MPL_VECTOR_C_HPP_INCLUDED #define BOOST_MPL_VECTOR_C_HPP_INCLUDED -// Copyright (c) 2000-04 Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. @@ -18,220 +14,47 @@ // $Date$ // $Revision$ -// no include guards, the header is intended for multiple inclusion! - #if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include "boost/mpl/limits/vector.hpp" -# include "boost/mpl/aux_/config/preprocessor.hpp" +# include <boost/mpl/limits/vector.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" +# 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 MPL_AUX_VECTOR_HEADER \ - BOOST_PP_CAT(BOOST_PP_CAT(vector,BOOST_MPL_LIMIT_VECTOR_SIZE), _c).hpp \ +# define AUX778076_HEADER \ + BOOST_PP_CAT(BOOST_PP_CAT(vector,BOOST_MPL_LIMIT_VECTOR_SIZE),_c).hpp \ /**/ #else -# define MPL_AUX_VECTOR_HEADER \ - BOOST_PP_CAT(BOOST_PP_CAT(vector,BOOST_MPL_LIMIT_VECTOR_SIZE), _c)##.hpp \ +# define AUX778076_HEADER \ + BOOST_PP_CAT(BOOST_PP_CAT(vector,BOOST_MPL_LIMIT_VECTOR_SIZE),_c)##.hpp \ /**/ #endif -# include BOOST_PP_STRINGIZE(boost/mpl/vector/MPL_AUX_VECTOR_HEADER) -# undef MPL_AUX_VECTOR_HEADER +# include BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_HEADER) +# undef AUX778076_HEADER # include <climits> #endif -#include "boost/mpl/aux_/config/use_preprocessed.hpp" +#include <boost/mpl/aux_/config/use_preprocessed.hpp> -#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \ - !defined(BOOST_MPL_PREPROCESSING_MODE) +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector_c.hpp -# include "boost/mpl/aux_/include_preprocessed.hpp" +# include <boost/mpl/aux_/include_preprocessed.hpp> #else -# include "boost/mpl/limits/vector.hpp" -# include "boost/mpl/aux_/config/nttp.hpp" +# include <boost/mpl/limits/vector.hpp> -# include "boost/preprocessor/arithmetic/sub.hpp" -# include "boost/preprocessor/tuple/elem.hpp" -# include "boost/preprocessor/enum_params_with_a_default.hpp" -# include "boost/preprocessor/enum_params.hpp" -# include "boost/preprocessor/enum.hpp" -# include "boost/preprocessor/repeat.hpp" -# include "boost/preprocessor/comma_if.hpp" -# include "boost/preprocessor/iterate.hpp" +# define AUX778076_SEQUENCE_NAME vector_c +# define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_VECTOR_SIZE +# define AUX778076_SEQUENCE_NAME_N(n) BOOST_PP_CAT(BOOST_PP_CAT(vector,n),_c) +# define AUX778076_SEQUENCE_INTEGRAL_WRAPPER +# include <boost/mpl/aux_/sequence_wrapper.hpp> -# include "boost/config.hpp" - -#if defined(BOOST_MPL_PREPROCESSING_MODE) -# undef LONG_MAX -#endif - -namespace boost { -namespace mpl { - -# define AUX_VECTOR_C(i) \ - BOOST_PP_CAT(BOOST_PP_CAT(vector,i),_c) \ - /**/ - -# define AUX_VECTOR_C_PARAMS(param) \ - BOOST_PP_ENUM_PARAMS( \ - BOOST_MPL_LIMIT_VECTOR_SIZE \ - , param \ - ) \ - /**/ - -# define AUX_VECTOR_C_DEFAULT_PARAMS(param, value) \ - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( \ - BOOST_MPL_LIMIT_VECTOR_SIZE \ - , param \ - , value \ - ) \ - /**/ - -# define AUX_VECTOR_C_N_PARAMS(n, param) \ - BOOST_PP_COMMA_IF(n) \ - BOOST_PP_ENUM_PARAMS(n, param) \ - /**/ - -# define AUX_VECTOR_C_N_PARTIAL_SPEC_PARAMS(n, param, def) \ - BOOST_PP_ENUM_PARAMS(n, param) \ - BOOST_PP_COMMA_IF(n) \ - BOOST_PP_ENUM( \ - BOOST_PP_SUB_D(1,BOOST_MPL_LIMIT_VECTOR_SIZE,n) \ - , BOOST_PP_TUPLE_ELEM_3_2 \ - , def \ - ) \ - /**/ - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -// forward declaration -template< - typename T - , AUX_VECTOR_C_DEFAULT_PARAMS(BOOST_MPL_AUX_NTTP_DECL(long, C), LONG_MAX) - > -struct vector_c; -#else -namespace aux { -template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct vector_c_impl_chooser; -} -#endif - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(0, BOOST_MPL_LIMIT_VECTOR_SIZE, "boost/mpl/vector_c.hpp")) -#include BOOST_PP_ITERATE() - -// real C++ version is already taken care of -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - -namespace aux { -// vector_count_args -#define BOOST_MPL_AUX_COUNT_ARGS_PREFIX vector_c -#define BOOST_MPL_AUX_COUNT_ARGS_DEFAULT LONG_MAX -#define BOOST_MPL_AUX_COUNT_ARGS_TEMPLATE_PARAM BOOST_MPL_AUX_NTTP_DECL(long, T) -#define BOOST_MPL_AUX_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_VECTOR_SIZE -#define BOOST_MPL_AUX_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES -#include "boost/mpl/aux_/count_args.hpp" - -template< - typename T - , AUX_VECTOR_C_PARAMS(BOOST_MPL_AUX_NTTP_DECL(long, C)) - > -struct vector_c_impl -{ - typedef aux::vector_c_count_args< AUX_VECTOR_C_PARAMS(C) > arg_num_; - typedef typename aux::vector_c_impl_chooser< arg_num_::value > - ::template result_< T, AUX_VECTOR_C_PARAMS(C) >::type type; -}; - -} // namespace aux - -template< - typename T - , AUX_VECTOR_C_DEFAULT_PARAMS(BOOST_MPL_AUX_NTTP_DECL(long, C), LONG_MAX) - > -struct vector_c - : aux::vector_c_impl< T,AUX_VECTOR_C_PARAMS(C) >::type -{ - typedef typename aux::vector_c_impl< - T,AUX_VECTOR_C_PARAMS(C) - >::type type; -}; - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -# undef AUX_VECTOR_C_N_PARTIAL_SPEC_PARAMS -# undef AUX_VECTOR_C_N_PARAMS -# undef AUX_VECTOR_C_DEFAULT_PARAMS -# undef AUX_VECTOR_C_PARAMS -# undef AUX_VECTOR_C - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_C_HPP_INCLUDED - -///// iteration - -#else -#define i BOOST_PP_FRAME_ITERATION(1) - -# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - -#if i == BOOST_MPL_LIMIT_VECTOR_SIZE - -//: primary template (not a specialization!) -template< - typename T - AUX_VECTOR_C_N_PARAMS(i, BOOST_MPL_AUX_NTTP_DECL(long, C)) - > -struct vector_c - : AUX_VECTOR_C(i)< T AUX_VECTOR_C_N_PARAMS(i, C) > -{ - typedef AUX_VECTOR_C(i)< T AUX_VECTOR_C_N_PARAMS(i, C) > type; -}; - -#else - -template< - typename T - AUX_VECTOR_C_N_PARAMS(i, BOOST_MPL_AUX_NTTP_DECL(long, C)) - > -struct vector_c< T,AUX_VECTOR_C_N_PARTIAL_SPEC_PARAMS(i, C, LONG_MAX) > - : AUX_VECTOR_C(i)< T AUX_VECTOR_C_N_PARAMS(i, C) > -{ - typedef AUX_VECTOR_C(i)< T AUX_VECTOR_C_N_PARAMS(i, C) > type; -}; - -#endif // i == BOOST_MPL_LIMIT_VECTOR_SIZE - -# else - -namespace aux { - -template<> -struct vector_c_impl_chooser<i> -{ - template< - typename T - , AUX_VECTOR_C_PARAMS(BOOST_MPL_AUX_NTTP_DECL(long, C)) - > - struct result_ - { - typedef AUX_VECTOR_C(i)< - T AUX_VECTOR_C_N_PARAMS(i, C) - > type; - }; -}; - -} // namespace aux - -# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -#undef i -#endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/void.hpp b/include/boost/mpl/void.hpp index 637780a..55767d6 100644 --- a/include/boost/mpl/void.hpp +++ b/include/boost/mpl/void.hpp @@ -2,25 +2,25 @@ #ifndef BOOST_MPL_VOID_HPP_INCLUDED #define BOOST_MPL_VOID_HPP_INCLUDED -// + file: boost/mpl/void.hpp -// + last modified: 05/may/03 - -// Copyright (c) 2001-03 -// Peter Dimov, Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2001-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/void_fwd.hpp" -#include "boost/mpl/bool.hpp" -#include "boost/mpl/aux_/config/msvc.hpp" -#include "boost/mpl/aux_/config/workaround.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace boost { -namespace mpl { +#include <boost/mpl/void_fwd.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/aux_/na_spec.hpp> +#include <boost/mpl/aux_/config/msvc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN // [JDG Feb-4-2003] made void_ a complete type to allow it to be // instantiated so that it can be passed in as an object that can be @@ -28,6 +28,10 @@ namespace mpl { // a zero arity functor evaluation call. struct void_ { typedef void_ type; }; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +namespace boost { namespace mpl { + template< typename T > struct is_void_ : false_ @@ -46,7 +50,27 @@ struct is_void_<void_> #endif }; -} // namespace mpl -} // namespace boost +template< typename T > +struct is_not_void_ + : true_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using true_::value; +#endif +}; + +template<> +struct is_not_void_<void_> + : false_ +{ +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + using false_::value; +#endif +}; + +BOOST_MPL_AUX_NA_SPEC(1, is_void_) +BOOST_MPL_AUX_NA_SPEC(1, is_not_void_) + +}} #endif // BOOST_MPL_VOID_HPP_INCLUDED diff --git a/include/boost/mpl/void_fwd.hpp b/include/boost/mpl/void_fwd.hpp index d832a81..7179b2a 100644 --- a/include/boost/mpl/void_fwd.hpp +++ b/include/boost/mpl/void_fwd.hpp @@ -2,24 +2,25 @@ #ifndef BOOST_MPL_VOID_FWD_HPP_INCLUDED #define BOOST_MPL_VOID_FWD_HPP_INCLUDED -// + file: boost/mpl/void_fwd.hpp -// + last modified: 05/may/03 - -// Copyright (c) 2001-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2001-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -namespace boost { -namespace mpl { +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/aux_/adl_barrier.hpp> + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN struct void_; -} // namespace mpl -} // namespace boost +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +BOOST_MPL_AUX_ADL_BARRIER_DECL(void_) #endif // BOOST_MPL_VOID_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/zip_view.hpp b/include/boost/mpl/zip_view.hpp index d2fcd8f..ee13d03 100644 --- a/include/boost/mpl/zip_view.hpp +++ b/include/boost/mpl/zip_view.hpp @@ -1,39 +1,41 @@ -//----------------------------------------------------------------------------- -// boost mpl/zip_view.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// David Abrahams, Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MPL_ZIP_VIEW_HPP_INCLUDED #define BOOST_MPL_ZIP_VIEW_HPP_INCLUDED -#include "boost/mpl/transform.hpp" -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/iterator_tag.hpp" -#include "boost/mpl/next.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/apply.hpp" -#include "boost/mpl/aux_/void_spec.hpp" +// Copyright Aleksey Gurtovoy 2000-2002 +// Copyright David Abrahams 2000-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/transform.hpp> +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/iterator_tags.hpp> +#include <boost/mpl/next.hpp> +#include <boost/mpl/lambda.hpp> +#include <boost/mpl/deref.hpp> +#include <boost/mpl/aux_/na_spec.hpp> namespace boost { namespace mpl { template< typename IteratorSeq > struct zip_iterator { - typedef input_iter_tag_ category; - typedef typename transform< + typedef forward_iterator_tag category; + typedef typename transform1< IteratorSeq - , apply0<_1> + , deref<_1> >::type type; typedef zip_iterator< - typename transform< + typename transform1< IteratorSeq , next<_1> >::type @@ -41,13 +43,13 @@ struct zip_iterator }; template< - typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequences) + typename BOOST_MPL_AUX_NA_PARAM(Sequences) > struct zip_view { - private: - typedef typename transform< Sequences, begin<_1> >::type first_ones_; - typedef typename transform< Sequences, end<_1> >::type last_ones_; + private: + typedef typename transform1< Sequences, begin<_1> >::type first_ones_; + typedef typename transform1< Sequences, end<_1> >::type last_ones_; public: typedef nested_begin_end_tag tag; @@ -55,8 +57,8 @@ struct zip_view typedef zip_iterator<last_ones_> end; }; -BOOST_MPL_AUX_VOID_SPEC(1, zip_view) +BOOST_MPL_AUX_NA_SPEC(1, zip_view) -}} // namespace boost::mpl +}} #endif // BOOST_MPL_ZIP_VIEW_HPP_INCLUDED diff --git a/preprocessed/include/bcc/user.hpp b/preprocessed/include/bcc/user.hpp index 714951d..4da0d34 100644 --- a/preprocessed/include/bcc/user.hpp +++ b/preprocessed/include/bcc/user.hpp @@ -1,11 +1,13 @@ #define BOOST_NO_CONFIG -#include "boost/preprocessor/config/config.hpp" +#include <boost/preprocessor/config/config.hpp> #define BOOST_NO_TEMPLATE_TEMPLATES -#define BOOST_MPL_NO_BIND_TEMPLATE -#define BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION -#define BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES -#define BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES -#define BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION -#define BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING +#define BOOST_MPL_CFG_NO_BIND_TEMPLATE +#define BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC +#define BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES +#define BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES +#define BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION +#define BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING +#define BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS +#define BOOST_MPL_CFG_NO_NESTED_FORWARDING diff --git a/preprocessed/include/bcc551/user.hpp b/preprocessed/include/bcc551/user.hpp index 72df50a..bb4a71e 100644 --- a/preprocessed/include/bcc551/user.hpp +++ b/preprocessed/include/bcc551/user.hpp @@ -1,10 +1,12 @@ #define BOOST_NO_CONFIG -#include "boost/preprocessor/config/config.hpp" +#include <boost/preprocessor/config/config.hpp> #define BOOST_NO_TEMPLATE_TEMPLATES -#define BOOST_MPL_NO_BIND_TEMPLATE -#define BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION -#define BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES -#define BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION -#define BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING +#define BOOST_MPL_CFG_NO_BIND_TEMPLATE +#define BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC +#define BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES +#define BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION +#define BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING +#define BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS +#define BOOST_MPL_CFG_NO_NESTED_FORWARDING diff --git a/preprocessed/include/dmc/user.hpp b/preprocessed/include/dmc/user.hpp new file mode 100644 index 0000000..7034a40 --- /dev/null +++ b/preprocessed/include/dmc/user.hpp @@ -0,0 +1,2 @@ +#define BOOST_NO_CONFIG +#define BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS diff --git a/preprocessed/include/gcc/user.hpp b/preprocessed/include/gcc/user.hpp index 84248b6..c9e62bb 100644 --- a/preprocessed/include/gcc/user.hpp +++ b/preprocessed/include/gcc/user.hpp @@ -1,3 +1,2 @@ #define BOOST_NO_CONFIG -#define BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING - +#define BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING diff --git a/preprocessed/include/msvc60/user.hpp b/preprocessed/include/msvc60/user.hpp index 131506f..fffda44 100644 --- a/preprocessed/include/msvc60/user.hpp +++ b/preprocessed/include/msvc60/user.hpp @@ -2,8 +2,11 @@ #define BOOST_MSVC 1200 #define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #define BOOST_NO_INCLASS_MEMBER_INITIALIZATION -#define BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS +#define BOOST_NO_TEMPLATE_TEMPLATES #define BOOST_NO_CV_VOID_SPECIALIZATIONS #define BOOST_NO_INTRINSIC_WCHAR_T #define BOOST_NO_STD_ALLOCATOR -#define BOOST_MPL_NO_BIND_TEMPLATE +#define BOOST_MPL_CFG_NO_BIND_TEMPLATE +#define BOOST_MPL_CFG_NO_APPLY_TEMPLATE +#define BOOST_MPL_CFG_MSVC_60_ETI_BUG +#define BOOST_MPL_CFG_MSVC_ETI_BUG diff --git a/preprocessed/include/msvc70/user.hpp b/preprocessed/include/msvc70/user.hpp index bcc3183..c939784 100644 --- a/preprocessed/include/msvc70/user.hpp +++ b/preprocessed/include/msvc70/user.hpp @@ -2,4 +2,6 @@ #define BOOST_MSVC 1300 #define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #define BOOST_NO_INCLASS_MEMBER_INITIALIZATION -#define BOOST_MPL_NO_BIND_TEMPLATE +#define BOOST_MPL_CFG_NO_BIND_TEMPLATE +#define BOOST_MPL_CFG_NO_APPLY_TEMPLATE +#define BOOST_MPL_CFG_MSVC_ETI_BUG diff --git a/preprocessed/include/mwcw/user.hpp b/preprocessed/include/mwcw/user.hpp index e1978ea..e705c4a 100644 --- a/preprocessed/include/mwcw/user.hpp +++ b/preprocessed/include/mwcw/user.hpp @@ -1,2 +1,2 @@ #define BOOST_NO_CONFIG -#define BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES +#define BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES diff --git a/preprocessed/include/plain/user.hpp b/preprocessed/include/plain/user.hpp index 6154cdc..2285921 100644 --- a/preprocessed/include/plain/user.hpp +++ b/preprocessed/include/plain/user.hpp @@ -1 +1,2 @@ #define BOOST_NO_CONFIG +#define BOOST_MPL_AUX_LAMBDA_SUPPORT(unused1, unused2, unused3) diff --git a/preprocessed/include/typeof_based/user.hpp b/preprocessed/include/typeof_based/user.hpp index c3fff25..d44a087 100644 --- a/preprocessed/include/typeof_based/user.hpp +++ b/preprocessed/include/typeof_based/user.hpp @@ -1,2 +1,2 @@ #define BOOST_NO_CONFIG -#define BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL +#define BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES diff --git a/preprocessed/list/list10.cpp b/preprocessed/list/list10.cpp index 0754874..7044ffa 100644 --- a/preprocessed/list/list10.cpp +++ b/preprocessed/list/list10.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/list/list10.hpp" +#include <boost/mpl/list/list10.hpp> diff --git a/preprocessed/list/list10_c.cpp b/preprocessed/list/list10_c.cpp index e3ac6bb..b4da119 100644 --- a/preprocessed/list/list10_c.cpp +++ b/preprocessed/list/list10_c.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/list/list10_c.hpp" +#include <boost/mpl/list/list10_c.hpp> diff --git a/preprocessed/list/list20.cpp b/preprocessed/list/list20.cpp index 2f4ec33..461b3fc 100644 --- a/preprocessed/list/list20.cpp +++ b/preprocessed/list/list20.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/list/list20.hpp" +#include <boost/mpl/list/list20.hpp> diff --git a/preprocessed/list/list20_c.cpp b/preprocessed/list/list20_c.cpp index ee65fb9..b86133d 100644 --- a/preprocessed/list/list20_c.cpp +++ b/preprocessed/list/list20_c.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/list/list20_c.hpp" +#include <boost/mpl/list/list20_c.hpp> diff --git a/preprocessed/list/list30.cpp b/preprocessed/list/list30.cpp index f208f02..862644d 100644 --- a/preprocessed/list/list30.cpp +++ b/preprocessed/list/list30.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/list/list30.hpp" +#include <boost/mpl/list/list30.hpp> diff --git a/preprocessed/list/list30_c.cpp b/preprocessed/list/list30_c.cpp index 740ee28..d2c04e7 100644 --- a/preprocessed/list/list30_c.cpp +++ b/preprocessed/list/list30_c.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/list/list30_c.hpp" +#include <boost/mpl/list/list30_c.hpp> diff --git a/preprocessed/list/list40.cpp b/preprocessed/list/list40.cpp index e762c2a..4a993ca 100644 --- a/preprocessed/list/list40.cpp +++ b/preprocessed/list/list40.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/list/list40.hpp" +#include <boost/mpl/list/list40.hpp> diff --git a/preprocessed/list/list40_c.cpp b/preprocessed/list/list40_c.cpp index 7a21bdd..56b8510 100644 --- a/preprocessed/list/list40_c.cpp +++ b/preprocessed/list/list40_c.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/list/list40_c.hpp" +#include <boost/mpl/list/list40_c.hpp> diff --git a/preprocessed/list/list50.cpp b/preprocessed/list/list50.cpp index fe96b41..2712a86 100644 --- a/preprocessed/list/list50.cpp +++ b/preprocessed/list/list50.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/list/list50.hpp" +#include <boost/mpl/list/list50.hpp> diff --git a/preprocessed/list/list50_c.cpp b/preprocessed/list/list50_c.cpp index 14df78c..6c12a2d 100644 --- a/preprocessed/list/list50_c.cpp +++ b/preprocessed/list/list50_c.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/list/list50_c.hpp" +#include <boost/mpl/list/list50_c.hpp> diff --git a/preprocessed/map/map10.cpp b/preprocessed/map/map10.cpp new file mode 100644 index 0000000..f4a0f2d --- /dev/null +++ b/preprocessed/map/map10.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/map/map10.hpp> diff --git a/preprocessed/map/map20.cpp b/preprocessed/map/map20.cpp new file mode 100644 index 0000000..eca3cdd --- /dev/null +++ b/preprocessed/map/map20.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/map/map20.hpp> diff --git a/preprocessed/map/map30.cpp b/preprocessed/map/map30.cpp new file mode 100644 index 0000000..d4c040f --- /dev/null +++ b/preprocessed/map/map30.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/map/map30.hpp> diff --git a/preprocessed/map/map40.cpp b/preprocessed/map/map40.cpp new file mode 100644 index 0000000..02e85fa --- /dev/null +++ b/preprocessed/map/map40.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/map/map40.hpp> diff --git a/preprocessed/map/map50.cpp b/preprocessed/map/map50.cpp new file mode 100644 index 0000000..f7cbc44 --- /dev/null +++ b/preprocessed/map/map50.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/map/map50.hpp> diff --git a/preprocessed/pp.py b/preprocessed/pp.py index 7854536..8f0ede4 100644 --- a/preprocessed/pp.py +++ b/preprocessed/pp.py @@ -1,17 +1,16 @@ -# Copyright (c) 2001-03 -# Aleksey Gurtovoy +# Copyright Aleksey Gurtovoy 2001-2004 # -# Permission to use, copy, modify, distribute and sell this software -# and its documentation for any purpose is hereby granted without fee, -# provided that the above copyright notice appears in all copies and -# that both the copyright notice and this permission notice appear in -# supporting documentation. No representations are made about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. +# 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$ + import fileinput import os import re @@ -25,12 +24,16 @@ ident = 4 def nearest_ident_pos(text): return (len(text)/ident) * ident -def block_format(limits,text,first_sep=' ',sep=',',need_last_ident=1): +def block_format(limits, text, first_sep=' ', sep=',', need_last_ident=1 ): + if sep == ',' and string.find( text, '<' ) != -1: + sep = '%s ' % sep + words = string.split( - string.join(string.split(text),' ') - , if_else(sep != ',' or string.find(text,'<') == -1,sep,' %s '%sep) + string.join( string.split( text ), ' ' ) + , sep ) - s = reduce(lambda t,x: '%s '%t, range(0,limits[0]), '') + + s = ' ' * limits[0] max_len = limits[1] return '%s\n%s' \ % ( @@ -46,7 +49,7 @@ def block_format(limits,text,first_sep=' ',sep=',',need_last_ident=1): , if_else(need_last_ident,s,'') ) -def handle_args(match): +def handle_args( match ): if re.compile('^\s*(typedef|struct|static)\s+.*?$').match(match.group(0)): return match.group(0) @@ -59,6 +62,7 @@ def handle_args(match): , 0 ) + def handle_inline_args(match): if len(match.group(0)) < max_len: return match.group(0) @@ -120,57 +124,79 @@ def handle_typedefs(match): return match.group(0) join_sep = ';\n%s' % match.group(1) -# return if_else(string.find(match.group(0), '\n') == -1, '%s%s\n', '%s%s') \ + return '%s%s\n' \ % ( match.group(1) , string.join(map(string.strip, string.split(match.group(2), ';')), join_sep) ) + +def fix_angle_brackets( match ): + return ' '.join( ''.join( match.group(1).split( ' ' ) ) ) + match.group(3) + class pretty: def __init__(self, name): self.output = open(name, "w") self.prev_line = '' - self.re_header_name_comment = re.compile(r"^\s*//\s+\+\s+file:\s+(boost/mpl(/\w+)+\.hpp)s*$") + self.re_copyright_start = re.compile( r'^// Copyright .*$' ) + self.re_copyright_end = re.compile( r'^// See .* for documentation.$' ) + self.reading_copyright = 0 + self.copyright = None + + self.re_header_name_comment = re.compile( r'^\s*//\s+\$[S]ource: /cvsroot/boost/boost/(.*),v\s*\$$' ) self.header_was_written = 0 - self.re_junk = re.compile(r"^\s*(#|//[^:]).*$") - self.re_c_comment_start = re.compile(r"^\s*/\*.*") - self.re_c_comment_end = re.compile(r"^.*\*/\s*$") + self.re_junk = re.compile(r'^\s*(#|//[^/]|////).*$') + self.re_c_comment_start = re.compile(r'^\s*/\*.*') + self.re_c_comment_end = re.compile(r'^.*\*/\s*$') self.inside_c_comment = 0 - self.re_empty_line = re.compile(r"^\s*$") - self.re_comma = re.compile(r'(\w+)\s*,\s*') - self.re_assign = re.compile(r'\s*(=+)\s*') - self.re_marked_comment = re.compile(r'^(\s*//):(.*)$') + self.re_empty_line = re.compile(r'^\s*$') + self.re_comma = re.compile(r'(\S+)\s*,\s*') + self.re_assign = re.compile(r'([^<|^!|^>])\s*(=+)\s*') self.re_marked_empty_comment = re.compile(r'^\s*//\s*$') self.re_typedef = re.compile(r'^\s+typedef\s+.*?;$') self.re_nsl = re.compile(r'^(\s+typedef\s+.*?;|\s*(private|public):\s*|\s*{\s*|\s*(\w|\d|,)+\s*)$') self.re_templ_decl = re.compile(r'^(\s*template\s*<\s*.*?|\s*(private|public):\s*)$') self.re_type_const = re.compile(r'(const)\s+((unsigned|signed)?(bool|char|short|int|long))') + #self.re_templ_args = re.compile(r'^(\s*)(, | {2})((.*::.*?,?)+)\s*$') self.re_templ_args = re.compile(r'^(\s*)(, | {2})((\s*(\w+)(\s+|::)\w+\s*.*?,?)+)\s*$') self.re_inline_templ_args = re.compile( r'^(\s+(,|:\s+)?|struct\s+)(\w+)\s*<((\s*(typename\s+)?\w+\s*(=\s*.*|<(\s*\w+\s*,?)+>\s*)?,?)+)\s*>\s+((struct|class).*?)?$' ) - self.re_simple_list = re.compile(r'(\w+)\s*<((\w|,| |-|>|<)+)>') - self.re_static_const = re.compile(r'(\s*)((static\s+.*?|enum\s*{\s*)value\s*=)(.*?)(}?;)$') + self.re_simple_list = re.compile(r'(\w+)\s*<((\w|,| |-)+)>') + self.re_static_const = re.compile(r'(\s*)((static\s+.*?|enum\s*\w*\s*{\s*)value\s*=)(.*?)(}?;)$') self.re_typedefs = re.compile(r'(\s*)((\s*typedef\s*.*?;)+)\s*$') + self.re_fix_angle_brackets = re.compile( r'(>(\s*>)+)(,|\n$)' ) self.re_closing_curly_brace = re.compile(r'^(}|struct\s+\w+);\s*$') self.re_namespace_scope_templ = re.compile(r'^template\s*<\s*$') self.re_namespace = re.compile(r'^\n?namespace\s+\w+\s*{\s*\n?$') def process(self, line): + if self.reading_copyright: + if not self.re_copyright_end.match( line ): + self.copyright += line + return + self.reading_copyright = 0 + + if not self.header_was_written and self.re_copyright_start.match( line ): + self.copyright = line + self.reading_copyright = 1 + return + # searching for header line - if not self.header_was_written and self.re_header_name_comment.match(line): + if not self.header_was_written and self.re_header_name_comment.match( line ): self.header_was_written = 1 - match = self.re_header_name_comment.match(line) + match = self.re_header_name_comment.match( line ) self.output.write( \ - "// preprocessed version of '%s' header\n"\ - "// see the original for copyright information\n\n" \ - % match.group(1) + '\n%s\n' \ + '// Preprocessed version of "%s" header\n' \ + '// -- DO NOT modify by hand!\n\n' \ + % ( self.copyright, match.group(1) ) ) return @@ -201,17 +227,18 @@ class pretty: return # formatting - line = self.re_comma.sub(r'\1, ', line) - line = self.re_assign.sub(r' \1 ', line) - line = self.re_marked_comment.sub(r'\1\2', line) - line = self.re_marked_empty_comment.sub(r'\n', line) - line = self.re_type_const.sub(r'\2 \1', line) - line = self.re_templ_args.sub(handle_args, line) - line = self.re_inline_templ_args.sub(handle_inline_args, line) - line = self.re_simple_list.sub(handle_simple_list, line) - line = self.re_static_const.sub(handle_static, line) - line = self.re_typedefs.sub(handle_typedefs, line) - + + line = self.re_comma.sub( r'\1, ', line ) + line = self.re_assign.sub( r'\1 \2 ', line ) + line = self.re_marked_empty_comment.sub( r'\n', line ) + line = self.re_type_const.sub( r'\2 \1', line ) + line = self.re_templ_args.sub( handle_args, line ) + line = self.re_inline_templ_args.sub( handle_inline_args, line ) + line = self.re_simple_list.sub( handle_simple_list, line) + line = self.re_static_const.sub( handle_static, line ) + line = self.re_typedefs.sub( handle_typedefs, line ) + line = self.re_fix_angle_brackets.sub( fix_angle_brackets, line ) + # write the output self.output.write(line) self.prev_line = line diff --git a/preprocessed/preprocess.cmd b/preprocessed/preprocess.cmd index 9c0c1f7..fed63ba 100755 --- a/preprocessed/preprocess.cmd +++ b/preprocessed/preprocess.cmd @@ -1 +1 @@ -c:\home\mingw\bin\gcc.exe -E -C -P -I%1 -D BOOST_USER_CONFIG="<%1/libs/mpl/preprocessed/include/%2/user.hpp>" %3 >%4 \ No newline at end of file +gcc -E -C -P -I%1 "-D BOOST_USER_CONFIG=<%1/libs/mpl/preprocessed/include/%2/user.hpp>" -D BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES %3 >%4 diff --git a/preprocessed/preprocess.py b/preprocessed/preprocess.py index 9c707e7..1794041 100644 --- a/preprocessed/preprocess.py +++ b/preprocessed/preprocess.py @@ -1,16 +1,15 @@ -# Copyright (c) 2001-03 -# Aleksey Gurtovoy +# Copyright Aleksey Gurtovoy 2001-2004 # -# Permission to use, copy, modify, distribute and sell this software -# and its documentation for any purpose is hereby granted without fee, -# provided that the above copyright notice appears in all copies and -# that both the copyright notice and this permission notice appear in -# supporting documentation. No representations are made about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. +# 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. +# See http://www.boost.org/libs/mpl for documentation. + +# $Source$ +# $Date$ +# $Revision$ import shutil import os.path @@ -22,7 +21,7 @@ def process( file, boost_root, dst_dir, mode ): os.system( "preprocess %s %s %s %s" % ( boost_root, mode, file, file_path ) ) os.rename( file_path, "%s.tmp" % file_path ) - os.system( "pp.py %s.tmp %s" % ( file_path, file_path ) ) + os.system( "python pp.py %s.tmp %s" % ( file_path, file_path ) ) os.remove( "%s.tmp" % file_path ) filename = os.path.basename(file_path) @@ -74,7 +73,7 @@ def main( all_modes, src_dir, dst_dir ): if __name__ == '__main__': main( - ["bcc", "bcc551", "gcc", "msvc60", "msvc70", "mwcw", "no_ctps", "no_ttp", "plain"] + ["bcc", "bcc551", "gcc", "msvc60", "msvc70", "mwcw", "dmc", "no_ctps", "no_ttp", "plain"] , "src" , "boost\\mpl\\aux_\\preprocessed" ) diff --git a/preprocessed/preprocess_list.py b/preprocessed/preprocess_list.py new file mode 100644 index 0000000..5d2a583 --- /dev/null +++ b/preprocessed/preprocess_list.py @@ -0,0 +1,20 @@ + +# Copyright Aleksey Gurtovoy 2001-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$ + +import preprocess + +preprocess.main( + [ "plain" ] + , "list" + , "boost\\mpl\\list\\aux_\\preprocessed" + ) diff --git a/preprocessed/preprocess_map.py b/preprocessed/preprocess_map.py new file mode 100644 index 0000000..3c1340c --- /dev/null +++ b/preprocessed/preprocess_map.py @@ -0,0 +1,20 @@ + +# Copyright Aleksey Gurtovoy 2001-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$ + +import preprocess + +preprocess.main( + [ "plain", "typeof_based" ] + , "map" + , "boost\\mpl\\map\\aux_\\preprocessed" + ) diff --git a/preprocessed/preprocess_set.py b/preprocessed/preprocess_set.py new file mode 100644 index 0000000..b7ff3ec --- /dev/null +++ b/preprocessed/preprocess_set.py @@ -0,0 +1,20 @@ + +# Copyright Aleksey Gurtovoy 2001-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$ + +import preprocess + +preprocess.main( + [ "plain" ] + , "set" + , "boost\\mpl\\set\\aux_\\preprocessed" + ) diff --git a/preprocessed/preprocess_vector.py b/preprocessed/preprocess_vector.py new file mode 100644 index 0000000..b647d55 --- /dev/null +++ b/preprocessed/preprocess_vector.py @@ -0,0 +1,20 @@ + +# Copyright Aleksey Gurtovoy 2001-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$ + +import preprocess + +preprocess.main( + [ "no_ctps", "plain", "typeof_based" ] + , "vector" + , "boost\\mpl\\vector\\aux_\\preprocessed" + ) diff --git a/preprocessed/set/set10.cpp b/preprocessed/set/set10.cpp new file mode 100644 index 0000000..d64b0d8 --- /dev/null +++ b/preprocessed/set/set10.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/set/set10.hpp> diff --git a/preprocessed/set/set20.cpp b/preprocessed/set/set20.cpp new file mode 100644 index 0000000..80f991d --- /dev/null +++ b/preprocessed/set/set20.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/set/set20.hpp> diff --git a/preprocessed/set/set30.cpp b/preprocessed/set/set30.cpp new file mode 100644 index 0000000..668604c --- /dev/null +++ b/preprocessed/set/set30.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/set/set30.hpp> diff --git a/preprocessed/set/set40.cpp b/preprocessed/set/set40.cpp new file mode 100644 index 0000000..596cd48 --- /dev/null +++ b/preprocessed/set/set40.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/set/set40.hpp> diff --git a/preprocessed/set/set50.cpp b/preprocessed/set/set50.cpp new file mode 100644 index 0000000..9324581 --- /dev/null +++ b/preprocessed/set/set50.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/set/set50.hpp> diff --git a/preprocessed/src/advance_backward.cpp b/preprocessed/src/advance_backward.cpp index ce46b00..d7ec37a 100644 --- a/preprocessed/src/advance_backward.cpp +++ b/preprocessed/src/advance_backward.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/aux_/advance_backward.hpp" +#include <boost/mpl/aux_/advance_backward.hpp> diff --git a/preprocessed/src/advance_forward.cpp b/preprocessed/src/advance_forward.cpp index 242148f..bbdc7f1 100644 --- a/preprocessed/src/advance_forward.cpp +++ b/preprocessed/src/advance_forward.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/aux_/advance_forward.hpp" +#include <boost/mpl/aux_/advance_forward.hpp> diff --git a/preprocessed/src/and.cpp b/preprocessed/src/and.cpp index 29c030a..9700a64 100644 --- a/preprocessed/src/and.cpp +++ b/preprocessed/src/and.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/and.hpp" +#include <boost/mpl/and.hpp> diff --git a/preprocessed/src/apply.cpp b/preprocessed/src/apply.cpp index 7ea363b..f365071 100644 --- a/preprocessed/src/apply.cpp +++ b/preprocessed/src/apply.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/apply.hpp" +#include <boost/mpl/apply.hpp> diff --git a/preprocessed/src/apply_fwd.cpp b/preprocessed/src/apply_fwd.cpp new file mode 100644 index 0000000..338d84c --- /dev/null +++ b/preprocessed/src/apply_fwd.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/apply_fwd.hpp> diff --git a/preprocessed/src/apply_wrap.cpp b/preprocessed/src/apply_wrap.cpp new file mode 100644 index 0000000..8f36771 --- /dev/null +++ b/preprocessed/src/apply_wrap.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/apply_wrap.hpp> diff --git a/preprocessed/src/arg.cpp b/preprocessed/src/arg.cpp index 7518eb4..811e3d3 100644 --- a/preprocessed/src/arg.cpp +++ b/preprocessed/src/arg.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/arg.hpp" +#include <boost/mpl/arg.hpp> diff --git a/preprocessed/src/basic_bind.cpp b/preprocessed/src/basic_bind.cpp index af4b77a..c7b82d8 100644 --- a/preprocessed/src/basic_bind.cpp +++ b/preprocessed/src/basic_bind.cpp @@ -1,3 +1,3 @@ #define BOOST_MPL_PREPROCESSING_MODE -#define BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT -#include "boost/mpl/bind.hpp" +#define BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT +#include <boost/mpl/bind.hpp> diff --git a/preprocessed/src/bind.cpp b/preprocessed/src/bind.cpp index 385230f..fae5f7a 100644 --- a/preprocessed/src/bind.cpp +++ b/preprocessed/src/bind.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/bind.hpp" +#include <boost/mpl/bind.hpp> diff --git a/preprocessed/src/bind_fwd.cpp b/preprocessed/src/bind_fwd.cpp new file mode 100644 index 0000000..46a6dc6 --- /dev/null +++ b/preprocessed/src/bind_fwd.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/bind_fwd.hpp> diff --git a/preprocessed/src/bitand.cpp b/preprocessed/src/bitand.cpp new file mode 100644 index 0000000..cafe366 --- /dev/null +++ b/preprocessed/src/bitand.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/bitand.hpp> diff --git a/preprocessed/src/bitor.cpp b/preprocessed/src/bitor.cpp new file mode 100644 index 0000000..eabd231 --- /dev/null +++ b/preprocessed/src/bitor.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/bitor.hpp> diff --git a/preprocessed/src/bitxor.cpp b/preprocessed/src/bitxor.cpp new file mode 100644 index 0000000..b180677 --- /dev/null +++ b/preprocessed/src/bitxor.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/bitxor.hpp> diff --git a/preprocessed/src/divides.cpp b/preprocessed/src/divides.cpp new file mode 100644 index 0000000..47eb285 --- /dev/null +++ b/preprocessed/src/divides.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/divides.hpp> diff --git a/preprocessed/src/equal_to.cpp b/preprocessed/src/equal_to.cpp new file mode 100644 index 0000000..7d24195 --- /dev/null +++ b/preprocessed/src/equal_to.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/equal_to.hpp> diff --git a/preprocessed/src/fold_backward_impl.cpp b/preprocessed/src/fold_backward_impl.cpp deleted file mode 100644 index 5923ae6..0000000 --- a/preprocessed/src/fold_backward_impl.cpp +++ /dev/null @@ -1,2 +0,0 @@ -#define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/aux_/fold_backward_impl.hpp" diff --git a/preprocessed/src/fold_impl.cpp b/preprocessed/src/fold_impl.cpp index a54f9d7..639d8f0 100644 --- a/preprocessed/src/fold_impl.cpp +++ b/preprocessed/src/fold_impl.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/aux_/fold_impl.hpp" +#include <boost/mpl/aux_/fold_impl.hpp> diff --git a/preprocessed/src/full_lambda.cpp b/preprocessed/src/full_lambda.cpp index b4f112e..4a08605 100644 --- a/preprocessed/src/full_lambda.cpp +++ b/preprocessed/src/full_lambda.cpp @@ -1,3 +1,3 @@ #define BOOST_MPL_PREPROCESSING_MODE -//#define BOOST_MPL_NO_LAMBDA_HEURISTIC -#include "boost/mpl/aux_/full_lambda.hpp" +//#define BOOST_MPL_CFG_NO_LAMBDA_HEURISTIC +#include <boost/mpl/aux_/full_lambda.hpp> diff --git a/preprocessed/src/greater.cpp b/preprocessed/src/greater.cpp new file mode 100644 index 0000000..182222e --- /dev/null +++ b/preprocessed/src/greater.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/greater.hpp> diff --git a/preprocessed/src/greater_equal.cpp b/preprocessed/src/greater_equal.cpp new file mode 100644 index 0000000..6a21cc0 --- /dev/null +++ b/preprocessed/src/greater_equal.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/greater_equal.hpp> diff --git a/preprocessed/src/inherit.cpp b/preprocessed/src/inherit.cpp new file mode 100644 index 0000000..9f9add5 --- /dev/null +++ b/preprocessed/src/inherit.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/inherit.hpp> diff --git a/preprocessed/src/iter_fold_backward_impl.cpp b/preprocessed/src/iter_fold_backward_impl.cpp deleted file mode 100644 index db93b14..0000000 --- a/preprocessed/src/iter_fold_backward_impl.cpp +++ /dev/null @@ -1,2 +0,0 @@ -#define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/aux_/iter_fold_backward_impl.hpp" diff --git a/preprocessed/src/iter_fold_if_impl.cpp b/preprocessed/src/iter_fold_if_impl.cpp index c883c22..0c1475d 100644 --- a/preprocessed/src/iter_fold_if_impl.cpp +++ b/preprocessed/src/iter_fold_if_impl.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/aux_/iter_fold_if_impl.hpp" +#include <boost/mpl/aux_/iter_fold_if_impl.hpp> diff --git a/preprocessed/src/iter_fold_impl.cpp b/preprocessed/src/iter_fold_impl.cpp index c54140f..13fce2f 100644 --- a/preprocessed/src/iter_fold_impl.cpp +++ b/preprocessed/src/iter_fold_impl.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/aux_/iter_fold_impl.hpp" +#include <boost/mpl/aux_/iter_fold_impl.hpp> diff --git a/preprocessed/src/lambda_helper.cpp b/preprocessed/src/lambda_helper.cpp deleted file mode 100644 index b3d3823..0000000 --- a/preprocessed/src/lambda_helper.cpp +++ /dev/null @@ -1,2 +0,0 @@ -#define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/lambda_helper.hpp" diff --git a/preprocessed/src/lambda_no_ctps.cpp b/preprocessed/src/lambda_no_ctps.cpp index f4fece4..e2fbf7c 100644 --- a/preprocessed/src/lambda_no_ctps.cpp +++ b/preprocessed/src/lambda_no_ctps.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/aux_/lambda_no_ctps.hpp" +#include <boost/mpl/aux_/lambda_no_ctps.hpp> diff --git a/preprocessed/src/less.cpp b/preprocessed/src/less.cpp new file mode 100644 index 0000000..b230626 --- /dev/null +++ b/preprocessed/src/less.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/less.hpp> diff --git a/preprocessed/src/less_equal.cpp b/preprocessed/src/less_equal.cpp new file mode 100644 index 0000000..a77a762 --- /dev/null +++ b/preprocessed/src/less_equal.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/less_equal.hpp> diff --git a/preprocessed/src/list.cpp b/preprocessed/src/list.cpp index 245fc04..fe0ea06 100644 --- a/preprocessed/src/list.cpp +++ b/preprocessed/src/list.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/list.hpp" +#include <boost/mpl/list.hpp> diff --git a/preprocessed/src/list_c.cpp b/preprocessed/src/list_c.cpp index cf675a3..baedd93 100644 --- a/preprocessed/src/list_c.cpp +++ b/preprocessed/src/list_c.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/list_c.hpp" +#include <boost/mpl/list_c.hpp> diff --git a/preprocessed/src/map.cpp b/preprocessed/src/map.cpp new file mode 100644 index 0000000..7263ad6 --- /dev/null +++ b/preprocessed/src/map.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/map.hpp> diff --git a/preprocessed/src/minus.cpp b/preprocessed/src/minus.cpp new file mode 100644 index 0000000..1fd3f26 --- /dev/null +++ b/preprocessed/src/minus.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/minus.hpp> diff --git a/preprocessed/src/modulus.cpp b/preprocessed/src/modulus.cpp new file mode 100644 index 0000000..f4de14d --- /dev/null +++ b/preprocessed/src/modulus.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/modulus.hpp> diff --git a/preprocessed/src/not_equal_to.cpp b/preprocessed/src/not_equal_to.cpp new file mode 100644 index 0000000..6205307 --- /dev/null +++ b/preprocessed/src/not_equal_to.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/not_equal_to.hpp> diff --git a/preprocessed/src/or.cpp b/preprocessed/src/or.cpp index ea77b7e..42ce15b 100644 --- a/preprocessed/src/or.cpp +++ b/preprocessed/src/or.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/or.hpp" +#include <boost/mpl/or.hpp> diff --git a/preprocessed/src/placeholders.cpp b/preprocessed/src/placeholders.cpp index 370bbad..0a126c9 100644 --- a/preprocessed/src/placeholders.cpp +++ b/preprocessed/src/placeholders.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/placeholders.hpp" +#include <boost/mpl/placeholders.hpp> diff --git a/preprocessed/src/plus.cpp b/preprocessed/src/plus.cpp new file mode 100644 index 0000000..942eeff --- /dev/null +++ b/preprocessed/src/plus.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/plus.hpp> diff --git a/preprocessed/src/quote.cpp b/preprocessed/src/quote.cpp index 31a12de..b63058b 100644 --- a/preprocessed/src/quote.cpp +++ b/preprocessed/src/quote.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/quote.hpp" +#include <boost/mpl/quote.hpp> diff --git a/preprocessed/src/reverse_fold_impl.cpp b/preprocessed/src/reverse_fold_impl.cpp new file mode 100644 index 0000000..d66a718 --- /dev/null +++ b/preprocessed/src/reverse_fold_impl.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/aux_/reverse_fold_impl.hpp> diff --git a/preprocessed/src/reverse_iter_fold_impl.cpp b/preprocessed/src/reverse_iter_fold_impl.cpp new file mode 100644 index 0000000..2c2c317 --- /dev/null +++ b/preprocessed/src/reverse_iter_fold_impl.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/aux_/reverse_iter_fold_impl.hpp> diff --git a/preprocessed/src/set.cpp b/preprocessed/src/set.cpp new file mode 100644 index 0000000..3069991 --- /dev/null +++ b/preprocessed/src/set.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/set.hpp> diff --git a/preprocessed/src/shift_left.cpp b/preprocessed/src/shift_left.cpp new file mode 100644 index 0000000..feb1dff --- /dev/null +++ b/preprocessed/src/shift_left.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/shift_left.hpp> diff --git a/preprocessed/src/shift_right.cpp b/preprocessed/src/shift_right.cpp new file mode 100644 index 0000000..cb47a69 --- /dev/null +++ b/preprocessed/src/shift_right.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/shift_right.hpp> diff --git a/preprocessed/src/template_arity.cpp b/preprocessed/src/template_arity.cpp index 9e6598b..604a183 100644 --- a/preprocessed/src/template_arity.cpp +++ b/preprocessed/src/template_arity.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/aux_/template_arity.hpp" +#include <boost/mpl/aux_/template_arity.hpp> diff --git a/preprocessed/src/times.cpp b/preprocessed/src/times.cpp new file mode 100644 index 0000000..b0b2e57 --- /dev/null +++ b/preprocessed/src/times.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/times.hpp> diff --git a/preprocessed/src/unpack_args.cpp b/preprocessed/src/unpack_args.cpp new file mode 100644 index 0000000..bf77fed --- /dev/null +++ b/preprocessed/src/unpack_args.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include <boost/mpl/unpack_args.hpp> diff --git a/preprocessed/src/vector.cpp b/preprocessed/src/vector.cpp index 9c8b52a..07d4306 100644 --- a/preprocessed/src/vector.cpp +++ b/preprocessed/src/vector.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/vector.hpp" +#include <boost/mpl/vector.hpp> diff --git a/preprocessed/src/vector_c.cpp b/preprocessed/src/vector_c.cpp index 1bbeff4..2c77514 100644 --- a/preprocessed/src/vector_c.cpp +++ b/preprocessed/src/vector_c.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/vector_c.hpp" +#include <boost/mpl/vector_c.hpp> diff --git a/preprocessed/vector/vector10.cpp b/preprocessed/vector/vector10.cpp index f8f3fec..d9b66a5 100644 --- a/preprocessed/vector/vector10.cpp +++ b/preprocessed/vector/vector10.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/vector/vector10.hpp" +#include <boost/mpl/vector/vector10.hpp> diff --git a/preprocessed/vector/vector10_c.cpp b/preprocessed/vector/vector10_c.cpp index 31bdbf8..da5e3a5 100644 --- a/preprocessed/vector/vector10_c.cpp +++ b/preprocessed/vector/vector10_c.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/vector/vector10_c.hpp" +#include <boost/mpl/vector/vector10_c.hpp> diff --git a/preprocessed/vector/vector20.cpp b/preprocessed/vector/vector20.cpp index c6f8138..c43ae95 100644 --- a/preprocessed/vector/vector20.cpp +++ b/preprocessed/vector/vector20.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/vector/vector20.hpp" +#include <boost/mpl/vector/vector20.hpp> diff --git a/preprocessed/vector/vector20_c.cpp b/preprocessed/vector/vector20_c.cpp index c5cef1e..8af2f03 100644 --- a/preprocessed/vector/vector20_c.cpp +++ b/preprocessed/vector/vector20_c.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/vector/vector20_c.hpp" +#include <boost/mpl/vector/vector20_c.hpp> diff --git a/preprocessed/vector/vector30.cpp b/preprocessed/vector/vector30.cpp index 86f9d98..1604470 100644 --- a/preprocessed/vector/vector30.cpp +++ b/preprocessed/vector/vector30.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/vector/vector30.hpp" +#include <boost/mpl/vector/vector30.hpp> diff --git a/preprocessed/vector/vector30_c.cpp b/preprocessed/vector/vector30_c.cpp index 724ae4f..3bfa4ce 100644 --- a/preprocessed/vector/vector30_c.cpp +++ b/preprocessed/vector/vector30_c.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/vector/vector30_c.hpp" +#include <boost/mpl/vector/vector30_c.hpp> diff --git a/preprocessed/vector/vector40.cpp b/preprocessed/vector/vector40.cpp index bc9610a..8214c5a 100644 --- a/preprocessed/vector/vector40.cpp +++ b/preprocessed/vector/vector40.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/vector/vector40.hpp" +#include <boost/mpl/vector/vector40.hpp> diff --git a/preprocessed/vector/vector40_c.cpp b/preprocessed/vector/vector40_c.cpp index 239e15e..399b20d 100644 --- a/preprocessed/vector/vector40_c.cpp +++ b/preprocessed/vector/vector40_c.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/vector/vector40_c.hpp" +#include <boost/mpl/vector/vector40_c.hpp> diff --git a/preprocessed/vector/vector50.cpp b/preprocessed/vector/vector50.cpp index 302d43d..bbee908 100644 --- a/preprocessed/vector/vector50.cpp +++ b/preprocessed/vector/vector50.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/vector/vector50.hpp" +#include <boost/mpl/vector/vector50.hpp> diff --git a/preprocessed/vector/vector50_c.cpp b/preprocessed/vector/vector50_c.cpp index a460f4b..8e7dee4 100644 --- a/preprocessed/vector/vector50_c.cpp +++ b/preprocessed/vector/vector50_c.cpp @@ -1,2 +1,2 @@ #define BOOST_MPL_PREPROCESSING_MODE -#include "boost/mpl/vector/vector50_c.hpp" +#include <boost/mpl/vector/vector50_c.hpp> diff --git a/test/Jamfile b/test/Jamfile index ebf8b9d..0dada71 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -11,23 +11,22 @@ compile apply.cpp ; compile apply_if.cpp ; compile arithmetic.cpp ; compile as_sequence.cpp ; -compile assert_is_same.cpp ; +compile assert.cpp ; compile at.cpp ; compile back.cpp ; compile bind.cpp ; compile bitwise.cpp ; -compile bool.cpp ; +run bool.cpp ; compile comparison.cpp ; compile contains.cpp ; compile copy.cpp ; -compile copy_backward.cpp ; -compile copy_backward_if.cpp ; compile copy_if.cpp ; compile count.cpp ; compile count_if.cpp ; compile distance.cpp ; compile empty.cpp ; compile equal.cpp ; +compile equal_to.cpp ; compile erase.cpp ; compile erase_range.cpp ; compile filter_view.cpp ; @@ -36,6 +35,7 @@ compile find_if.cpp ; compile fold.cpp ; unit-test for_each : for_each.cpp : <sysinclude>$(BOOST_ROOT) ; compile front.cpp ; +compile has_xxx.cpp ; compile identity.cpp ; compile if.cpp ; compile index_of.cpp ; @@ -46,16 +46,22 @@ compile int.cpp ; compile integral_c.cpp ; compile is_placeholder.cpp ; compile is_sequence.cpp ; +compile iterator_tag.cpp ; compile joint_view.cpp ; compile lambda.cpp ; +compile lambda_apply_bind.cpp ; compile lambda_args.cpp ; -compile max_element.cpp ; -compile multiset.cpp ; compile list.cpp ; compile list_c.cpp ; compile logical.cpp ; compile lower_bound.cpp ; +compile map.cpp ; +compile max_element.cpp ; +compile min_max.cpp ; +compile multiset.cpp ; compile next.cpp ; +compile no_has_xxx.cpp ; +compile pair_view.cpp ; compile pop_front.cpp ; compile push_front.cpp ; compile quote.cpp ; @@ -64,6 +70,7 @@ compile replace.cpp ; compile replace_if.cpp ; compile reverse.cpp ; compile same_as.cpp ; +compile set.cpp ; compile single_view.cpp ; compile size.cpp ; compile sizeof.cpp ; @@ -72,6 +79,7 @@ compile stable_partition.cpp ; compile transform.cpp ; compile transform_view.cpp ; compile unique.cpp ; +compile unpack_args.cpp ; compile upper_bound.cpp ; compile vector.cpp ; compile vector_c.cpp ; diff --git a/test/advance.cpp b/test/advance.cpp index 866c387..e102e2c 100644 --- a/test/advance.cpp +++ b/test/advance.cpp @@ -1,33 +1,51 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/advance.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/vector/vector10_c.hpp" -#include "boost/mpl/advance.hpp" -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/assert_is_same.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/advance.hpp> +#include <boost/mpl/iterator_tags.hpp> +#include <boost/mpl/aux_/test.hpp> -int main() +template< int pos > struct iter { - typedef mpl::vector10_c<int,0,1,2,3,4,5,6,7,8,9> numbers; - typedef mpl::begin<numbers>::type first; - typedef mpl::end<numbers>::type last; + typedef mpl::bidirectional_iterator_tag category; + typedef iter<(pos + 1)> next; + typedef iter<(pos - 1)> prior; + typedef int_<pos> type; +}; - typedef mpl::advance_c<first,10>::type iter1; - typedef mpl::advance_c<last,-10>::type iter2; +#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) +namespace boost { namespace mpl { +template< int pos, typename Default > struct tag< iter<pos>,Default > : void_ {}; +}} +#endif - BOOST_MPL_ASSERT_IS_SAME(iter1, last); - BOOST_MPL_ASSERT_IS_SAME(iter2, first); - - return 0; +typedef iter<0> first; +typedef iter<10> last; + +MPL_TEST_CASE() +{ + typedef mpl::advance<first,int_<10> >::type iter1; + typedef advance_c<first,10>::type iter2; + + MPL_ASSERT(( is_same<iter1, last> )); + MPL_ASSERT(( is_same<iter2, last> )); +} + +MPL_TEST_CASE() +{ + typedef mpl::advance<last,int_<-10> >::type iter1; + typedef advance_c<last,-10>::type iter2; + + MPL_ASSERT(( is_same<iter1, first> )); + MPL_ASSERT(( is_same<iter2, first> )); } diff --git a/test/always.cpp b/test/always.cpp index 7c4c2c2..98ae572 100644 --- a/test/always.cpp +++ b/test/always.cpp @@ -1,42 +1,42 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/always.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/always.hpp" -#include "boost/mpl/bool.hpp" -#include "boost/mpl/int.hpp" -#include "boost/mpl/apply.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/apply.hpp> +#include <boost/mpl/always.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/int.hpp> -int main() +#include <boost/mpl/aux_/test.hpp> + +MPL_TEST_CASE() { - typedef mpl::always<mpl::true_> always_true; - typedef mpl::apply1< always_true,mpl::false_ >::type res1; - typedef mpl::apply2< always_true,mpl::false_,mpl::false_ >::type res2; - typedef mpl::apply3< always_true,mpl::false_,mpl::false_,mpl::false_ >::type res3; + typedef always<true_> always_true; - BOOST_STATIC_ASSERT(res1::value == true); - BOOST_STATIC_ASSERT(res2::value == true); - BOOST_STATIC_ASSERT(res3::value == true); - - typedef mpl::always< mpl::int_<10> > always_10; - typedef mpl::apply1< always_10,mpl::int_<0> >::type res4; - typedef mpl::apply2< always_10,mpl::int_<0>,mpl::int_<0> >::type res5; - typedef mpl::apply3< always_10,mpl::int_<0>,mpl::int_<0>,mpl::int_<0> >::type res6; - - BOOST_STATIC_ASSERT(res4::value == 10); - BOOST_STATIC_ASSERT(res5::value == 10); - BOOST_STATIC_ASSERT(res6::value == 10); - - return 0; + MPL_ASSERT(( apply1< always_true,false_ > )); + MPL_ASSERT(( apply2< always_true,false_,false_ > )); + MPL_ASSERT(( apply3< always_true,false_,false_,false_ > )); +} + + +MPL_TEST_CASE() +{ + typedef always< int_<10> > always_10; + + typedef apply1< always_10,int_<0> >::type res1; + typedef apply2< always_10,int_<0>,int_<0> >::type res2; + typedef apply3< always_10,int_<0>,int_<0>,int_<0> >::type res3; + + MPL_ASSERT_RELATION( res1::value, ==, 10 ); + MPL_ASSERT_RELATION( res2::value, ==, 10 ); + MPL_ASSERT_RELATION( res3::value, ==, 10 ); } diff --git a/test/apply.cpp b/test/apply.cpp index ccd7244..1ce7a47 100644 --- a/test/apply.cpp +++ b/test/apply.cpp @@ -1,110 +1,128 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/apply.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/apply.hpp" -#include "boost/mpl/assert_is_same.hpp" -#include "boost/mpl/limits/arity.hpp" -#include "boost/mpl/aux_/preprocessor/params.hpp" -#include "boost/mpl/aux_/preprocessor/enum.hpp" +// $Source$ +// $Date$ +// $Revision$ -#include "boost/preprocessor/repeat.hpp" -#include "boost/preprocessor/comma_if.hpp" -#include "boost/preprocessor/dec.hpp" -#include "boost/preprocessor/if.hpp" -#include "boost/preprocessor/cat.hpp" +#include <boost/mpl/apply.hpp> +#include <boost/mpl/lambda.hpp> +#include <boost/mpl/plus.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/aux_/test.hpp> -namespace mpl = boost::mpl; -#define APPLY_0_FUNC_DEF(i) \ - struct f0 { typedef char type; }; \ -/**/ - -#define APPLY_N_FUNC_DEF(i) \ - struct first##i \ - { \ - template< BOOST_MPL_PP_PARAMS(i, typename U) > \ - struct apply { typedef U1 type; }; \ - }; \ - \ - struct last##i \ - { \ - template< BOOST_MPL_PP_PARAMS(i, typename U) > \ - struct apply { typedef BOOST_PP_CAT(U,i) type; }; \ - }; \ -/**/ - -#define APPLY_FUNC_DEF(z, i, unused) \ - BOOST_PP_IF( \ - i \ - , APPLY_N_FUNC_DEF \ - , APPLY_0_FUNC_DEF \ - )(i) \ -/**/ - -namespace aux { -BOOST_PP_REPEAT( - BOOST_MPL_METAFUNCTION_MAX_ARITY - , APPLY_FUNC_DEF - , unused - ) -} - -#define APPLY_0_TEST(i, apply_) \ - typedef mpl::apply_<aux::f##i>::type t; \ - { BOOST_MPL_ASSERT_IS_SAME(t, char); } \ -/**/ - -#define APPLY_N_TEST(i, apply_) \ - typedef mpl::apply_< \ - aux::first##i \ - , char \ - BOOST_PP_COMMA_IF(BOOST_PP_DEC(i)) \ - BOOST_MPL_PP_ENUM(BOOST_PP_DEC(i), int) \ - >::type t1; \ - \ - typedef mpl::apply_< \ - aux::last##i \ - , BOOST_MPL_PP_ENUM(BOOST_PP_DEC(i), int) \ - BOOST_PP_COMMA_IF(BOOST_PP_DEC(i)) char \ - >::type t2; \ - { BOOST_MPL_ASSERT_IS_SAME(t1, char); } \ - { BOOST_MPL_ASSERT_IS_SAME(t2, char); } \ -/**/ - -#define APPLY_TEST(z, i, APPLY_NAME) \ - BOOST_PP_IF( \ - i \ - , APPLY_N_TEST \ - , APPLY_0_TEST \ - )(i, APPLY_NAME(i)) \ -/**/ - -#define MAKE_APPLY_N_NAME(i) apply##i -#define MAKE_APPLY_NAME(i) apply - -int main() +template< typename T > struct std_vector { - BOOST_PP_REPEAT( - BOOST_MPL_METAFUNCTION_MAX_ARITY - , APPLY_TEST - , MAKE_APPLY_N_NAME - ) - -#if defined(BOOST_MPL_HAS_APPLY) - BOOST_PP_REPEAT( - BOOST_MPL_METAFUNCTION_MAX_ARITY - , APPLY_TEST - , MAKE_APPLY_NAME - ) +#if defined(BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS) + typedef std_vector type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(1, std_vector, (T)) #endif - return 0; +}; + + +MPL_TEST_CASE() +{ + typedef plus<int_<2>,int_<3> > plus1; + typedef lambda<plus1>::type plus2; + MPL_ASSERT(( is_same< plus1,plus2 > )); + + typedef lambda<std_vector<int> >::type v; + MPL_ASSERT(( is_same< v,std_vector<int> > )); + + typedef lambda<std_vector<_1> >::type make_vector; + typedef apply_wrap1<make_vector,int>::type v_int; + MPL_ASSERT(( is_same< v_int,std_vector<int> > )); +} + +MPL_TEST_CASE() +{ + typedef plus<_1,_2> plus_fun; + typedef apply2<plus_fun,int_<2>,int_<3> >::type res; + + MPL_ASSERT_RELATION( res::value, ==, 5 ); +} + +MPL_TEST_CASE() +{ + typedef apply1<_1, plus<_1,_2> >::type plus_fun; + MPL_ASSERT(( is_same< plus_fun,plus<_1,_2> > )); + + typedef apply2<plus_fun,int_<2>,int_<3> >::type res; + MPL_ASSERT_RELATION( res::value, ==, 5 ); +} + +MPL_TEST_CASE() +{ + typedef lambda< lambda<_1> >::type make_lambda; + typedef apply_wrap1< make_lambda,std_vector<int> >::type v; + MPL_ASSERT(( is_same< v,std_vector<int> > )); + + typedef apply_wrap1< make_lambda,std_vector<_1> >::type make_vector; + typedef apply_wrap1< make_vector,int >::type v_int; + MPL_ASSERT(( is_same< v_int,std_vector<int> > )); +} + +MPL_TEST_CASE() +{ + typedef apply1< _1, std_vector<int> >::type v; + MPL_ASSERT(( is_same< v,std_vector<int> > )); + + typedef apply1< _1, std_vector<_1> >::type v_lambda; + typedef apply1<v_lambda,int>::type v_int; + MPL_ASSERT(( is_same< v,std_vector<int> > )); +} + +MPL_TEST_CASE() +{ + typedef apply1< lambda<_1>, std_vector<int> >::type v; + MPL_ASSERT(( is_same< v,std_vector<int> > )); + + typedef apply1< lambda<_1>, std_vector<_1> >::type make_vector; + typedef apply_wrap1< make_vector,int >::type v_int; + MPL_ASSERT(( is_same< v,std_vector<int> > )); +} + +MPL_TEST_CASE() +{ + typedef apply1< lambda<_1>, plus<_1,_2> >::type plus_fun; + typedef apply_wrap2< plus_fun,int_<2>,int_<3> >::type res; + + MPL_ASSERT_RELATION( res::value, ==, 5 ); +} + +MPL_TEST_CASE() +{ + typedef bind2<plus<>,_1,_1> b1; + typedef lambda<b1>::type b2; + MPL_ASSERT(( is_same< b1,b2 > )); +} + +MPL_TEST_CASE() +{ +#if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) + typedef lambda< lambda< bind2<plus<>,_1,_1> > >::type make_lambda; + typedef apply_wrap1< make_lambda::type, int_<5> >::type res; + MPL_ASSERT_RELATION( res::value, ==, 10 ); +#endif +} + +MPL_TEST_CASE() +{ + typedef apply1< bind2<plus<>,_1,_1>, int_<5> >::type res; + MPL_ASSERT_RELATION( res::value, ==, 10 ); +} + +MPL_TEST_CASE() +{ + typedef apply1<_1, lambda<plus<_1,_2> > >::type plus_fun; + typedef apply_wrap2< plus_fun::type, int_<2>,int_<3> >::type res; + + MPL_ASSERT_RELATION( res::value, ==, 5 ); } diff --git a/test/apply_if.cpp b/test/apply_if.cpp deleted file mode 100644 index 28eecb0..0000000 --- a/test/apply_if.cpp +++ /dev/null @@ -1,53 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/apply_if.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include "boost/mpl/apply_if.hpp" -#include "boost/mpl/bool.hpp" -#include "boost/mpl/identity.hpp" -#include "boost/mpl/assert_is_same.hpp" - -namespace mpl = boost::mpl; - -int main() -{ - typedef mpl::apply_if< - mpl::true_ - , mpl::identity<char> - , mpl::identity<long> - >::type t1; - - typedef mpl::apply_if_c< - true - , mpl::identity<char> - , mpl::identity<long> - >::type t2; - - BOOST_MPL_ASSERT_IS_SAME(t1, char); - BOOST_MPL_ASSERT_IS_SAME(t2, char); - - typedef mpl::apply_if< - mpl::false_ - , mpl::identity<char> - , mpl::identity<long> - >::type t3; - - typedef mpl::apply_if_c< - false - , mpl::identity<char> - , mpl::identity<long> - >::type t4; - - BOOST_MPL_ASSERT_IS_SAME(t3, long); - BOOST_MPL_ASSERT_IS_SAME(t4, long); - - return 0; -} diff --git a/test/apply_wrap.cpp b/test/apply_wrap.cpp new file mode 100644 index 0000000..8baae42 --- /dev/null +++ b/test/apply_wrap.cpp @@ -0,0 +1,110 @@ + +// 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/mpl/apply_wrap.hpp> +#include <boost/mpl/limits/arity.hpp> +#include <boost/mpl/aux_/preprocessor/params.hpp> +#include <boost/mpl/aux_/preprocessor/enum.hpp> +#include <boost/mpl/aux_/test.hpp> + +#include <boost/preprocessor/repeat.hpp> +#include <boost/preprocessor/comma_if.hpp> +#include <boost/preprocessor/dec.hpp> +#include <boost/preprocessor/if.hpp> +#include <boost/preprocessor/cat.hpp> + +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +# define APPLY_0_FUNC_DEF(i) \ + struct f0 \ + { \ + template< typename T = int > struct apply { typedef char type; }; \ + }; \ +/**/ +#else +# define APPLY_0_FUNC_DEF(i) \ + struct f0 \ + { \ + template< typename T > struct apply { typedef char type; }; \ + }; \ +/**/ +#endif + +#define APPLY_N_FUNC_DEF(i) \ + struct first##i \ + { \ + template< BOOST_MPL_PP_PARAMS(i, typename U) > \ + struct apply { typedef U1 type; }; \ + }; \ + \ + struct last##i \ + { \ + template< BOOST_MPL_PP_PARAMS(i, typename U) > \ + struct apply { typedef BOOST_PP_CAT(U,i) type; }; \ + }; \ +/**/ + +#define APPLY_FUNC_DEF(z, i, unused) \ + BOOST_PP_IF( \ + i \ + , APPLY_N_FUNC_DEF \ + , APPLY_0_FUNC_DEF \ + )(i) \ +/**/ + +namespace { namespace test { +BOOST_PP_REPEAT( + BOOST_MPL_LIMIT_METAFUNCTION_ARITY + , APPLY_FUNC_DEF + , unused + ) +}} + +#define APPLY_0_TEST(i, apply_) \ + typedef apply_<test::f##i>::type t; \ + { MPL_ASSERT(( boost::is_same<t, char> )); } \ +/**/ + +#define APPLY_N_TEST(i, apply_) \ + typedef apply_< \ + test::first##i \ + , char \ + BOOST_PP_COMMA_IF(BOOST_PP_DEC(i)) \ + BOOST_MPL_PP_ENUM(BOOST_PP_DEC(i), int) \ + >::type t1##i; \ + \ + typedef apply_< \ + test::last##i \ + , BOOST_MPL_PP_ENUM(BOOST_PP_DEC(i), int) \ + BOOST_PP_COMMA_IF(BOOST_PP_DEC(i)) char \ + >::type t2##i; \ + { MPL_ASSERT(( boost::is_same<t1##i, char> )); } \ + { MPL_ASSERT(( boost::is_same<t2##i, char> )); } \ +/**/ + +#define APPLY_TEST(z, i, unused) \ + BOOST_PP_IF( \ + i \ + , APPLY_N_TEST \ + , APPLY_0_TEST \ + )(i, BOOST_PP_CAT(apply_wrap,i)) \ +/**/ + + +MPL_TEST_CASE() +{ + BOOST_PP_REPEAT( + BOOST_MPL_LIMIT_METAFUNCTION_ARITY + , APPLY_TEST + , unused + ) +} diff --git a/test/arithmetic.cpp b/test/arithmetic.cpp index b88984f..e1a237a 100644 --- a/test/arithmetic.cpp +++ b/test/arithmetic.cpp @@ -1,49 +1,50 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/arithmetic.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2001-2004 // -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/arithmetic.hpp" -#include "boost/mpl/int.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/arithmetic.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/aux_/test.hpp> -int main() +MPL_TEST_CASE() { - typedef mpl::int_<0> _0; - typedef mpl::int_<1> _1; - typedef mpl::int_<3> _3; - typedef mpl::int_<10> _10; + typedef int_<0> _0; + typedef int_<1> _1; + typedef int_<3> _3; + typedef int_<10> _10; - BOOST_STATIC_ASSERT((mpl::plus<_0,_10>::value == 10)); - BOOST_STATIC_ASSERT((mpl::plus<_10,_0>::value == 10)); + MPL_ASSERT_RELATION( (plus<_0,_10>::value), ==, 10 ); + MPL_ASSERT_RELATION( (plus<_10,_0>::value), ==, 10 ); - BOOST_STATIC_ASSERT((mpl::minus<_0,_10>::value == -10)); - BOOST_STATIC_ASSERT((mpl::minus<_10,_0>::value == 10)); + MPL_ASSERT_RELATION( (minus<_0,_10>::value), ==, -10 ); + MPL_ASSERT_RELATION( (minus<_10,_0>::value), ==, 10 ); - BOOST_STATIC_ASSERT((mpl::multiplies<_1,_10>::value == 10)); - BOOST_STATIC_ASSERT((mpl::multiplies<_10,_1>::value == 10)); + MPL_ASSERT_RELATION( (times<_1,_10>::value), ==, 10 ); + MPL_ASSERT_RELATION( (times<_10,_1>::value), ==, 10 ); + MPL_ASSERT_RELATION( (multiplies<_1,_10>::value), ==, 10 ); + MPL_ASSERT_RELATION( (multiplies<_10,_1>::value), ==, 10 ); - BOOST_STATIC_ASSERT((mpl::divides<_10,_1>::value == 10)); - BOOST_STATIC_ASSERT((mpl::divides<_10,_1>::value == 10)); + MPL_ASSERT_RELATION( (divides<_10,_1>::value), ==, 10 ); + MPL_ASSERT_RELATION( (divides<_10,_1>::value), ==, 10 ); - BOOST_STATIC_ASSERT((mpl::modulus<_10,_1>::value == 0)); - BOOST_STATIC_ASSERT((mpl::modulus<_10,_3>::value == 1)); + MPL_ASSERT_RELATION( (modulus<_10,_1>::value), ==, 0 ); + MPL_ASSERT_RELATION( (modulus<_10,_3>::value), ==, 1 ); - BOOST_STATIC_ASSERT((mpl::minus<_10,_1,_10>::value == -1)); - BOOST_STATIC_ASSERT((mpl::plus<_10,_1,_10>::value == 21)); - BOOST_STATIC_ASSERT((mpl::divides<_10,_1,_10>::value == 1)); - BOOST_STATIC_ASSERT((mpl::divides<_10,_1,_10>::value == 1)); +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + MPL_ASSERT_RELATION( (minus<_10,_1,_10>::value), ==, -1 ); + MPL_ASSERT_RELATION( (plus<_10,_1,_10>::value), ==, 21 ); + MPL_ASSERT_RELATION( (divides<_10,_1,_10>::value), ==, 1 ); + MPL_ASSERT_RELATION( (divides<_10,_1,_10>::value), ==, 1 ); +#endif - BOOST_STATIC_ASSERT((mpl::negate<_10>::value == -10)); - - return 0; + MPL_ASSERT_RELATION( negate<_10>::value, ==, -10 ); } diff --git a/test/as_sequence.cpp b/test/as_sequence.cpp index 73adfb7..db47528 100644 --- a/test/as_sequence.cpp +++ b/test/as_sequence.cpp @@ -1,28 +1,23 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/as_sequence.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2002-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/vector.hpp" -#include "boost/mpl/as_sequence.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -using namespace boost::mpl; +#include <boost/mpl/as_sequence.hpp> +#include <boost/mpl/vector.hpp> +#include <boost/mpl/aux_/test.hpp> -struct UDT {}; - -int main() +MPL_TEST_CASE() { - BOOST_STATIC_ASSERT(is_sequence< as_sequence<int>::type >::value); - BOOST_STATIC_ASSERT(is_sequence< as_sequence<UDT>::type >::value); - BOOST_STATIC_ASSERT(is_sequence< as_sequence< vector<> >::type >::value); - - return 0; + MPL_ASSERT(( is_sequence< as_sequence<int>::type > )); + MPL_ASSERT(( is_sequence< as_sequence<UDT>::type > )); + MPL_ASSERT(( is_sequence< as_sequence< vector<> >::type > )); } diff --git a/test/assert.cpp b/test/assert.cpp new file mode 100644 index 0000000..0e848f4 --- /dev/null +++ b/test/assert.cpp @@ -0,0 +1,88 @@ + +// 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/mpl/assert.hpp> + +#include <boost/type_traits/is_same.hpp> +#include <boost/type_traits/is_pointer.hpp> + + +BOOST_MPL_ASSERT(( boost::is_same<int,int> )); +BOOST_MPL_ASSERT(( boost::is_pointer<int*> )); +BOOST_MPL_ASSERT_NOT(( boost::is_same<int,long> )); +BOOST_MPL_ASSERT_NOT(( boost::is_pointer<int> )); +BOOST_MPL_ASSERT_RELATION( 5, >, 1 ); +BOOST_MPL_ASSERT_RELATION( 1, <, 5 ); +BOOST_MPL_ASSERT_MSG( true, GLOBAL_SCOPE_ERROR, (int,long) ); +BOOST_MPL_ASSERT_MSG( true, ANOTHER_GLOBAL_SCOPE_ERROR, () ); + +namespace my { +BOOST_MPL_ASSERT(( boost::is_same<int,int> )); +BOOST_MPL_ASSERT(( boost::is_pointer<int*> )); +BOOST_MPL_ASSERT_NOT(( boost::is_same<int,long> )); +BOOST_MPL_ASSERT_NOT(( boost::is_pointer<int> )); +BOOST_MPL_ASSERT_RELATION( 5, >, 1 ); +BOOST_MPL_ASSERT_RELATION( 1, <, 5 ); +BOOST_MPL_ASSERT_MSG( true, GLOBAL_SCOPE_ERROR, (int,long) ); +BOOST_MPL_ASSERT_MSG( true, NAMESPACE_SCOPE_ERROR, () ); +BOOST_MPL_ASSERT_MSG( true, ANOTHER_NAMESPACE_SCOPE_ERROR, () ); +} + +template< typename T > +struct her +{ + BOOST_MPL_ASSERT(( boost::is_same<void,T> )); + BOOST_MPL_ASSERT(( boost::is_pointer<T*> )); + BOOST_MPL_ASSERT_NOT(( boost::is_same<int,T> )); + BOOST_MPL_ASSERT_NOT(( boost::is_pointer<T> )); + BOOST_MPL_ASSERT_RELATION( sizeof(T*), >, 1 ); + BOOST_MPL_ASSERT_RELATION( 1, <, sizeof(T*) ); + BOOST_MPL_ASSERT_MSG( true, GLOBAL_SCOPE_ERROR, (int,long) ); + BOOST_MPL_ASSERT_MSG( true, CLASS_SCOPE_ERROR, () ); +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) + BOOST_MPL_ASSERT_MSG( true, ANOTHER_CLASS_SCOPE_ERROR, (types<int, T>) ); +#endif + + void f() + { + BOOST_MPL_ASSERT(( boost::is_same<void,T> )); + BOOST_MPL_ASSERT(( boost::is_pointer<T*> )); + BOOST_MPL_ASSERT_NOT(( boost::is_same<int,T> )); + BOOST_MPL_ASSERT_NOT(( boost::is_pointer<T> )); + BOOST_MPL_ASSERT_RELATION( sizeof(T*), >, 1 ); + BOOST_MPL_ASSERT_RELATION( 1, <, sizeof(T*) ); + BOOST_MPL_ASSERT_MSG( true, GLOBAL_SCOPE_ERROR, (int,long) ); + BOOST_MPL_ASSERT_MSG( true, MEMBER_FUNCTION_SCOPE_ERROR, () ); +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) + BOOST_MPL_ASSERT_MSG( true, ANOTHER_MEMBER_FUNCTION_SCOPE_ERROR, (types<int, T>) ); +#endif + } +}; + +int main() +{ + her<void> h; + h.f(); + + BOOST_MPL_ASSERT(( boost::is_same<int,int> )); + BOOST_MPL_ASSERT(( boost::is_pointer<int*> )); + BOOST_MPL_ASSERT_NOT(( boost::is_same<int,long> )); + BOOST_MPL_ASSERT_NOT(( boost::is_pointer<int> )); + BOOST_MPL_ASSERT_RELATION( 5, >, 1 ); + BOOST_MPL_ASSERT_RELATION( 1, <, 5 ); + BOOST_MPL_ASSERT_MSG( true, GLOBAL_SCOPE_ERROR, (int,long) ); + BOOST_MPL_ASSERT_MSG( true, FUNCTION_SCOPE_ERROR, () ); + BOOST_MPL_ASSERT_MSG( true, ANOTHER_FUNCTION_SCOPE_ERROR, () ); + + return 0; +} diff --git a/test/assert_is_same.cpp b/test/assert_is_same.cpp deleted file mode 100644 index 065588b..0000000 --- a/test/assert_is_same.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/assert_is_same.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include "boost/mpl/assert_is_same.hpp" - -namespace { -struct my; -} - -int main() -{ - BOOST_MPL_ASSERT_IS_SAME(long, long); - BOOST_MPL_ASSERT_IS_SAME(my, my); - - BOOST_MPL_ASSERT_NOT_SAME(my, long); - BOOST_MPL_ASSERT_NOT_SAME(long, my); - - return 0; -} diff --git a/test/at.cpp b/test/at.cpp index ddf3134..54c94c7 100644 --- a/test/at.cpp +++ b/test/at.cpp @@ -1,35 +1,39 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/at.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/at.hpp" -#include "boost/mpl/vector/vector10_c.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/at.hpp> +#include <boost/mpl/vector/vector10_c.hpp> +#include <boost/mpl/aux_/test.hpp> -int main() +template< typename Seq, int n > struct at_test { - typedef mpl::vector10_c<int,9,8,7,6,5,4,3,2,1,0> numbers; + typedef typename at_c<Seq,n>::type t; + MPL_ASSERT(( is_same< t, integral_c<int,9-n> > )); + MPL_ASSERT_RELATION( t::value, ==, 9 - n ); +}; - BOOST_STATIC_ASSERT((mpl::at_c<numbers,0>::type::value == 9)); - BOOST_STATIC_ASSERT((mpl::at_c<numbers,1>::type::value == 8)); - BOOST_STATIC_ASSERT((mpl::at_c<numbers,2>::type::value == 7)); - BOOST_STATIC_ASSERT((mpl::at_c<numbers,3>::type::value == 6)); - BOOST_STATIC_ASSERT((mpl::at_c<numbers,4>::type::value == 5)); - BOOST_STATIC_ASSERT((mpl::at_c<numbers,5>::type::value == 4)); - BOOST_STATIC_ASSERT((mpl::at_c<numbers,6>::type::value == 3)); - BOOST_STATIC_ASSERT((mpl::at_c<numbers,7>::type::value == 2)); - BOOST_STATIC_ASSERT((mpl::at_c<numbers,8>::type::value == 1)); - BOOST_STATIC_ASSERT((mpl::at_c<numbers,9>::type::value == 0)); - - return 0; +MPL_TEST_CASE() +{ + typedef vector10_c<int,9,8,7,6,5,4,3,2,1,0> numbers; + + at_test< numbers, 0 >(); + at_test< numbers, 1 >(); + at_test< numbers, 2 >(); + at_test< numbers, 3 >(); + at_test< numbers, 4 >(); + at_test< numbers, 5 >(); + at_test< numbers, 6 >(); + at_test< numbers, 7 >(); + at_test< numbers, 8 >(); + at_test< numbers, 9 >(); } diff --git a/test/aux_/Jamfile b/test/aux_/Jamfile index 1106e07..42f154b 100644 --- a/test/aux_/Jamfile +++ b/test/aux_/Jamfile @@ -3,10 +3,8 @@ subproject libs/mpl/test/aux_ ; # bring in rules for testing import testing ; -compile debug_print.cpp ; -compile has_rebind.cpp ; -compile has_distance.cpp ; -compile has_xxx.cpp ; -compile no_has_xxx.cpp ; -compile typeof.cpp ; +compile preprocessor/is_seq.cpp ; +compile preprocessor/token_equal.cpp ; +compile largest_int.cpp ; +compile msvc_is_class.cpp ; compile template_arity.cpp ; diff --git a/test/aux_/debug_print.cpp b/test/aux_/debug_print.cpp deleted file mode 100644 index 9f1f137..0000000 --- a/test/aux_/debug_print.cpp +++ /dev/null @@ -1,19 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/typeof.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include "boost/mpl/aux_/debug_print.hpp" - -int main() -{ - BOOST_MPL_AUX_DEBUG_PRINT(int); - return 0; -} diff --git a/test/aux_/has_distance.cpp b/test/aux_/has_distance.cpp deleted file mode 100644 index 2aba3d8..0000000 --- a/test/aux_/has_distance.cpp +++ /dev/null @@ -1,34 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/aux_/has_distance.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include "boost/mpl/aux_/has_distance.hpp" -#include "boost/mpl/aux_/has_distance_spec.hpp" -#include "boost/static_assert.hpp" - -namespace mpl = boost::mpl; - -struct iter0 {}; -template< typename T > struct iter1 -{ - template< typename > struct BOOST_MPL_AUX_ITERATOR_DISTANCE; -}; - -namespace boost { namespace mpl { -BOOST_MPL_AUX_HAS_DISTANCE_SPEC(1,iter1) -}} - -int main() -{ - BOOST_STATIC_ASSERT(!mpl::aux::has_distance<iter0>::value); - BOOST_STATIC_ASSERT(mpl::aux::has_distance< iter1<int> >::value); - return 0; -} diff --git a/test/aux_/has_rebind.cpp b/test/aux_/has_rebind.cpp deleted file mode 100644 index 5f36a1d..0000000 --- a/test/aux_/has_rebind.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/aux_/has_rebind.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include "boost/mpl/aux_/has_rebind.hpp" -#include "boost/static_assert.hpp" - -namespace mpl = boost::mpl; - -struct f1 {}; -struct f2 { struct rebind; }; - -int main() -{ - BOOST_STATIC_ASSERT(!mpl::aux::has_rebind<f1>::value); - BOOST_STATIC_ASSERT(mpl::aux::has_rebind<f2>::value); - return 0; -} diff --git a/test/aux_/has_xxx.cpp b/test/aux_/has_xxx.cpp deleted file mode 100644 index 973213d..0000000 --- a/test/aux_/has_xxx.cpp +++ /dev/null @@ -1,63 +0,0 @@ - -// + file: libs/mpl/test/aux_/has_xxx.cpp -// + last modified: 09/jun/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy -// -// 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. - -#include "boost/mpl/aux_/has_xxx.hpp" -#include "boost/mpl/aux_/config/workaround.hpp" -#include "boost/static_assert.hpp" - -BOOST_MPL_HAS_XXX_TRAIT_DEF(xxx) - -struct a1; -struct a2 {}; -struct a3 { void xxx(); }; -struct a4 { int xxx; }; -struct a5 { static int xxx(); }; - -struct b1 { typedef int xxx; }; -struct b2 { struct xxx; }; -struct b3 { typedef int& xxx; }; -struct b4 { typedef int* xxx; }; -struct b5 { typedef int xxx[10]; }; -struct b6 { typedef void (*xxx)(); }; -struct b7 { typedef void (xxx)(); }; - -template <class T> struct outer; -template <class T> struct inner { typedef typename T::type type; }; - -int main() -{ -#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - BOOST_STATIC_ASSERT(!has_xxx<int&>::value); - BOOST_STATIC_ASSERT(!has_xxx<int*>::value); - BOOST_STATIC_ASSERT(!has_xxx<int[]>::value); - BOOST_STATIC_ASSERT(!has_xxx<int (*)()>::value); -#endif - BOOST_STATIC_ASSERT(!has_xxx<int>::value); - BOOST_STATIC_ASSERT(!has_xxx<a1>::value); - BOOST_STATIC_ASSERT(!has_xxx<a2>::value); - BOOST_STATIC_ASSERT(!has_xxx<a3>::value); - BOOST_STATIC_ASSERT(!has_xxx<a4>::value); - BOOST_STATIC_ASSERT(!has_xxx<a5>::value); - - BOOST_STATIC_ASSERT(has_xxx<b1>::value); - BOOST_STATIC_ASSERT(has_xxx<b2>::value); - BOOST_STATIC_ASSERT(has_xxx<b3>::value); - BOOST_STATIC_ASSERT(has_xxx<b4>::value); - BOOST_STATIC_ASSERT(has_xxx<b5>::value); - BOOST_STATIC_ASSERT(has_xxx<b6>::value); - BOOST_STATIC_ASSERT(has_xxx<b7>::value); - - BOOST_STATIC_ASSERT(!has_xxx<outer<inner<int> > >::value); - - return 0; -} diff --git a/test/aux_/largest_int.cpp b/test/aux_/largest_int.cpp new file mode 100644 index 0000000..3a84f8f --- /dev/null +++ b/test/aux_/largest_int.cpp @@ -0,0 +1,25 @@ + +// 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/mpl/aux_/largest_int.hpp> +#include <boost/mpl/aux_/test.hpp> + + +MPL_TEST_CASE() +{ + MPL_ASSERT(( is_same< mpl::aux::largest_int<bool,bool>::type, bool > )); + MPL_ASSERT(( is_same< mpl::aux::largest_int<bool,char>::type, char > )); + MPL_ASSERT(( is_same< mpl::aux::largest_int<char,bool>::type, char > )); + MPL_ASSERT(( is_same< mpl::aux::largest_int<int,unsigned>::type, unsigned > )); + MPL_ASSERT(( is_same< mpl::aux::largest_int<unsigned,long>::type, long > )); +} diff --git a/test/aux_/msvc_is_class.cpp b/test/aux_/msvc_is_class.cpp new file mode 100644 index 0000000..c86cf28 --- /dev/null +++ b/test/aux_/msvc_is_class.cpp @@ -0,0 +1,46 @@ + +// 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/mpl/aux_/config/msvc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200) + +#include <boost/mpl/aux_/msvc_is_class.hpp> +#include <boost/mpl/aux_/test.hpp> + +template< typename T > struct A { T x[0]; }; + +MPL_TEST_CASE() +{ + MPL_ASSERT_NOT(( aux::msvc_is_class< int > )); + MPL_ASSERT_NOT(( aux::msvc_is_class< char > )); + MPL_ASSERT_NOT(( aux::msvc_is_class< enum_ > )); + MPL_ASSERT_NOT(( aux::msvc_is_class< char* > )); + MPL_ASSERT_NOT(( aux::msvc_is_class< UDT* > )); + MPL_ASSERT_NOT(( aux::msvc_is_class< UDT& > )); + MPL_ASSERT_NOT(( aux::msvc_is_class< incomplete* > )); + MPL_ASSERT_NOT(( aux::msvc_is_class< incomplete& > )); + MPL_ASSERT_NOT(( aux::msvc_is_class< int[5] > )); + MPL_ASSERT_NOT(( aux::msvc_is_class< void (*)() > )); + MPL_ASSERT_NOT(( aux::msvc_is_class< int (*)(int, char) > )); + + MPL_ASSERT(( aux::msvc_is_class< UDT > )); + MPL_ASSERT(( aux::msvc_is_class< incomplete > )); + MPL_ASSERT(( aux::msvc_is_class< abstract > )); + MPL_ASSERT(( aux::msvc_is_class< noncopyable > )); + MPL_ASSERT(( aux::msvc_is_class< A<int> > )); + MPL_ASSERT(( aux::msvc_is_class< A<incomplete> > )); +} + +#endif diff --git a/test/aux_/no_has_xxx.cpp b/test/aux_/no_has_xxx.cpp deleted file mode 100755 index d6aca3a..0000000 --- a/test/aux_/no_has_xxx.cpp +++ /dev/null @@ -1,66 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/aux_/no_has_xxx.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-03 -// Aleksey Gurtovoy, Dave Abrahams -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include "boost/mpl/aux_/has_xxx.hpp" -#include "boost/mpl/aux_/config/workaround.hpp" -#include "boost/static_assert.hpp" - -BOOST_MPL_HAS_XXX_TRAIT_DEF(xxx_type) - -struct a1; -struct a2 {}; -struct a3 { typedef int xxx_type; }; -struct a4 { struct xxx_type; }; -struct a5 { typedef int& xxx_type; }; -struct a6 { typedef int* xxx_type; }; -struct a7 { typedef int xxx_type[10]; }; -struct a8 { typedef void (*xxx_type)(); }; -struct a9 { typedef void (xxx_type)(); }; - -// -// This file tests that we have the right value for -// BOOST_MPL_NO_AUX_HAS_XXX, and that has_xxx doesn't just fail to -// compile arbitrarily. Could be used as part of the config tests. -// - -#undef FALSE -#undef TRUE -#define FALSE false - -#ifdef BOOST_MPL_NO_AUX_HAS_XXX -# define TRUE FALSE -#else -# define TRUE true -#endif - -int main() -{ -#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - BOOST_STATIC_ASSERT(has_xxx_type<int&>::value == FALSE); - BOOST_STATIC_ASSERT(has_xxx_type<int*>::value == FALSE); - BOOST_STATIC_ASSERT(has_xxx_type<int[]>::value == FALSE); - BOOST_STATIC_ASSERT(has_xxx_type<int (*)()>::value == FALSE); -#endif - - BOOST_STATIC_ASSERT(has_xxx_type<int>::value == FALSE); - BOOST_STATIC_ASSERT(has_xxx_type<a1>::value == FALSE); - BOOST_STATIC_ASSERT(has_xxx_type<a2>::value == FALSE); - BOOST_STATIC_ASSERT(has_xxx_type<a3>::value == TRUE); - BOOST_STATIC_ASSERT(has_xxx_type<a4>::value == TRUE); - BOOST_STATIC_ASSERT(has_xxx_type<a5>::value == TRUE); - BOOST_STATIC_ASSERT(has_xxx_type<a6>::value == TRUE); - BOOST_STATIC_ASSERT(has_xxx_type<a7>::value == TRUE); - BOOST_STATIC_ASSERT(has_xxx_type<a8>::value == TRUE); - BOOST_STATIC_ASSERT(has_xxx_type<a9>::value == TRUE); - - return 0; -} diff --git a/test/aux_/preprocessor/is_seq.cpp b/test/aux_/preprocessor/is_seq.cpp index a03c514..5aa2650 100644 --- a/test/aux_/preprocessor/is_seq.cpp +++ b/test/aux_/preprocessor/is_seq.cpp @@ -1,20 +1,20 @@ -// + file: libs/mpl/test/aux_/is_seq.cpp -// + last modified: 03/may/03 - -// Copyright (c) 2003 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2003-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/aux_/preprocessor/is_seq.hpp" +// $Source$ +// $Date$ +// $Revision$ -#include "boost/preprocessor/logical/not.hpp" -#include "boost/preprocessor/debug/assert.hpp" +#include <boost/mpl/aux_/preprocessor/is_seq.hpp> + +#include <boost/preprocessor/logical/not.hpp> +#include <boost/preprocessor/debug/assert.hpp> #define AUX_ASSERT_IS_SEQ( seq ) \ BOOST_PP_ASSERT( BOOST_MPL_PP_IS_SEQ(seq) ) \ @@ -26,13 +26,8 @@ #define SEQ (a)(b)(c) -int main() -{ - AUX_ASSERT_IS_NOT_SEQ( a ) - AUX_ASSERT_IS_SEQ( (a) ) - AUX_ASSERT_IS_SEQ( (a)(b) ) - AUX_ASSERT_IS_SEQ( (a)(b)(c) ) - AUX_ASSERT_IS_SEQ( SEQ ) - - return 0; -} +AUX_ASSERT_IS_NOT_SEQ( a ) +AUX_ASSERT_IS_SEQ( (a) ) +AUX_ASSERT_IS_SEQ( (a)(b) ) +AUX_ASSERT_IS_SEQ( (a)(b)(c) ) +AUX_ASSERT_IS_SEQ( SEQ ) diff --git a/test/aux_/preprocessor/token_equal.cpp b/test/aux_/preprocessor/token_equal.cpp index 97712a1..7db2b09 100644 --- a/test/aux_/preprocessor/token_equal.cpp +++ b/test/aux_/preprocessor/token_equal.cpp @@ -1,20 +1,20 @@ -// + file: libs/mpl/test/aux_/token_eqaul.cpp -// + last modified: 03/may/03 - -// Copyright (c) 2003 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2003-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/aux_/preprocessor/token_equal.hpp" +// $Source$ +// $Date$ +// $Revision$ -#include "boost/preprocessor/logical/not.hpp" -#include "boost/preprocessor/debug/assert.hpp" +#include <boost/mpl/aux_/preprocessor/token_equal.hpp> + +#include <boost/preprocessor/logical/not.hpp> +#include <boost/preprocessor/debug/assert.hpp> #define AUX_ASSERT_EQUAL(x, y) \ BOOST_PP_ASSERT( BOOST_MPL_PP_TOKEN_EQUAL(x, y) ) \ @@ -24,18 +24,13 @@ BOOST_PP_ASSERT( BOOST_PP_NOT( BOOST_MPL_PP_TOKEN_EQUAL(x, y) ) ) \ /**/ -int main() -{ - #define BOOST_MPL_PP_TOKEN_EQUAL_apple(x) x - #define BOOST_MPL_PP_TOKEN_EQUAL_orange(x) x +#define BOOST_MPL_PP_TOKEN_EQUAL_apple(x) x +#define BOOST_MPL_PP_TOKEN_EQUAL_orange(x) x - AUX_ASSERT_NOT_EQUAL( apple, abc ) - AUX_ASSERT_NOT_EQUAL( abc, apple ) - AUX_ASSERT_NOT_EQUAL( apple, orange ) - AUX_ASSERT_NOT_EQUAL( orange, apple ) +AUX_ASSERT_NOT_EQUAL( apple, abc ) +AUX_ASSERT_NOT_EQUAL( abc, apple ) +AUX_ASSERT_NOT_EQUAL( apple, orange ) +AUX_ASSERT_NOT_EQUAL( orange, apple ) - AUX_ASSERT_EQUAL( apple, apple ) - AUX_ASSERT_EQUAL( orange, orange ) - - return 0; -} +AUX_ASSERT_EQUAL( apple, apple ) +AUX_ASSERT_EQUAL( orange, orange ) diff --git a/test/aux_/template_arity.cpp b/test/aux_/template_arity.cpp index d20e316..272ce7d 100644 --- a/test/aux_/template_arity.cpp +++ b/test/aux_/template_arity.cpp @@ -1,35 +1,31 @@ -// + file: libs/mpl/test/aux_/template_arity.cpp -// + last modified: 10/jul/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/aux_/template_arity.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -# if defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) +#include <boost/mpl/aux_/template_arity.hpp> +#include <boost/mpl/aux_/test.hpp> -using namespace boost::mpl; +#if defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) struct my {}; template< typename T1 > struct my1 {}; template< typename T1, typename T2 = void > struct my2 {}; -int main() +MPL_TEST_CASE() { - BOOST_STATIC_ASSERT((aux::template_arity<my>::value == -1)); - BOOST_STATIC_ASSERT((aux::template_arity< my1<int> >::value == 1)); - BOOST_STATIC_ASSERT((aux::template_arity< my2<int,long> >::value == 2)); - BOOST_STATIC_ASSERT((aux::template_arity< my2<int> >::value == 2)); - - return 0; + MPL_ASSERT_RELATION( (aux::template_arity<my>::value), ==, -1 ); + MPL_ASSERT_RELATION( (aux::template_arity< my1<int> >::value), ==, 1 ); + MPL_ASSERT_RELATION( (aux::template_arity< my2<int,long> >::value), ==, 2 ); + MPL_ASSERT_RELATION( (aux::template_arity< my2<int> >::value), ==, 2 ); } -# endif +#endif diff --git a/test/aux_/test/test_case.cpp b/test/aux_/test/test_case.cpp deleted file mode 100644 index c69b468..0000000 --- a/test/aux_/test/test_case.cpp +++ /dev/null @@ -1,38 +0,0 @@ - -// + file: libs/mpl/aux_/test/test_case.cpp -// + last modified: 03/may/03 - -// Copyright (c) 2002-03 -// Aleksey Gurtovoy -// -// 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. - -#include "boost/mpl/aux_/test.hpp" - -CTT_test_case( false_positives, (S)(T) ) -{ - CTT_assert_same( 2, (S, char) ); - CTT_assert_not_same( 2, (S, bool) ); - //T t; -} - -CTT_test_case( empty_set, (T) ) - { - CTT_for_each( - (T)(T const) - , false_positives - , (char)(_1) - ); - } - -int main() -{ - CTT_test( empty_set, (bool) ); - CTT_for_each( (int)(long), empty_set, (_1) ); - - return 0; -} diff --git a/test/aux_/typeof.cpp b/test/aux_/typeof.cpp deleted file mode 100644 index e082933..0000000 --- a/test/aux_/typeof.cpp +++ /dev/null @@ -1,44 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/typeof.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include "boost/mpl/aux_/typeof.hpp" -#include "boost/mpl/assert_is_same.hpp" - -namespace { -template< typename T > struct identity { static T type(); }; -} - -#define TYPEOF_CHECK(T) \ - BOOST_MPL_ASSERT_IS_SAME( \ - BOOST_MPL_AUX_TYPEOF(identity<T>::type()) \ - , T \ - ) \ -/**/ - -int main() -{ - TYPEOF_CHECK(bool); - TYPEOF_CHECK(signed char); - TYPEOF_CHECK(unsigned char); - TYPEOF_CHECK(char); - TYPEOF_CHECK(short); - TYPEOF_CHECK(unsigned short); - TYPEOF_CHECK(int); - TYPEOF_CHECK(unsigned int); - TYPEOF_CHECK(long); - TYPEOF_CHECK(unsigned long); - TYPEOF_CHECK(float); - TYPEOF_CHECK(double); - TYPEOF_CHECK(long double); - - return 0; -} diff --git a/test/back.cpp b/test/back.cpp index e7e94d5..7a07775 100644 --- a/test/back.cpp +++ b/test/back.cpp @@ -1,31 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/back.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/back.hpp" -#include "boost/mpl/range_c.hpp" -#include "boost/mpl/assert_is_same.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/back.hpp> +#include <boost/mpl/range_c.hpp> +#include <boost/mpl/aux_/test.hpp> -int main() +template< typename Seq, int value > struct back_test { - typedef mpl::range_c<int,0,1> range1; - typedef mpl::range_c<int,0,10> range2; - typedef mpl::range_c<int,-10,0> range3; - - BOOST_STATIC_ASSERT(mpl::back<range1>::type::value == 0); - BOOST_STATIC_ASSERT(mpl::back<range2>::type::value == 9); - BOOST_STATIC_ASSERT(mpl::back<range3>::type::value == -1); + typedef typename back<Seq>::type t; + MPL_ASSERT_RELATION( t::value, ==, value ); +}; - return 0; +MPL_TEST_CASE() +{ + back_test< range_c<int,0,1>, 0 >(); + back_test< range_c<int,0,10>, 9 >(); + back_test< range_c<int,-10,0>, -1 >(); } diff --git a/test/bind.cpp b/test/bind.cpp index a238db2..ca7d4e1 100644 --- a/test/bind.cpp +++ b/test/bind.cpp @@ -1,21 +1,26 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/bind.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 // -// Copyright (c) 2001-02 -// Peter Dimov, Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/bind.hpp" -#include "boost/mpl/apply.hpp" -#include "boost/mpl/assert_is_same.hpp" -#include "boost/type_traits/is_same.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/bind.hpp> +#include <boost/mpl/quote.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/next.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/apply_wrap.hpp> +#include <boost/mpl/aux_/test.hpp> + +#include <boost/type_traits/is_float.hpp> namespace { @@ -38,19 +43,47 @@ struct f5 } // namespace -int main() +MPL_TEST_CASE() // basic argument binding { - using namespace mpl::placeholders; + typedef apply_wrap1< bind1<f1,_1>, int >::type r11; + typedef apply_wrap5< bind1<f1,_5>, void,void,void,void,int >::type r12; + MPL_ASSERT(( boost::is_same<r11,int> )); + MPL_ASSERT(( boost::is_same<r12,int> )); - typedef mpl::apply1< mpl::bind1<f1,_1>,int >::type r11; - typedef mpl::apply5< mpl::bind1<f1,_5>,void,void,void,void,int >::type r12; - BOOST_MPL_ASSERT_IS_SAME(r11,int); - BOOST_MPL_ASSERT_IS_SAME(r12,int); - - typedef mpl::apply5< mpl::bind5<f5,_1,_2,_3,_4,_5>,void,void,void,void,int >::type r51; - typedef mpl::apply5< mpl::bind5<f5,_5,_4,_3,_2,_1>,int,void,void,void,void >::type r52; - BOOST_MPL_ASSERT_IS_SAME(r51,int); - BOOST_MPL_ASSERT_IS_SAME(r52,int); - - return 0; + typedef apply_wrap5< bind5<f5,_1,_2,_3,_4,_5>, void,void,void,void,int >::type r51; + typedef apply_wrap5< bind5<f5,_5,_4,_3,_2,_1>, int,void,void,void,void >::type r52; + MPL_ASSERT(( boost::is_same<r51,int> )); + MPL_ASSERT(( boost::is_same<r52,int> )); } + + +MPL_TEST_CASE() // fully bound metafunction classes +{ + typedef apply_wrap0< bind1<f1,int> >::type r11; + typedef apply_wrap0< bind5<f5,void,void,void,void,int> >::type r51; + MPL_ASSERT(( boost::is_same<r11,int> )); + MPL_ASSERT(( boost::is_same<r51,int> )); +} + + +MPL_TEST_CASE() // metafunction class composition +{ + typedef apply_wrap5< bind5<f5,_1,_2,_3,_4,bind1<f1,_1> >, int,void,void,void,void >::type r51; + typedef apply_wrap5< bind5<f5,_1,_2,_3,_4,bind1<f1,_5> >, void,void,void,void,int >::type r52; + MPL_ASSERT(( boost::is_same<r51,int> )); + MPL_ASSERT(( boost::is_same<r52,int> )); +} + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \ + && !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) +MPL_TEST_CASE() // if_ evaluation +{ + typedef bind3< quote3<if_>, _1, bind1< quote1<next>, _2>, _3 > f; + typedef apply_wrap3< f,true_,int_<0>,int >::type r1; + typedef apply_wrap3< f,false_,int,int_<0> >::type r2; + + MPL_ASSERT(( boost::is_same<r1,int_<1> > )); + MPL_ASSERT(( boost::is_same<r2,int_<0> > )); +} +#endif diff --git a/test/bitwise.cpp b/test/bitwise.cpp index 9a1940c..bcd1b91 100644 --- a/test/bitwise.cpp +++ b/test/bitwise.cpp @@ -1,66 +1,71 @@ -// + file: libs/mpl/test/bitwise.cpp -// + last modified: 09/mar/03 - -// Copyright (c) 2001-03 -// Aleksey Gurtovoy, Jaap Suter +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright Jaap Suter 2003 // -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appears in all copies and -// that both the copyright notice and this permission notice appear in -// supporting documentation. No representations are made about the -// suitability of this software for any purpose. It is provided "as is" -// without express or implied warranty. +// 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. -#include "boost/mpl/bitwise.hpp" -#include "boost/mpl/integral_c.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/bitwise.hpp> +#include <boost/mpl/integral_c.hpp> +#include <boost/mpl/aux_/test.hpp> -int main() +typedef integral_c<unsigned int, 0> _0; +typedef integral_c<unsigned int, 1> _1; +typedef integral_c<unsigned int, 2> _2; +typedef integral_c<unsigned int, 8> _8; +typedef integral_c<unsigned int, 0xffffffff> _ffffffff; + +MPL_TEST_CASE() { - typedef mpl::integral_c<unsigned int, 0> _0; - typedef mpl::integral_c<unsigned int, 1> _1; - typedef mpl::integral_c<unsigned int, 2> _2; - typedef mpl::integral_c<unsigned int, 8> _8; - typedef mpl::integral_c<unsigned int, 0xFFFFFFFF> _FFFFFFFF; - - BOOST_STATIC_ASSERT((mpl::bitand_<_0,_0>::value == 0)); - BOOST_STATIC_ASSERT((mpl::bitand_<_1,_0>::value == 0)); - BOOST_STATIC_ASSERT((mpl::bitand_<_0,_1>::value == 0)); - BOOST_STATIC_ASSERT((mpl::bitand_<_0,_FFFFFFFF>::value == 0)); - BOOST_STATIC_ASSERT((mpl::bitand_<_1,_FFFFFFFF>::value == 1)); - BOOST_STATIC_ASSERT((mpl::bitand_<_8,_FFFFFFFF>::value == 8)); - - BOOST_STATIC_ASSERT((mpl::bitor_<_0,_0>::value == 0)); - BOOST_STATIC_ASSERT((mpl::bitor_<_1,_0>::value == 1)); - BOOST_STATIC_ASSERT((mpl::bitor_<_0,_1>::value == 1)); - BOOST_STATIC_ASSERT((mpl::bitor_<_0,_FFFFFFFF>::value == 0xFFFFFFFF)); - BOOST_STATIC_ASSERT((mpl::bitor_<_1,_FFFFFFFF>::value == 0xFFFFFFFF)); - BOOST_STATIC_ASSERT((mpl::bitor_<_8,_FFFFFFFF>::value == 0xFFFFFFFF)); - - BOOST_STATIC_ASSERT((mpl::bitxor_<_0,_0>::value == 0)); - BOOST_STATIC_ASSERT((mpl::bitxor_<_1,_0>::value == 1)); - BOOST_STATIC_ASSERT((mpl::bitxor_<_0,_1>::value == 1)); - BOOST_STATIC_ASSERT((mpl::bitxor_<_0,_FFFFFFFF>::value == (0xFFFFFFFF ^ 0))); - BOOST_STATIC_ASSERT((mpl::bitxor_<_1,_FFFFFFFF>::value == (0xFFFFFFFF ^ 1))); - BOOST_STATIC_ASSERT((mpl::bitxor_<_8,_FFFFFFFF>::value == (0xFFFFFFFF ^ 8))); - - BOOST_STATIC_ASSERT((mpl::shift_right<_0,_0>::value == 0)); - BOOST_STATIC_ASSERT((mpl::shift_right<_1,_0>::value == 1)); - BOOST_STATIC_ASSERT((mpl::shift_right<_1,_1>::value == 0)); - BOOST_STATIC_ASSERT((mpl::shift_right<_2,_1>::value == 1)); - BOOST_STATIC_ASSERT((mpl::shift_right<_8,_1>::value == 4)); - - BOOST_STATIC_ASSERT((mpl::shift_left<_0,_0>::value == 0)); - BOOST_STATIC_ASSERT((mpl::shift_left<_1,_0>::value == 1)); - BOOST_STATIC_ASSERT((mpl::shift_left<_1,_1>::value == 2)); - BOOST_STATIC_ASSERT((mpl::shift_left<_2,_1>::value == 4)); - BOOST_STATIC_ASSERT((mpl::shift_left<_8,_1>::value == 16)); - - return 0; + MPL_ASSERT_RELATION( (bitand_<_0,_0>::value), ==, 0 ); + MPL_ASSERT_RELATION( (bitand_<_1,_0>::value), ==, 0 ); + MPL_ASSERT_RELATION( (bitand_<_0,_1>::value), ==, 0 ); + MPL_ASSERT_RELATION( (bitand_<_0,_ffffffff>::value), ==, 0 ); + MPL_ASSERT_RELATION( (bitand_<_1,_ffffffff>::value), ==, 1 ); + MPL_ASSERT_RELATION( (bitand_<_8,_ffffffff>::value), ==, 8 ); +} + +MPL_TEST_CASE() +{ + MPL_ASSERT_RELATION( (bitor_<_0,_0>::value), ==, 0 ); + MPL_ASSERT_RELATION( (bitor_<_1,_0>::value), ==, 1 ); + MPL_ASSERT_RELATION( (bitor_<_0,_1>::value), ==, 1 ); + MPL_ASSERT_RELATION( (bitor_<_0,_ffffffff>::value), ==, 0xffffffff ); + MPL_ASSERT_RELATION( (bitor_<_1,_ffffffff>::value), ==, 0xffffffff ); + MPL_ASSERT_RELATION( (bitor_<_8,_ffffffff>::value), ==, 0xffffffff ); +} + +MPL_TEST_CASE() +{ + MPL_ASSERT_RELATION( (bitxor_<_0,_0>::value), ==, 0 ); + MPL_ASSERT_RELATION( (bitxor_<_1,_0>::value), ==, 1 ); + MPL_ASSERT_RELATION( (bitxor_<_0,_1>::value), ==, 1 ); + MPL_ASSERT_RELATION( (bitxor_<_0,_ffffffff>::value), ==, (0xffffffff ^ 0) ); + MPL_ASSERT_RELATION( (bitxor_<_1,_ffffffff>::value), ==, (0xffffffff ^ 1) ); + MPL_ASSERT_RELATION( (bitxor_<_8,_ffffffff>::value), ==, (0xffffffff ^ 8) ); +} + +MPL_TEST_CASE() +{ + MPL_ASSERT_RELATION( (shift_right<_0,_0>::value), ==, 0 ); + MPL_ASSERT_RELATION( (shift_right<_1,_0>::value), ==, 1 ); + MPL_ASSERT_RELATION( (shift_right<_1,_1>::value), ==, 0 ); + MPL_ASSERT_RELATION( (shift_right<_2,_1>::value), ==, 1 ); + MPL_ASSERT_RELATION( (shift_right<_8,_1>::value), ==, 4 ); +} + +MPL_TEST_CASE() +{ + MPL_ASSERT_RELATION( (shift_left<_0,_0>::value), ==, 0 ); + MPL_ASSERT_RELATION( (shift_left<_1,_0>::value), ==, 1 ); + MPL_ASSERT_RELATION( (shift_left<_1,_1>::value), ==, 2 ); + MPL_ASSERT_RELATION( (shift_left<_2,_1>::value), ==, 4 ); + MPL_ASSERT_RELATION( (shift_left<_8,_1>::value), ==, 16 ); } diff --git a/test/bool.cpp b/test/bool.cpp index 80a2959..333a823 100644 --- a/test/bool.cpp +++ b/test/bool.cpp @@ -1,34 +1,31 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/bool_.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#include "boost/mpl/bool.hpp" -#include "boost/mpl/assert_is_same.hpp" -#include "boost/static_assert.hpp" +// Copyright Aleksey Gurtovoy 2001-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/bool.hpp> +#include <boost/mpl/aux_/test.hpp> #include <cassert> -namespace mpl = boost::mpl; - -#define BOOL_C_TEST(c) \ - { BOOST_MPL_ASSERT_IS_SAME(mpl::bool_<c>::value_type, bool); } \ - { BOOST_MPL_ASSERT_IS_SAME(mpl::bool_<c>, mpl::c##_); } \ - { BOOST_MPL_ASSERT_IS_SAME(mpl::bool_<c>::type, mpl::bool_<c>); } \ - { BOOST_STATIC_ASSERT(mpl::bool_<c>::value == c); } \ - assert(mpl::bool_<c>() == c); \ +#define BOOL_TEST(c) \ + { MPL_ASSERT(( is_same< bool_<c>::value_type, bool > )); } \ + { MPL_ASSERT(( is_same< bool_<c>, c##_ > )); } \ + { MPL_ASSERT(( is_same< bool_<c>::type, bool_<c> > )); } \ + { MPL_ASSERT_RELATION( bool_<c>::value, ==, c ); } \ + assert( bool_<c>() == c ); \ /**/ -int main() +MPL_TEST_CASE() { - BOOL_C_TEST(true) - BOOL_C_TEST(false) - return 0; + BOOL_TEST(true) + BOOL_TEST(false) } diff --git a/test/comparison.cpp b/test/comparison.cpp index 0d35822..e1f4fa9 100644 --- a/test/comparison.cpp +++ b/test/comparison.cpp @@ -1,49 +1,64 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/comparison.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2001-2004 // -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/comparison.hpp" -#include "boost/mpl/int.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/comparison.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/aux_/test.hpp> -int main() +// make sure MSVC behaves nicely in presence of the following template +template< typename T > struct value {}; + +typedef int_<0> _0; +typedef int_<10> _10; + +MPL_TEST_CASE() { - typedef mpl::int_<0> _0; - typedef mpl::int_<10> _10; - - BOOST_STATIC_ASSERT((mpl::less<_0, _10>::value)); - BOOST_STATIC_ASSERT((!mpl::less<_10, _0>::value)); - BOOST_STATIC_ASSERT((!mpl::less<_10, _10>::value)); - - BOOST_STATIC_ASSERT((mpl::less_equal<_0, _10>::value)); - BOOST_STATIC_ASSERT((!mpl::less_equal<_10, _0>::value)); - BOOST_STATIC_ASSERT((mpl::less_equal<_10, _10>::value)); - - BOOST_STATIC_ASSERT((mpl::greater<_10, _0>::value)); - BOOST_STATIC_ASSERT((!mpl::greater<_0, _10>::value)); - BOOST_STATIC_ASSERT((!mpl::greater<_10, _10>::value)); - - BOOST_STATIC_ASSERT((!mpl::greater_equal<_0, _10>::value)); - BOOST_STATIC_ASSERT((mpl::greater_equal<_10, _0>::value)); - BOOST_STATIC_ASSERT((mpl::greater_equal<_10, _10>::value)); - - BOOST_STATIC_ASSERT((!mpl::equal_to<_0, _10>::value)); - BOOST_STATIC_ASSERT((!mpl::equal_to<_10, _0>::value)); - BOOST_STATIC_ASSERT((mpl::equal_to<_10, _10>::value)); - - BOOST_STATIC_ASSERT((mpl::not_equal_to<_0, _10>::value)); - BOOST_STATIC_ASSERT((mpl::not_equal_to<_10, _0>::value)); - BOOST_STATIC_ASSERT((!mpl::not_equal_to<_10, _10>::value)); - - return 0; + MPL_ASSERT_NOT(( equal_to<_0, _10> )); + MPL_ASSERT_NOT(( equal_to<_10, _0> )); + MPL_ASSERT(( equal_to<_10, _10> )); +} + +MPL_TEST_CASE() +{ + MPL_ASSERT(( not_equal_to<_0, _10> )); + MPL_ASSERT(( not_equal_to<_10, _0> )); + MPL_ASSERT_NOT(( not_equal_to<_10, _10> )); +} + +MPL_TEST_CASE() +{ + MPL_ASSERT(( less<_0, _10> )); + MPL_ASSERT_NOT(( less<_10, _0> )); + MPL_ASSERT_NOT(( less<_10, _10> )); +} + +MPL_TEST_CASE() +{ + MPL_ASSERT(( less_equal<_0, _10> )); + MPL_ASSERT_NOT(( less_equal<_10, _0> )); + MPL_ASSERT(( less_equal<_10, _10> )); +} + +MPL_TEST_CASE() +{ + MPL_ASSERT(( greater<_10, _0> )); + MPL_ASSERT_NOT(( greater<_0, _10> )); + MPL_ASSERT_NOT(( greater<_10, _10> )); +} + +MPL_TEST_CASE() +{ + MPL_ASSERT_NOT(( greater_equal<_0, _10> )); + MPL_ASSERT(( greater_equal<_10, _0> )); + MPL_ASSERT(( greater_equal<_10, _10> )); } diff --git a/test/contains.cpp b/test/contains.cpp index fcbce87..ba5015b 100644 --- a/test/contains.cpp +++ b/test/contains.cpp @@ -1,27 +1,24 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/contains.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2001-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/contains.hpp" -#include "boost/mpl/list.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/contains.hpp> +#include <boost/mpl/vector.hpp> +#include <boost/mpl/aux_/test.hpp> -int main() +MPL_TEST_CASE() { - typedef mpl::list<int,char,long,short,char,long,double,long>::type types; + typedef vector<int,char,long,short,char,long,double,long>::type types; - BOOST_STATIC_ASSERT((mpl::contains< types,short >::type::value)); - BOOST_STATIC_ASSERT((!mpl::contains< types,unsigned >::type::value)); - - return 0; + MPL_ASSERT(( contains< types,short > )); + MPL_ASSERT_NOT(( contains< types,unsigned > )); } diff --git a/test/copy.cpp b/test/copy.cpp index f14244c..c695663 100644 --- a/test/copy.cpp +++ b/test/copy.cpp @@ -1,38 +1,47 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/copy.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright David Abrahams 2003-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/copy.hpp" -#include "boost/mpl/vector/vector10_c.hpp" -#include "boost/mpl/vector.hpp" -#include "boost/mpl/range_c.hpp" -#include "boost/mpl/push_front.hpp" -#include "boost/mpl/size.hpp" -#include "boost/mpl/equal.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; -using mpl::_; +#include <boost/mpl/copy.hpp> -int main() +#include <boost/mpl/vector/vector20_c.hpp> +#include <boost/mpl/vector/vector0.hpp> +#include <boost/mpl/range_c.hpp> +#include <boost/mpl/front_inserter.hpp> +#include <boost/mpl/size.hpp> +#include <boost/mpl/equal.hpp> +#include <boost/mpl/aux_/test.hpp> + +MPL_TEST_CASE() { - typedef mpl::vector10_c<int,9,8,7,6,5,4,3,2,1,0> answer; - typedef mpl::copy< - mpl::range_c<int,0,10> - , mpl::vector<> - , mpl::push_front<_,_> + typedef vector10_c<int,9,8,7,6,5,4,3,2,1,0> answer; + typedef copy< + range_c<int,0,10> + , mpl::front_inserter< vector0<> > >::type result; - BOOST_STATIC_ASSERT(mpl::size<result>::value == 10); - BOOST_STATIC_ASSERT((mpl::equal< result,answer >::type::value)); - - return 0; + MPL_ASSERT_RELATION( size<result>::value, ==, 10 ); + MPL_ASSERT(( equal< result,answer > )); +} + +MPL_TEST_CASE() +{ + typedef vector10_c<int,10,11,12,13,14,15,16,17,18,19> numbers; + typedef reverse_copy< + range_c<int,0,10> + , mpl::front_inserter<numbers> + >::type result; + + MPL_ASSERT_RELATION( size<result>::value, ==, 20 ); + MPL_ASSERT(( equal< result,range_c<int,0,20> > )); } diff --git a/test/copy_backward.cpp b/test/copy_backward.cpp deleted file mode 100644 index 5ca6b0d..0000000 --- a/test/copy_backward.cpp +++ /dev/null @@ -1,38 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/copy_backward.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include "boost/mpl/copy_backward.hpp" -#include "boost/mpl/list/list10_c.hpp" -#include "boost/mpl/push_front.hpp" -#include "boost/mpl/range_c.hpp" -#include "boost/mpl/size.hpp" -#include "boost/mpl/equal.hpp" -#include "boost/static_assert.hpp" - -namespace mpl = boost::mpl; - -int main() -{ - using namespace mpl::placeholders; - - typedef mpl::list10_c<int,10,11,12,13,14,15,16,17,18,19>::type numbers; - typedef mpl::copy_backward< - mpl::range_c<int,0,10> - , numbers - , mpl::push_front<_,_> - >::type result; - - BOOST_STATIC_ASSERT(mpl::size<result>::value == 20); - BOOST_STATIC_ASSERT((mpl::equal< result,mpl::range_c<int,0,20> >::type::value)); - - return 0; -} diff --git a/test/copy_backward_if.cpp b/test/copy_backward_if.cpp deleted file mode 100644 index 13253f4..0000000 --- a/test/copy_backward_if.cpp +++ /dev/null @@ -1,39 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/copy_backward_if.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include "boost/mpl/copy_backward_if.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/push_front.hpp" -#include "boost/mpl/size.hpp" -#include "boost/mpl/equal.hpp" -#include "boost/type_traits/is_float.hpp" -#include "boost/static_assert.hpp" - -namespace mpl = boost::mpl; -using mpl::_; - -int main() -{ - typedef mpl::list<int,float,long,float,char,long,double,double>::type types; - typedef mpl::list<float,float,double,double>::type float_types; - typedef mpl::copy_backward_if< - types - , mpl::list0<> - , mpl::push_front<_,_> - , boost::is_float<_> - >::type result; - - BOOST_STATIC_ASSERT(mpl::size<result>::value == 4); - BOOST_STATIC_ASSERT((mpl::equal<result,result>::type::value)); - - return 0; -} diff --git a/test/copy_if.cpp b/test/copy_if.cpp index 07c11da..cc2abc1 100644 --- a/test/copy_if.cpp +++ b/test/copy_if.cpp @@ -1,40 +1,54 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/copy_if.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright David Abrahams 2003-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/copy_if.hpp" -#include "boost/mpl/list_c.hpp" -#include "boost/mpl/push_front.hpp" -#include "boost/mpl/less.hpp" -#include "boost/mpl/int.hpp" -#include "boost/mpl/equal.hpp" -#include "boost/mpl/size.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; -using mpl::_; +#include <boost/mpl/copy_if.hpp> +#include <boost/mpl/list/list10_c.hpp> +#include <boost/mpl/list/list10.hpp> +#include <boost/mpl/front_inserter.hpp> +#include <boost/mpl/less.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/equal.hpp> +#include <boost/mpl/size.hpp> +#include <boost/type_traits/is_float.hpp> -int main() +#include <boost/mpl/aux_/test.hpp> + +MPL_TEST_CASE() { - typedef mpl::list_c<int,0,1,2,3,4,5,6,7,8,9>::type numbers; - typedef mpl::list_c<int,4,3,2,1,0>::type answer; - typedef mpl::copy_if< + typedef list10_c<int,0,1,2,3,4,5,6,7,8,9>::type numbers; + typedef list5_c<int,4,3,2,1,0>::type answer; + typedef copy_if< numbers - , mpl::list0_c<int> - , mpl::push_front<_,_> - , mpl::less<_,mpl::int_<5> > + , less<_,int_<5> > + , mpl::front_inserter< list0_c<int> > >::type result; - BOOST_STATIC_ASSERT(mpl::size<result>::value == 5); - BOOST_STATIC_ASSERT((mpl::equal<result,answer>::type::value)); - - return 0; + MPL_ASSERT_RELATION(size<result>::value, ==, 5); + MPL_ASSERT(( equal<result,answer> )); +} + + +MPL_TEST_CASE() +{ + typedef list8<int,float,long,float,char,long,double,double>::type types; + typedef list4<float,float,double,double>::type float_types; + typedef reverse_copy_if< + types + , is_float<_> + , mpl::front_inserter< list0<> > + >::type result; + + MPL_ASSERT_RELATION(mpl::size<result>::value, ==, 4); + MPL_ASSERT(( equal<result,float_types> )); } diff --git a/test/count.cpp b/test/count.cpp index ef9b2d1..2d20758 100644 --- a/test/count.cpp +++ b/test/count.cpp @@ -1,39 +1,41 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/count.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/count.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/list_c.hpp" -#include "boost/mpl/int.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/count.hpp> -int main() +#include <boost/mpl/vector.hpp> +#include <boost/mpl/vector_c.hpp> +#include <boost/mpl/integral_c.hpp> +#include <boost/mpl/aux_/test.hpp> + +MPL_TEST_CASE() { - typedef mpl::list<int,char,long,short,char,long,double,long> types; - typedef mpl::list_c<int,1,0,5,1,7,5,0,5> values; + typedef vector<int,char,long,short,char,long,double,long> types; - BOOST_STATIC_ASSERT((mpl::count<types,int>::type::value == 1)); - BOOST_STATIC_ASSERT((mpl::count<types,double>::type::value == 1)); - BOOST_STATIC_ASSERT((mpl::count<types,char>::type::value == 2)); - BOOST_STATIC_ASSERT((mpl::count<types,long>::type::value == 3)); - BOOST_STATIC_ASSERT((mpl::count<types,unsigned>::type::value == 0)); - - BOOST_STATIC_ASSERT((mpl::count< values, mpl::integral_c<int,1> >::type::value == 2)); - BOOST_STATIC_ASSERT((mpl::count< values, mpl::integral_c<int,0> >::type::value == 2)); - BOOST_STATIC_ASSERT((mpl::count< values, mpl::integral_c<int,5> >::type::value == 3)); - BOOST_STATIC_ASSERT((mpl::count< values, mpl::integral_c<int,7> >::type::value == 1)); - BOOST_STATIC_ASSERT((mpl::count< values, mpl::integral_c<int,8> >::type::value == 0)); - - return 0; + MPL_ASSERT_RELATION( (count<types,int>::value), ==, 1 ); + MPL_ASSERT_RELATION( (count<types,double>::value), ==, 1 ); + MPL_ASSERT_RELATION( (count<types,char>::value), ==, 2 ); + MPL_ASSERT_RELATION( (count<types,long>::value), ==, 3 ); + MPL_ASSERT_RELATION( (count<types,unsigned>::value), ==, 0 ); +} + +MPL_TEST_CASE() +{ + typedef vector_c<int,1,0,5,1,7,5,0,5> values; + + MPL_ASSERT_RELATION( (count< values, integral_c<int,1> >::value), ==, 2 ); + MPL_ASSERT_RELATION( (count< values, integral_c<int,0> >::value), ==, 2 ); + MPL_ASSERT_RELATION( (count< values, integral_c<int,5> >::value), ==, 3 ); + MPL_ASSERT_RELATION( (count< values, integral_c<int,7> >::value), ==, 1 ); + MPL_ASSERT_RELATION( (count< values, integral_c<int,8> >::value), ==, 0 ); } diff --git a/test/count_if.cpp b/test/count_if.cpp index 0520db2..93f78e6 100644 --- a/test/count_if.cpp +++ b/test/count_if.cpp @@ -1,39 +1,36 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/count_if.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/count_if.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/list_c.hpp" -#include "boost/mpl/less.hpp" -#include "boost/mpl/equal_to.hpp" -#include "boost/type_traits/is_float.hpp" -#include "boost/type_traits/is_same.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/count_if.hpp> +#include <boost/mpl/vector.hpp> +#include <boost/mpl/vector_c.hpp> +#include <boost/mpl/comparison.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/aux_/test.hpp> -int main() +#include <boost/type_traits/is_float.hpp> +#include <boost/type_traits/is_same.hpp> + +MPL_TEST_CASE() { - using namespace mpl::placeholders; - typedef mpl::list<int,char&,long,short,char&,long,double,long> types; - typedef mpl::list_c<int,1,0,5,1,7,5,0,5> values; + typedef vector<int,char&,long,short,char&,long,double,long> types; + typedef vector_c<int,1,0,5,1,7,5,0,5> values; - BOOST_STATIC_ASSERT((mpl::count_if< types, boost::is_float<_> >::type::value == 1)); - BOOST_STATIC_ASSERT((mpl::count_if< types, boost::is_same<_,char&> >::type::value == 2)); - BOOST_STATIC_ASSERT((mpl::count_if< types, boost::is_same<_,void*> >::type::value == 0)); + MPL_ASSERT_RELATION( (count_if< types, boost::is_float<_> >::value), ==, 1 ); + MPL_ASSERT_RELATION( (count_if< types, boost::is_same<_,char&> >::value), ==, 2 ); + MPL_ASSERT_RELATION( (count_if< types, boost::is_same<_,void*> >::value), ==, 0 ); - BOOST_STATIC_ASSERT((mpl::count_if< values, mpl::lt<5> >::type::value == 4)); - BOOST_STATIC_ASSERT((mpl::count_if< values, mpl::eq<0> >::type::value == 2)); - BOOST_STATIC_ASSERT((mpl::count_if< values, mpl::eq<-1> >::type::value == 0)); - - return 0; + MPL_ASSERT_RELATION( (count_if< values, less<_,int_<5> > >::value), ==, 4 ); + MPL_ASSERT_RELATION( (count_if< values, equal_to<int_<0>,_> >::value), ==, 2 ); + MPL_ASSERT_RELATION( (count_if< values, equal_to<int_<-1>,_> >::value), ==, 0 ); } diff --git a/test/distance.cpp b/test/distance.cpp index b491fe4..64e57d3 100644 --- a/test/distance.cpp +++ b/test/distance.cpp @@ -1,41 +1,37 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/distance.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/distance.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/range_c.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/distance.hpp> +#include <boost/mpl/list.hpp> +#include <boost/mpl/range_c.hpp> -void list_distance_test() +#include <boost/mpl/aux_/test.hpp> + + +MPL_TEST_CASE() { - typedef mpl::list<char,short,int,long>::type list; - typedef mpl::begin<list>::type first; - typedef mpl::end<list>::type last; + typedef list<char,short,int,long>::type list; + typedef begin<list>::type first; + typedef end<list>::type last; - BOOST_STATIC_ASSERT((mpl::distance<first,last>::type::value == 4)); + MPL_ASSERT_RELATION( (mpl::distance<first,last>::value), ==, 4 ); } -void range_distance_test() +MPL_TEST_CASE() { - typedef mpl::range_c<int,0,10>::type range; - typedef mpl::begin<range>::type first; - typedef mpl::end<range>::type last; + typedef range_c<int,0,10>::type range; + typedef begin<range>::type first; + typedef end<range>::type last; - BOOST_STATIC_ASSERT((mpl::distance<first,last>::type::value == 10)); -} - -int main() -{ - return 0; + MPL_ASSERT_RELATION( (mpl::distance<first,last>::value), ==, 10 ); } diff --git a/test/empty.cpp b/test/empty.cpp index c0d4515..b7f1d2d 100644 --- a/test/empty.cpp +++ b/test/empty.cpp @@ -1,28 +1,23 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/empty.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/empty.hpp" -#include "boost/mpl/list/list10.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/empty.hpp> -int main() +#include <boost/mpl/list/list10.hpp> +#include <boost/mpl/aux_/test.hpp> + +MPL_TEST_CASE() { - typedef mpl::list0<> list0; - typedef mpl::list1<char> list1; - - BOOST_STATIC_ASSERT((mpl::empty<list0>::type::value == true)); - BOOST_STATIC_ASSERT((mpl::empty<list1>::type::value == false)); - - return 0; + MPL_ASSERT(( empty< list0<> > )); + MPL_ASSERT_NOT(( empty< list1<char> > )); } diff --git a/test/equal.cpp b/test/equal.cpp index b1e13ef..0629888 100644 --- a/test/equal.cpp +++ b/test/equal.cpp @@ -1,33 +1,31 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/equal.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/equal.hpp" -#include "boost/mpl/list.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/equal.hpp> -int main() +#include <boost/mpl/list.hpp> +#include <boost/mpl/aux_/test.hpp> + +MPL_TEST_CASE() { - typedef mpl::list<int,float,long,double,char,long,double,float> list1; - typedef mpl::list<int,float,long,double,char,long,double,float> list2; - typedef mpl::list<int,float,long,double,char,long,double,short> list3; - typedef mpl::list<int,float,long,double,char,long,double> list4; - - BOOST_STATIC_ASSERT((mpl::equal<list1,list2>::type::value == true)); - BOOST_STATIC_ASSERT((mpl::equal<list2,list1>::type::value == true)); - BOOST_STATIC_ASSERT((mpl::equal<list2,list3>::type::value == false)); - BOOST_STATIC_ASSERT((mpl::equal<list3,list4>::type::value == false)); - BOOST_STATIC_ASSERT((mpl::equal<list4,list3>::type::value == false)); - - return 0; + typedef list<int,float,long,double,char,long,double,float> list1; + typedef list<int,float,long,double,char,long,double,float> list2; + typedef list<int,float,long,double,char,long,double,short> list3; + typedef list<int,float,long,double,char,long,double> list4; + + MPL_ASSERT(( equal<list1,list2> )); + MPL_ASSERT(( equal<list2,list1> )); + MPL_ASSERT_NOT(( equal<list2,list3> )); + MPL_ASSERT_NOT(( equal<list3,list4> )); + MPL_ASSERT_NOT(( equal<list4,list3> )); } diff --git a/test/erase.cpp b/test/erase.cpp index 942f93d..ddb643e 100644 --- a/test/erase.cpp +++ b/test/erase.cpp @@ -1,46 +1,45 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/erase.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/erase.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/list_c.hpp" -#include "boost/mpl/find.hpp" -#include "boost/mpl/size.hpp" -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/assert_is_same.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/erase.hpp> +#include <boost/mpl/list.hpp> +#include <boost/mpl/list_c.hpp> +#include <boost/mpl/find.hpp> +#include <boost/mpl/size.hpp> +#include <boost/mpl/integral_c.hpp> +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/aux_/test.hpp> -int main() +MPL_TEST_CASE() { - typedef mpl::list<int,char,long,short,char,long,double,long> types; - typedef mpl::list_c<int,1,0,5,1,7,5,0,5> values; + typedef list<int,char,long,short,char,long,double,long> types; + typedef find<types,short>::type iter; + + typedef erase<types, iter>::type result; + MPL_ASSERT_RELATION( size<result>::value, ==, 7 ); - typedef mpl::find<types,short>::type types_iter; - typedef mpl::find< values, mpl::integral_c<int,7> >::type values_iter; - - typedef mpl::erase<types, types_iter>::type result_types; - typedef mpl::erase<values, values_iter>::type result_values; - - BOOST_STATIC_ASSERT(mpl::size<result_types>::type::value == 7); - BOOST_STATIC_ASSERT(mpl::size<result_values>::type::value == 7); - - typedef mpl::find<result_types,short>::type result_types_iter; - typedef mpl::find<result_values, mpl::integral_c<int,7> >::type result_values_iter; - - BOOST_MPL_ASSERT_IS_SAME(result_types_iter, mpl::end<result_types>::type); - BOOST_MPL_ASSERT_IS_SAME(result_values_iter, mpl::end<result_values>::type); - - return 0; + typedef find<result,short>::type result_iter; + MPL_ASSERT(( is_same< result_iter, end<result>::type > )); +} + +MPL_TEST_CASE() +{ + typedef list_c<int,1,0,5,1,7,5,0,5> values; + typedef find< values, integral_c<int,7> >::type iter; + + typedef erase<values, iter>::type result; + MPL_ASSERT_RELATION( size<result>::value, ==, 7 ); + + typedef find<result, integral_c<int,7> >::type result_iter; + MPL_ASSERT(( is_same< result_iter, end<result>::type > )); } diff --git a/test/erase_range.cpp b/test/erase_range.cpp index 501daff..c8ca1fa 100644 --- a/test/erase_range.cpp +++ b/test/erase_range.cpp @@ -1,39 +1,34 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/erase_range.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/erase.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/find.hpp" -#include "boost/mpl/size.hpp" -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/assert_is_same.hpp" -#include "boost/static_assert.hpp" -#include "boost/config.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/erase.hpp> +#include <boost/mpl/list.hpp> +#include <boost/mpl/find.hpp> +#include <boost/mpl/size.hpp> +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/aux_/test.hpp> -int main() +MPL_TEST_CASE() { - typedef mpl::list<int,char,long,short,unsigned,long,double,long> types; + typedef list<int,char,long,short,unsigned,long,double,long> types; - typedef mpl::find<types,short>::type iter1; - typedef mpl::find<types,double>::type iter2; + typedef find<types,short>::type iter1; + typedef find<types,double>::type iter2; - typedef mpl::erase<types,iter1,iter2>::type result; + typedef erase<types,iter1,iter2>::type result; - BOOST_STATIC_ASSERT(mpl::size<result>::type::value == 5); + MPL_ASSERT_RELATION( size<result>::value, ==, 5 ); - typedef mpl::find<result,unsigned>::type iter; - BOOST_MPL_ASSERT_IS_SAME(iter, mpl::end<result>::type); - - return 0; + typedef find<result,unsigned>::type iter; + MPL_ASSERT(( is_same< iter, end<result>::type > )); } diff --git a/test/eval_if.cpp b/test/eval_if.cpp new file mode 100644 index 0000000..6b5db6d --- /dev/null +++ b/test/eval_if.cpp @@ -0,0 +1,33 @@ + +// 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/mpl/eval_if.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/identity.hpp> + +#include <boost/mpl/aux_/test.hpp> + +#include <boost/type_traits/is_same.hpp> + +MPL_TEST_CASE() +{ + typedef eval_if< true_, identity<char>, identity<long> >::type t1; + typedef eval_if_c< true, identity<char>, identity<long> >::type t2; + typedef eval_if< false_, identity<char>, identity<long> >::type t3; + typedef eval_if_c< false, identity<char>, identity<long> >::type t4; + + MPL_ASSERT(( is_same<t1,char> )); + MPL_ASSERT(( is_same<t2,char> )); + MPL_ASSERT(( is_same<t3,long> )); + MPL_ASSERT(( is_same<t4,long> )); +} diff --git a/test/filter_view.cpp b/test/filter_view.cpp index dd5b640..0d97316 100644 --- a/test/filter_view.cpp +++ b/test/filter_view.cpp @@ -1,28 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/filter_view.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2001-2004 // -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/filter_view.hpp" -#include "boost/mpl/transform_view.hpp" -#include "boost/mpl/max_element.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/sizeof.hpp" -#include "boost/type_traits/is_float.hpp" -#include "boost/type_traits/is_same.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; -using mpl::_; +#include <boost/static_assert.hpp> +#include <boost/mpl/filter_view.hpp> +#include <boost/mpl/transform_view.hpp> +#include <boost/mpl/max_element.hpp> +#include <boost/mpl/list.hpp> +#include <boost/mpl/sizeof.hpp> +#include <boost/mpl/deref.hpp> +#include <boost/mpl/aux_/test.hpp> -int main() +#include <boost/type_traits/is_float.hpp> +#include <boost/type_traits/is_same.hpp> + +MPL_TEST_CASE() { typedef mpl::list<int,float,long,float,char[50],long double,char> types; typedef mpl::max_element< @@ -32,6 +33,5 @@ int main() > >::type iter; - BOOST_STATIC_ASSERT((boost::is_same<iter::base::type,long double>::value)); - return 0; + MPL_ASSERT((is_same<mpl::deref<iter::base>::type, long double>)); } diff --git a/test/find.cpp b/test/find.cpp index 09ef2ef..9b168ce 100644 --- a/test/find.cpp +++ b/test/find.cpp @@ -1,41 +1,37 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/find.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/find.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/list_c.hpp" -#include "boost/mpl/distance.hpp" -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/int.hpp" -#include "boost/mpl/assert_is_same.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/find.hpp> +#include <boost/mpl/list.hpp> +#include <boost/mpl/list_c.hpp> +#include <boost/mpl/distance.hpp> +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/aux_/test.hpp> -int main() +MPL_TEST_CASE() { - typedef mpl::list<int,char,long,short,char,long,double,long>::type types; - typedef mpl::list_c<int,1,0,5,1,7,5,0,5> values; + typedef list<int,char,long,short,char,long,double,long>::type types; + typedef list_c<int,1,0,5,1,7,5,0,5> values; - typedef mpl::find<types, short>::type types_iter; - typedef mpl::find< values, mpl::integral_c<int,7> >::type values_iter; + typedef find<types, short>::type types_iter; + typedef find< values, integral_c<int,7> >::type values_iter; - BOOST_MPL_ASSERT_IS_SAME(types_iter::type, short); - BOOST_STATIC_ASSERT(values_iter::type::value == 7); + MPL_ASSERT(( is_same<types_iter::type, short> )); + MPL_ASSERT_RELATION( values_iter::type::value, ==, 7 ); - typedef mpl::begin<types>::type types_first; - typedef mpl::begin<values>::type values_first; - BOOST_STATIC_ASSERT((mpl::distance< types_first,types_iter >::type::value == 3)); - BOOST_STATIC_ASSERT((mpl::distance< values_first,values_iter >::type::value == 4)); - - return 0; + typedef begin<types>::type types_first; + typedef begin<values>::type values_first; + MPL_ASSERT_RELATION( (mpl::distance< types_first,types_iter >::value), ==, 3 ); + MPL_ASSERT_RELATION( (mpl::distance< values_first,values_iter >::value), ==, 4 ); } diff --git a/test/find_if.cpp b/test/find_if.cpp index ae80a9e..0442a46 100644 --- a/test/find_if.cpp +++ b/test/find_if.cpp @@ -1,41 +1,46 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/find_if.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/find_if.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/distance.hpp" -#include "boost/mpl/assert_is_same.hpp" -#include "boost/type_traits/is_float.hpp" -#include "boost/type_traits/is_same.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/find_if.hpp> -int main() +#include <boost/mpl/vector.hpp> +#include <boost/mpl/distance.hpp> +#include <boost/mpl/size.hpp> +#include <boost/mpl/aux_/test.hpp> + +#include <boost/type_traits/is_float.hpp> +#include <boost/type_traits/is_same.hpp> + +typedef vector<int,char,long,short,char,long,double,float,char>::type types; +typedef begin<types>::type first_; + +MPL_TEST_CASE() { - using namespace mpl::placeholders; - typedef mpl::list9<int,char,long,short,char,long,double,float,char>::type types; - - typedef mpl::find_if< types, boost::is_float<_> >::type iter1; - typedef mpl::find_if< types, boost::is_same<_,long> >::type iter2; - typedef mpl::find_if< types, boost::is_same<_,void> >::type iter3; - - BOOST_MPL_ASSERT_IS_SAME(iter1::type, double); - BOOST_MPL_ASSERT_IS_SAME(iter2::type, long); - BOOST_MPL_ASSERT_IS_SAME(iter3, mpl::end<types>::type); - - typedef mpl::begin<types>::type first; - BOOST_STATIC_ASSERT((mpl::distance<first,iter1>::type::value == 6)); - BOOST_STATIC_ASSERT((mpl::distance<first,iter2>::type::value == 2)); - - return 0; + typedef find_if< types, boost::is_float<_> >::type iter; + MPL_ASSERT(( is_same< iter::type, double > )); + MPL_ASSERT_RELATION( (mpl::distance<first_,iter>::value), ==, 6 ); +} + +MPL_TEST_CASE() +{ + typedef find_if< types, boost::is_same<_,long> >::type iter; + MPL_ASSERT(( is_same< iter::type, long > )); + MPL_ASSERT_RELATION( (mpl::distance<first_,iter>::value), ==, 2 ); +} + +MPL_TEST_CASE() +{ + typedef find_if< types, boost::is_same<_,void> >::type iter; + MPL_ASSERT(( is_same< iter, end<types>::type > )); + MPL_ASSERT_RELATION( (mpl::distance<first_,iter>::value), ==, size<types>::value ); } diff --git a/test/fold.cpp b/test/fold.cpp index e36f9c9..b30999b 100644 --- a/test/fold.cpp +++ b/test/fold.cpp @@ -1,35 +1,55 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/fold.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/fold.hpp" -#include "boost/mpl/vector.hpp" -#include "boost/mpl/next.hpp" -#include "boost/mpl/if.hpp" -#include "boost/mpl/integral_c.hpp" -#include "boost/type_traits/is_float.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -using namespace boost::mpl; +#include <boost/mpl/fold.hpp> +#include <boost/mpl/reverse_fold.hpp> +//#include <boost/mpl/vector.hpp> +#include <boost/mpl/list.hpp> +#include <boost/mpl/list_c.hpp> +#include <boost/mpl/equal.hpp> +#include <boost/mpl/equal_to.hpp> +#include <boost/mpl/next.hpp> +#include <boost/mpl/push_front.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/less.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/at.hpp> +#include <boost/mpl/size.hpp> +#include <boost/type_traits/is_float.hpp> -int main() +#include <boost/mpl/aux_/test.hpp> + +MPL_TEST_CASE() { - typedef vector<long,float,short,double,float,long,long double> types; + typedef list<long,float,short,double,float,long,long double> types; typedef fold< types - , integral_c<long, 0> + , int_<0> , if_< boost::is_float<_2>,next<_1>,_1 > >::type number_of_floats; - BOOST_STATIC_ASSERT(number_of_floats::value == 4); - - return 0; + MPL_ASSERT_RELATION( number_of_floats::value, ==, 4 ); +} + +MPL_TEST_CASE() +{ + typedef list_c<int,5,-1,0,-7,-2,0,-5,4> numbers; + typedef list_c<int,-1,-7,-2,-5> negatives; + typedef reverse_fold< + numbers + , list_c<int> + , if_< less< _2,int_<0> >, push_front<_1,_2>, _1 > + >::type result; + + MPL_ASSERT(( equal< result,negatives,equal_to<_1,_2> > )); } diff --git a/test/for_each.cpp b/test/for_each.cpp index 8362161..3b16fc3 100644 --- a/test/for_each.cpp +++ b/test/for_each.cpp @@ -1,21 +1,23 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/for_each.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#include "boost/mpl/for_each.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/range_c.hpp" -#include "boost/mpl/identity.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/bind.hpp" +// 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/mpl/for_each.hpp> + +#include <boost/mpl/list.hpp> +#include <boost/mpl/range_c.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/lambda.hpp> +#include <boost/bind.hpp> #include <vector> #include <iostream> @@ -24,7 +26,6 @@ #include <cassert> namespace mpl = boost::mpl; -using mpl::_; struct type_printer { @@ -57,18 +58,18 @@ struct value_printer int main() { typedef mpl::list<char,short,int,long,float,double> types; - mpl::for_each< types,mpl::make_identity<_> >(type_printer(std::cout)); + mpl::for_each< types,mpl::make_identity<mpl::_1> >(type_printer(std::cout)); typedef mpl::range_c<int,0,10> numbers; std::vector<int> v; -#if !defined(__BORLANDC__) && (__BORLANDC__ >= 0x561 && !defined(BOOST_STRICT_CONFIG)) - mpl::for_each<numbers,mpl::_>( +#if BOOST_WORKAROUND(__BORLANDC__, >= 0x561) + mpl::for_each<numbers>( boost::bind(&std::vector<int>::push_back, &v, _1) ); #else void (std::vector<int>::* push_back)(int const&) = &std::vector<int>::push_back; - mpl::for_each<numbers,mpl::_>( + mpl::for_each<numbers>( boost::bind(push_back, &v, _1) ); #endif diff --git a/test/front.cpp b/test/front.cpp index 1886995..d59a7f4 100644 --- a/test/front.cpp +++ b/test/front.cpp @@ -1,40 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/front.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/front.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/list_c.hpp" -#include "boost/mpl/assert_is_same.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/front.hpp> +#include <boost/mpl/range_c.hpp> +#include <boost/mpl/aux_/test.hpp> -int main() +template< typename Seq, int value > struct front_test { - typedef mpl::list<long>::type types1; - typedef mpl::list<int,long>::type types2; - typedef mpl::list<char,int,long>::type types3; + typedef typename front<Seq>::type t; + MPL_ASSERT_RELATION( t::value, ==, value ); +}; - BOOST_MPL_ASSERT_IS_SAME(mpl::front<types1>::type, long); - BOOST_MPL_ASSERT_IS_SAME(mpl::front<types2>::type, int); - BOOST_MPL_ASSERT_IS_SAME(mpl::front<types3>::type, char); - - typedef mpl::list_c<int,1>::type values1; - typedef mpl::list_c<int,2,1>::type values2; - typedef mpl::list_c<int,3,2,1>::type values3; - - BOOST_STATIC_ASSERT(mpl::front<values1>::type::value == 1); - BOOST_STATIC_ASSERT(mpl::front<values2>::type::value == 2); - BOOST_STATIC_ASSERT(mpl::front<values3>::type::value == 3); - - return 0; +MPL_TEST_CASE() +{ + front_test< range_c<int,1,10>, 1 >(); + front_test< range_c<int,2,10>, 2 >(); + front_test< range_c<int,-1,0>, -1 >(); } diff --git a/test/has_xxx.cpp b/test/has_xxx.cpp new file mode 100644 index 0000000..45324ee --- /dev/null +++ b/test/has_xxx.cpp @@ -0,0 +1,80 @@ + +// 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/mpl/has_xxx.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> +#include <boost/mpl/aux_/test.hpp> + +BOOST_MPL_HAS_XXX_TRAIT_DEF(xxx) + +struct a1 {}; +struct a2 { void xxx(); }; +struct a3 { int xxx; }; +struct a4 { static int xxx(); }; + +struct b1 { typedef int xxx; }; +struct b2 { struct xxx; }; +struct b3 { typedef int& xxx; }; +struct b4 { typedef int* xxx; }; +struct b5 { typedef int xxx[10]; }; +struct b6 { typedef void (*xxx)(); }; +struct b7 { typedef void (xxx)(); }; + +template< typename T > struct outer; +template< typename T > struct inner { typedef typename T::type type; }; + +// agurt, 15/aug/04: make sure MWCW passes the test in presence of the following +// template +template< typename T > struct xxx; + + +MPL_TEST_CASE() +{ + MPL_ASSERT_NOT(( has_xxx<int> )); +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + MPL_ASSERT_NOT(( has_xxx<int&> )); + MPL_ASSERT_NOT(( has_xxx<int*> )); + MPL_ASSERT_NOT(( has_xxx<int[]> )); + MPL_ASSERT_NOT(( has_xxx<int (*)()> )); + + MPL_ASSERT_NOT(( has_xxx<a2> )); + MPL_ASSERT_NOT(( has_xxx<a3> )); + MPL_ASSERT_NOT(( has_xxx<a4> )); + MPL_ASSERT_NOT(( has_xxx< enum_ > )); +#endif + MPL_ASSERT_NOT(( has_xxx<a1> )); + MPL_ASSERT_NOT(( has_xxx< outer< inner<int> > > )); + MPL_ASSERT_NOT(( has_xxx< incomplete > )); + MPL_ASSERT_NOT(( has_xxx< abstract > )); + MPL_ASSERT_NOT(( has_xxx< noncopyable > )); + + MPL_ASSERT(( has_xxx<b1,true> )); + MPL_ASSERT(( has_xxx<b2,true> )); + MPL_ASSERT(( has_xxx<b3,true> )); + MPL_ASSERT(( has_xxx<b4,true> )); + MPL_ASSERT(( has_xxx<b5,true> )); + MPL_ASSERT(( has_xxx<b6,true> )); + MPL_ASSERT(( has_xxx<b7,true> )); + +#if !defined(HAS_XXX_ASSERT) +# define HAS_XXX_ASSERT(x) MPL_ASSERT(x) +#endif + + HAS_XXX_ASSERT(( has_xxx<b1> )); + HAS_XXX_ASSERT(( has_xxx<b2> )); + HAS_XXX_ASSERT(( has_xxx<b3> )); + HAS_XXX_ASSERT(( has_xxx<b4> )); + HAS_XXX_ASSERT(( has_xxx<b5> )); + HAS_XXX_ASSERT(( has_xxx<b6> )); + HAS_XXX_ASSERT(( has_xxx<b7> )); +} diff --git a/test/identity.cpp b/test/identity.cpp index a82c128..8e3e04b 100644 --- a/test/identity.cpp +++ b/test/identity.cpp @@ -1,25 +1,32 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/identity.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/apply.hpp" -#include "boost/mpl/identity.hpp" -#include "boost/mpl/assert_is_same.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/apply.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/aux_/test.hpp> -int main() +MPL_TEST_CASE() { - typedef mpl::apply1< mpl::identity<>, char >::type t1; - BOOST_MPL_ASSERT_IS_SAME(t1, char); - - return 0; + typedef apply1< identity<>, char >::type t1; + typedef apply1< identity<_1>, int >::type t2; + MPL_ASSERT(( is_same< t1, char > )); + MPL_ASSERT(( is_same< t2, int > )); +} + +MPL_TEST_CASE() +{ + typedef apply1< make_identity<>, char >::type t1; + typedef apply1< make_identity<_1>, int >::type t2; + MPL_ASSERT(( is_same< t1, identity<char> > )); + MPL_ASSERT(( is_same< t2, identity<int> > )); } diff --git a/test/if.cpp b/test/if.cpp index 8db267d..fd9798f 100644 --- a/test/if.cpp +++ b/test/if.cpp @@ -1,32 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/if.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/if.hpp" -#include "boost/mpl/bool.hpp" -#include "boost/mpl/assert_is_same.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/if.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/aux_/test.hpp> -int main() +MPL_TEST_CASE() { - typedef mpl::if_<mpl::true_,char,long>::type t1; - typedef mpl::if_c<true,char,long>::type t2; - BOOST_MPL_ASSERT_IS_SAME(t1, char); - BOOST_MPL_ASSERT_IS_SAME(t2, char); + typedef if_<true_,char,long>::type t1; + typedef if_c<true,char,long>::type t2; + typedef if_<false_,char,long>::type t3; + typedef if_c<false,char,long>::type t4; - typedef mpl::if_<mpl::false_,char,long>::type t3; - typedef mpl::if_c<false,char,long>::type t4; - BOOST_MPL_ASSERT_IS_SAME(t3, long); - BOOST_MPL_ASSERT_IS_SAME(t4, long); - - return 0; + MPL_ASSERT(( is_same<t1, char> )); + MPL_ASSERT(( is_same<t2, char> )); + MPL_ASSERT(( is_same<t3, long> )); + MPL_ASSERT(( is_same<t4, long> )); } diff --git a/test/index_of.cpp b/test/index_of.cpp index 70033a1..66ec51b 100644 --- a/test/index_of.cpp +++ b/test/index_of.cpp @@ -1,37 +1,34 @@ -//----------------------------------------------------------------------------- -// libs mpl/test/index_of.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Eric Friedman 2003 // -// Copyright (c) 2003 -// Eric Friedman -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/index_of.hpp" +// $Source$ +// $Date$ +// $Revision$ -#include "boost/static_assert.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/void.hpp" -namespace mpl = boost::mpl; +#include <boost/mpl/index_of.hpp> +#include <boost/mpl/list.hpp> +#include <boost/mpl/void.hpp> +#include <boost/mpl/aux_/test.hpp> -int test_main(int , char* []) +MPL_TEST_CASE() { - typedef mpl::list< int, double, float >::type types; + typedef list< int, double, float >::type types; - typedef mpl::index_of< types, int >::type index_of_int; - typedef mpl::index_of< types, double >::type index_of_double; - typedef mpl::index_of< types, float >::type index_of_float; - typedef mpl::index_of< types, char >::type index_of_char; + typedef index_of< types, int >::type index_of_int; + typedef index_of< types, double >::type index_of_double; + typedef index_of< types, float >::type index_of_float; + typedef index_of< types, char >::type index_of_char; - BOOST_STATIC_ASSERT(( index_of_int::value == 0 )); - BOOST_STATIC_ASSERT(( index_of_double::value == 1 )); - BOOST_STATIC_ASSERT(( index_of_float::value == 2 )); + MPL_ASSERT_RELATION( index_of_int::value, ==, 0 ); + MPL_ASSERT_RELATION( index_of_double::value, ==, 1 ); + MPL_ASSERT_RELATION( index_of_float::value, ==, 2 ); - BOOST_STATIC_ASSERT(( mpl::is_void_< index_of_char >::value )); - - return 0; + MPL_ASSERT(( is_void_< index_of_char > )); } diff --git a/test/inherit.cpp b/test/inherit.cpp index a91dcf8..2700a01 100644 --- a/test/inherit.cpp +++ b/test/inherit.cpp @@ -1,43 +1,40 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/inherit.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#include "boost/mpl/inherit.hpp" -#include "boost/mpl/assert_is_same.hpp" +// Copyright Aleksey Gurtovoy 2001-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/inherit.hpp> +#include <boost/mpl/aux_/test.hpp> struct her { typedef her herself; }; struct my { typedef my myself; }; -int main() +MPL_TEST_CASE() { - using namespace boost::mpl; - - BOOST_MPL_ASSERT_IS_SAME(inherit<her>::type, her); + MPL_ASSERT(( is_same<inherit<her>::type, her> )); typedef inherit<her,my>::type her_my1; - BOOST_MPL_ASSERT_IS_SAME(her_my1::herself, her); - BOOST_MPL_ASSERT_IS_SAME(her_my1::myself, my); + MPL_ASSERT(( is_same<her_my1::herself, her> )); + MPL_ASSERT(( is_same<her_my1::myself, my> )); typedef inherit<empty_base,her>::type her1; - BOOST_MPL_ASSERT_IS_SAME(her1, her); + MPL_ASSERT(( is_same<her1, her> )); typedef inherit<empty_base,her,empty_base,empty_base>::type her2; - BOOST_MPL_ASSERT_IS_SAME(her2, her); + MPL_ASSERT(( is_same<her2, her> )); typedef inherit<her,empty_base,my>::type her_my2; - BOOST_MPL_ASSERT_IS_SAME(her_my2::herself, her); - BOOST_MPL_ASSERT_IS_SAME(her_my2::myself, my); + MPL_ASSERT(( is_same<her_my2::herself, her> )); + MPL_ASSERT(( is_same<her_my2::myself, my> )); typedef inherit<empty_base,empty_base>::type empty; - BOOST_MPL_ASSERT_IS_SAME(empty, empty_base); - - return 0; + MPL_ASSERT(( is_same<empty, empty_base> )); } diff --git a/test/insert.cpp b/test/insert.cpp index 280fe98..719013e 100644 --- a/test/insert.cpp +++ b/test/insert.cpp @@ -1,32 +1,31 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/insert.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2001-2004 // -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/insert.hpp" -#include "boost/mpl/find.hpp" -#include "boost/mpl/list_c.hpp" -#include "boost/mpl/size.hpp" -#include "boost/mpl/range_c.hpp" -#include "boost/mpl/equal.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/insert.hpp> -int main() +#include <boost/mpl/find.hpp> +#include <boost/mpl/vector_c.hpp> +#include <boost/mpl/size.hpp> +#include <boost/mpl/range_c.hpp> +#include <boost/mpl/equal.hpp> +#include <boost/mpl/aux_/test.hpp> + +MPL_TEST_CASE() { - typedef mpl::list_c<int,0,1,3,4,5,6,7,8,9> numbers; - typedef mpl::find< numbers,mpl::integral_c<int,3> >::type pos; - typedef mpl::insert< numbers,pos,mpl::integral_c<int,2> >::type range; + typedef vector_c<int,0,1,3,4,5,6,7,8,9> numbers; + typedef find< numbers,integral_c<int,3> >::type pos; + typedef insert< numbers,pos,integral_c<int,2> >::type range; - BOOST_STATIC_ASSERT(mpl::size<range>::type::value == 10); - BOOST_STATIC_ASSERT((mpl::equal< range,mpl::range_c<int,0,10> >::type::value)); - return 0; + MPL_ASSERT_RELATION( size<range>::value, ==, 10 ); + MPL_ASSERT(( equal< range,range_c<int,0,10> > )); } diff --git a/test/insert_range.cpp b/test/insert_range.cpp index 15b643c..e780699 100644 --- a/test/insert_range.cpp +++ b/test/insert_range.cpp @@ -1,42 +1,35 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/insert_range.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2001-2004 // -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/insert_range.hpp" -#include "boost/mpl/find.hpp" -#include "boost/mpl/list_c.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/size.hpp" -#include "boost/mpl/range_c.hpp" -#include "boost/mpl/equal.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/insert_range.hpp> +#include <boost/mpl/find.hpp> +#include <boost/mpl/vector_c.hpp> +#include <boost/mpl/list.hpp> +#include <boost/mpl/size.hpp> +#include <boost/mpl/range_c.hpp> +#include <boost/mpl/equal.hpp> -int main() +#include <boost/mpl/aux_/test.hpp> + +MPL_TEST_CASE() { - typedef mpl::list_c<int,0,1,7,8,9> numbers; - typedef mpl::find< numbers,mpl::integral_c<int,7> >::type pos; - typedef mpl::insert_range< numbers,pos,mpl::range_c<int,2,7> >::type range; + typedef vector_c<int,0,1,7,8,9> numbers; + typedef find< numbers,integral_c<int,7> >::type pos; + typedef insert_range< numbers,pos,range_c<int,2,7> >::type range; - BOOST_STATIC_ASSERT(mpl::size<range>::type::value == 10); - BOOST_STATIC_ASSERT((mpl::equal< range,mpl::range_c<int,0,10> >::type::value)); + MPL_ASSERT_RELATION( size<range>::value, ==, 10 ); + MPL_ASSERT(( equal< range,range_c<int,0,10> > )); - typedef mpl::insert_range< - mpl::list0<>, - mpl::end< mpl::list0<> >::type, - mpl::list<int> - >::type result2; - - BOOST_STATIC_ASSERT((mpl::size<result2>::type::value == 1)); - - return 0; + typedef insert_range< list0<>,end< list0<> >::type,list1<int> >::type result2; + MPL_ASSERT_RELATION( size<result2>::value, ==, 1 ); } diff --git a/test/int.cpp b/test/int.cpp index 80f51a1..f4142db 100644 --- a/test/int.cpp +++ b/test/int.cpp @@ -1,36 +1,24 @@ -// + file: libs/mpl/int.cpp -// + last modified: 12/apr/03 - -// Copyright (c) 2001-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2001-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/int.hpp" -#include "boost/mpl/assert_is_same.hpp" -#include "boost/static_assert.hpp" -#include "boost/preprocessor/repeat.hpp" +// $Source$ +// $Date$ +// $Revision$ -#include <cassert> +#include <boost/mpl/int.hpp> +#include <boost/preprocessor/repeat.hpp> -namespace mpl = boost::mpl; +#include "integral_wrapper_test.hpp" -#define INT_C_TEST(unused1, i, unused2) \ - { BOOST_MPL_ASSERT_IS_SAME(mpl::int_<i>::value_type, int); } \ - { BOOST_MPL_ASSERT_IS_SAME(mpl::int_<i>::type, mpl::int_<i>); } \ - { BOOST_MPL_ASSERT_IS_SAME(mpl::int_<i>::next, mpl::int_<i+1>); } \ - { BOOST_MPL_ASSERT_IS_SAME(mpl::int_<i>::prior, mpl::int_<i-1>); } \ - { BOOST_STATIC_ASSERT(mpl::int_<i>::value == i); } \ - assert(mpl::int_<i>() == i); \ -/**/ -int main() +MPL_TEST_CASE() { - BOOST_PP_REPEAT(10, INT_C_TEST, unused) - return 0; +# define WRAPPER(T, i) int_<i> + BOOST_PP_REPEAT(10, INTEGRAL_WRAPPER_TEST, int) } diff --git a/test/integral_c.cpp b/test/integral_c.cpp index 5950e93..736beba 100644 --- a/test/integral_c.cpp +++ b/test/integral_c.cpp @@ -1,42 +1,27 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/integral_c.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2001-2004 // -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/integral_c.hpp" -#include "boost/mpl/assert_is_same.hpp" -#include "boost/static_assert.hpp" -#include "boost/preprocessor/repeat.hpp" +// $Source$ +// $Date$ +// $Revision$ -#include <cassert> +#include <boost/mpl/integral_c.hpp> +#include <boost/preprocessor/repeat.hpp> -namespace mpl = boost::mpl; +#include "integral_wrapper_test.hpp" -#define INTEGRAL_C_TEST(z, i, T) \ - { \ - typedef mpl::integral_c<T,i> c##i; \ - typedef mpl::integral_c<T,i+1> next_c##i; \ - typedef mpl::integral_c<T,i-1> prior_c##i; \ - { BOOST_MPL_ASSERT_IS_SAME(c##i::value_type, T); } \ - { BOOST_MPL_ASSERT_IS_SAME(c##i::type, c##i); } \ - { BOOST_MPL_ASSERT_IS_SAME(c##i::next, next_c##i); } \ - { BOOST_MPL_ASSERT_IS_SAME(c##i::prior, prior_c##i); } \ - { BOOST_STATIC_ASSERT(c##i::value == i); } \ - assert(c##i() == i); \ - } -/**/ -int main() +MPL_TEST_CASE() { - BOOST_PP_REPEAT(10, INTEGRAL_C_TEST, char) - BOOST_PP_REPEAT(10, INTEGRAL_C_TEST, short) - BOOST_PP_REPEAT(10, INTEGRAL_C_TEST, int) - return 0; +# define WRAPPER(T, i) integral_c<T,i> + BOOST_PP_REPEAT(10, INTEGRAL_WRAPPER_TEST, char) + BOOST_PP_REPEAT(10, INTEGRAL_WRAPPER_TEST, short) + BOOST_PP_REPEAT(10, INTEGRAL_WRAPPER_TEST, int) + BOOST_PP_REPEAT(10, INTEGRAL_WRAPPER_TEST, long) } diff --git a/test/integral_wrapper_test.hpp b/test/integral_wrapper_test.hpp new file mode 100644 index 0000000..4d07530 --- /dev/null +++ b/test/integral_wrapper_test.hpp @@ -0,0 +1,38 @@ + +// Copyright Aleksey Gurtovoy 2001-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/next_prior.hpp> +#include <boost/mpl/aux_/test.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +#include <cassert> + +#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) +# define INTEGRAL_WRAPPER_RUNTIME_TEST(i, T) \ + assert(WRAPPER(T,i)() == i); \ + assert(WRAPPER(T,i)::value == i); \ + /**/ +#else +# define INTEGRAL_WRAPPER_RUNTIME_TEST(i, T) \ + assert(WRAPPER(T,i)::value == i); \ + /**/ +#endif + +#define INTEGRAL_WRAPPER_TEST(unused1, i, T) \ + { MPL_ASSERT(( is_same< WRAPPER(T,i)::value_type, T > )); } \ + { MPL_ASSERT(( is_same< WRAPPER(T,i)::type, WRAPPER(T,i) > )); } \ + { MPL_ASSERT(( is_same< next< WRAPPER(T,i) >::type, WRAPPER(T,i+1) > )); } \ + { MPL_ASSERT(( is_same< prior< WRAPPER(T,i) >::type, WRAPPER(T,i-1) > )); } \ + { MPL_ASSERT_RELATION( (WRAPPER(T,i)::value), ==, i ); } \ + INTEGRAL_WRAPPER_RUNTIME_TEST(i, T) \ +/**/ diff --git a/test/is_placeholder.cpp b/test/is_placeholder.cpp index 8f10cae..7a30f03 100644 --- a/test/is_placeholder.cpp +++ b/test/is_placeholder.cpp @@ -1,44 +1,42 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/is_placeholder.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/is_placeholder.hpp" -#include "boost/mpl/placeholders.hpp" +// $Source$ +// $Date$ +// $Revision$ -#include "boost/preprocessor/repeat.hpp" -#include "boost/preprocessor/inc.hpp" -#include "boost/preprocessor/cat.hpp" -#include "boost/static_assert.hpp" +#include <boost/mpl/is_placeholder.hpp> +#include <boost/mpl/placeholders.hpp> +#include <boost/mpl/aux_/test.hpp> -using namespace boost::mpl; - -struct UDT; +#include <boost/preprocessor/repeat.hpp> +#include <boost/preprocessor/inc.hpp> +#include <boost/preprocessor/cat.hpp> #define AUX_IS_PLACEHOLDER_TEST(unused1, n, unused2) \ - { BOOST_STATIC_ASSERT(is_placeholder< \ + { MPL_ASSERT(( is_placeholder< \ BOOST_PP_CAT(_,BOOST_PP_INC(n)) \ - >::value); } \ + > )); } \ /**/ -int main() +MPL_TEST_CASE() { - BOOST_STATIC_ASSERT(!is_placeholder<int>::value); - BOOST_STATIC_ASSERT(!is_placeholder<UDT>::value); - BOOST_STATIC_ASSERT(is_placeholder<_>::value); + MPL_ASSERT_NOT(( is_placeholder<int> )); + MPL_ASSERT_NOT(( is_placeholder<UDT> )); + MPL_ASSERT_NOT(( is_placeholder<incomplete> )); + MPL_ASSERT_NOT(( is_placeholder<abstract> )); + MPL_ASSERT_NOT(( is_placeholder<noncopyable> )); + MPL_ASSERT(( is_placeholder<_> )); BOOST_PP_REPEAT( - BOOST_MPL_METAFUNCTION_MAX_ARITY + BOOST_MPL_LIMIT_METAFUNCTION_ARITY , AUX_IS_PLACEHOLDER_TEST , unused ) - - return 0; } diff --git a/test/is_sequence.cpp b/test/is_sequence.cpp index b9efd49..88d28b5 100644 --- a/test/is_sequence.cpp +++ b/test/is_sequence.cpp @@ -1,38 +1,37 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/is_sequence.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2002-2004 // -// Copyright (c) 2002-03 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/list.hpp" -#include "boost/mpl/vector.hpp" -#include "boost/mpl/range_c.hpp" -#include "boost/mpl/is_sequence.hpp" -#include "boost/static_assert.hpp" -#include <vector> +// $Source$ +// $Date$ +// $Revision$ -using namespace boost::mpl; +#include <boost/mpl/is_sequence.hpp> +#include <boost/mpl/list.hpp> +#include <boost/mpl/vector.hpp> +#include <boost/mpl/range_c.hpp> +#include <boost/mpl/aux_/test.hpp> -struct UDT {}; - -int main() +template< typename T > struct std_vector { - BOOST_STATIC_ASSERT(!is_sequence< std::vector<int> >::value); - BOOST_STATIC_ASSERT(!is_sequence< int >::value); - BOOST_STATIC_ASSERT(!is_sequence< int& >::value); - BOOST_STATIC_ASSERT(!is_sequence< UDT >::value); - BOOST_STATIC_ASSERT(!is_sequence< UDT* >::value); - BOOST_STATIC_ASSERT((is_sequence< range_c<int,0,0> >::value)); - BOOST_STATIC_ASSERT(is_sequence< list<> >::value); - BOOST_STATIC_ASSERT(is_sequence< list<int> >::value); - BOOST_STATIC_ASSERT(is_sequence< vector<> >::value); - BOOST_STATIC_ASSERT(is_sequence< vector<int> >::value); + T* begin(); +}; - return 0; +MPL_TEST_CASE() +{ + MPL_ASSERT_NOT(( is_sequence< std_vector<int> > )); + MPL_ASSERT_NOT(( is_sequence< int > )); + MPL_ASSERT_NOT(( is_sequence< int& > )); + MPL_ASSERT_NOT(( is_sequence< UDT > )); + MPL_ASSERT_NOT(( is_sequence< UDT* > )); + MPL_ASSERT(( is_sequence< range_c<int,0,0> > )); + MPL_ASSERT(( is_sequence< list<> > )); + MPL_ASSERT(( is_sequence< list<int> > )); + MPL_ASSERT(( is_sequence< vector<> > )); + MPL_ASSERT(( is_sequence< vector<int> > )); } diff --git a/test/iterator_tags.cpp b/test/iterator_tags.cpp new file mode 100644 index 0000000..8f6fc43 --- /dev/null +++ b/test/iterator_tags.cpp @@ -0,0 +1,23 @@ + +// 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/mpl/iterator_tags.hpp> + +#include <boost/mpl/less.hpp> +#include <boost/mpl/aux_/test.hpp> + +MPL_TEST_CASE() +{ + MPL_ASSERT(( less<mpl::forward_iterator_tag,mpl::bidirectional_iterator_tag> )); + MPL_ASSERT(( less<mpl::bidirectional_iterator_tag,mpl::random_access_iterator_tag> )); +} diff --git a/test/joint_view.cpp b/test/joint_view.cpp index cde564b..8fd35a2 100644 --- a/test/joint_view.cpp +++ b/test/joint_view.cpp @@ -1,35 +1,32 @@ -// + file: libs/mpl/test/joint_view.cpp -// + last modified: 25/may/03 - -// Copyright (c) 2001-03 -// Aleksey Gurtovoy +// Copyright Aleksey Gurtovoy 2001-2004 // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/joint_view.hpp" -#include "boost/mpl/range_c.hpp" -#include "boost/mpl/equal.hpp" -#include "boost/mpl/size.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/joint_view.hpp> -int main() +#include <boost/mpl/range_c.hpp> +#include <boost/mpl/equal.hpp> +#include <boost/mpl/size.hpp> +#include <boost/mpl/aux_/test.hpp> + +MPL_TEST_CASE() { - typedef mpl::joint_view< - mpl::range_c<int,0,10> - , mpl::range_c<int,10,15> + typedef joint_view< + range_c<int,0,10> + , range_c<int,10,15> > numbers; - typedef mpl::range_c<int,0,15> answer; + typedef range_c<int,0,15> answer; - BOOST_STATIC_ASSERT((mpl::equal<numbers,answer>::type::value)); - BOOST_STATIC_ASSERT((mpl::size<numbers>::value == 15)); - - return 0; + MPL_ASSERT(( equal<numbers,answer> )); + MPL_ASSERT_RELATION( size<numbers>::value, ==, 15 ); } diff --git a/test/lambda.cpp b/test/lambda.cpp index 5315446..1c2c526 100644 --- a/test/lambda.cpp +++ b/test/lambda.cpp @@ -1,75 +1,78 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/lambda.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2001-2004 // -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/logical.hpp" -#include "boost/mpl/comparison.hpp" -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/int.hpp" -#include "boost/mpl/bool.hpp" -#include "boost/mpl/sizeof.hpp" -#include "boost/mpl/apply.hpp" +// $Source$ +// $Date$ +// $Revision$ -#include "boost/type_traits/is_same.hpp" -#include "boost/type_traits/is_float.hpp" -#include "boost/static_assert.hpp" +#include <boost/mpl/logical.hpp> +#include <boost/mpl/comparison.hpp> +#include <boost/mpl/lambda.hpp> +#include <boost/mpl/size_t.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/sizeof.hpp> +#include <boost/mpl/apply.hpp> -namespace mpl = boost::mpl; +#include <boost/mpl/aux_/test.hpp> + +#include <boost/type_traits/is_same.hpp> +#include <boost/type_traits/is_float.hpp> struct my { char a[100]; }; -int main() +MPL_TEST_CASE() { - using namespace mpl::placeholders; - // !(x == char) && !(x == double) && x convertible to int || sizeof(x) > 8 - typedef mpl::lambda< - mpl::or_< - mpl::and_< - mpl::not_< boost::is_same<_1, char> > - , mpl::not_< boost::is_float<_1> > + typedef lambda< + or_< + and_< + not_< boost::is_same<_1, char> > + , not_< boost::is_float<_1> > > - , mpl::greater< mpl::sizeof_<_1>, mpl::size_t<8> > + , greater< sizeof_<_1>, mpl::size_t<8> > > - >::type f1; + >::type f; - BOOST_STATIC_ASSERT((!mpl::apply1<f1,char>::type::value)); - BOOST_STATIC_ASSERT((!mpl::apply1<f1,double>::type::value)); - BOOST_STATIC_ASSERT((mpl::apply1<f1,long>::type::value)); - BOOST_STATIC_ASSERT((mpl::apply1<f1,my>::type::value)); + MPL_ASSERT_NOT(( apply_wrap1<f,char> )); + MPL_ASSERT_NOT(( apply_wrap1<f,double> )); + MPL_ASSERT(( apply_wrap1<f,long> )); + MPL_ASSERT(( apply_wrap1<f,my> )); +} +MPL_TEST_CASE() +{ // x == y || x == my || sizeof(x) == sizeof(y) - typedef mpl::lambda< - mpl::or_< + typedef lambda< + or_< boost::is_same<_1, _2> , boost::is_same<_2, my> - , mpl::equal_to< mpl::sizeof_<_1>, mpl::sizeof_<_2> > + , equal_to< sizeof_<_1>, sizeof_<_2> > > - >::type f2; + >::type f; - BOOST_STATIC_ASSERT((!mpl::apply2<f2,double,char>::type::value)); - BOOST_STATIC_ASSERT((!mpl::apply2<f2,my,int>::type::value)); - BOOST_STATIC_ASSERT((!mpl::apply2<f2,my,char[99]>::type::value)); - BOOST_STATIC_ASSERT((mpl::apply2<f2,int,int>::type::value)); - BOOST_STATIC_ASSERT((mpl::apply2<f2,my,my>::type::value)); - BOOST_STATIC_ASSERT((mpl::apply2<f2,signed long, unsigned long>::type::value)); - - // bind <-> lambda interaction - typedef mpl::lambda< mpl::less<_1,_2> >::type pred; - typedef mpl::bind2< pred, _1, mpl::int_<4> > f3; - - BOOST_STATIC_ASSERT((mpl::apply1< f3,mpl::int_<3> >::type::value)); - - return 0; + MPL_ASSERT_NOT(( apply_wrap2<f,double,char> )); + MPL_ASSERT_NOT(( apply_wrap2<f,my,int> )); + MPL_ASSERT_NOT(( apply_wrap2<f,my,char[99]> )); + MPL_ASSERT(( apply_wrap2<f,int,int> )); + MPL_ASSERT(( apply_wrap2<f,my,my> )); + MPL_ASSERT(( apply_wrap2<f,signed long, unsigned long> )); +} + +MPL_TEST_CASE() +{ + // bind <-> lambda interaction + typedef lambda< less<_1,_2> >::type pred; + typedef bind2< pred, _1, int_<4> > f; + + MPL_ASSERT(( apply_wrap1< f,int_<3> > )); } diff --git a/test/lambda_args.cpp b/test/lambda_args.cpp index 708a74a..786b43c 100644 --- a/test/lambda_args.cpp +++ b/test/lambda_args.cpp @@ -1,51 +1,48 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/lambda_args.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2001-2004 // -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/lambda.hpp" -#include "boost/mpl/apply.hpp" -#include "boost/type_traits/is_same.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -using namespace boost; -using namespace mpl; +#include <boost/mpl/lambda.hpp> +#include <boost/mpl/apply.hpp> +#include <boost/mpl/aux_/test.hpp> +#include <boost/mpl/aux_/config/gcc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> -class C {}; -class incomplete; - -typedef int C::* mem_ptr; -typedef int (C::* mem_fun_ptr)(); +typedef int UDT::* mem_ptr; +typedef int (UDT::* mem_fun_ptr)(); #define AUX_LAMBDA_TEST(T) \ - {BOOST_STATIC_ASSERT((apply1<lambda< is_same<_,T> >::type, T>::type::value));} \ - {BOOST_STATIC_ASSERT((apply1<lambda< is_same<T,_> >::type, T>::type::value));} \ - {BOOST_STATIC_ASSERT((apply2<lambda< is_same<_,_> >::type, T, T>::type::value));} \ + { MPL_ASSERT(( apply1<lambda< is_same<_,T> >::type, T> )); } \ + { MPL_ASSERT(( apply1<lambda< is_same<T,_> >::type, T> )); } \ + { MPL_ASSERT(( apply2<lambda< is_same<_,_> >::type, T, T> )); } \ /**/ -int main() +MPL_TEST_CASE() { - AUX_LAMBDA_TEST(C); -#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 - AUX_LAMBDA_TEST(incomplete); + AUX_LAMBDA_TEST( UDT ); + AUX_LAMBDA_TEST( abstract ); + AUX_LAMBDA_TEST( noncopyable ); + AUX_LAMBDA_TEST( incomplete ); + AUX_LAMBDA_TEST( int ); + AUX_LAMBDA_TEST( void ); + AUX_LAMBDA_TEST( double ); + AUX_LAMBDA_TEST( int& ); + AUX_LAMBDA_TEST( int* ); +#if !BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, <= 0x0295) \ + && !BOOST_WORKAROUND(__BORLANDC__, < 0x600) + AUX_LAMBDA_TEST( int[] ); #endif - AUX_LAMBDA_TEST(int); - AUX_LAMBDA_TEST(void); - AUX_LAMBDA_TEST(double); - AUX_LAMBDA_TEST(int&); - AUX_LAMBDA_TEST(int*); -// AUX_LAMBDA_TEST(int[]); - AUX_LAMBDA_TEST(int[10]); - AUX_LAMBDA_TEST(int (*)()) - AUX_LAMBDA_TEST(mem_ptr); - AUX_LAMBDA_TEST(mem_fun_ptr); - - return 0; + AUX_LAMBDA_TEST( int[10] ); + AUX_LAMBDA_TEST( int (*)() ) + AUX_LAMBDA_TEST( mem_ptr ); + AUX_LAMBDA_TEST( mem_fun_ptr ); } diff --git a/test/list.cpp b/test/list.cpp index 7172955..2b10ce6 100644 --- a/test/list.cpp +++ b/test/list.cpp @@ -1,25 +1,68 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/list.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/list.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/list.hpp> +#include <boost/mpl/push_front.hpp> +#include <boost/mpl/pop_front.hpp> +#include <boost/mpl/front.hpp> +#include <boost/mpl/size.hpp> +#include <boost/mpl/empty.hpp> -int main() +#include <boost/mpl/aux_/test.hpp> + + +MPL_TEST_CASE() { - typedef mpl::list0<> list0; - typedef mpl::list1<char> list1; - typedef mpl::list2<char,long> list2; - typedef mpl::list9<char,char,char,char,char,char,char,char,char> list9; + typedef list0<> l0; + typedef list1<char> l1; + typedef list2<char,long> l2; + typedef list9<char,char,char,char,char,char,char,char,char> l9; - return 0; + MPL_ASSERT_RELATION(size<l0>::value, ==, 0); + MPL_ASSERT_RELATION(size<l1>::value, ==, 1); + MPL_ASSERT_RELATION(size<l2>::value, ==, 2); + MPL_ASSERT_RELATION(size<l9>::value, ==, 9); + + MPL_ASSERT(( empty<l0> )); + MPL_ASSERT_NOT(( empty<l1> )); + MPL_ASSERT_NOT(( empty<l2> )); + MPL_ASSERT_NOT(( empty<l9> )); + + MPL_ASSERT(( is_same<front<l1>::type,char> )); + MPL_ASSERT(( is_same<front<l2>::type,char> )); + MPL_ASSERT(( is_same<front<l9>::type,char> )); +} + +MPL_TEST_CASE() +{ + typedef list2<char,long> l2; + + typedef begin<l2>::type i1; + typedef next<i1>::type i2; + typedef next<i2>::type i3; + + MPL_ASSERT(( is_same<deref<i1>::type,char> )); + MPL_ASSERT(( is_same<deref<i2>::type,long> )); + MPL_ASSERT(( is_same< i3, end<l2>::type > )); +} + +MPL_TEST_CASE() +{ + typedef list0<> l0; + + typedef push_front<l0,char>::type l1; + MPL_ASSERT(( is_same<front<l1>::type,char> )); + + typedef push_front<l1,long>::type l2; + MPL_ASSERT(( is_same<front<l2>::type,long> )); } diff --git a/test/list_c.cpp b/test/list_c.cpp index 83cf373..b54d1ce 100644 --- a/test/list_c.cpp +++ b/test/list_c.cpp @@ -1,60 +1,69 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/list_c.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/list_c.hpp" -#include "boost/mpl/front.hpp" -#include "boost/mpl/size.hpp" -#include "boost/static_assert.hpp" -#include "boost/config.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/list_c.hpp> +#include <boost/mpl/front.hpp> +#include <boost/mpl/size.hpp> +#include <boost/static_assert.hpp> -#if !defined(BOOST_MSVC) || (BOOST_MSVC > 1200) -void test_bool_list() +#include <boost/mpl/aux_/test.hpp> + + +#if !BOOST_WORKAROUND(BOOST_MSVC,<= 1200) +MPL_TEST_CASE() { - typedef mpl::list_c<bool,true>::type list1; - typedef mpl::list_c<bool,false>::type list2; + typedef list_c<bool,true>::type list1; + typedef list_c<bool,false>::type list2; - BOOST_STATIC_ASSERT(mpl::front<list1>::type::value == true); - BOOST_STATIC_ASSERT(mpl::front<list2>::type::value == false); + MPL_ASSERT_RELATION( front<list1>::type::value, ==, true ); + MPL_ASSERT_RELATION( front<list2>::type::value, ==, false ); } #endif -void test_int_list() +MPL_TEST_CASE() { - typedef mpl::list_c<int,-1>::type list1; - typedef mpl::list_c<int,0,1>::type list2; - typedef mpl::list_c<int,1,2,3>::type list3; + typedef list_c<int,-1>::type list1; + typedef list_c<int,0,1>::type list2; + typedef list_c<int,1,2,3>::type list3; - BOOST_STATIC_ASSERT(mpl::size<list1>::type::value == 1); - BOOST_STATIC_ASSERT(mpl::size<list2>::type::value == 2); - BOOST_STATIC_ASSERT(mpl::size<list3>::type::value == 3); - BOOST_STATIC_ASSERT(mpl::front<list1>::type::value == -1); - BOOST_STATIC_ASSERT(mpl::front<list2>::type::value == 0); - BOOST_STATIC_ASSERT(mpl::front<list3>::type::value == 1); + MPL_ASSERT_RELATION( size<list1>::value, ==, 1 ); + MPL_ASSERT_RELATION( size<list2>::value, ==, 2 ); + MPL_ASSERT_RELATION( size<list3>::value, ==, 3 ); + MPL_ASSERT_RELATION( front<list1>::type::value, ==, -1 ); + MPL_ASSERT_RELATION( front<list2>::type::value, ==, 0 ); + MPL_ASSERT_RELATION( front<list3>::type::value, ==, 1 ); } -void test_unsigned_list() +MPL_TEST_CASE() { - typedef mpl::list_c<unsigned,0>::type list1; - typedef mpl::list_c<unsigned,1,2>::type list2; + typedef list_c<unsigned,0>::type list1; + typedef list_c<unsigned,1,2>::type list2; - BOOST_STATIC_ASSERT(mpl::size<list1>::type::value == 1); - BOOST_STATIC_ASSERT(mpl::size<list2>::type::value == 2); - BOOST_STATIC_ASSERT(mpl::front<list1>::type::value == 0); - BOOST_STATIC_ASSERT(mpl::front<list2>::type::value == 1); + MPL_ASSERT_RELATION( size<list1>::value, ==, 1 ); + MPL_ASSERT_RELATION( size<list2>::value, ==, 2 ); + MPL_ASSERT_RELATION( front<list1>::type::value, ==, 0 ); + MPL_ASSERT_RELATION( front<list2>::type::value, ==, 1 ); } -int main() +MPL_TEST_CASE() { - return 0; + typedef list_c<unsigned,2,1> l2; + + typedef begin<l2>::type i1; + typedef next<i1>::type i2; + typedef next<i2>::type i3; + + MPL_ASSERT_RELATION( deref<i1>::type::value, ==, 2 ); + MPL_ASSERT_RELATION( deref<i2>::type::value, ==, 1 ); + MPL_ASSERT(( is_same< i3, end<l2>::type > )); } diff --git a/test/logical.cpp b/test/logical.cpp index c3aed23..5e99dda 100644 --- a/test/logical.cpp +++ b/test/logical.cpp @@ -1,43 +1,41 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/logical.cpp source file -// See http://www.boost.org for updates,documentation,and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/logical.hpp" -#include "boost/mpl/bool.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/logical.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/aux_/test.hpp> -struct my; -struct true_ : mpl::true_ {}; -struct false_ : mpl::false_ {}; +struct unknown; -int main() +using mpl::true_; +using mpl::false_; + +MPL_TEST_CASE() { - BOOST_STATIC_ASSERT((mpl::and_< true_,true_ >::value == true)); - BOOST_STATIC_ASSERT((mpl::and_< false_,true_ >::value == false)); - BOOST_STATIC_ASSERT((mpl::and_< true_,false_ >::value == false)); - BOOST_STATIC_ASSERT((mpl::and_< false_,false_ >::value == false)); - BOOST_STATIC_ASSERT((mpl::and_< false_,my >::value == false)); - BOOST_STATIC_ASSERT((mpl::and_< false_,my,my >::value == false)); + MPL_ASSERT(( mpl::and_< true_,true_ > )); + MPL_ASSERT_NOT(( mpl::and_< false_,true_ > )); + MPL_ASSERT_NOT(( mpl::and_< true_,false_ > )); + MPL_ASSERT_NOT(( mpl::and_< false_,false_ > )); + MPL_ASSERT_NOT(( mpl::and_< false_,unknown > )); + MPL_ASSERT_NOT(( mpl::and_< false_,unknown,unknown > )); - BOOST_STATIC_ASSERT((mpl::or_< true_,true_ >::value == true)); - BOOST_STATIC_ASSERT((mpl::or_< false_,true_ >::value == true)); - BOOST_STATIC_ASSERT((mpl::or_< true_,false_ >::value == true)); - BOOST_STATIC_ASSERT((mpl::or_< false_,false_ >::value == false)); - BOOST_STATIC_ASSERT((mpl::or_< true_,my >::value == true)); - BOOST_STATIC_ASSERT((mpl::or_< true_,my,my >::value == true)); + MPL_ASSERT(( mpl::or_< true_,true_ > )); + MPL_ASSERT(( mpl::or_< false_,true_ > )); + MPL_ASSERT(( mpl::or_< true_,false_ > )); + MPL_ASSERT_NOT(( mpl::or_< false_,false_ > )); + MPL_ASSERT(( mpl::or_< true_,unknown > )); + MPL_ASSERT(( mpl::or_< true_,unknown,unknown > )); - BOOST_STATIC_ASSERT((mpl::not_< true_ >::value == false)); - BOOST_STATIC_ASSERT((mpl::not_< false_ >::value == true)); - - return 0; + MPL_ASSERT_NOT(( mpl::not_< true_ > )); + MPL_ASSERT(( mpl::not_< false_ > )); } diff --git a/test/lower_bound.cpp b/test/lower_bound.cpp index 05dcb7e..d72e9e6 100644 --- a/test/lower_bound.cpp +++ b/test/lower_bound.cpp @@ -1,29 +1,28 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/lower_bound.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2001-2004 // -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/lower_bound.hpp" -#include "boost/mpl/distance.hpp" -#include "boost/mpl/list_c.hpp" -#include "boost/mpl/less.hpp" -#include "boost/mpl/int.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/lower_bound.hpp> +#include <boost/mpl/distance.hpp> +#include <boost/mpl/list_c.hpp> +#include <boost/mpl/less.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/aux_/test.hpp> -int main() +MPL_TEST_CASE() { - typedef mpl::list_c<int,1,2,3,3,3,5,8> numbers; - typedef mpl::lower_bound< numbers, mpl::int_<3> >::type iter; - BOOST_STATIC_ASSERT((mpl::distance< mpl::begin<numbers>::type,iter >::type::value == 2)); - BOOST_STATIC_ASSERT(iter::type::value == 3); - return 0; + typedef list_c<int,1,2,3,3,3,5,8> numbers; + typedef lower_bound< numbers, int_<4> >::type iter; + + MPL_ASSERT_RELATION( (mpl::distance< begin<numbers>::type,iter >::value), ==, 5 ); + MPL_ASSERT_RELATION( deref<iter>::type::value, ==, 5 ); } diff --git a/test/map.cpp b/test/map.cpp new file mode 100644 index 0000000..838fd68 --- /dev/null +++ b/test/map.cpp @@ -0,0 +1,171 @@ + +// 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/map.hpp> +#include <boost/mpl/insert.hpp> +#include <boost/mpl/erase_key.hpp> +#include <boost/mpl/erase_key.hpp> +#include <boost/mpl/contains.hpp> +#include <boost/mpl/at.hpp> +#include <boost/mpl/clear.hpp> +#include <boost/mpl/has_key.hpp> +#include <boost/mpl/order.hpp> +#include <boost/mpl/size.hpp> +#include <boost/mpl/empty.hpp> +#include <boost/mpl/begin_end.hpp> + +#include <boost/mpl/aux_/test.hpp> + + +MPL_TEST_CASE() +{ +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + typedef m_mask<char + , m_item<int,unsigned + , m_item<char,unsigned char + , map0<> > > > m; +#else + typedef m_mask<char + , m_item2<int,unsigned + , m_item1<char,unsigned char + , map0<> > > > m; +#endif + + MPL_ASSERT_RELATION( size<m>::type::value, ==, 1 ); + MPL_ASSERT_NOT(( empty<m> )); + MPL_ASSERT(( is_same< clear<m>::type,map0<> > )); + MPL_ASSERT(( is_same< at<m,int>::type,unsigned> )); + MPL_ASSERT(( is_same< at<m,char>::type,void_ > )); + MPL_ASSERT(( contains< m,pair<int,unsigned> > )); + MPL_ASSERT_NOT(( contains< m,pair<int,int> > )); + MPL_ASSERT_NOT(( contains< m,pair<char,unsigned char> > )); + + MPL_ASSERT_NOT(( has_key<m,char>::type )); + MPL_ASSERT(( has_key<m,int>::type )); + MPL_ASSERT_RELATION( (order<m,int>::type::value), ==, 3 ); + MPL_ASSERT(( is_same< item_by_order<m,3>::type,pair<int,unsigned> > )); + MPL_ASSERT(( is_same< order<m,char>::type,void_ > )); + + typedef begin<m>::type first; + typedef end<m>::type last; + + MPL_ASSERT(( is_same< first::type,pair<int,unsigned> > )); + MPL_ASSERT(( is_same< next<first>::type,last > )); + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + typedef m_item<char,long,m> m2; +#else + typedef m_item3<char,long,m> m2; +#endif + + MPL_ASSERT_RELATION( size<m2>::type::value, ==, 2 ); + MPL_ASSERT_NOT(( empty<m2>::type )); + MPL_ASSERT(( is_same< clear<m2>::type,map0<> > )); + MPL_ASSERT(( is_same< at<m2,int>::type,unsigned > )); + MPL_ASSERT(( is_same< at<m2,char>::type,long > )); + + MPL_ASSERT(( contains< m2,pair<int,unsigned> > )); + MPL_ASSERT_NOT(( contains< m2,pair<int,int> > )); + MPL_ASSERT_NOT(( contains< m2,pair<char,unsigned char> > )); + MPL_ASSERT(( contains< m2,pair<char,long> > )); + + MPL_ASSERT(( has_key<m2,char>::type )); + MPL_ASSERT_NOT(( has_key<m2,long>::type )); + MPL_ASSERT_RELATION( (order<m2,int>::type::value), ==, 3 ); + MPL_ASSERT_RELATION( (order<m2,char>::type::value), ==, 4 ); + + typedef begin<m2>::type first2; + typedef end<m2>::type last2; + + MPL_ASSERT(( is_same<first2::type,pair<int,unsigned> > )); + typedef next<first2>::type iter; + MPL_ASSERT(( is_same<iter::type,pair<char,long> > )); + MPL_ASSERT(( is_same< next<iter>::type,last2 > )); + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + typedef insert<m2,pair<int,unsigned> >::type s2_1; + MPL_ASSERT(( is_same<m2,s2_1> )); + + typedef insert<m2,pair<long,unsigned> >::type m3; + MPL_ASSERT_RELATION( size<m3>::type::value, ==, 3 ); + MPL_ASSERT(( has_key<m3,long>::type )); + MPL_ASSERT(( has_key<m3,int>::type )); + MPL_ASSERT(( has_key<m3,char>::type )); + MPL_ASSERT(( contains< m3,pair<long,unsigned> > )); + MPL_ASSERT(( contains< m3,pair<int,unsigned> > )); + + typedef insert<m,pair<char,long> >::type m1; + MPL_ASSERT_RELATION( size<m1>::type::value, ==, 2 ); + MPL_ASSERT(( is_same< at<m1,int>::type,unsigned > )); + MPL_ASSERT(( is_same< at<m1,char>::type,long > )); + + MPL_ASSERT(( contains< m1,pair<int,unsigned> > )); + MPL_ASSERT_NOT(( contains< m1,pair<int,int> > )); + MPL_ASSERT_NOT(( contains< m1,pair<char,unsigned char> > )); + MPL_ASSERT(( contains< m1,pair<char,long> > )); + + MPL_ASSERT(( is_same< m1,m2 > )); + + typedef erase_key<m1,char>::type m_1; + MPL_ASSERT(( is_same<m,m_1> )); + MPL_ASSERT_RELATION( size<m_1>::type::value, ==, 1 ); + MPL_ASSERT(( is_same< at<m_1,char>::type,void_ > )); + MPL_ASSERT(( is_same< at<m_1,int>::type,unsigned > )); + + typedef erase_key<m3,char>::type m2_1; + MPL_ASSERT_RELATION( size<m2_1>::type::value, ==, 2 ); + MPL_ASSERT(( is_same< at<m2_1,char>::type,void_ > )); + MPL_ASSERT(( is_same< at<m2_1,int>::type,unsigned > )); + MPL_ASSERT(( is_same< at<m2_1,long>::type,unsigned > )); +#endif +} + +MPL_TEST_CASE() +{ + typedef map0<> m; + + MPL_ASSERT_RELATION( size<m>::type::value, ==, 0 ); + MPL_ASSERT(( empty<m>::type )); + + MPL_ASSERT(( is_same< clear<m>::type,map0<> > )); + MPL_ASSERT(( is_same< at<m,char>::type,void_ > )); + + MPL_ASSERT_NOT(( has_key<m,char>::type )); + MPL_ASSERT_NOT(( has_key<m,int>::type )); + MPL_ASSERT_NOT(( has_key<m,UDT>::type )); + MPL_ASSERT_NOT(( has_key<m,incomplete>::type )); + + MPL_ASSERT_NOT(( has_key<m,char const>::type )); + MPL_ASSERT_NOT(( has_key<m,int const>::type )); + MPL_ASSERT_NOT(( has_key<m,UDT const>::type )); + MPL_ASSERT_NOT(( has_key<m,incomplete const>::type )); + + MPL_ASSERT_NOT(( has_key<m,int*>::type )); + MPL_ASSERT_NOT(( has_key<m,UDT*>::type )); + MPL_ASSERT_NOT(( has_key<m,incomplete*>::type )); + + MPL_ASSERT_NOT(( has_key<m,int&>::type )); + MPL_ASSERT_NOT(( has_key<m,UDT&>::type )); + MPL_ASSERT_NOT(( has_key<m,incomplete&>::type )); + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + typedef insert<m,pair<char,int> >::type m1; + MPL_ASSERT_RELATION( size<m1>::type::value, ==, 1 ); + MPL_ASSERT(( is_same< at<m1,char>::type,int > )); + + typedef erase_key<m,char>::type m0_1; + MPL_ASSERT_RELATION( size<m0_1>::type::value, ==, 0 ); + MPL_ASSERT(( is_same< at<m0_1,char>::type,void_ > )); +#endif +} diff --git a/test/max_element.cpp b/test/max_element.cpp index 184000b..77261bc 100644 --- a/test/max_element.cpp +++ b/test/max_element.cpp @@ -1,29 +1,26 @@ -//----------------------------------------------------------------------------- -// libs mpl/test/max_element.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Eric Friedman 2002-2003 // -// Copyright (c) 2002-2003 -// Eric Friedman -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/max_element.hpp" +// $Source$ +// $Date$ +// $Revision$ -#include "boost/static_assert.hpp" -#include "boost/mpl/list_c.hpp" +#include <boost/mpl/max_element.hpp> -namespace mpl = boost::mpl; +#include <boost/mpl/list_c.hpp> +#include <boost/mpl/aux_/test.hpp> -int main() +MPL_TEST_CASE() { - typedef mpl::list_c<int, 3, 4, 2, 0, -5, 8, -1, 7>::type numbers; - - typedef mpl::max_element< numbers >::type max_it; - typedef max_it::type max_value; - BOOST_STATIC_ASSERT((max_value::value == 8)); - - return 0; + typedef list_c<int,3,4,2,0,-5,8,-1,7>::type numbers; + typedef max_element< numbers >::type iter; + typedef deref<iter>::type max_value; + + MPL_ASSERT_RELATION( max_value::value, ==, 8 ); } diff --git a/test/min_max.cpp b/test/min_max.cpp new file mode 100644 index 0000000..b2b8f12 --- /dev/null +++ b/test/min_max.cpp @@ -0,0 +1,27 @@ + +// 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/mpl/min_max.hpp> +#include <boost/mpl/int.hpp> + +#include <boost/mpl/aux_/test.hpp> + + +MPL_TEST_CASE() +{ + MPL_ASSERT(( is_same< mpl::min< int_<5>,int_<7> >::type,int_<5> > )); + MPL_ASSERT(( is_same< mpl::max< int_<5>,int_<7> >::type,int_<7> > )); + + MPL_ASSERT(( is_same< mpl::min< int_<-5>,int_<-7> >::type,int_<-7> > )); + MPL_ASSERT(( is_same< mpl::max< int_<-5>,int_<-7> >::type,int_<-5> > )); +} diff --git a/test/multiset.cpp b/test/multiset.cpp index 1870b4d..b1dce73 100644 --- a/test/multiset.cpp +++ b/test/multiset.cpp @@ -1,29 +1,24 @@ -// + file: libs/mpl/test/multiset.cpp -// + last modified: 05/nov/03 - -// Copyright Aleksey Gurtovoy 2003 +// Copyright Aleksey Gurtovoy 2003-2004 // -// Use, modification and distribution are subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy -// at http://www.boost.org/LICENSE_1_0.txt) +// 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. -#include "boost/mpl/multiset/multiset0.hpp" -#include "boost/mpl/insert.hpp" -#include "boost/mpl/count.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -using namespace boost; -using namespace boost::mpl; +#include <boost/mpl/multiset/multiset0.hpp> -struct abstract -{ - virtual ~abstract() = 0; -}; +#include <boost/mpl/insert.hpp> +#include <boost/mpl/count.hpp> +#include <boost/mpl/aux_/test.hpp> -int main() + +MPL_TEST_CASE() { typedef multiset0<> s0; typedef insert<s0,int>::type s1; @@ -31,13 +26,11 @@ int main() typedef insert<s2,int>::type s3; typedef insert<s3,abstract>::type s4; - BOOST_STATIC_ASSERT((count<s0,int>::value == 0)); - BOOST_STATIC_ASSERT((count<s1,int>::value == 1)); - BOOST_STATIC_ASSERT((count<s2,int>::value == 1)); - BOOST_STATIC_ASSERT((count<s2,char&>::value == 1)); - BOOST_STATIC_ASSERT((count<s3,int>::value == 2)); - BOOST_STATIC_ASSERT((count<s3,char&>::value == 1)); - BOOST_STATIC_ASSERT((count<s4,abstract>::value == 1)); - - return 0; + MPL_ASSERT_RELATION( (count<s0,int>::value), ==, 0 ); + MPL_ASSERT_RELATION( (count<s1,int>::value), ==, 1 ); + MPL_ASSERT_RELATION( (count<s2,int>::value), ==, 1 ); + MPL_ASSERT_RELATION( (count<s2,char&>::value), ==, 1 ); + MPL_ASSERT_RELATION( (count<s3,int>::value), ==, 2 ); + MPL_ASSERT_RELATION( (count<s3,char&>::value), ==, 1 ); + MPL_ASSERT_RELATION( (count<s4,abstract>::value), ==, 1 ); } diff --git a/test/next.cpp b/test/next.cpp index b1346b6..c0810bf 100644 --- a/test/next.cpp +++ b/test/next.cpp @@ -1,32 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/next.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/next.hpp" -#include "boost/mpl/prior.hpp" -#include "boost/mpl/int.hpp" -#include "boost/mpl/assert_is_same.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; - -int main() +#include <boost/mpl/next.hpp> +#include <boost/mpl/prior.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/aux_/test.hpp> + +MPL_TEST_CASE() { - typedef mpl::int_<0> _0; - typedef mpl::int_<1> _1; - typedef mpl::int_<2> _2; + typedef int_<0> _0; + typedef int_<1> _1; + typedef int_<2> _2; - BOOST_MPL_ASSERT_IS_SAME(mpl::next<_0>::type, _1); - BOOST_MPL_ASSERT_IS_SAME(mpl::next<_1>::type, _2); - BOOST_MPL_ASSERT_IS_SAME(mpl::prior<_1>::type, _0); - BOOST_MPL_ASSERT_IS_SAME(mpl::prior<_2>::type, _1); - - return 0; + MPL_ASSERT(( is_same< next<_0>::type, _1 > )); + MPL_ASSERT(( is_same< next<_1>::type, _2 > )); + MPL_ASSERT(( is_same< prior<_1>::type, _0 > )); + MPL_ASSERT(( is_same< prior<_2>::type, _1 > )); } diff --git a/test/no_has_xxx.cpp b/test/no_has_xxx.cpp new file mode 100644 index 0000000..4927707 --- /dev/null +++ b/test/no_has_xxx.cpp @@ -0,0 +1,26 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright David Abrahams 2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + + +// This file tests that we have the right value for +// BOOST_MPL_CFG_NO_HAS_XXX, and that 'has_xxx' doesn't just fail to +// compile arbitrarily. + +#include <boost/mpl/aux_/config/has_xxx.hpp> + +#if defined(BOOST_MPL_CFG_NO_HAS_XXX) +# define HAS_XXX_ASSERT(x) MPL_ASSERT_NOT(x) +#endif + +#include "has_xxx.cpp" diff --git a/test/numeric_ops.cpp b/test/numeric_ops.cpp new file mode 100644 index 0000000..03ff349 --- /dev/null +++ b/test/numeric_ops.cpp @@ -0,0 +1,129 @@ + +// Copyright Aleksey Gurtovoy 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/arithmetic.hpp> +#include <boost/mpl/comparison.hpp> +#include <boost/mpl/and.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/long.hpp> +#include <boost/mpl/aux_/test.hpp> + +struct complex_tag : int_<10> {}; + +template< typename Re, typename Im > struct complex +{ + typedef complex_tag tag; + typedef complex type; + typedef Re real; + typedef Im imag; +}; + +template< typename C > struct real : C::real {}; +template< typename C > struct imag : C::imag {}; + +namespace boost { namespace mpl { + +template<> struct numeric_cast< integral_c_tag,complex_tag > +{ + template< typename N > struct apply + : complex< N, integral_c< typename N::value_type, 0 > > + { + }; +}; + +template<> +struct plus_impl< complex_tag,complex_tag > +{ + template< typename N1, typename N2 > struct apply + : complex< + plus< typename N1::real, typename N2::real > + , plus< typename N1::imag, typename N2::imag > + > + { + }; +}; + +template<> +struct times_impl< complex_tag,complex_tag > +{ + template< typename N1, typename N2 > struct apply + : complex< + minus< + times< typename N1::real, typename N2::real > + , times< typename N1::imag, typename N2::imag > + > + , plus< + times< typename N1::real, typename N2::imag > + , times< typename N1::imag, typename N2::real > + > + > + { + }; +}; + +template<> +struct equal_to_impl< complex_tag,complex_tag > +{ + template< typename N1, typename N2 > struct apply + : and_< + equal_to< typename N1::real, typename N2::real > + , equal_to< typename N1::imag, typename N2::imag > + > + { + }; +}; + +}} + + +typedef complex< int_<5>, int_<-1> > c1; +typedef complex< int_<-5>, int_<1> > c2; + +MPL_TEST_CASE() +{ + typedef plus<c1,c2>::type r1; + MPL_ASSERT_RELATION( real<r1>::value, ==, 0 ); + MPL_ASSERT_RELATION( imag<r1>::value, ==, 0 ); + + typedef plus<c1,c1>::type r2; + MPL_ASSERT_RELATION( real<r2>::value, ==, 10 ); + MPL_ASSERT_RELATION( imag<r2>::value, ==, -2 ); + + typedef plus<c2,c2>::type r3; + MPL_ASSERT_RELATION( real<r3>::value, ==, -10 ); + MPL_ASSERT_RELATION( imag<r3>::value, ==, 2 ); +} + +MPL_TEST_CASE() +{ + typedef times<c1,c2>::type r1; + MPL_ASSERT_RELATION( real<r1>::value, ==, -24 ); + MPL_ASSERT_RELATION( imag<r1>::value, ==, 10 ); + + typedef times<c1,c1>::type r2; + MPL_ASSERT_RELATION( real<r2>::value, ==, 24 ); + MPL_ASSERT_RELATION( imag<r2>::value, ==, -10 ); + + typedef times<c2,c2>::type r3; + MPL_ASSERT_RELATION( real<r3>::value, ==, 24 ); + MPL_ASSERT_RELATION( imag<r3>::value, ==, -10 ); +} + +MPL_TEST_CASE() +{ + MPL_ASSERT(( equal_to<c1,c1> )); + MPL_ASSERT(( equal_to<c2,c2> )); + MPL_ASSERT_NOT(( equal_to<c1,c2> )); + + MPL_ASSERT(( equal_to<c1, complex< long_<5>, long_<-1> > > )); +} diff --git a/test/pair_view.cpp b/test/pair_view.cpp new file mode 100644 index 0000000..6eb68e3 --- /dev/null +++ b/test/pair_view.cpp @@ -0,0 +1,32 @@ + +// Copyright David Abrahams 2003-2004 +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/pair_view.hpp> +#include <boost/mpl/list/list10_c.hpp> +#include <boost/mpl/front.hpp> +#include <boost/mpl/back.hpp> + +#include <boost/mpl/aux_/test.hpp> + + +MPL_TEST_CASE() +{ + typedef list10_c<int,0,1,2,3,4,5,6,7,8,9> l1; + typedef list10_c<int,9,8,7,6,5,4,3,2,1,0> l2; + + typedef pair_view<l1,l2> view; + + MPL_ASSERT_RELATION( front<view>::type::first::value, ==, 0 ); + MPL_ASSERT_RELATION( front<view>::type::second::value, ==, 9 ); +} diff --git a/test/pop_front.cpp b/test/pop_front.cpp index ff9e891..9904fdc 100644 --- a/test/pop_front.cpp +++ b/test/pop_front.cpp @@ -1,40 +1,36 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/pop_front.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/pop_front.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/size.hpp" -#include "boost/mpl/front.hpp" -#include "boost/mpl/assert_is_same.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/pop_front.hpp> +#include <boost/mpl/list.hpp> +#include <boost/mpl/size.hpp> +#include <boost/mpl/front.hpp> +#include <boost/mpl/aux_/test.hpp> -int main() +MPL_TEST_CASE() { - typedef mpl::list<long>::type types1; - typedef mpl::list<int,long>::type types2; - typedef mpl::list<char,int,long>::type types3; + typedef list<long>::type types1; + typedef list<int,long>::type types2; + typedef list<char,int,long>::type types3; - typedef mpl::pop_front<types1>::type result1; - typedef mpl::pop_front<types2>::type result2; - typedef mpl::pop_front<types3>::type result3; + typedef pop_front<types1>::type result1; + typedef pop_front<types2>::type result2; + typedef pop_front<types3>::type result3; - BOOST_STATIC_ASSERT(mpl::size<result1>::type::value == 0); - BOOST_STATIC_ASSERT(mpl::size<result2>::type::value == 1); - BOOST_STATIC_ASSERT(mpl::size<result3>::type::value == 2); + MPL_ASSERT_RELATION( size<result1>::value, ==, 0 ); + MPL_ASSERT_RELATION( size<result2>::value, ==, 1 ); + MPL_ASSERT_RELATION( size<result3>::value, ==, 2 ); - BOOST_MPL_ASSERT_IS_SAME(mpl::front<result2>::type, long); - BOOST_MPL_ASSERT_IS_SAME(mpl::front<result3>::type, int); - - return 0; + MPL_ASSERT(( is_same< front<result2>::type, long > )); + MPL_ASSERT(( is_same< front<result3>::type, int > )); } diff --git a/test/print.cpp b/test/print.cpp new file mode 100644 index 0000000..1409b9d --- /dev/null +++ b/test/print.cpp @@ -0,0 +1,22 @@ + +// 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/print.hpp> + +#include <boost/mpl/aux_/test.hpp> + + +MPL_TEST_CASE() +{ + typedef print<int>::type t; +} diff --git a/test/push_front.cpp b/test/push_front.cpp index 7c6208d..f4b4a45 100644 --- a/test/push_front.cpp +++ b/test/push_front.cpp @@ -1,41 +1,40 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/push_front.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/push_front.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/size.hpp" -#include "boost/mpl/front.hpp" -#include "boost/mpl/assert_is_same.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/push_front.hpp> +#include <boost/mpl/push_back.hpp> +#include <boost/mpl/list/list10.hpp> +#include <boost/mpl/size.hpp> +#include <boost/mpl/front.hpp> -int main() +#include <boost/mpl/aux_/test.hpp> + +MPL_TEST_CASE() { - typedef mpl::list<>::type types1; - typedef mpl::list<long>::type types2; - typedef mpl::list<int,long>::type types3; - - typedef mpl::push_front<types1,long>::type result1; - typedef mpl::push_front<types2,int>::type result2; - typedef mpl::push_front<types3,char>::type result3; + typedef push_front<list0<>,long>::type res1; + typedef push_front<list1<long>,int>::type res2; + typedef push_front<list2<int,long>,char>::type res3; - BOOST_STATIC_ASSERT(mpl::size<result1>::type::value == 1); - BOOST_STATIC_ASSERT(mpl::size<result2>::type::value == 2); - BOOST_STATIC_ASSERT(mpl::size<result3>::type::value == 3); + MPL_ASSERT_RELATION( size<res1>::value, ==, 1 ); + MPL_ASSERT_RELATION( size<res2>::value, ==, 2 ); + MPL_ASSERT_RELATION( size<res3>::value, ==, 3 ); - BOOST_MPL_ASSERT_IS_SAME(mpl::front<result1>::type, long); - BOOST_MPL_ASSERT_IS_SAME(mpl::front<result2>::type, int); - BOOST_MPL_ASSERT_IS_SAME(mpl::front<result3>::type, char); + MPL_ASSERT(( is_same< front<res1>::type, long > )); + MPL_ASSERT(( is_same< front<res2>::type, int > )); + MPL_ASSERT(( is_same< front<res3>::type, char > )); + + MPL_ASSERT(( has_push_front< list0<> > )); + MPL_ASSERT(( has_push_front< list1<long> > )); - return 0; + MPL_ASSERT_NOT(( has_push_back< list0<> > )); } diff --git a/test/quote.cpp b/test/quote.cpp index f4dafb1..d9e411c 100644 --- a/test/quote.cpp +++ b/test/quote.cpp @@ -1,21 +1,19 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/quote.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/quote.hpp" -#include "boost/mpl/apply.hpp" -#include "boost/type_traits/is_same.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -using namespace boost::mpl; +#include <boost/mpl/quote.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/mpl/aux_/test.hpp> template< typename T > struct f1 { @@ -27,16 +25,18 @@ template< > struct f5 { +#if !defined(BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS) // no 'type' member! +#else + typedef f5 type; +#endif }; -int main() +MPL_TEST_CASE() { - typedef apply1< quote1<f1>,int >::type t1; - typedef apply5< quote5<f5>,char,short,int,long,float >::type t5; + typedef quote1<f1>::apply<int>::type t1; + typedef quote5<f5>::apply<char,short,int,long,float>::type t5; - BOOST_STATIC_ASSERT((boost::is_same< t1, int >::value)); - BOOST_STATIC_ASSERT((boost::is_same< t5, f5<char,short,int,long,float> >::value)); - - return 0; + MPL_ASSERT(( boost::is_same< t1, int > )); + MPL_ASSERT(( boost::is_same< t5, f5<char,short,int,long,float> > )); } diff --git a/test/range_c.cpp b/test/range_c.cpp index 5838601..0ba24c7 100644 --- a/test/range_c.cpp +++ b/test/range_c.cpp @@ -1,47 +1,70 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/range_c.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/range_c.hpp" -#include "boost/mpl/empty.hpp" -#include "boost/mpl/size.hpp" -#include "boost/mpl/front.hpp" -#include "boost/mpl/back.hpp" -#include "boost/mpl/assert_is_same.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/range_c.hpp> +#include <boost/mpl/empty.hpp> +#include <boost/mpl/size.hpp> +#include <boost/mpl/front.hpp> +#include <boost/mpl/back.hpp> +#include <boost/mpl/aux_/test.hpp> -int main() +MPL_TEST_CASE() { - typedef mpl::range_c<int,0,0> range0; - typedef mpl::range_c<int,0,1> range1; - typedef mpl::range_c<int,0,10> range10; + typedef range_c<int,0,0> range0; + typedef range_c<int,0,1> range1; + typedef range_c<int,0,10> range10; - BOOST_STATIC_ASSERT(mpl::size<range0>::type::value == 0); - BOOST_STATIC_ASSERT(mpl::size<range1>::type::value == 1); - BOOST_STATIC_ASSERT(mpl::size<range10>::type::value == 10); + MPL_ASSERT_RELATION( size<range0>::value, ==, 0 ); + MPL_ASSERT_RELATION( size<range1>::value, ==, 1 ); + MPL_ASSERT_RELATION( size<range10>::value, ==, 10 ); - BOOST_STATIC_ASSERT(mpl::empty<range0>::type::value); - BOOST_STATIC_ASSERT(!mpl::empty<range1>::type::value); - BOOST_STATIC_ASSERT(!mpl::empty<range10>::type::value); + MPL_ASSERT(( empty<range0> )); + MPL_ASSERT_NOT(( empty<range1> )); + MPL_ASSERT_NOT(( empty<range10> )); - BOOST_MPL_ASSERT_IS_SAME(mpl::begin<range0>::type, mpl::end<range0>::type); - BOOST_MPL_ASSERT_NOT_SAME(mpl::begin<range1>::type, mpl::end<range1>::type); - BOOST_MPL_ASSERT_NOT_SAME(mpl::begin<range10>::type, mpl::end<range10>::type); + MPL_ASSERT(( is_same<begin<range0>::type, end<range0>::type > )); + MPL_ASSERT_NOT(( is_same<begin<range1>::type, end<range1>::type > )); + MPL_ASSERT_NOT(( is_same<begin<range10>::type, end<range10>::type > )); - BOOST_STATIC_ASSERT(mpl::front<range1>::type::value == 0); - BOOST_STATIC_ASSERT(mpl::back<range1>::type::value == 0); - BOOST_STATIC_ASSERT(mpl::front<range10>::type::value == 0); - BOOST_STATIC_ASSERT(mpl::back<range10>::type::value == 9); - - return 0; + MPL_ASSERT_RELATION( front<range1>::type::value, ==, 0 ); + MPL_ASSERT_RELATION( back<range1>::type::value, ==, 0 ); + MPL_ASSERT_RELATION( front<range10>::type::value, ==, 0 ); + MPL_ASSERT_RELATION( back<range10>::type::value, ==, 9 ); +} + +MPL_TEST_CASE() +{ + typedef range_c<int,0,10> range10; + typedef begin<range10>::type i0; + typedef next<i0>::type i1; + typedef next<i1>::type i2; + typedef next<i2>::type i3; + typedef next<i3>::type i4; + typedef next<i4>::type i5; + typedef next<i5>::type i6; + typedef next<i6>::type i7; + typedef next<i7>::type i8; + typedef next<i8>::type i9; + typedef next<i9>::type i10; + + MPL_ASSERT_RELATION( deref<i0>::type::value, ==, 0 ); + MPL_ASSERT_RELATION( deref<i1>::type::value, ==, 1 ); + MPL_ASSERT_RELATION( deref<i2>::type::value, ==, 2 ); + MPL_ASSERT_RELATION( deref<i3>::type::value, ==, 3 ); + MPL_ASSERT_RELATION( deref<i4>::type::value, ==, 4 ); + MPL_ASSERT_RELATION( deref<i5>::type::value, ==, 5 ); + MPL_ASSERT_RELATION( deref<i6>::type::value, ==, 6 ); + MPL_ASSERT_RELATION( deref<i7>::type::value, ==, 7 ); + MPL_ASSERT_RELATION( deref<i8>::type::value, ==, 8 ); + MPL_ASSERT_RELATION( deref<i9>::type::value, ==, 9 ); } diff --git a/test/remove.cpp b/test/remove.cpp new file mode 100644 index 0000000..3c49fba --- /dev/null +++ b/test/remove.cpp @@ -0,0 +1,28 @@ + +// 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$ + +#include <boost/mpl/remove.hpp> +#include <boost/mpl/vector/vector10.hpp> +#include <boost/mpl/equal.hpp> + +#include <boost/mpl/aux_/test.hpp> + + +MPL_TEST_CASE() +{ + typedef vector6<int,float,char,float,float,double> types; + typedef mpl::remove< types,float >::type result; + typedef vector3<int,char,double> answer; + MPL_ASSERT(( equal< result,answer > )); +} diff --git a/test/remove_if.cpp b/test/remove_if.cpp new file mode 100644 index 0000000..e042caf --- /dev/null +++ b/test/remove_if.cpp @@ -0,0 +1,54 @@ + +// 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$ + +#include <boost/mpl/remove_if.hpp> + +#include <boost/mpl/list/list10_c.hpp> +#include <boost/mpl/list/list10.hpp> +#include <boost/mpl/front_inserter.hpp> +#include <boost/mpl/greater.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/equal.hpp> +#include <boost/mpl/size.hpp> +#include <boost/type_traits/is_float.hpp> + +#include <boost/mpl/aux_/test.hpp> + +MPL_TEST_CASE() +{ + typedef list10_c<int,0,1,2,3,4,5,6,7,8,9> numbers; + typedef list5_c<int,4,3,2,1,0>::type answer; + typedef remove_if< + numbers + , greater<_,int_<4> > + , mpl::front_inserter< list0_c<int> > + >::type result; + + MPL_ASSERT_RELATION( size<result>::value, ==, 5 ); + MPL_ASSERT(( equal<result,answer> )); +} + +MPL_TEST_CASE() +{ + typedef list8<int,float,long,float,char,long,double,double> types; + typedef list4<int,long,char,long>::type answer; + typedef reverse_remove_if< + types + , is_float<_> + , mpl::front_inserter< list0<> > + >::type result; + + MPL_ASSERT_RELATION( size<result>::value, ==, 4 ); + MPL_ASSERT(( equal<result,answer> )); +} diff --git a/test/replace.cpp b/test/replace.cpp index 58ab164..aaf04c9 100644 --- a/test/replace.cpp +++ b/test/replace.cpp @@ -1,29 +1,27 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/replace.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright David Abrahams 2003-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy and John R. Bandela -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/replace.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/equal.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/replace.hpp> -int main() +#include <boost/mpl/list.hpp> +#include <boost/mpl/equal.hpp> +#include <boost/mpl/aux_/test.hpp> + +MPL_TEST_CASE() { - typedef mpl::list<int,float,char,float,float,double>::type types; - typedef mpl::replace< types,float,double >::type result; - - typedef mpl::list<int,double,char,double,double,double>::type answer; - BOOST_STATIC_ASSERT((mpl::equal< result,answer >::type::value)); - - return 0; + typedef list<int,float,char,float,float,double> types; + typedef replace< types,float,double >::type result; + typedef list<int,double,char,double,double,double> answer; + MPL_ASSERT(( equal< result,answer > )); } diff --git a/test/replace_if.cpp b/test/replace_if.cpp index 53e2994..397b8df 100644 --- a/test/replace_if.cpp +++ b/test/replace_if.cpp @@ -1,33 +1,33 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/replace_if.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright John R. Bandela 2000-2002 +// Copyright David Abrahams 2003-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy and John R. Bandela -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/replace_if.hpp" -#include "boost/mpl/list_c.hpp" -#include "boost/mpl/int.hpp" -#include "boost/mpl/equal.hpp" -#include "boost/mpl/greater.hpp" -#include "boost/mpl/equal_to.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/replace_if.hpp> -int main() +#include <boost/mpl/list/list10_c.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/equal.hpp> +#include <boost/mpl/greater.hpp> +#include <boost/mpl/equal_to.hpp> + +#include <boost/mpl/aux_/test.hpp> + +MPL_TEST_CASE() { - using namespace mpl::placeholders; - typedef mpl::list_c<int,1,4,5,2,7,5,3,5>::type numbers; - typedef mpl::replace_if< numbers, mpl::gt<4>, mpl::int_<0> >::type result; + typedef list8_c<int,1,4,5,2,7,5,3,5>::type numbers; + typedef replace_if< numbers, greater<_1,int_<4> >, int_<0> >::type result; - typedef mpl::list_c<int,1,4,0,2,0,0,3,0>::type answer; - BOOST_STATIC_ASSERT((mpl::equal< answer,result,mpl::equal_to<_,_> >::type::value)); - - return 0; + typedef list8_c<int,1,4,0,2,0,0,3,0>::type answer; + MPL_ASSERT(( equal< answer,result,equal_to<_1,_2> > )); } diff --git a/test/reverse.cpp b/test/reverse.cpp index 50f426b..2cfadc4 100644 --- a/test/reverse.cpp +++ b/test/reverse.cpp @@ -1,32 +1,32 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/reverse.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/reverse.hpp" -#include "boost/mpl/list_c.hpp" -#include "boost/mpl/range_c.hpp" -#include "boost/mpl/equal.hpp" -#include "boost/mpl/equal_to.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/reverse.hpp> -int main() +#include <boost/mpl/list_c.hpp> +#include <boost/mpl/range_c.hpp> +#include <boost/mpl/equal.hpp> +#include <boost/mpl/equal_to.hpp> +#include <boost/mpl/at.hpp> + +#include <boost/mpl/aux_/test.hpp> + +MPL_TEST_CASE() { - using namespace mpl::placeholders; - typedef mpl::list_c<int,9,8,7,6,5,4,3,2,1,0>::type numbers; - typedef mpl::reverse< numbers >::type result; + typedef list_c<int,9,8,7,6,5,4,3,2,1,0> numbers; + typedef reverse< numbers >::type result; - typedef mpl::range_c<int,0,10> answer; - BOOST_STATIC_ASSERT((mpl::equal< result,answer,mpl::equal_to<_,_> >::type::value)); - - return 0; + typedef range_c<int,0,10> answer; + + MPL_ASSERT(( equal< result,answer,equal_to<_1,_2> > )); } diff --git a/test/same_as.cpp b/test/same_as.cpp index 9cc4ea6..62ebcdf 100644 --- a/test/same_as.cpp +++ b/test/same_as.cpp @@ -1,24 +1,23 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/same_as.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2001-2004 // -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/same_as.hpp" -#include "boost/mpl/apply.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/same_as.hpp> -int main() +#include <boost/mpl/apply.hpp> +#include <boost/mpl/aux_/test.hpp> + +MPL_TEST_CASE() { - BOOST_STATIC_ASSERT((mpl::apply1< mpl::same_as<int>,int >::type::value)); - BOOST_STATIC_ASSERT((!mpl::apply1< mpl::same_as<int>,long >::type::value)); - return 0; + MPL_ASSERT(( apply1< same_as<int>,int > )); + MPL_ASSERT_NOT(( apply1< same_as<int>,long > )); } diff --git a/test/set.cpp b/test/set.cpp index 3562b58..d8c2c96 100644 --- a/test/set.cpp +++ b/test/set.cpp @@ -1,94 +1,161 @@ -// + file: libs/mpl/test/set.cpp -// + last modified: 03/may/03 - -// Copyright (c) 2002-03 -// Aleksey Gurtovoy +// 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 +// 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. -#include "boost/mpl/set/set0.hpp" -#include "boost/mpl/has_key.hpp" -#include "boost/mpl/order.hpp" -#include "boost/mpl/insert.hpp" -#include "boost/mpl/begin_end.hpp" +// $Source$ +// $Date$ +// $Revision$ -#include "boost/mpl/aux_/test.hpp" +#include <boost/mpl/set.hpp> +#include <boost/mpl/insert.hpp> +#include <boost/mpl/erase.hpp> +#include <boost/mpl/erase_key.hpp> +#include <boost/mpl/at.hpp> +#include <boost/mpl/clear.hpp> +#include <boost/mpl/has_key.hpp> +#include <boost/mpl/order.hpp> +#include <boost/mpl/size.hpp> +#include <boost/mpl/empty.hpp> +#include <boost/mpl/begin_end.hpp> -using namespace boost::mpl; -using namespace boost; +#include <boost/mpl/aux_/test.hpp> -CTT_test_case( false_positives, (S)(T) ) - { - CTT_assert(( !has_key<S,T>::type::value )); // notation test - CTT_assert(( !has_key<S,T>::value )); - CTT_assert_same(3, (BOOST_MSVC_TYPENAME order<S,T>::type, void_)); - } - -CTT_test_case( empty_set, (T) ) - { - typedef set0<> s; - - CTT_for_each( - (T) CTT_basic_modifiers(T) - , false_positives - , (s)(_1) - ); - } - -CTT_test_case( one_element_set, (T) ) - { - typedef s_item<T, set0<> > s; - - CTT_for_each( - CTT_basic_modifiers(T) - , false_positives - , (s)(_1) - ); - - CTT_assert(( has_key<s,T>::type::value )); // notation test - CTT_assert(( has_key<s,T>::value )); - - CTT_assert_equal(3, (order<s,T>::type::value, 1)); // notation test - CTT_assert_equal(3, (order<s,T>::value, 1)); - } - -CTT_test_case( insertion, (T) ) - { - typedef s_item<T, set0<> > s1; - typedef typename insert< set0<>,T >::type s2; - - CTT_assert_same(2, (s1, s2)); - } - -/* -CTT_test_case( erasure, (T) ) +MPL_TEST_CASE() { typedef s_mask<char,s_item<int,s_item<char, set0<> > > > s; - CTT_TEST_ASSERT(( !has_key<s,char>::type::value )); - CTT_TEST_ASSERT(( has_key<s,int>::type::value )); - CTT_TEST_ASSERT(( order<s,int>::type::value == 1 )); - CTT_TEST_ASSERT(( is_same< order<s,char>::type,void_ >::value )); + MPL_ASSERT_RELATION( size<s>::value, ==, 1 ); + MPL_ASSERT_NOT(( empty<s> )); + + MPL_ASSERT(( is_same< clear<s>::type, set0<> > )); + MPL_ASSERT(( is_same< at<s,int>::type, int > )); + MPL_ASSERT(( is_same< at<s,char>::type, void_ > )); + + MPL_ASSERT_NOT(( has_key<s,char> )); + MPL_ASSERT(( has_key<s,int> )); + MPL_ASSERT_RELATION( (order<s,int>::value), ==, 2 ); + MPL_ASSERT(( is_same< order<s,char>::type, void_ > )); typedef begin<s>::type first; typedef end<s>::type last; - CTT_TEST_ASSERT(( is_same<first::type,int>::value )); - CTT_TEST_ASSERT(( is_same<first::next,last>::value )); + MPL_ASSERT(( is_same< first::type, int > )); + MPL_ASSERT(( is_same< next<first>::type, last > )); + typedef s_unmask<char,s> s2; + + MPL_ASSERT_RELATION( size<s2>::value, ==, 2 ); + MPL_ASSERT_NOT(( empty<s2> )); + MPL_ASSERT(( is_same<clear<s2>::type, set0<> > )); + MPL_ASSERT(( is_same<at<s2,int>::type, int > )); + MPL_ASSERT(( is_same<at<s2,char>::type, char > )); + + MPL_ASSERT(( has_key<s2,char> )); + MPL_ASSERT_NOT(( has_key<s2,long> )); + MPL_ASSERT_RELATION( (order<s2,int>::value), ==, 2 ); + MPL_ASSERT_RELATION( (order<s2,char>::value), ==, 1 ); + + typedef begin<s2>::type first2; + typedef end<s2>::type last2; + + MPL_ASSERT(( is_same< first2::type, int > )); + typedef next<first2>::type iter; + MPL_ASSERT(( is_same< iter::type, char > )); + MPL_ASSERT(( is_same< next<iter>::type, last2 > )); + + typedef insert<s2,int>::type s2_1; + MPL_ASSERT(( is_same<s2, s2_1> )); + + typedef insert<s2,long>::type s3; + MPL_ASSERT_RELATION( size<s3>::value, ==, 3 ); + MPL_ASSERT(( has_key<s3,long> )); + MPL_ASSERT(( has_key<s3,int> )); + MPL_ASSERT(( has_key<s3,char> )); + + typedef insert<s,char>::type s1; + MPL_ASSERT_RELATION( size<s1>::value, ==, 2 ); + MPL_ASSERT(( is_same<at<s1,int>::type, int > )); + MPL_ASSERT(( is_same<at<s1,char>::type, char > )); + MPL_ASSERT_NOT(( is_same<s1, s2> )); + + typedef erase_key<s1,char>::type s_1; + MPL_ASSERT(( is_same<s, s_1> )); + MPL_ASSERT_RELATION( size<s_1>::value, ==, 1 ); + MPL_ASSERT(( is_same< at<s_1,char>::type, void_ > )); + MPL_ASSERT(( is_same< at<s_1,int>::type, int > )); + } -*/ -int main() + +MPL_TEST_CASE() { - CTT_for_each( CTT_basic_types(), empty_set, (_1)); -// CTT_for_each( CTT_basic_types(), one_element_set, (_1)); - CTT_for_each( CTT_basic_types(), insertion, (_1)); + typedef set0<> s; + + MPL_ASSERT_RELATION( size<s>::value, ==, 0 ); + MPL_ASSERT(( empty<s> )); + MPL_ASSERT(( is_same< clear<s>::type, set0<> > )); + MPL_ASSERT(( is_same< at<s,char>::type, void_ > )); - return 0; + MPL_ASSERT_NOT(( has_key<s,char> )); + MPL_ASSERT_NOT(( has_key<s,int> )); + MPL_ASSERT_NOT(( has_key<s,UDT> )); + MPL_ASSERT_NOT(( has_key<s,incomplete> )); + + MPL_ASSERT_NOT(( has_key<s,char const> )); + MPL_ASSERT_NOT(( has_key<s,int const> )); + MPL_ASSERT_NOT(( has_key<s,UDT const> )); + MPL_ASSERT_NOT(( has_key<s,incomplete const> )); + + MPL_ASSERT_NOT(( has_key<s,int*> )); + MPL_ASSERT_NOT(( has_key<s,UDT*> )); + MPL_ASSERT_NOT(( has_key<s,incomplete*> )); + + MPL_ASSERT_NOT(( has_key<s,int&> )); + MPL_ASSERT_NOT(( has_key<s,UDT&> )); + MPL_ASSERT_NOT(( has_key<s,incomplete&> )); + + typedef insert<s,char>::type s1; + MPL_ASSERT_RELATION( size<s1>::value, ==, 1 ); + MPL_ASSERT(( is_same< at<s1,char>::type, char > )); + + typedef erase_key<s,char>::type s0_1; + MPL_ASSERT_RELATION( size<s0_1>::value, ==, 0 ); + MPL_ASSERT(( is_same< at<s0_1,char>::type, void_ > )); +} + +MPL_TEST_CASE() +{ + typedef set< + char,int const,long*,UDT* const,incomplete,abstract + , incomplete volatile&,abstract const& + > s; + + MPL_ASSERT_RELATION( size<s>::value, ==, 8 ); + MPL_ASSERT_NOT(( empty<s> )); + MPL_ASSERT(( is_same< clear<s>::type, set0<> > )); + MPL_ASSERT(( is_same< at<s,bool>::type, void_ > )); + + MPL_ASSERT(( has_key<s,char> )); + MPL_ASSERT(( has_key<s,int const> )); + MPL_ASSERT(( has_key<s,long*> )); + MPL_ASSERT(( has_key<s,UDT* const> )); + MPL_ASSERT(( has_key<s,incomplete> )); + MPL_ASSERT(( has_key<s,abstract> )); + MPL_ASSERT(( has_key<s,incomplete volatile&> )); + MPL_ASSERT(( has_key<s,abstract const&> )); + + MPL_ASSERT_NOT(( has_key<s,char const> )); + MPL_ASSERT_NOT(( has_key<s,int> )); + MPL_ASSERT_NOT(( has_key<s,long* const> )); + MPL_ASSERT_NOT(( has_key<s,UDT*> )); + MPL_ASSERT_NOT(( has_key<s,incomplete const> )); + MPL_ASSERT_NOT(( has_key<s,abstract volatile> )); + MPL_ASSERT_NOT(( has_key<s,incomplete&> )); + MPL_ASSERT_NOT(( has_key<s,abstract&> )); } diff --git a/test/single_view.cpp b/test/single_view.cpp index 09d0e59..e57bdf5 100644 --- a/test/single_view.cpp +++ b/test/single_view.cpp @@ -1,34 +1,30 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/single_view.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2001-2004 // -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/single_view.hpp" -#include "boost/mpl/size.hpp" -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/assert_is_same.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -using namespace boost::mpl; +#include <boost/mpl/single_view.hpp> +#include <boost/mpl/size.hpp> +#include <boost/mpl/begin_end.hpp> +#include <boost/mpl/aux_/test.hpp> -int main() +MPL_TEST_CASE() { typedef single_view<int> view; typedef begin<view>::type first; typedef end<view>::type last; - BOOST_MPL_ASSERT_IS_SAME(first::type,int); - BOOST_MPL_ASSERT_IS_SAME(first::next,last); - BOOST_MPL_ASSERT_IS_SAME(last::prior,first); + MPL_ASSERT(( is_same<first::type,int> )); + MPL_ASSERT(( is_same<first::next,last> )); + MPL_ASSERT(( is_same<last::prior,first> )); - BOOST_STATIC_ASSERT(size<view>::type::value == 1); - - return 0; + MPL_ASSERT_RELATION( size<view>::value, ==, 1 ); } diff --git a/test/size.cpp b/test/size.cpp index e6fd486..7247c4a 100644 --- a/test/size.cpp +++ b/test/size.cpp @@ -1,28 +1,26 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/size.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/size.hpp" -#include "boost/mpl/list.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/size.hpp> -int main() +#include <boost/mpl/list.hpp> +#include <boost/mpl/aux_/test.hpp> + +MPL_TEST_CASE() { - typedef mpl::list<> empty_list; - typedef mpl::list<char,short,int,long> list; + typedef list<> empty_list; + typedef list<char,short,int,long> list; - BOOST_STATIC_ASSERT((mpl::size<empty_list>::type::value == 0)); - BOOST_STATIC_ASSERT((mpl::size<list>::type::value == 4)); - - return 0; + MPL_ASSERT_RELATION( size<empty_list>::value, ==, 0 ); + MPL_ASSERT_RELATION( size<list>::value, ==, 4 ); } diff --git a/test/size_t.cpp b/test/size_t.cpp new file mode 100644 index 0000000..26450af --- /dev/null +++ b/test/size_t.cpp @@ -0,0 +1,24 @@ + +// Copyright Aleksey Gurtovoy 2001-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_t.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/preprocessor/repetition/repeat_from_to.hpp> + +#include "integral_wrapper_test.hpp" + +MPL_TEST_CASE() +{ +# define WRAPPER(T, i) mpl::size_t<i> + BOOST_PP_REPEAT_FROM_TO(1, 11, INTEGRAL_WRAPPER_TEST, std::size_t) +} diff --git a/test/sizeof.cpp b/test/sizeof.cpp index 5e2de31..5549346 100644 --- a/test/sizeof.cpp +++ b/test/sizeof.cpp @@ -1,30 +1,28 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/sizeof.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2001-2004 // -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/sizeof.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/sizeof.hpp> +#include <boost/mpl/aux_/test.hpp> struct my { char a[100]; }; -int main() +MPL_TEST_CASE() { - BOOST_STATIC_ASSERT(mpl::sizeof_<char>::type::value == sizeof(char)); - BOOST_STATIC_ASSERT(mpl::sizeof_<int>::type::value == sizeof(int)); - BOOST_STATIC_ASSERT(mpl::sizeof_<double>::type::value == sizeof(double)); - BOOST_STATIC_ASSERT(mpl::sizeof_<my>::type::value == sizeof(my)); - return 0; + MPL_ASSERT_RELATION( sizeof_<char>::value, ==, sizeof(char) ); + MPL_ASSERT_RELATION( sizeof_<int>::value, ==, sizeof(int) ); + MPL_ASSERT_RELATION( sizeof_<double>::value, ==, sizeof(double) ); + MPL_ASSERT_RELATION( sizeof_<my>::value, ==, sizeof(my) ); } diff --git a/test/sort.cpp b/test/sort.cpp index 7645721..df35e3e 100644 --- a/test/sort.cpp +++ b/test/sort.cpp @@ -1,31 +1,29 @@ -//----------------------------------------------------------------------------- -// libs mpl/test/sort.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2004 +// Copyright David Eric Friedman 2002-2003 // -// Copyright (c) 2002-2003 -// Eric Friedman -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/sort.hpp" +#include <boost/mpl/sort.hpp> -#include "boost/static_assert.hpp" -#include "boost/mpl/list_c.hpp" -#include "boost/mpl/equal.hpp" +#include <boost/static_assert.hpp> +#include <boost/mpl/list_c.hpp> +#include <boost/mpl/equal.hpp> +#include <boost/mpl/equal_to.hpp> +#include <boost/mpl/at.hpp> -namespace mpl = boost::mpl; +#include <boost/mpl/aux_/test.hpp> -int main() +MPL_TEST_CASE() { - typedef mpl::list_c<int, 3, 4, 0, -5, 8, -1, 7>::type numbers; - typedef mpl::list_c<int, -5, -1, 0, 3, 4, 7, 8>::type manual_result; + typedef list_c<int, 3, 4, 0, -5, 8, -1, 7>::type numbers; + typedef list_c<int, -5, -1, 0, 3, 4, 7, 8>::type manual_result; - typedef mpl::sort< numbers >::type result; + typedef sort< numbers >::type result; - BOOST_STATIC_ASSERT((mpl::equal< result,manual_result >::type::value)); - - return 0; + MPL_ASSERT(( equal< result,manual_result,equal_to<_1,_2> > )); } diff --git a/test/stable_partition.cpp b/test/stable_partition.cpp index d50b4bc..ae2329c 100644 --- a/test/stable_partition.cpp +++ b/test/stable_partition.cpp @@ -1,56 +1,47 @@ -//----------------------------------------------------------------------------- -// libs mpl/test/stable_partition.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2004 +// Copyright Eric Friedman 2003 // -// Copyright (c) 2003 -// Eric Friedman -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/stable_partition.hpp" +// $Source$ +// $Date$ +// $Revision$ -#include "boost/static_assert.hpp" -#include "boost/mpl/list_c.hpp" -#include "boost/mpl/equal.hpp" +#include <boost/mpl/stable_partition.hpp> -#include "boost/mpl/less.hpp" -#include "boost/mpl/placeholders.hpp" -#include "boost/mpl/int.hpp" +#include <boost/mpl/vector_c.hpp> +#include <boost/mpl/equal.hpp> +#include <boost/mpl/comparison.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/aux_/test.hpp> -namespace mpl = boost::mpl; +typedef vector_c<int,3,4,0,-5,8,-1,7>::type numbers; +typedef vector_c<int,0,-5,-1>::type manual_first; +typedef vector_c<int,3,4,8,7>::type manual_second; -int main() +MPL_TEST_CASE() { - typedef mpl::list_c<int, 3, 4, 0, -5, 8, -1, 7>::type numbers; - typedef mpl::list_c<int, 0, -5, -1>::type manual_first; - typedef mpl::list_c<int, 3, 4, 8, 7>::type manual_second; - - ////// - - typedef mpl::stable_partition< + typedef stable_partition< numbers - , mpl::less< mpl::_, mpl::int_<3> > - >::type result1; + , less< _, int_<3> > + >::type result; - typedef result1::first first1; - BOOST_STATIC_ASSERT((mpl::equal< first1,manual_first >::type::value)); - typedef result1::second second1; - BOOST_STATIC_ASSERT((mpl::equal< second1,manual_second >::type::value)); - - ////// - - typedef mpl::stable_partition< - numbers - , mpl::lt< 3 > - >::type result2; - - typedef result2::first first2; - BOOST_STATIC_ASSERT((mpl::equal< first2,manual_first >::type::value)); - typedef result2::second second2; - BOOST_STATIC_ASSERT((mpl::equal< second2,manual_second >::type::value)); - - return 0; + MPL_ASSERT(( equal< result::first,manual_first > )); + MPL_ASSERT(( equal< result::second,manual_second > )); +} + +MPL_TEST_CASE() +{ + typedef stable_partition< + numbers + , greater_equal< _, int_<3> > + >::type result; + + MPL_ASSERT(( equal< result::first,manual_second > )); + MPL_ASSERT(( equal< result::second,manual_first > )); } diff --git a/test/transform.cpp b/test/transform.cpp index b49559b..f6b8fce 100644 --- a/test/transform.cpp +++ b/test/transform.cpp @@ -1,51 +1,51 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/transform.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright David Abrahams 2003-2004 // -// Copyright (c) 2000-03 -// Aleksey Gurtovoy, Dave Abrahams -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/transform.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/list_c.hpp" -#include "boost/mpl/equal.hpp" -#include "boost/mpl/plus.hpp" -#include "boost/type_traits/add_pointer.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/transform.hpp> -int main() +#include <boost/mpl/list.hpp> +#include <boost/mpl/list_c.hpp> +#include <boost/mpl/equal.hpp> +#include <boost/mpl/equal_to.hpp> +#include <boost/mpl/plus.hpp> +#include <boost/mpl/aux_/test.hpp> +#include <boost/mpl/aux_/config/gcc.hpp> +#include <boost/mpl/aux_/config/workaround.hpp> + +#include <boost/type_traits/add_pointer.hpp> + + +MPL_TEST_CASE() { - using namespace mpl::placeholders; + typedef list<char,short,int,long,float,double> types; + typedef list<char*,short*,int*,long*,float*,double*> pointers; - { - typedef mpl::list<char,short,int,long,float,double> types; - typedef mpl::list<char*,short*,int*,long*,float*,double*> pointers; - - typedef mpl::transform1< types,boost::add_pointer<_1> >::type result1; - BOOST_STATIC_ASSERT((mpl::equal<result1,pointers>::type::value)); - - typedef mpl::transform< types,boost::add_pointer<_1> >::type result; - BOOST_STATIC_ASSERT((mpl::equal<result,pointers>::type::value)); - } - - { - typedef mpl::list_c<long,0,2,4,6,8,10> evens; - typedef mpl::list_c<long,2,3,5,7,11,13> primes; - typedef mpl::list_c<long,2,5,9,13,19,23> sums; - - typedef mpl::transform2< evens, primes, mpl::plus<> >::type result1; - BOOST_STATIC_ASSERT((mpl::equal<result1::type,sums::type>::type::value)); - - typedef mpl::transform< evens, primes, mpl::plus<> >::type result; - BOOST_STATIC_ASSERT((mpl::equal<result::type,sums::type>::type::value)); - } - - return 0; + typedef transform1< types,add_pointer<_1> >::type result; + MPL_ASSERT(( equal<result,pointers> )); +} + +MPL_TEST_CASE() +{ + typedef list_c<long,0,2,4,6,8,10> evens; + typedef list_c<long,2,3,5,7,11,13> primes; + typedef list_c<long,2,5,9,13,19,23> sums; + + typedef transform2< evens, primes, plus<> >::type result; + MPL_ASSERT(( equal< result,sums,equal_to<_1,_2> > )); + +#if !defined(BOOST_MPL_CFG_NO_HAS_XXX) + typedef transform< evens, primes, plus<> >::type result2; + MPL_ASSERT(( is_same<result2,result> )); +#endif } diff --git a/test/transform_view.cpp b/test/transform_view.cpp index 8f0b2a7..a3e563a 100644 --- a/test/transform_view.cpp +++ b/test/transform_view.cpp @@ -1,31 +1,30 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/transform_view.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2001-2004 // -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/transform_view.hpp" -#include "boost/mpl/max_element.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/sizeof.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; -using mpl::_; +#include <boost/mpl/transform_view.hpp> -int main() +#include <boost/mpl/max_element.hpp> +#include <boost/mpl/list.hpp> +#include <boost/mpl/sizeof.hpp> +#include <boost/mpl/aux_/test.hpp> + + +MPL_TEST_CASE() { - typedef mpl::list<int,long,char,char[50],double> types; - typedef mpl::max_element< - mpl::transform_view< types, mpl::sizeof_<_> > + typedef list<int,long,char,char[50],double> types; + typedef max_element< + transform_view< types, sizeof_<_> > >::type iter; - BOOST_STATIC_ASSERT(iter::type::value == 50); - return 0; + MPL_ASSERT_RELATION( deref<iter>::type::value, ==, 50 ); } diff --git a/test/unique.cpp b/test/unique.cpp index efa658f..9ab0560 100644 --- a/test/unique.cpp +++ b/test/unique.cpp @@ -1,30 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/unique.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 +// Copyright David Abrahams 2003-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/unique.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/equal.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/unique.hpp> +#include <boost/mpl/list.hpp> +#include <boost/mpl/equal.hpp> +#include <boost/type_traits/is_same.hpp> -int main() +#include <boost/mpl/aux_/test.hpp> + +MPL_TEST_CASE() { - using namespace mpl::placeholders; - typedef mpl::list<int,float,float,char,int,int,int,double>::type types; - typedef mpl::unique<types>::type result; + typedef list<int,float,float,char,int,int,int,double> types; + typedef unique< types, is_same<_1,_2> >::type result; - typedef mpl::list<int,float,char,int,double>::type answer; - BOOST_STATIC_ASSERT((mpl::equal< result,answer >::type::value)); - - return 0; + typedef list<int,float,char,int,double>::type answer; + MPL_ASSERT(( equal< result,answer > )); } diff --git a/test/unpack_args.cpp b/test/unpack_args.cpp new file mode 100644 index 0000000..3d51e78 --- /dev/null +++ b/test/unpack_args.cpp @@ -0,0 +1,26 @@ + +// 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. + +// $Source$ +// $Date$ +// $Revision$ + +#include <boost/mpl/unpack_args.hpp> + +#include <boost/mpl/vector/vector10.hpp> +#include <boost/mpl/aux_/test.hpp> +#include <boost/type_traits/is_same.hpp> + +MPL_TEST_CASE() +{ + MPL_ASSERT(( apply1< + unpack_args< is_same<_1,_2> > + , vector2<int,int> + > )); +} diff --git a/test/upper_bound.cpp b/test/upper_bound.cpp index 796609a..06248dd 100644 --- a/test/upper_bound.cpp +++ b/test/upper_bound.cpp @@ -1,29 +1,29 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/upper_bound.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2001-2004 // -// Copyright (c) 2001-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/upper_bound.hpp" -#include "boost/mpl/distance.hpp" -#include "boost/mpl/list_c.hpp" -#include "boost/mpl/less.hpp" -#include "boost/mpl/int.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/upper_bound.hpp> -int main() +#include <boost/mpl/distance.hpp> +#include <boost/mpl/list_c.hpp> +#include <boost/mpl/less.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/aux_/test.hpp> + +MPL_TEST_CASE() { - typedef mpl::list_c<int,1,2,3,3,3,5,8> numbers; - typedef mpl::upper_bound< numbers, mpl::int_<3> >::type iter; - BOOST_STATIC_ASSERT((mpl::distance< mpl::begin<numbers>::type,iter >::type::value == 5)); - BOOST_STATIC_ASSERT(iter::type::value == 5); - return 0; + typedef list_c<int,1,2,3,3,3,5,8> numbers; + typedef upper_bound< numbers, int_<3> >::type iter; + + MPL_ASSERT_RELATION( (mpl::distance< begin<numbers>::type,iter >::value), ==, 5 ); + MPL_ASSERT_RELATION( deref<iter>::type::value, ==, 5 ); } diff --git a/test/vector.cpp b/test/vector.cpp index a33923f..61fe809 100644 --- a/test/vector.cpp +++ b/test/vector.cpp @@ -1,25 +1,93 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/vector.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/vector.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/vector.hpp> +#include <boost/mpl/vector/vector10.hpp> +#include <boost/mpl/push_back.hpp> +#include <boost/mpl/pop_back.hpp> +#include <boost/mpl/push_front.hpp> +#include <boost/mpl/pop_front.hpp> +#include <boost/mpl/back.hpp> +#include <boost/mpl/front.hpp> +#include <boost/mpl/size.hpp> +#include <boost/mpl/empty.hpp> -int main() +#include <boost/mpl/aux_/test.hpp> + + +MPL_TEST_CASE() { - typedef mpl::vector0<> vector0; - typedef mpl::vector1<char> vector1; - typedef mpl::vector2<char,long> vector2; - typedef mpl::vector9<char,char,char,char,char,char,char,char,char> vector9; + typedef vector0<> v0; + typedef vector1<char> v1; + typedef vector2<char,long> v2; + typedef vector9<char,char,char,char,char,char,char,char,int> v9; - return 0; + MPL_ASSERT_RELATION( size<v0>::value, ==, 0 ); + MPL_ASSERT_RELATION( size<v1>::value, ==, 1 ); + MPL_ASSERT_RELATION( size<v2>::value, ==, 2 ); + MPL_ASSERT_RELATION( size<v9>::value, ==, 9 ); + + MPL_ASSERT(( empty<v0> )); + MPL_ASSERT_NOT(( empty<v1> )); + MPL_ASSERT_NOT(( empty<v2> )); + MPL_ASSERT_NOT(( empty<v9> )); + + MPL_ASSERT(( is_same< front<v1>::type,char > )); + MPL_ASSERT(( is_same< back<v1>::type,char > )); + MPL_ASSERT(( is_same< front<v2>::type,char > )); + MPL_ASSERT(( is_same< back<v2>::type,long > )); + MPL_ASSERT(( is_same< front<v9>::type,char > )); + MPL_ASSERT(( is_same< back<v9>::type,int > )); +} + + +MPL_TEST_CASE() +{ + typedef vector2<char,long> v2; + + typedef begin<v2>::type i1; + typedef next<i1>::type i2; + typedef next<i2>::type i3; + + MPL_ASSERT(( is_same<deref<i1>::type,char> )); + MPL_ASSERT(( is_same<deref<i2>::type,long> )); + MPL_ASSERT(( is_same< i3, end<v2>::type > )); +} + +MPL_TEST_CASE() +{ + typedef vector0<> v0; + + typedef push_back<v0,int>::type v1; + MPL_ASSERT(( is_same< back<v1>::type,int > )); + + typedef push_front<v1,char>::type v2; + MPL_ASSERT(( is_same< back<v2>::type,int > )); + MPL_ASSERT(( is_same< front<v2>::type,char > )); + + typedef push_back<v2,long>::type v3; + MPL_ASSERT(( is_same< back<v3>::type,long > )); +} + +MPL_TEST_CASE() +{ + typedef vector<> v0; + typedef vector<char> v1; + typedef vector<char,long> v2; + typedef vector<char,char,char,char,char,char,char,char,int> v9; + + MPL_ASSERT_RELATION( size<v0>::value, ==, 0 ); + MPL_ASSERT_RELATION( size<v1>::value, ==, 1 ); + MPL_ASSERT_RELATION( size<v2>::value, ==, 2 ); + MPL_ASSERT_RELATION( size<v9>::value, ==, 9 ); } diff --git a/test/vector_c.cpp b/test/vector_c.cpp index 9dd247e..cec13ea 100644 --- a/test/vector_c.cpp +++ b/test/vector_c.cpp @@ -1,60 +1,56 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/vector_c.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2000-2004 // -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/vector_c.hpp" -#include "boost/mpl/front.hpp" -#include "boost/mpl/size.hpp" -#include "boost/static_assert.hpp" -#include "boost/config.hpp" +// $Source$ +// $Date$ +// $Revision$ -namespace mpl = boost::mpl; +#include <boost/mpl/vector_c.hpp> +#include <boost/mpl/front.hpp> +#include <boost/mpl/size.hpp> -#if !defined(BOOST_MSVC) || (BOOST_MSVC > 1200) -void test_bool_list() +#include <boost/mpl/aux_/test.hpp> + +#if !BOOST_WORKAROUND(BOOST_MSVC, <=1200) +MPL_TEST_CASE() { - typedef mpl::vector_c<bool,true>::type list1; - typedef mpl::vector_c<bool,false>::type list2; + typedef vector_c<bool,true>::type v1; + typedef vector_c<bool,false>::type v2; - BOOST_STATIC_ASSERT(mpl::front<list1>::type::value == true); - BOOST_STATIC_ASSERT(mpl::front<list2>::type::value == false); + MPL_ASSERT_RELATION( front<v1>::type::value, ==, true ); + MPL_ASSERT_RELATION( front<v2>::type::value, ==, false ); } #endif -void test_int_list() +MPL_TEST_CASE() { - typedef mpl::vector_c<int,-1>::type list1; - typedef mpl::vector_c<int,0,1>::type list2; - typedef mpl::vector_c<int,1,2,3>::type list3; + typedef vector_c<int,-1> v1; + typedef vector_c<int,0,1> v2; + typedef vector_c<int,1,2,3> v3; - BOOST_STATIC_ASSERT(mpl::size<list1>::type::value == 1); - BOOST_STATIC_ASSERT(mpl::size<list2>::type::value == 2); - BOOST_STATIC_ASSERT(mpl::size<list3>::type::value == 3); - BOOST_STATIC_ASSERT(mpl::front<list1>::type::value == -1); - BOOST_STATIC_ASSERT(mpl::front<list2>::type::value == 0); - BOOST_STATIC_ASSERT(mpl::front<list3>::type::value == 1); + MPL_ASSERT_RELATION( size<v1>::value, ==, 1 ); + MPL_ASSERT_RELATION( size<v2>::value, ==, 2 ); + MPL_ASSERT_RELATION( size<v3>::value, ==, 3 ); + + MPL_ASSERT_RELATION( front<v1>::type::value, ==, -1 ); + MPL_ASSERT_RELATION( front<v2>::type::value, ==, 0 ); + MPL_ASSERT_RELATION( front<v3>::type::value, ==, 1 ); } -void test_unsigned_list() +MPL_TEST_CASE() { - typedef mpl::vector_c<unsigned,0>::type list1; - typedef mpl::vector_c<unsigned,1,2>::type list2; + typedef vector_c<unsigned,0> v1; + typedef vector_c<unsigned,1,2> v2; - BOOST_STATIC_ASSERT(mpl::size<list1>::type::value == 1); - BOOST_STATIC_ASSERT(mpl::size<list2>::type::value == 2); - BOOST_STATIC_ASSERT(mpl::front<list1>::type::value == 0); - BOOST_STATIC_ASSERT(mpl::front<list2>::type::value == 1); -} + MPL_ASSERT_RELATION( size<v1>::type::value, ==, 1 ); + MPL_ASSERT_RELATION( size<v2>::type::value, ==, 2 ); -int main() -{ - return 0; + MPL_ASSERT_RELATION( front<v1>::type::value, ==, 0 ); + MPL_ASSERT_RELATION( front<v2>::type::value, ==, 1 ); } diff --git a/test/zip_view.cpp b/test/zip_view.cpp index aa7df9e..8afc733 100644 --- a/test/zip_view.cpp +++ b/test/zip_view.cpp @@ -1,56 +1,41 @@ -//----------------------------------------------------------------------------- -// boost mpl/test/zip_view.cpp source file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- + +// Copyright Aleksey Gurtovoy 2002-2004 // -// Copyright (c) 2002 -// Aleksey Gurtovoy -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at +// 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. -#include "boost/mpl/zip_view.hpp" -#include "boost/mpl/transform_view.hpp" -#include "boost/mpl/filter_view.hpp" -#include "boost/mpl/range_c.hpp" -#include "boost/mpl/list.hpp" -#include "boost/mpl/at.hpp" -#include "boost/mpl/equal.hpp" -#include "boost/mpl/equal_to.hpp" -#include "boost/mpl/math/is_even.hpp" -#include "boost/static_assert.hpp" +// $Source$ +// $Date$ +// $Revision$ -using namespace boost::mpl; +#include <boost/mpl/zip_view.hpp> -template< typename BinaryOp > -struct apply_two_args_seq +#include <boost/mpl/transform_view.hpp> +#include <boost/mpl/filter_view.hpp> +#include <boost/mpl/range_c.hpp> +#include <boost/mpl/vector.hpp> +#include <boost/mpl/at.hpp> +#include <boost/mpl/equal.hpp> +#include <boost/mpl/equal_to.hpp> +#include <boost/mpl/unpack_args.hpp> +#include <boost/mpl/math/is_even.hpp> + +#include <boost/mpl/aux_/test.hpp> + + +MPL_TEST_CASE() { - template< typename Args > struct apply - { - typedef typename apply2< - BinaryOp - , typename at_c<Args,0>::type - , typename at_c<Args,1>::type - >::type type; - }; -}; - -int main() -{ - typedef range_c<int,0,10> s1; - typedef range_c<int,10,20> s2; - typedef transform_view< - zip_view< list<s1,s2> > - , apply_two_args_seq< plus<> > + zip_view< vector< range_c<int,0,10>, range_c<int,10,20> > > + , unpack_args< plus<> > > result; - BOOST_STATIC_ASSERT((equal< + MPL_ASSERT(( equal< result - , filter_view< range_c<int,10,30>, math::is_even<_> > + , filter_view< range_c<int,10,30>, is_even<_> > , equal_to<_,_> - >::type::value)); - - return 0; + > )); }