merge new MPL version from 'mplbook' branch

[SVN r24874]
This commit is contained in:
Aleksey Gurtovoy
2004-09-02 15:41:37 +00:00
parent e2e70427cc
commit 1689c8ef83
1216 changed files with 89941 additions and 36780 deletions

View File

@@ -389,7 +389,7 @@ struct remove_pointer_if
</div>
</div>
<p>Besides <tt>boost/config.hpp</tt> header, the MPL heavily depends on two other Boost libraries - the Boost Preprocessor library <span class="citation">[<a class="interlink" href="#ref.pre" title="[pre]">PRE</a>]</span>, and the Type Traits library <span class="citation">[<a class="interlink" href="#ref.ttl" title="[ttl]">TTL</a>]</span>. These dependencies are essential and cannot be eliminated. In addition to those, the <tt>boost/mpl/assert_is_same.hpp</tt> header depends on Boost Static Assert library <span class="citation">[<a class="interlink" href="#ref.sal" title="[sal]">SAL</a>]</span>. The library tests and examples may depend on some additional Boost libraries, e.g. Boost Bind <span class="citation">[<a class="interlink" href="#ref.bbl" title="[bbl]">BBL</a>]</span>; you don't have to have those unless you are interested in actually compiling the tests/examples (probably you are, though).</p>
<p>Besides <tt>boost/config.hpp</tt> header, the MPL heavily depends on two other Boost libraries - the Boost Preprocessor library <span class="citation">[<a class="interlink" href="#ref.pre" title="[pre]">PRE</a>]</span>, and the Type Traits library <span class="citation">[<a class="interlink" href="#ref.ttl" title="[ttl]">TTL</a>]</span>. These dependencies are essential and cannot be eliminated. In addition to those, the <tt>boost/mpl/assert.hpp</tt> header depends on Boost Static Assert library <span class="citation">[<a class="interlink" href="#ref.sal" title="[sal]">SAL</a>]</span>. The library tests and examples may depend on some additional Boost libraries, e.g. Boost Bind <span class="citation">[<a class="interlink" href="#ref.bbl" title="[bbl]">BBL</a>]</span>; you don't have to have those unless you are interested in actually compiling the tests/examples (probably you are, though).</p>
</div>
<div class="section">

View File

@@ -20,7 +20,7 @@ The library provides you with a fine-grained header structure with one header pe
<title>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>

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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> > ));

View File

@@ -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);

View File

@@ -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>

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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;
}

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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.
// $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))
#if defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT)
# 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

View File

@@ -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

View File

@@ -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

View File

@@ -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 \
); \
}; \
} \

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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(); \

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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
//#define BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT
#endif // BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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
{

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)

Some files were not shown because too many files have changed in this diff Show More