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>
-Besides boost/config.hpp> header, the MPL heavily depends on two other Boost libraries - the Boost Preprocessor library >, and the Type Traits library >. 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 >. The library tests and examples may depend on some additional Boost libraries, e.g. Boost Bind >; 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 >, and the Type Traits library >. These dependencies are essential and cannot be eliminated. In addition to those, the boost/mpl/assert.hpp> header depends on Boost Static Assert library >. The library tests and examples may depend on some additional Boost libraries, e.g. Boost Bind >; you don't have to have those unless you are interested in actually compiling the tests/examples (probably you are, though).
>
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
+#include
+#include
+#include
#include
#include
-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
-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 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
+
+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
-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
#include
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
#include
#include
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
+#include
+#include
#include
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
+#include
+#include
#include
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
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
namespace mpl = boost::mpl;
using namespace mpl::placeholders;
@@ -44,10 +47,10 @@ struct integer
>::type >::type iter_;
typedef typename mpl::end::type last_;
- typedef typename mpl::apply_if<
+ typedef typename mpl::eval_if<
boost::is_same
, mpl::identity< big_int >
- , mpl::apply0
+ , mpl::deref
>::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
+#include
+#include
#include
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
+#include
+#include
+#include
+#include
+
+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::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
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
-#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 >::type backward_;
- typedef typename if_< backward_, negate, N >::type offset_;
+ template< typename Iterator, typename N > struct apply
+ {
+ typedef typename less< N,long_<0> >::type backward_;
+ typedef typename if_< backward_, negate, 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::type type;
+ };
};
-// random-access iterators
-template< typename Iterator, typename N >
-struct advance_impl
-{
- typedef typename Iterator
- ::template BOOST_MPL_AUX_ITERATOR_ADVANCE::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::type >
+ ::template apply
{
- 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::type >
+ ::template apply >
{
- typedef typename aux::advance_impl<
- typename BOOST_MPL_AUX_ITERATOR_CATEGORY(Iterator)
- , Iterator
- , integral_c
- >::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
- >::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
-{
- template< typename Iterator, typename N > struct result_
- {
- typedef typename msvc_advance
- ::template result_::type type;
- };
-};
-#else
-template<>
-struct advance_impl
-{
- template< typename Iterator, typename N > struct result_
- {
- typedef typename Iterator
- ::template BOOST_MPL_AUX_ITERATOR_ADVANCE::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
- ::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
- ::template result_<
- Iterator
- , integral_c
- >::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
+
+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
+#include
+#include
+
+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
-# 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
+# include
+# include
+# include
// agurt, 19/may/04: workaround a conflict with 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
#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
-#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
+# include
+# include
+# include
+# include
+# include
#endif
-#include "boost/mpl/aux_/config/use_preprocessed.hpp"
+#include
-#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
#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
+# include
+# include
+# include
+# include
+# include
+# include
+# include
+# include
+# include
+# include
-# include "boost/preprocessor/comma_if.hpp"
-# include "boost/preprocessor/inc.hpp"
-# include "boost/preprocessor/iterate.hpp"
+# include
+# include
+# include
+# include
-# 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, ))
#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
+}
+
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::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::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
+struct BOOST_PP_CAT(apply,i_)
{
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)::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::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)
-{
- 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
+struct apply_chooser
{
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
+#endif
+
+#include
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+# define BOOST_MPL_PREPROCESSED_HEADER apply_fwd.hpp
+# include
+
+#else
+
+# include
+# include
+# include
+# include
+# include
+
+# include
+# include
+# include
+
+// 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, ))
+#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_::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::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
+# include
+# include
+#endif
+
+#include
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+# define BOOST_MPL_PREPROCESSED_HEADER apply_wrap.hpp
+# include
+
+#else
+
+# include
+# include
+# include
+# include
+# include
+# include
+# include
+# include
+
+# include
+# include
+# include
+# include
+
+
+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, ))
+#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
+
+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_)::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_, ))
+#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::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_)
+{
+ 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
#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
+# include
+# include
+# include
+# include
#endif
-#include "boost/mpl/aux_/config/use_preprocessed.hpp"
+#include
-#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
#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
+# include
+# include
+# include
+# include
+# include
-namespace boost {
-namespace mpl {
+# include
+# include
+# include
+
+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, ))
#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
+template<> struct arg
{
- BOOST_STATIC_CONSTANT(int, value = i);
- typedef arg next;
- BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag)
+ BOOST_STATIC_CONSTANT(int, value = i_);
+ typedef arg 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_::value);
- BOOST_STATIC_ASSERT(nv);
-#endif
+ typedef BOOST_PP_CAT(U,i_) type;
+ BOOST_MPL_ASSERT_NOT((is_na));
};
};
@@ -115,23 +113,20 @@ template<> struct arg
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_::value);
- BOOST_STATIC_ASSERT(nv);
-#endif
+ BOOST_MPL_ASSERT_NOT((is_na));
};
};
-#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
+#include
+
+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
+#include
+#include
+#include
+#include
+#include
+#include // 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
+#include
+#include
+#include
+#include
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, single_view >
@@ -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
-{
- typedef single_view 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
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#include
+
+#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' by reference
+template< bool C > struct assert { typedef void* type; };
+template<> struct assert { typedef assert& type; };
+
+template< bool C >
+int assertion_failed( typename assert::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
+#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
+#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 { 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::type type;
+};
+
+template< typename Pred >
+failed ************ (Pred::************
+ assert_arg( void (*)(Pred), typename assert_arg_pred::type )
+ );
+
+template< typename Pred >
+failed ************ (boost::mpl::not_