--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_ADAPTED_30122005_1420)
+#define BOOST_FUSION_ADAPTED_30122005_1420
+
+#include <boost/fusion/adapted/boost_tuple.hpp>
+#include <boost/fusion/adapted/std_pair.hpp>
+#include <boost/fusion/adapted/array.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/adapted/struct.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_ARRAY_27122005_1035)
+#define BOOST_FUSION_ARRAY_27122005_1035
+
+#include <boost/fusion/adapted/array/array_iterator.hpp>
+#include <boost/fusion/adapted/array/tag_of.hpp>
+#include <boost/fusion/adapted/array/detail/is_view_impl.hpp>
+#include <boost/fusion/adapted/array/detail/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/array/detail/category_of_impl.hpp>
+#include <boost/fusion/adapted/array/detail/begin_impl.hpp>
+#include <boost/fusion/adapted/array/detail/end_impl.hpp>
+#include <boost/fusion/adapted/array/detail/size_impl.hpp>
+#include <boost/fusion/adapted/array/detail/at_impl.hpp>
+#include <boost/fusion/adapted/array/detail/value_at_impl.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_ARRAY_ITERATOR_26122005_2250)
+#define BOOST_FUSION_ARRAY_ITERATOR_26122005_2250
+
+#include <cstddef>
+#include <boost/config.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/minus.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/fusion/iterator/iterator_facade.hpp>
+
+namespace boost { namespace fusion
+{
+ struct random_access_traversal_tag;
+
+ template <typename Array, int Pos>
+ struct array_iterator
+ : iterator_facade<array_iterator<Array, Pos>, random_access_traversal_tag>
+ {
+ BOOST_MPL_ASSERT_RELATION(Pos, >=, 0);
+ BOOST_MPL_ASSERT_RELATION(Pos, <=, Array::static_size);
+
+ typedef mpl::int_<Pos> index;
+ typedef Array array_type;
+
+ array_iterator(Array& a)
+ : array(a) {}
+
+ Array& array;
+
+ template <typename Iterator>
+ struct value_of
+ {
+ typedef typename Iterator::array_type array_type;
+ typedef typename array_type::value_type type;
+ };
+
+ template <typename Iterator>
+ struct deref
+ {
+ typedef typename Iterator::array_type array_type;
+ typedef typename
+ mpl::if_<
+ is_const<array_type>
+ , typename array_type::const_reference
+ , typename array_type::reference
+ >::type
+ type;
+
+ static type
+ call(Iterator const & it)
+ {
+ return it.array[Iterator::index::value];
+ }
+ };
+
+ template <typename Iterator, typename N>
+ struct advance
+ {
+ typedef typename Iterator::index index;
+ typedef typename Iterator::array_type array_type;
+ typedef array_iterator<array_type, index::value + N::value> type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return type(i.array);
+ }
+ };
+
+ template <typename Iterator>
+ struct next : advance<Iterator, mpl::int_<1> > {};
+
+ template <typename Iterator>
+ struct prior : advance<Iterator, mpl::int_<-1> > {};
+
+ template <typename I1, typename I2>
+ struct distance : mpl::minus<typename I2::index, typename I1::index>
+ {
+ typedef typename
+ mpl::minus<
+ typename I2::index, typename I1::index
+ >::type
+ type;
+
+ static type
+ call(I1 const&, I2 const&)
+ {
+ return type();
+ }
+ };
+
+ private:
+
+ array_iterator<Array, Pos>& operator=(array_iterator<Array, Pos> const&);
+ };
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_AT_IMPL_27122005_1241)
+#define BOOST_FUSION_AT_IMPL_27122005_1241
+
+#include <boost/type_traits/is_const.hpp>
+
+#include <boost/mpl/if.hpp>
+
+namespace boost { namespace fusion {
+
+ struct array_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct at_impl;
+
+ template<>
+ struct at_impl<array_tag>
+ {
+ template<typename Sequence, typename N>
+ struct apply
+ {
+ typedef typename mpl::if_<
+ is_const<Sequence>,
+ typename Sequence::const_reference,
+ typename Sequence::reference>::type type;
+
+ static type
+ call(Sequence& seq)
+ {
+ return seq[N::value];
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_BEGIN_IMPL_27122005_1117)
+#define BOOST_FUSION_BEGIN_IMPL_27122005_1117
+
+#include <boost/fusion/adapted/array/array_iterator.hpp>
+
+namespace boost { namespace fusion {
+
+ struct array_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<array_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef array_iterator<Sequence, 0> type;
+
+ static type
+ call(Sequence& v)
+ {
+ return type(v);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_CATEGORY_OF_IMPL_27122005_1044)
+#define BOOST_FUSION_CATEGORY_OF_IMPL_27122005_1044
+
+#include <boost/config/no_tr1/utility.hpp>
+
+namespace boost { namespace fusion {
+
+ struct array_tag;
+ struct random_access_traversal_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct category_of_impl;
+
+ template<>
+ struct category_of_impl<array_tag>
+ {
+ template<typename T>
+ struct apply
+ {
+ typedef random_access_traversal_tag type;
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_END_IMPL_27122005_1120)
+#define BOOST_FUSION_END_IMPL_27122005_1120
+
+#include <boost/fusion/adapted/array/array_iterator.hpp>
+
+namespace boost { namespace fusion {
+
+ struct array_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<array_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef array_iterator<Sequence, Sequence::static_size> type;
+
+ static type
+ call(Sequence& v)
+ {
+ return type(v);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_IS_SEQUENCE_IMPL_27122005_1648)
+#define BOOST_FUSION_IS_SEQUENCE_IMPL_27122005_1648
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion {
+
+ struct array_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_sequence_impl;
+
+ template<>
+ struct is_sequence_impl<array_tag>
+ {
+ template<typename Sequence>
+ struct apply : mpl::true_ {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_IS_VIEW_IMPL_27042006_2221)
+#define BOOST_FUSION_IS_VIEW_IMPL_27042006_2221
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct array_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_view_impl;
+
+ template<>
+ struct is_view_impl<array_tag>
+ {
+ template<typename T>
+ struct apply : mpl::false_
+ {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_SIZE_IMPL_27122005_1251)
+#define BOOST_FUSION_SIZE_IMPL_27122005_1251
+
+namespace boost { namespace fusion {
+
+ struct array_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct size_impl;
+
+ template<>
+ struct size_impl<array_tag>
+ {
+ template<typename Sequence>
+ struct apply : mpl::int_<Sequence::static_size> {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_VALUE_AT_IMPL_27122005_1256)
+#define BOOST_FUSION_VALUE_AT_IMPL_27122005_1256
+
+namespace boost { namespace fusion {
+
+ struct array_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct value_at_impl;
+
+ template <>
+ struct value_at_impl<array_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply
+ {
+ typedef typename Sequence::value_type type;
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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(FUSION_SEQUENCE_TAG_OF_27122005_1030)
+#define FUSION_SEQUENCE_TAG_OF_27122005_1030
+
+#include <boost/fusion/support/tag_of_fwd.hpp>
+
+#include <cstddef>
+
+namespace boost
+{
+ template<typename T, std::size_t N>
+ class array;
+}
+
+namespace boost { namespace fusion
+{
+ struct array_tag;
+
+ namespace traits
+ {
+ template<typename T, std::size_t N>
+#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
+ struct tag_of<boost::array<T,N>, void >
+#else
+ struct tag_of<boost::array<T,N> >
+#endif
+ {
+ typedef array_tag type;
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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_FUSION_BOOST_TUPLE_09272006_0732)
+#define BOOST_FUSION_BOOST_TUPLE_09272006_0732
+
+#include <boost/fusion/adapted/boost_tuple/tag_of.hpp>
+#include <boost/fusion/adapted/boost_tuple/detail/is_view_impl.hpp>
+#include <boost/fusion/adapted/boost_tuple/detail/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/boost_tuple/detail/category_of_impl.hpp>
+#include <boost/fusion/adapted/boost_tuple/detail/begin_impl.hpp>
+#include <boost/fusion/adapted/boost_tuple/detail/end_impl.hpp>
+#include <boost/fusion/adapted/boost_tuple/detail/size_impl.hpp>
+#include <boost/fusion/adapted/boost_tuple/detail/at_impl.hpp>
+#include <boost/fusion/adapted/boost_tuple/detail/value_at_impl.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_BOOST_TUPLE_ITERATOR_09262006_1851)
+#define FUSION_BOOST_TUPLE_ITERATOR_09262006_1851
+
+#include <boost/fusion/iterator/iterator_facade.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/tuple/tuple.hpp>
+
+namespace boost { namespace fusion
+{
+ struct forward_traversal_tag;
+
+ namespace detail
+ {
+ template <typename T>
+ struct boost_tuple_is_empty : mpl::false_ {};
+
+ template <>
+ struct boost_tuple_is_empty<tuples::null_type> : mpl::true_ {};
+
+ template <>
+ struct boost_tuple_is_empty<tuples::null_type const> : mpl::true_ {};
+
+ template <>
+ struct boost_tuple_is_empty<tuples::tuple<> > : mpl::true_ {};
+
+ template <>
+ struct boost_tuple_is_empty<tuples::tuple<> const> : mpl::true_ {};
+ }
+
+ template <typename Cons = tuples::null_type>
+ struct boost_tuple_iterator
+ : iterator_facade<boost_tuple_iterator<Cons>, forward_traversal_tag>
+ {
+ typedef Cons cons_type;
+
+ explicit boost_tuple_iterator(Cons& cons)
+ : cons(cons) {}
+ Cons& cons;
+
+ template <typename Iterator>
+ struct value_of : mpl::identity<typename Iterator::cons_type::head_type> {};
+
+ template <typename Iterator>
+ struct deref
+ {
+ typedef typename value_of<Iterator>::type element;
+
+ typedef typename
+ mpl::if_<
+ is_const<typename Iterator::cons_type>
+ , typename tuples::access_traits<element>::const_type
+ , typename tuples::access_traits<element>::non_const_type
+ >::type
+ type;
+
+ static type
+ call(Iterator const& iter)
+ {
+ return iter.cons.get_head();
+ }
+ };
+
+ template <typename Iterator>
+ struct next
+ {
+ typedef typename Iterator::cons_type cons_type;
+ typedef typename cons_type::tail_type tail_type;
+
+ typedef boost_tuple_iterator<
+ typename mpl::eval_if<
+ is_const<cons_type>
+ , add_const<tail_type>
+ , mpl::identity<tail_type>
+ >::type>
+ type;
+
+ static type
+ call(Iterator const& iter)
+ {
+ return type(iter.cons.get_tail());
+ }
+ };
+ };
+
+ template <typename Null>
+ struct boost_tuple_null_iterator
+ : iterator_facade<boost_tuple_iterator<Null>, forward_traversal_tag>
+ {
+ typedef Null cons_type;
+
+ template <typename I1, typename I2>
+ struct equal_to
+ : mpl::or_<
+ is_same<I1, I2>
+ , mpl::and_<
+ detail::boost_tuple_is_empty<typename I1::cons_type>
+ , detail::boost_tuple_is_empty<typename I2::cons_type>
+ >
+ >
+ {};
+ };
+
+ template <>
+ struct boost_tuple_iterator<tuples::null_type>
+ : boost_tuple_null_iterator<tuples::null_type>
+ {
+ template <typename Cons>
+ explicit boost_tuple_iterator(Cons const&) {}
+ };
+
+ template <>
+ struct boost_tuple_iterator<tuples::null_type const>
+ : boost_tuple_null_iterator<tuples::null_type const>
+ {
+ template <typename Cons>
+ explicit boost_tuple_iterator(Cons const&) {}
+ };
+
+ template <>
+ struct boost_tuple_iterator<tuples::tuple<> >
+ : boost_tuple_null_iterator<tuples::tuple<> >
+ {
+ template <typename Cons>
+ explicit boost_tuple_iterator(Cons const&) {}
+ };
+
+ template <>
+ struct boost_tuple_iterator<tuples::tuple<> const>
+ : boost_tuple_null_iterator<tuples::tuple<> const>
+ {
+ template <typename Cons>
+ explicit boost_tuple_iterator(Cons const&) {}
+ };
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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_FUSION_AT_IMPL_09262006_1920)
+#define BOOST_FUSION_AT_IMPL_09262006_1920
+
+#include <boost/tuple/tuple.hpp>
+#include <boost/mpl/if.hpp>
+
+namespace boost { namespace fusion
+{
+ struct boost_tuple_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct at_impl;
+
+ template <>
+ struct at_impl<boost_tuple_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply
+ {
+ typedef typename
+ tuples::element<N::value, Sequence>::type
+ element;
+
+ typedef typename
+ mpl::if_<
+ is_const<Sequence>
+ , typename tuples::access_traits<element>::const_type
+ , typename tuples::access_traits<element>::non_const_type
+ >::type
+ type;
+
+ static type
+ call(Sequence& seq)
+ {
+ return tuples::get<N::value>(seq);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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_FUSION_BEGIN_IMPL_09272006_0719)
+#define BOOST_FUSION_BEGIN_IMPL_09272006_0719
+
+#include <boost/fusion/adapted/boost_tuple/boost_tuple_iterator.hpp>
+
+namespace boost { namespace fusion
+{
+ struct boost_tuple_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<boost_tuple_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef boost_tuple_iterator<Sequence> type;
+
+ static type
+ call(Sequence& v)
+ {
+ return type(v);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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_FUSION_CATEGORY_OF_IMPL_09272006_0726)
+#define BOOST_FUSION_CATEGORY_OF_IMPL_09272006_0726
+
+namespace boost { namespace fusion
+{
+ struct boost_tuple_tag;
+ struct forward_traversal_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct category_of_impl;
+
+ template<>
+ struct category_of_impl<boost_tuple_tag>
+ {
+ template<typename T>
+ struct apply
+ {
+ typedef forward_traversal_tag type;
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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_FUSION_END_IMPL_09272006_0721)
+#define BOOST_FUSION_END_IMPL_09272006_0721
+
+#include <boost/fusion/adapted/boost_tuple/boost_tuple_iterator.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/type_traits/is_const.hpp>
+
+namespace boost { namespace tuples
+{
+ struct null_type;
+}}
+
+namespace boost { namespace fusion
+{
+ struct boost_tuple_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<boost_tuple_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef
+ boost_tuple_iterator<
+ typename mpl::if_<
+ is_const<Sequence>
+ , tuples::null_type const
+ , tuples::null_type
+ >::type
+ >
+ type;
+
+ static type
+ call(Sequence& seq)
+ {
+ return type(seq);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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_FUSION_IS_SEQUENCE_IMPL_09272006_0726)
+#define BOOST_FUSION_IS_SEQUENCE_IMPL_09272006_0726
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct boost_tuple_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_sequence_impl;
+
+ template<>
+ struct is_sequence_impl<boost_tuple_tag>
+ {
+ template<typename Sequence>
+ struct apply : mpl::true_ {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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_FUSION_IS_VIEW_IMPL_09272006_0725)
+#define BOOST_FUSION_IS_VIEW_IMPL_09272006_0725
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct boost_tuple_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_view_impl;
+
+ template<>
+ struct is_view_impl<boost_tuple_tag>
+ {
+ template<typename T>
+ struct apply : mpl::false_ {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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_FUSION_SIZE_IMPL_09272006_0724)
+#define BOOST_FUSION_SIZE_IMPL_09272006_0724
+
+#include <boost/tuple/tuple.hpp>
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace fusion
+{
+ struct boost_tuple_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct size_impl;
+
+ template <>
+ struct size_impl<boost_tuple_tag>
+ {
+ template <typename Sequence>
+ struct apply : mpl::int_<tuples::length<Sequence>::value> {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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_FUSION_VALUE_AT_IMPL_09262006_1926)
+#define BOOST_FUSION_VALUE_AT_IMPL_09262006_1926
+
+#include <boost/tuple/tuple.hpp>
+
+namespace boost { namespace fusion
+{
+ struct boost_tuple_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct value_at_impl;
+
+ template <>
+ struct value_at_impl<boost_tuple_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply : tuples::element<N::value, Sequence> {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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_FUSION_TAG_OF_09262006_1900)
+#define BOOST_FUSION_TAG_OF_09262006_1900
+
+#include <boost/fusion/support/tag_of_fwd.hpp>
+
+namespace boost { namespace tuples
+{
+ struct null_type;
+
+ template <
+ class T0, class T1, class T2, class T3, class T4,
+ class T5, class T6, class T7, class T8, class T9
+ >
+ class tuple;
+
+ template <class Head, class Tail>
+ struct cons;
+}}
+
+namespace boost { namespace fusion
+{
+ struct boost_tuple_tag;
+
+ namespace traits
+ {
+ template <
+ class T0, class T1, class T2, class T3, class T4,
+ class T5, class T6, class T7, class T8, class T9
+ >
+#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
+ struct tag_of<tuples::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>, void >
+#else
+ struct tag_of<tuples::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
+#endif
+ {
+ typedef boost_tuple_tag type;
+ };
+
+ template <class Head, class Tail>
+#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
+ struct tag_of<tuples::cons<Head, Tail>, void >
+#else
+ struct tag_of<tuples::cons<Head, Tail> >
+#endif
+ {
+ typedef boost_tuple_tag type;
+ };
+
+ template <>
+ struct tag_of<tuples::null_type>
+ {
+ typedef boost_tuple_tag type;
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_MPL_31122005_1152)
+#define BOOST_FUSION_MPL_31122005_1152
+
+#include <boost/fusion/adapted/mpl/detail/begin_impl.hpp>
+#include <boost/fusion/adapted/mpl/detail/end_impl.hpp>
+#include <boost/fusion/adapted/mpl/detail/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/mpl/detail/size_impl.hpp>
+#include <boost/fusion/adapted/mpl/detail/value_at_impl.hpp>
+#include <boost/fusion/adapted/mpl/detail/at_impl.hpp>
+#include <boost/fusion/adapted/mpl/detail/has_key_impl.hpp>
+#include <boost/fusion/adapted/mpl/detail/category_of_impl.hpp>
+#include <boost/fusion/adapted/mpl/detail/is_view_impl.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_AT_IMPL_31122005_1642)
+#define BOOST_FUSION_AT_IMPL_31122005_1642
+
+#include <boost/mpl/at.hpp>
+
+namespace boost { namespace fusion
+{
+ struct mpl_sequence_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct at_impl;
+
+ template <>
+ struct at_impl<mpl_sequence_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply
+ {
+ typedef typename mpl::at<Sequence, N>::type type;
+
+ static type
+ call(Sequence)
+ {
+ return type();
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_BEGIN_IMPL_31122005_1209)
+#define BOOST_FUSION_BEGIN_IMPL_31122005_1209
+
+#include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
+#include <boost/mpl/begin.hpp>
+#include <boost/type_traits/remove_const.hpp>
+
+namespace boost { namespace fusion {
+
+ struct mpl_sequence_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<mpl_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename mpl::begin<
+ typename remove_const<Sequence>::type
+ >::type iterator;
+ typedef mpl_iterator<iterator> type;
+
+ static type
+ call(Sequence)
+ {
+ return type();
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_CATEGORY_OF_IMPL_20060217_2141)
+#define BOOST_FUSION_CATEGORY_OF_IMPL_20060217_2141
+
+#include <boost/fusion/support/detail/mpl_iterator_category.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/is_sequence.hpp>
+#include <boost/static_assert.hpp>
+
+namespace boost { namespace fusion {
+
+ namespace detail
+ {
+ template <typename T>
+ struct mpl_sequence_category_of
+ {
+ // assumes T is an mpl sequence
+ // there should be no way this will ever be
+ // called where T is an mpl iterator
+
+ BOOST_STATIC_ASSERT(mpl::is_sequence<T>::value);
+ typedef typename
+ mpl_iterator_category<
+ typename mpl::begin<T>::type::category
+ >::type
+ type;
+ };
+ }
+
+ struct mpl_sequence_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct category_of_impl;
+
+ template<>
+ struct category_of_impl<mpl_sequence_tag>
+ {
+ template<typename T>
+ struct apply
+ : detail::mpl_sequence_category_of<T>
+ {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_EMPTY_IMPL_31122005_1554)
+#define BOOST_FUSION_EMPTY_IMPL_31122005_1554
+
+#include <boost/mpl/empty.hpp>
+
+namespace boost { namespace fusion
+{
+ struct mpl_sequence_tag;
+
+ namespace extension
+ {
+ template <>
+ struct empty_impl<mpl_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply : mpl::empty<Sequence> {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_END_IMPL_31122005_1237)
+#define BOOST_FUSION_END_IMPL_31122005_1237
+
+#include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
+#include <boost/mpl/end.hpp>
+#include <boost/type_traits/add_const.hpp>
+
+namespace boost { namespace fusion
+{
+ struct mpl_sequence_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<mpl_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename mpl::end<
+ typename remove_const<Sequence>::type
+ >::type iterator;
+ typedef mpl_iterator<iterator> type;
+
+ static type
+ call(Sequence)
+ {
+ return type();
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_HAS_KEY_IMPL_31122005_1647)
+#define BOOST_FUSION_HAS_KEY_IMPL_31122005_1647
+
+#include <boost/mpl/has_key.hpp>
+
+namespace boost { namespace fusion
+{
+ struct mpl_sequence_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct has_key_impl;
+
+ template <>
+ struct has_key_impl<mpl_sequence_tag>
+ {
+ template <typename Sequence, typename Key>
+ struct apply : mpl::has_key<Sequence, Key> {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_IS_SEQUENCE_IMPL_31122005_1505)
+#define BOOST_FUSION_IS_SEQUENCE_IMPL_31122005_1505
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct mpl_sequence_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_sequence_impl;
+
+ template<>
+ struct is_sequence_impl<mpl_sequence_tag>
+ {
+ template<typename T>
+ struct apply : mpl::true_ {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_IS_VIEW_IMPL_03202006_0048)
+#define BOOST_FUSION_IS_VIEW_IMPL_03202006_0048
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct mpl_sequence_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_view_impl;
+
+ template<>
+ struct is_view_impl<mpl_sequence_tag>
+ {
+ template<typename T>
+ struct apply : mpl::true_
+ {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_SIZE_IMPL_31122005_1508)
+#define BOOST_FUSION_SIZE_IMPL_31122005_1508
+
+#include <boost/mpl/size.hpp>
+
+namespace boost { namespace fusion
+{
+ struct mpl_sequence_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct size_impl;
+
+ template <>
+ struct size_impl<mpl_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply : mpl::size<Sequence> {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_VALUE_AT_IMPL_31122005_1621)
+#define BOOST_FUSION_VALUE_AT_IMPL_31122005_1621
+
+#include <boost/mpl/at.hpp>
+
+namespace boost { namespace fusion
+{
+ struct mpl_sequence_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_at_impl;
+
+ template <>
+ struct value_at_impl<mpl_sequence_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply : mpl::at<Sequence, N> {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_MPL_ITERATOR_05052005_0731)
+#define FUSION_MPL_ITERATOR_05052005_0731
+
+#include <boost/fusion/support/detail/mpl_iterator_category.hpp>
+#include <boost/fusion/iterator/iterator_facade.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/prior.hpp>
+#include <boost/mpl/advance.hpp>
+#include <boost/mpl/distance.hpp>
+
+namespace boost { namespace fusion
+{
+ template <typename Iterator_>
+ struct mpl_iterator
+ : iterator_facade<
+ mpl_iterator<Iterator_>
+ , typename detail::mpl_iterator_category<typename Iterator_::category>::type
+ >
+ {
+ typedef typename remove_const<Iterator_>::type iterator_type;
+
+ template <typename Iterator>
+ struct value_of : mpl::deref<typename Iterator::iterator_type> {};
+
+ template <typename Iterator>
+ struct deref
+ {
+ typedef typename mpl::deref<
+ typename Iterator::iterator_type>::type
+ type;
+
+ static type
+ call(Iterator)
+ {
+ return type();
+ }
+ };
+
+ template <typename Iterator>
+ struct next
+ {
+ typedef mpl_iterator<
+ typename mpl::next<typename Iterator::iterator_type>::type>
+ type;
+
+ static type
+ call(Iterator)
+ {
+ return type();
+ }
+ };
+
+ template <typename Iterator>
+ struct prior
+ {
+ typedef mpl_iterator<
+ typename mpl::prior<typename Iterator::iterator_type>::type>
+ type;
+
+ static type
+ call(Iterator)
+ {
+ return type();
+ }
+ };
+
+ template <typename Iterator, typename N>
+ struct advance
+ {
+ typedef mpl_iterator<
+ typename mpl::advance<typename Iterator::iterator_type, N>::type>
+ type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return type();
+ }
+ };
+
+ template <typename I1, typename I2>
+ struct distance :
+ mpl::distance<
+ typename I1::iterator_type
+ , typename I2::iterator_type>
+ {
+ typedef typename
+ mpl::distance<
+ typename I1::iterator_type
+ , typename I2::iterator_type
+ >::type
+ type;
+
+ static type
+ call(I1 const&, I2 const&)
+ {
+ return type();
+ }
+ };
+ };
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_STD_PAIR_24122005_1744)
+#define BOOST_FUSION_STD_PAIR_24122005_1744
+
+#include <boost/fusion/support/tag_of_fwd.hpp>
+#include <boost/fusion/adapted/struct.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/config/no_tr1/utility.hpp>
+
+namespace boost { namespace fusion
+{
+ struct struct_tag;
+
+ namespace traits
+ {
+ template <typename T1, typename T2>
+#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
+ struct tag_of<std::pair<T1, T2>, void >
+#else
+ struct tag_of<std::pair<T1, T2> >
+#endif
+ {
+ typedef struct_tag type;
+ };
+ }
+
+ namespace extension
+ {
+ template <typename Struct, int N>
+ struct struct_member;
+
+ template <typename Struct>
+ struct struct_size;
+
+ template <typename T1, typename T2>
+ struct struct_member<std::pair<T1, T2>, 0>
+ {
+ typedef T1 type;
+
+ static type& call(std::pair<T1, T2>& pair)
+ {
+ return pair.first;
+ }
+ };
+
+ template <typename T1, typename T2>
+ struct struct_member<std::pair<T1, T2>, 1>
+ {
+ typedef T2 type;
+
+ static type& call(std::pair<T1, T2>& pair)
+ {
+ return pair.second;
+ }
+ };
+
+ template <typename T1, typename T2>
+ struct struct_size<std::pair<T1, T2> > : mpl::int_<2>
+ {
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_AT_IMPL_24122005_1807)
+#define BOOST_FUSION_AT_IMPL_24122005_1807
+
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/fusion/support/detail/access.hpp>
+
+namespace boost { namespace fusion {
+
+ struct std_pair_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct at_impl;
+
+ template <>
+ struct at_impl<std_pair_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply
+ {
+ static int const n_value = N::value;
+ BOOST_STATIC_ASSERT((n_value >= 0 && n_value < 2));
+ typedef typename
+ mpl::if_c<
+ (n_value == 0)
+ , typename Sequence::first_type
+ , typename Sequence::second_type
+ >
+ element;
+
+ typedef typename
+ mpl::eval_if<
+ is_const<Sequence>
+ , detail::cref_result<element>
+ , detail::ref_result<element>
+ >::type
+ type;
+
+ template <typename RT>
+ static RT get(Sequence& p, mpl::int_<0>)
+ {
+ return p.first;
+ }
+
+ template <typename RT>
+ static RT get(Sequence& p, mpl::int_<1>)
+ {
+ return p.second;
+ }
+
+ static type
+ call(Sequence& p)
+ {
+ return get<type>(p, N());
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_BEGIN_IMPL_24122005_1752)
+#define BOOST_FUSION_BEGIN_IMPL_24122005_1752
+
+#include <boost/fusion/adapted/std_pair/std_pair_iterator.hpp>
+
+namespace boost { namespace fusion {
+
+ struct std_pair_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<std_pair_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef std_pair_iterator<Sequence, 0> type;
+
+ static type
+ call(Sequence& v)
+ {
+ return type(v);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_CATEGORY_OF_IMPL_24122005_1731)
+#define BOOST_FUSION_CATEGORY_OF_IMPL_24122005_1731
+
+#include <boost/config/no_tr1/utility.hpp>
+
+namespace boost { namespace fusion {
+
+ struct std_pair_tag;
+ struct random_access_traversal_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct category_of_impl;
+
+ template<>
+ struct category_of_impl<std_pair_tag>
+ {
+ template<typename T>
+ struct apply
+ {
+ typedef random_access_traversal_tag type;
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_END_IMPL_24122005_1755)
+#define BOOST_FUSION_END_IMPL_24122005_1755
+
+#include <boost/fusion/adapted/std_pair/std_pair_iterator.hpp>
+
+namespace boost { namespace fusion {
+
+ struct std_pair_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<std_pair_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef std_pair_iterator<Sequence, 2> type;
+
+ static type
+ call(Sequence& v)
+ {
+ return type(v);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_IS_SEQUENCE_IMPL_27122005_1651)
+#define BOOST_FUSION_IS_SEQUENCE_IMPL_27122005_1651
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion {
+
+ struct std_pair_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_sequence_impl;
+
+ template<>
+ struct is_sequence_impl<std_pair_tag>
+ {
+ template<typename Sequence>
+ struct apply : mpl::true_ {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_IS_VIEW_IMPL_27042006_2219)
+#define BOOST_FUSION_IS_VIEW_IMPL_27042006_2219
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct std_pair_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_view_impl;
+
+ template<>
+ struct is_view_impl<std_pair_tag>
+ {
+ template<typename T>
+ struct apply : mpl::false_
+ {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_SIZE_IMPL_24122005_1759)
+#define BOOST_FUSION_SIZE_IMPL_24122005_1759
+
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace fusion {
+
+ struct std_pair_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct size_impl;
+
+ template <>
+ struct size_impl<std_pair_tag>
+ {
+ template <typename Sequence>
+ struct apply : mpl::int_<2> {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_VALUE_AT_IMPL_24122005_1917)
+#define BOOST_FUSION_VALUE_AT_IMPL_24122005_1917
+
+#include <boost/mpl/if.hpp>
+#include <boost/static_assert.hpp>
+
+namespace boost { namespace fusion {
+
+ struct std_pair_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct value_at_impl;
+
+ template <>
+ struct value_at_impl<std_pair_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply
+ {
+ static int const n_value = N::value;
+ BOOST_STATIC_ASSERT((n_value >= 0 && n_value < 2));
+ typedef typename
+ mpl::if_c<
+ (n_value == 0)
+ , typename Sequence::first_type
+ , typename Sequence::second_type
+ >::type
+ type;
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_STD_PAIR_ITERATOR_09262005_0934)
+#define FUSION_STD_PAIR_ITERATOR_09262005_0934
+
+#include <boost/fusion/iterator/iterator_facade.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/minus.hpp>
+#include <boost/config/no_tr1/utility.hpp>
+
+namespace boost { namespace fusion
+{
+ struct random_access_traversal_tag;
+
+ template <typename Pair_, int N_>
+ struct std_pair_iterator
+ : iterator_facade<std_pair_iterator<Pair_, N_>, random_access_traversal_tag>
+ {
+ BOOST_MPL_ASSERT_RELATION(N_, >=, 0);
+ BOOST_MPL_ASSERT_RELATION(N_, <=, 2);
+
+ typedef mpl::int_<N_> index;
+ typedef Pair_ pair_type;
+
+ std_pair_iterator(Pair_& pair)
+ : pair(pair) {}
+ Pair_& pair;
+
+ template <typename Iterator>
+ struct value_of;
+
+ template <typename Pair>
+ struct value_of<std_pair_iterator<Pair, 0> >
+ : mpl::identity<typename Pair::first_type> {};
+
+ template <typename Pair>
+ struct value_of<std_pair_iterator<Pair, 1> >
+ : mpl::identity<typename Pair::second_type> {};
+
+ template <typename Iterator>
+ struct deref;
+
+ template <typename Pair>
+ struct deref<std_pair_iterator<Pair, 0> >
+ {
+ typedef typename
+ mpl::if_<
+ is_const<Pair>
+ , typename Pair::first_type const&
+ , typename Pair::first_type&
+ >::type
+ type;
+
+ static type
+ call(std_pair_iterator<Pair, 0> const& iter)
+ {
+ return iter.pair.first;
+ }
+ };
+
+ template <typename Pair>
+ struct deref<std_pair_iterator<Pair, 1> >
+ {
+ typedef typename
+ mpl::if_<
+ is_const<Pair>
+ , typename Pair::second_type const&
+ , typename Pair::second_type&
+ >::type
+ type;
+
+ static type
+ call(std_pair_iterator<Pair, 1> const& iter)
+ {
+ return iter.pair.second;
+ }
+ };
+
+ template <typename Iterator, typename N>
+ struct advance
+ {
+ typedef typename Iterator::index index;
+ typedef typename Iterator::pair_type pair_type;
+ typedef std_pair_iterator<pair_type, index::value + N::value> type;
+
+ static type
+ call(Iterator const& iter)
+ {
+ return type(iter.pair);
+ }
+ };
+
+ template <typename Iterator>
+ struct next : advance<Iterator, mpl::int_<1> > {};
+
+ template <typename Iterator>
+ struct prior : advance<Iterator, mpl::int_<-1> > {};
+
+ template <typename I1, typename I2>
+ struct distance : mpl::minus<typename I2::index, typename I1::index>
+ {
+ typedef typename
+ mpl::minus<
+ typename I2::index, typename I1::index
+ >::type
+ type;
+
+ static type
+ call(I1 const&, I2 const&)
+ {
+ return type();
+ }
+ };
+ };
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_TAG_OF_24122005_1722)
+#define BOOST_FUSION_TAG_OF_24122005_1722
+
+#include <boost/fusion/support/tag_of_fwd.hpp>
+
+#include <boost/config/no_tr1/utility.hpp>
+
+namespace boost { namespace fusion {
+
+ struct std_pair_tag;
+
+ namespace traits
+ {
+ template<typename T1, typename T2>
+ struct tag_of<std::pair<T1, T2> >
+ {
+ typedef std_pair_tag type;
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_STRUCT_24122005_1744)
+#define BOOST_FUSION_STRUCT_24122005_1744
+
+#include <boost/fusion/adapted/struct/extension.hpp>
+#include <boost/fusion/adapted/struct/adapt_struct.hpp>
+#include <boost/fusion/adapted/struct/adapt_assoc_struct.hpp>
+#include <boost/fusion/adapted/struct/struct_iterator.hpp>
+
+#include <boost/fusion/adapted/struct/detail/at_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/at_key_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/begin_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/category_of_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/end_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/has_key_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/is_view_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/size_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/value_at_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/value_at_key_impl.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ Distributed under the 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_FUSION_ADAPT_ASSOC_STRUCT_20070508_2207)
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_20070508_2207
+
+#include <boost/fusion/support/tag_of_fwd.hpp>
+#include <boost/fusion/adapted/struct/extension.hpp>
+#include <boost/fusion/adapted/struct/struct_iterator.hpp>
+#include <boost/fusion/adapted/struct/detail/is_view_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/category_of_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/begin_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/end_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/size_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/at_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/value_at_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/has_key_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/at_key_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/value_at_key_impl.hpp>
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/punctuation/comma_if.hpp>
+#include <boost/preprocessor/seq/for_each_i.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/config/no_tr1/utility.hpp>
+
+namespace boost { namespace fusion { namespace extension {
+ template<typename Struct, typename Key>
+ struct struct_assoc_member;
+}}}
+
+
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT(name, bseq) \
+ BOOST_FUSION_ADAPT_ASSOC_STRUCT_I( \
+ name, BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_STRUCT_X bseq, 0)) \
+ /***/
+
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_X(x, y, z) ((x, y, z)) BOOST_FUSION_ADAPT_ASSOC_STRUCT_Y
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_Y(x, y, z) ((x, y, z)) BOOST_FUSION_ADAPT_ASSOC_STRUCT_X
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_X0
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_Y0
+
+// BOOST_FUSION_ADAPT_ASSOC_STRUCT_I generates the overarching structure and uses
+// SEQ_FOR_EACH_I to generate the "linear" substructures.
+// Thanks to Paul Mensonides for the PP macro help
+
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_I(name, seq) \
+ namespace boost { namespace fusion { namespace traits \
+ { \
+ template <> \
+ struct tag_of<name> \
+ { \
+ typedef struct_tag type; \
+ }; \
+ }}} \
+ namespace boost { namespace fusion { namespace extension \
+ { \
+ template <> \
+ struct struct_size<name> : mpl::int_<BOOST_PP_SEQ_SIZE(seq)> {}; \
+ BOOST_PP_SEQ_FOR_EACH_I(BOOST_FUSION_ADAPT_ASSOC_STRUCT_C, name, seq) \
+ }}} \
+ /***/
+
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_C(r, name, i, xy) \
+ template <> \
+ struct struct_member<name, i> \
+ { \
+ typedef BOOST_PP_TUPLE_ELEM(3, 0, xy) type; \
+ static type& call(name& struct_) \
+ { \
+ return struct_.BOOST_PP_TUPLE_ELEM(3, 1, xy); \
+ }; \
+ }; \
+ template<> \
+ struct struct_assoc_member<name, BOOST_PP_TUPLE_ELEM(3, 2, xy)> \
+ { \
+ typedef BOOST_PP_TUPLE_ELEM(3, 0, xy) type; \
+ static type& call(name& struct_) \
+ { \
+ return struct_.BOOST_PP_TUPLE_ELEM(3, 1, xy); \
+ }; \
+ };
+ /***/
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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_FUSION_ADAPT_STRUCT_APRIL_2_2007_1158AM)
+#define BOOST_FUSION_ADAPT_STRUCT_APRIL_2_2007_1158AM
+
+#include <boost/fusion/support/tag_of_fwd.hpp>
+#include <boost/fusion/adapted/struct/extension.hpp>
+#include <boost/fusion/adapted/struct/struct_iterator.hpp>
+#include <boost/fusion/adapted/struct/detail/is_view_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/category_of_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/begin_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/end_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/size_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/at_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/value_at_impl.hpp>
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/punctuation/comma_if.hpp>
+#include <boost/preprocessor/seq/for_each_i.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/config/no_tr1/utility.hpp>
+
+#define BOOST_FUSION_ADAPT_STRUCT(name, bseq) \
+ BOOST_FUSION_ADAPT_STRUCT_I( \
+ name, BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_X bseq, 0)) \
+ /***/
+
+#define BOOST_FUSION_ADAPT_STRUCT_X(x, y) ((x, y)) BOOST_FUSION_ADAPT_STRUCT_Y
+#define BOOST_FUSION_ADAPT_STRUCT_Y(x, y) ((x, y)) BOOST_FUSION_ADAPT_STRUCT_X
+#define BOOST_FUSION_ADAPT_STRUCT_X0
+#define BOOST_FUSION_ADAPT_STRUCT_Y0
+
+// BOOST_FUSION_ADAPT_STRUCT_I generates the overarching structure and uses
+// SEQ_FOR_EACH_I to generate the "linear" substructures.
+// Thanks to Paul Mensonides for the PP macro help
+
+#define BOOST_FUSION_ADAPT_STRUCT_I(name, seq) \
+ namespace boost { namespace fusion { namespace traits \
+ { \
+ template <> \
+ struct tag_of<name> \
+ { \
+ typedef struct_tag type; \
+ }; \
+ }}} \
+ namespace boost { namespace fusion { namespace extension \
+ { \
+ template <> \
+ struct struct_size<name> : mpl::int_<BOOST_PP_SEQ_SIZE(seq)> {}; \
+ BOOST_PP_SEQ_FOR_EACH_I(BOOST_FUSION_ADAPT_STRUCT_C, name, seq) \
+ }}} \
+ /***/
+
+#define BOOST_FUSION_ADAPT_STRUCT_C(r, name, i, xy) \
+ template <> \
+ struct struct_member<name, i> \
+ { \
+ typedef BOOST_PP_TUPLE_ELEM(2, 0, xy) type; \
+ static type& call(name& struct_) \
+ { \
+ return struct_.BOOST_PP_TUPLE_ELEM(2, 1, xy); \
+ }; \
+ }; \
+ /***/
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_AT_IMPL_24122005_1807)
+#define BOOST_FUSION_AT_IMPL_24122005_1807
+
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace fusion
+{
+ struct struct_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct at_impl;
+
+ template <typename Struct, int N>
+ struct struct_member;
+
+ template <typename Struct>
+ struct struct_size;
+
+ template <>
+ struct at_impl<struct_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply
+ {
+ static int const n_value = N::value;
+ BOOST_MPL_ASSERT_RELATION(
+ n_value, <=, extension::struct_size<Sequence>::value);
+
+ typedef typename
+ extension::struct_member<Sequence, N::value>
+ element;
+
+ typedef typename
+ mpl::eval_if<
+ is_const<Sequence>
+ , detail::cref_result<element>
+ , detail::ref_result<element>
+ >::type
+ type;
+
+ static type
+ call(Sequence& seq)
+ {
+ return extension::
+ struct_member<Sequence, N::value>::call(seq);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+ Copyright (c) 2005-2007 Dan Marsden
+
+ Distributed under the 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_FUSION_AT_KEY_IMPL_20070508_2248)
+#define BOOST_FUSION_AT_KEY_IMPL_20070508_2248
+
+#include <boost/fusion/support/detail/access.hpp>
+
+namespace boost { namespace fusion
+{
+ struct struct_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct at_key_impl;
+
+ template <typename Struct, typename Key>
+ struct struct_assoc_member;
+
+ template <>
+ struct at_key_impl<struct_tag>
+ {
+ template <typename Sequence, typename Key>
+ struct apply
+ {
+ typedef typename
+ extension::struct_assoc_member<Sequence, Key>
+ element;
+
+ typedef typename
+ mpl::eval_if<
+ is_const<Sequence>
+ , detail::cref_result<element>
+ , detail::ref_result<element>
+ >::type
+ type;
+
+ static type
+ call(Sequence& seq)
+ {
+ return extension::
+ struct_assoc_member<Sequence, Key>::call(seq);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_BEGIN_IMPL_24122005_1752)
+#define BOOST_FUSION_BEGIN_IMPL_24122005_1752
+
+#include <boost/fusion/adapted/struct/struct_iterator.hpp>
+
+namespace boost { namespace fusion
+{
+ struct struct_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<struct_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef struct_iterator<Sequence, 0> type;
+
+ static type
+ call(Sequence& v)
+ {
+ return type(v);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_CATEGORY_OF_IMPL_24122005_1731)
+#define BOOST_FUSION_CATEGORY_OF_IMPL_24122005_1731
+
+#include <boost/config/no_tr1/utility.hpp>
+
+namespace boost { namespace fusion
+{
+ struct struct_tag;
+ struct random_access_traversal_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct category_of_impl;
+
+ template<>
+ struct category_of_impl<struct_tag>
+ {
+ template<typename T>
+ struct apply
+ {
+ typedef random_access_traversal_tag type;
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_END_IMPL_24122005_1755)
+#define BOOST_FUSION_END_IMPL_24122005_1755
+
+#include <boost/fusion/adapted/struct/struct_iterator.hpp>
+
+namespace boost { namespace fusion
+{
+ struct struct_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+
+ template <typename Struct>
+ struct struct_size;
+
+ template <>
+ struct end_impl<struct_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef
+ struct_iterator<
+ Sequence
+ , struct_size<Sequence>::value
+ >
+ type;
+
+ static type
+ call(Sequence& v)
+ {
+ return type(v);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+ Copyright (c) 2005-2007 Dan Marsden
+
+ Distributed under the 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_FUSION_HAS_KEY_IMPL_20070508_2231)
+#define BOOST_FUSION_HAS_KEY_IMPL_20070508_2231
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/mpl/not.hpp>
+
+namespace boost { namespace fusion {
+
+ struct struct_tag;
+
+ namespace extension
+ {
+ struct no_such_member;
+
+ template<typename T>
+ struct has_key_impl;
+
+ template<typename Struct, typename Key>
+ struct struct_assoc_member;
+
+ template<>
+ struct has_key_impl<struct_tag>
+ {
+ template<typename Sequence, typename Key>
+ struct apply
+ : mpl::not_<is_same<no_such_member, typename struct_assoc_member<Sequence, Key>::type> >
+ {
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_IS_SEQUENCE_IMPL_27122005_1651)
+#define BOOST_FUSION_IS_SEQUENCE_IMPL_27122005_1651
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct struct_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_sequence_impl;
+
+ template<>
+ struct is_sequence_impl<struct_tag>
+ {
+ template<typename Sequence>
+ struct apply : mpl::true_ {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_IS_VIEW_IMPL_27042006_2219)
+#define BOOST_FUSION_IS_VIEW_IMPL_27042006_2219
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct struct_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_view_impl;
+
+ template<>
+ struct is_view_impl<struct_tag>
+ {
+ template<typename T>
+ struct apply : mpl::false_
+ {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_SIZE_IMPL_24122005_1759)
+#define BOOST_FUSION_SIZE_IMPL_24122005_1759
+
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace extension
+ {
+ template <typename Struct>
+ struct struct_size;
+ }
+
+ struct struct_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct size_impl;
+
+ template <>
+ struct size_impl<struct_tag>
+ {
+ template <typename Sequence>
+ struct apply : extension::struct_size<Sequence> {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_VALUE_AT_IMPL_24122005_1917)
+#define BOOST_FUSION_VALUE_AT_IMPL_24122005_1917
+
+#include <boost/mpl/if.hpp>
+#include <boost/static_assert.hpp>
+
+namespace boost { namespace fusion
+{
+ struct struct_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct value_at_impl;
+
+ template <typename Struct, int N>
+ struct struct_member;
+
+ template <typename Struct>
+ struct struct_size;
+
+ template <>
+ struct value_at_impl<struct_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply
+ {
+ static int const n_value = N::value;
+ BOOST_MPL_ASSERT_RELATION(
+ n_value, <=, extension::struct_size<Sequence>::value);
+
+ typedef typename
+ extension::struct_member<Sequence, N::value>::type
+ type;
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+ Copyright (c) 2005-2007 Dan Marsden
+
+ Distributed under the 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_FUSION_VALUE_AT_KEY_IMPL_20070508_2300)
+#define BOOST_FUSION_VALUE_AT_KEY_IMPL_20070508_2300
+
+#include <boost/mpl/if.hpp>
+
+namespace boost { namespace fusion
+{
+ struct struct_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct value_at_key_impl;
+
+ template <typename Struct, typename Key>
+ struct struct_assoc_member;
+
+ template <>
+ struct value_at_key_impl<struct_tag>
+ {
+ template <typename Sequence, typename Key>
+ struct apply
+ {
+ typedef typename
+ extension::struct_assoc_member<Sequence, Key>::type
+ type;
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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(FUSION_STRUCT_EXTENSION_APRIL_2_2007_1008AM)
+#define FUSION_STRUCT_EXTENSION_APRIL_2_2007_1008AM
+
+#include <boost/type_traits/add_const.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Struct, int N>
+ struct struct_member;
+
+ template <typename Struct>
+ struct struct_size;
+
+ template <typename Struct, int N>
+ struct struct_member<Struct const, N>
+ {
+ typedef typename
+ add_const<typename struct_member<Struct, N>::type>::type
+ type;
+
+ static type&
+ call(Struct const& struct_)
+ {
+ return struct_member<Struct, N>::call(
+ const_cast<Struct&>(struct_));
+ }
+ };
+
+ template <typename Struct>
+ struct struct_size<Struct const>
+ : struct_size<Struct>
+ {};
+
+ struct no_such_member;
+
+ template<typename Struct, typename Key>
+ struct struct_assoc_member
+ {
+ typedef no_such_member type;
+ };
+
+ template<typename Struct, typename Key>
+ struct struct_assoc_member<Struct const, Key>
+ {
+ typedef typename
+ add_const<typename struct_assoc_member<Struct, Key>::type>::type
+ type;
+
+ static type&
+ call(Struct const& struct_)
+ {
+ return struct_assoc_member<Struct, Key>::call(
+ const_cast<Struct&>(struct_));
+ }
+ };
+
+}}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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(FUSION_STRUCT_ITERATOR_APRIL_2_2007_1008AM)
+#define FUSION_STRUCT_ITERATOR_APRIL_2_2007_1008AM
+
+#include <boost/fusion/iterator/iterator_facade.hpp>
+#include <boost/fusion/adapted/struct/extension.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/minus.hpp>
+#include <boost/config/no_tr1/utility.hpp>
+
+namespace boost { namespace fusion
+{
+ struct random_access_traversal_tag;
+
+ template <typename Struct, int N_>
+ struct struct_iterator
+ : iterator_facade<struct_iterator<Struct, N_>, random_access_traversal_tag>
+ {
+ BOOST_MPL_ASSERT_RELATION(N_, >=, 0);
+ BOOST_MPL_ASSERT_RELATION(N_, <=, extension::struct_size<Struct>::value);
+
+ typedef mpl::int_<N_> index;
+ typedef Struct struct_type;
+
+ struct_iterator(Struct& struct_)
+ : struct_(struct_) {}
+ Struct& struct_;
+
+ template <typename Iterator>
+ struct value_of
+ : extension::struct_member<Struct, N_>
+ {
+ };
+
+ template <typename Iterator>
+ struct deref
+ {
+ typedef typename
+ add_reference<
+ typename extension::struct_member<Struct, N_>::type
+ >::type
+ type;
+
+ static type
+ call(Iterator const& iter)
+ {
+ return extension::struct_member<Struct, N_>::
+ call(iter.struct_);
+ }
+ };
+
+ template <typename Iterator, typename N>
+ struct advance
+ {
+ typedef typename Iterator::index index;
+ typedef typename Iterator::struct_type struct_type;
+ typedef struct_iterator<struct_type, index::value + N::value> type;
+
+ static type
+ call(Iterator const& iter)
+ {
+ return type(iter.struct_);
+ }
+ };
+
+ template <typename Iterator>
+ struct next : advance<Iterator, mpl::int_<1> > {};
+
+ template <typename Iterator>
+ struct prior : advance<Iterator, mpl::int_<-1> > {};
+
+ template <typename I1, typename I2>
+ struct distance : mpl::minus<typename I2::index, typename I1::index>
+ {
+ typedef typename
+ mpl::minus<
+ typename I2::index, typename I1::index
+ >::type
+ type;
+
+ static type
+ call(I1 const&, I2 const&)
+ {
+ return type();
+ }
+ };
+ };
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ALGORITHM_10022005_0549)
+#define FUSION_ALGORITHM_10022005_0549
+
+#include <boost/fusion/algorithm/iteration.hpp>
+#include <boost/fusion/algorithm/query.hpp>
+#include <boost/fusion/algorithm/transformation.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ALGORITHM_ITERATION_10022005_0549)
+#define FUSION_ALGORITHM_ITERATION_10022005_0549
+
+#include <boost/fusion/algorithm/iteration/accumulate.hpp>
+#include <boost/fusion/algorithm/iteration/fold.hpp>
+#include <boost/fusion/algorithm/iteration/for_each.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ACCUMULATE_09172005_1032)
+#define FUSION_ACCUMULATE_09172005_1032
+
+#include <boost/fusion/algorithm/iteration/fold.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+
+ namespace result_of
+ {
+ template <typename Sequence, typename State, typename F>
+ struct accumulate
+ : result_of::fold<Sequence, State, F>
+ {};
+ }
+
+ template <typename Sequence, typename State, typename F>
+ inline typename result_of::accumulate<Sequence, State, F>::type
+ accumulate(Sequence& seq, State const& state, F f)
+ {
+ return fusion::fold(seq, state, f);
+ }
+
+ template <typename Sequence, typename State, typename F>
+ inline typename result_of::accumulate<Sequence const, State, F>::type
+ accumulate(Sequence const& seq, State const& state, F f)
+ {
+ return fusion::fold(seq, state, f);
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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_FUSION_FOLD_HPP_20070528_1253)
+#define BOOST_FUSION_FOLD_HPP_20070528_1253
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/distance.hpp>
+#include <boost/utility/result_of.hpp>
+
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_reference.hpp>
+
+namespace boost { namespace fusion {
+namespace result_of
+{
+ template <typename Sequence, typename State, typename F>
+ struct fold;
+}
+namespace detail
+{
+ template <typename F>
+ struct apply_fold_result
+ {
+ template <typename Value, typename State>
+ struct apply
+ : boost::result_of<F(Value,State)>
+ {};
+ };
+
+ template <typename Iterator, typename State, typename F>
+ struct fold_apply
+ {
+ typedef typename result_of::deref<Iterator>::type dereferenced;
+ typedef typename add_reference<typename add_const<State>::type>::type lvalue_state;
+ typedef typename boost::result_of<F(dereferenced, lvalue_state)>::type type;
+ };
+
+ template <typename First, typename Last, typename State, typename F>
+ struct static_fold;
+
+ template <typename First, typename Last, typename State, typename F>
+ struct next_result_of_fold
+ {
+ typedef typename
+ static_fold<
+ typename result_of::next<First>::type
+ , Last
+ , typename fold_apply<First, State, F>::type
+ , F
+ >::type
+ type;
+ };
+
+ template <typename First, typename Last, typename State, typename F>
+ struct static_fold
+ {
+ typedef typename
+ mpl::if_<
+ result_of::equal_to<First, Last>
+ , mpl::identity<State>
+ , next_result_of_fold<First, Last, State, F>
+ >::type
+ result;
+
+ typedef typename result::type type;
+ };
+
+ template<typename I0, typename State, typename F, int N>
+ struct result_of_unrolled_fold;
+
+ template<int N>
+ struct unrolled_fold
+ {
+ template<typename I0, typename State, typename F>
+ static typename result_of_unrolled_fold<I0, State, F, N>::type
+ call(I0 const& i0, State const& state, F f)
+ {
+ typedef typename result_of::next<I0>::type I1;
+ I1 i1 = fusion::next(i0);
+ typedef typename result_of::next<I1>::type I2;
+ I2 i2 = fusion::next(i1);
+ typedef typename result_of::next<I2>::type I3;
+ I3 i3 = fusion::next(i2);
+ typedef typename result_of::next<I3>::type I4;
+ I4 i4 = fusion::next(i3);
+
+ return unrolled_fold<N-4>::call(i4, f(*i3, f(*i2, f(*i1, f(*i0, state)))), f);
+ }
+ };
+
+ template<>
+ struct unrolled_fold<3>
+ {
+ template<typename I0, typename State, typename F>
+ static typename result_of_unrolled_fold<I0, State, F, 3>::type
+ call(I0 const& i0, State const& state, F f)
+ {
+ typedef typename result_of::next<I0>::type I1;
+ I1 i1 = fusion::next(i0);
+ typedef typename result_of::next<I1>::type I2;
+ I2 i2 = fusion::next(i1);
+ return f(*i2, f(*i1, f(*i0, state)));
+ }
+ };
+
+ template<>
+ struct unrolled_fold<2>
+ {
+ template<typename I0, typename State, typename F>
+ static typename result_of_unrolled_fold<I0, State, F, 2>::type
+ call(I0 const& i0, State const& state, F f)
+ {
+ typedef typename result_of::next<I0>::type I1;
+ I1 i1 = fusion::next(i0);
+ return f(*i1, f(*i0, state));
+ }
+ };
+
+ template<>
+ struct unrolled_fold<1>
+ {
+ template<typename I0, typename State, typename F>
+ static typename result_of_unrolled_fold<I0, State, F, 1>::type
+ call(I0 const& i0, State const& state, F f)
+ {
+ return f(*i0, state);
+ }
+ };
+
+ template<>
+ struct unrolled_fold<0>
+ {
+ template<typename I0, typename State, typename F>
+ static State call(I0 const&, State const& state, F)
+ {
+ return state;
+ }
+ };
+
+ // terminal case
+ template <typename First, typename Last, typename State, typename F>
+ inline State const&
+ linear_fold(First const&, Last const&, State const& state, F, mpl::true_)
+ {
+ return state;
+ }
+
+ // non-terminal case
+ template <typename First, typename Last, typename State, typename F>
+ inline typename static_fold<First, Last, State, F>::type
+ linear_fold(
+ First const& first
+ , Last const& last
+ , State const& state
+ , F f
+ , mpl::false_)
+ {
+ return detail::linear_fold(
+ fusion::next(first)
+ , last
+ , f(*first, state)
+ , f
+ , result_of::equal_to<typename result_of::next<First>::type, Last>()
+ );
+ }
+
+ template<typename I0, typename State, typename F, int N>
+ struct result_of_unrolled_fold
+ {
+ typedef typename result_of::next<I0>::type I1;
+ typedef typename result_of::next<I1>::type I2;
+ typedef typename result_of::next<I2>::type I3;
+ typedef typename result_of::next<I3>::type I4;
+ typedef typename fold_apply<I0, State, F>::type Rest1;
+ typedef typename fold_apply<I1, Rest1, F>::type Rest2;
+ typedef typename fold_apply<I2, Rest2, F>::type Rest3;
+ typedef typename fold_apply<I3, Rest3, F>::type Rest4;
+
+ typedef typename result_of_unrolled_fold<I4, Rest4, F, N-4>::type type;
+ };
+
+ template<typename I0, typename State, typename F>
+ struct result_of_unrolled_fold<I0, State, F, 3>
+ {
+ typedef typename result_of::next<I0>::type I1;
+ typedef typename result_of::next<I1>::type I2;
+ typedef typename fold_apply<I0, State, F>::type Rest;
+ typedef typename fold_apply<I1, Rest, F>::type Rest2;
+ typedef typename fold_apply<I2, Rest2, F>::type type;
+ };
+
+ template<typename I0, typename State, typename F>
+ struct result_of_unrolled_fold<I0, State, F, 2>
+ {
+ typedef typename result_of::next<I0>::type I1;
+ typedef typename fold_apply<I0, State, F>::type Rest;
+ typedef typename fold_apply<I1, Rest, F>::type type;
+ };
+
+ template<typename I0, typename State, typename F>
+ struct result_of_unrolled_fold<I0, State, F, 1>
+ {
+ typedef typename fold_apply<I0, State, F>::type type;
+ };
+
+ template<typename I0, typename State, typename F>
+ struct result_of_unrolled_fold<I0, State, F, 0>
+ {
+ typedef State type;
+ };
+
+ template<typename Sequence, typename State, typename F, bool>
+ struct choose_fold;
+
+ template<typename Sequence, typename State, typename F>
+ struct choose_fold<Sequence, State, F, true>
+ {
+ typedef typename result_of::begin<Sequence>::type begin;
+ typedef typename result_of::end<Sequence>::type end;
+ typedef typename result_of_unrolled_fold<
+ begin, State, F, result_of::distance<begin, end>::type::value>::type type;
+ };
+
+ template<typename Sequence, typename State, typename F>
+ struct choose_fold<Sequence, State, F, false>
+ {
+ typedef typename
+ detail::static_fold<
+ typename result_of::begin<Sequence>::type
+ , typename result_of::end<Sequence>::type
+ , State
+ , F
+ >::type
+ type;
+ };
+
+ template<typename Sequence, typename State, typename F, typename Tag>
+ typename result_of::fold<Sequence, State, F>::type
+ fold(Sequence& seq, State const& state, F f, Tag)
+ {
+ return linear_fold(
+ fusion::begin(seq)
+ , fusion::end(seq)
+ , state
+ , f
+ , result_of::equal_to<
+ typename result_of::begin<Sequence>::type
+ , typename result_of::end<Sequence>::type>()
+ );
+ }
+
+ template<typename Sequence, typename State, typename F>
+ typename result_of::fold<Sequence, State, F>::type
+ fold(Sequence& seq, State const& state, F f, random_access_traversal_tag)
+ {
+ typedef typename result_of::begin<Sequence>::type begin;
+ typedef typename result_of::end<Sequence>::type end;
+ return unrolled_fold<result_of::distance<begin, end>::type::value>::call(
+ fusion::begin(seq)
+ , state
+ , f);
+ }
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_FOR_EACH_05052005_1028)
+#define FUSION_FOR_EACH_05052005_1028
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/distance.hpp>
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion {
+namespace detail
+{
+ template <typename First, typename Last, typename F>
+ inline void
+ for_each_linear(First const&, Last const&, F const&, mpl::true_)
+ {
+ }
+
+ template <typename First, typename Last, typename F>
+ inline void
+ for_each_linear(First const& first, Last const& last, F const& f, mpl::false_)
+ {
+ f(*first);
+ detail::for_each_linear(fusion::next(first), last, f,
+ result_of::equal_to<typename result_of::next<First>::type, Last>());
+ }
+
+
+ template <typename Sequence, typename F, typename Tag>
+ inline void
+ for_each(Sequence& seq, F const& f, Tag)
+ {
+ detail::for_each_linear(
+ fusion::begin(seq)
+ , fusion::end(seq)
+ , f
+ , result_of::equal_to<
+ typename result_of::begin<Sequence>::type
+ , typename result_of::end<Sequence>::type>());
+ }
+
+ template<int N>
+ struct for_each_unrolled
+ {
+ template<typename I0, typename F>
+ static void call(I0 const& i0, F const& f)
+ {
+ f(*i0);
+ typedef typename result_of::next<I0>::type I1;
+ I1 i1(fusion::next(i0));
+ f(*i1);
+ typedef typename result_of::next<I1>::type I2;
+ I2 i2(fusion::next(i1));
+ f(*i2);
+ typedef typename result_of::next<I2>::type I3;
+ I3 i3(fusion::next(i2));
+ f(*i3);
+ for_each_unrolled<N-4>::call(fusion::next(i3), f);
+ }
+ };
+
+ template<>
+ struct for_each_unrolled<3>
+ {
+ template<typename I0, typename F>
+ static void call(I0 const& i0, F const& f)
+ {
+ f(*i0);
+ typedef typename result_of::next<I0>::type I1;
+ I1 i1(fusion::next(i0));
+ f(*i1);
+ typedef typename result_of::next<I1>::type I2;
+ I2 i2(fusion::next(i1));
+ f(*i2);
+ }
+ };
+
+ template<>
+ struct for_each_unrolled<2>
+ {
+ template<typename I0, typename F>
+ static void call(I0 const& i0, F const& f)
+ {
+ f(*i0);
+ typedef typename result_of::next<I0>::type I1;
+ I1 i1(fusion::next(i0));
+ f(*i1);
+ }
+ };
+
+ template<>
+ struct for_each_unrolled<1>
+ {
+ template<typename I0, typename F>
+ static void call(I0 const& i0, F const& f)
+ {
+ f(*i0);
+ }
+ };
+
+ template<>
+ struct for_each_unrolled<0>
+ {
+ template<typename It, typename F>
+ static void call(It const&, F const&)
+ {
+ }
+ };
+
+ template <typename Sequence, typename F>
+ inline void
+ for_each(Sequence& seq, F const& f, random_access_traversal_tag)
+ {
+ typedef typename result_of::begin<Sequence>::type begin;
+ typedef typename result_of::end<Sequence>::type end;
+ for_each_unrolled<result_of::distance<begin, end>::type::value>::call(fusion::begin(seq), f);
+ }
+}}}
+
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006 Eric Niebler
+
+ Distributed under the 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(FUSION_FOR_EACH_S_05022006_1027)
+#define FUSION_FOR_EACH_S_05022006_1027
+
+#include <boost/mpl/assert.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/fusion/algorithm/iteration/for_each.hpp>
+#include <boost/fusion/sequence/intrinsic/ext_/segments.hpp>
+#include <boost/fusion/support/ext_/is_segmented.hpp>
+
+// fwd declarations
+namespace boost { namespace fusion
+{
+ template <typename Sequence, typename F>
+ void
+ for_each_s(Sequence& seq, F const& f);
+
+ template <typename Sequence, typename F>
+ void
+ for_each_s(Sequence const& seq, F const& f);
+}}
+
+namespace boost { namespace fusion { namespace detail
+{
+ template<typename F>
+ struct for_each_s_bind
+ {
+ explicit for_each_s_bind(F const &f)
+ : f_(f)
+ {}
+
+ template<typename Sequence>
+ void operator ()(Sequence &seq) const
+ {
+ fusion::for_each_s(seq, this->f_);
+ }
+
+ template<typename Sequence>
+ void operator ()(Sequence const &seq) const
+ {
+ fusion::for_each_s(seq, this->f_);
+ }
+ private:
+ F const &f_;
+ };
+
+ template<typename Sequence, typename F>
+ void for_each_s(Sequence &seq, F const &f, mpl::true_)
+ {
+ fusion::for_each_s(fusion::segments(seq), for_each_s_bind<F>(f));
+ }
+
+ template<typename Sequence, typename F>
+ void for_each_s(Sequence &seq, F const &f, mpl::false_)
+ {
+ fusion::for_each(seq, f);
+ }
+}}}
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename F>
+ struct for_each_s
+ {
+ typedef void type;
+ };
+ }
+
+ template <typename Sequence, typename F>
+ inline void
+ for_each_s(Sequence& seq, F const& f)
+ {
+ detail::for_each_s(seq, f, traits::is_segmented<Sequence>());
+ }
+
+ template <typename Sequence, typename F>
+ inline void
+ for_each_s(Sequence const& seq, F const& f)
+ {
+ detail::for_each_s(seq, f, traits::is_segmented<Sequence>());
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ Distributed under the 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_FUSION_FOLD_05052005_1214)
+#define BOOST_FUSION_FOLD_05052005_1214
+
+#include <boost/fusion/algorithm/iteration/detail/fold.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/support/category_of.hpp>
+
+#include <boost/type_traits/is_base_of.hpp>
+#include <boost/static_assert.hpp>
+
+namespace boost { namespace fusion {
+
+ struct random_access_traversal_tag;
+
+ namespace result_of
+ {
+ template <typename Sequence, typename State, typename F>
+ struct fold
+ : fusion::detail::choose_fold<
+ Sequence, State, F
+ , is_base_of<random_access_traversal_tag, typename traits::category_of<Sequence>::type>::value>
+ {};
+ }
+
+ template <typename Sequence, typename State, typename F>
+ inline typename result_of::fold<Sequence, State, F>::type
+ fold(Sequence& seq, State const& state, F f)
+ {
+ return detail::fold(seq, state, f, typename traits::category_of<Sequence>::type());
+ }
+
+ template <typename Sequence, typename State, typename F>
+ inline typename result_of::fold<Sequence const, State, F>::type
+ fold(Sequence const& seq, State const& state, F f)
+ {
+ return detail::fold(seq, state, f, typename traits::category_of<Sequence>::type());
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ Distributed under the 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_FUSION_FOR_EACH_20070527_0943)
+#define BOOST_FUSION_FOR_EACH_20070527_0943
+
+#include <boost/fusion/algorithm/iteration/detail/for_each.hpp>
+
+#include <boost/fusion/support/category_of.hpp>
+
+namespace boost { namespace fusion {
+
+ namespace result_of
+ {
+ template <typename Sequence, typename F>
+ struct for_each
+ {
+ typedef void type;
+ };
+ }
+
+ struct random_access_traversal_tag;
+
+ template <typename Sequence, typename F>
+ inline void
+ for_each(Sequence& seq, F const& f)
+ {
+ detail::for_each(seq, f, typename traits::category_of<Sequence>::type());
+ }
+
+ template <typename Sequence, typename F>
+ inline void
+ for_each(Sequence const& seq, F const& f)
+ {
+ detail::for_each(seq, f, typename traits::category_of<Sequence>::type());
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ALGORITHM_QUERY_10022005_0549)
+#define FUSION_ALGORITHM_QUERY_10022005_0549
+
+#include <boost/fusion/algorithm/query/all.hpp>
+#include <boost/fusion/algorithm/query/any.hpp>
+#include <boost/fusion/algorithm/query/count.hpp>
+#include <boost/fusion/algorithm/query/count_if.hpp>
+#include <boost/fusion/algorithm/query/find.hpp>
+#include <boost/fusion/algorithm/query/find_if.hpp>
+#include <boost/fusion/algorithm/query/none.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ Distributed under the 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_FUSION_ALL_05052005_1238)
+#define BOOST_FUSION_ALL_05052005_1238
+
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/algorithm/query/detail/all.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename F>
+ struct all
+ {
+ typedef bool type;
+ };
+ }
+
+ template <typename Sequence, typename F>
+ inline bool
+ all(Sequence const& seq, F f)
+ {
+ return detail::all(seq, f, typename traits::category_of<Sequence>::type());
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+ Copyright (c) 2007 Dan Marsden
+
+ Distributed under the 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(FUSION_ANY_05052005_1230)
+#define FUSION_ANY_05052005_1230
+
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/algorithm/query/detail/any.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename F>
+ struct any
+ {
+ typedef bool type;
+ };
+ }
+
+ template <typename Sequence, typename F>
+ inline bool
+ any(Sequence const& seq, F f)
+ {
+ return detail::any(seq, f, typename traits::category_of<Sequence>::type());
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007
+
+ Distributed under the 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_FUSION_COUNT_09162005_0150)
+#define BOOST_FUSION_COUNT_09162005_0150
+
+#include <boost/fusion/algorithm/query/count_if.hpp>
+#include <boost/fusion/algorithm/query/detail/count.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename F>
+ struct count
+ {
+ typedef int type;
+ };
+ }
+
+ template <typename Sequence, typename T>
+ inline int
+ count(Sequence const& seq, T const& x)
+ {
+ detail::count_compare<T> f(x);
+ return fusion::count_if(seq, f);
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ Distributed under the 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_FUSION_COUNT_IF_09162005_0137)
+#define BOOST_FUSION_COUNT_IF_09162005_0137
+
+#include <boost/fusion/algorithm/query/detail/count_if.hpp>
+#include <boost/fusion/support/category_of.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename F>
+ struct count_if
+ {
+ typedef int type;
+ };
+ }
+
+ template <typename Sequence, typename F>
+ inline int
+ count_if(Sequence const& seq, F f)
+ {
+ return detail::count_if(
+ seq, f, typename traits::category_of<Sequence>::type());
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ Distributed under the 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(FUSION_ALL_05052005_1237)
+#define FUSION_ALL_05052005_1237
+
+#include <boost/mpl/bool.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/distance.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename First, typename Last, typename F>
+ inline bool
+ linear_all(First const&, Last const&, F const&, mpl::true_)
+ {
+ return true;
+ }
+
+ template <typename First, typename Last, typename F>
+ inline bool
+ linear_all(First const& first, Last const& last, F& f, mpl::false_)
+ {
+ typename result_of::deref<First>::type x = *first;
+ return f(x) &&
+ detail::linear_all(
+ fusion::next(first)
+ , last
+ , f
+ , result_of::equal_to<typename result_of::next<First>::type, Last>());
+ }
+
+ template <typename Sequence, typename F, typename Tag>
+ inline bool
+ all(Sequence const& seq, F f, Tag)
+ {
+ return detail::linear_all(
+ fusion::begin(seq)
+ , fusion::end(seq)
+ , f
+ , result_of::equal_to<
+ typename result_of::begin<Sequence>::type
+ , typename result_of::end<Sequence>::type>());
+ }
+
+ template<int N>
+ struct unrolled_all
+ {
+ template <typename It, typename F>
+ static bool call(It const& it, F f)
+ {
+ return
+ f(*it) &&
+ f(*fusion::advance_c<1>(it))&&
+ f(*fusion::advance_c<2>(it)) &&
+ f(*fusion::advance_c<3>(it)) &&
+ detail::unrolled_all<N-4>::call(fusion::advance_c<4>(it), f);
+ }
+ };
+
+ template<>
+ struct unrolled_all<3>
+ {
+ template <typename It, typename F>
+ static bool call(It const& it, F f)
+ {
+ return
+ f(*it) &&
+ f(*fusion::advance_c<1>(it)) &&
+ f(*fusion::advance_c<2>(it));
+ }
+ };
+
+ template<>
+ struct unrolled_all<2>
+ {
+ template <typename It, typename F>
+ static bool call(It const& it, F f)
+ {
+ return
+ f(*it) &&
+ f(*fusion::advance_c<1>(it));
+ }
+ };
+
+ template<>
+ struct unrolled_all<1>
+ {
+ template <typename It, typename F>
+ static bool call(It const& it, F f)
+ {
+ return f(*it);
+ }
+ };
+
+ template<>
+ struct unrolled_all<0>
+ {
+ template <typename It, typename F>
+ static bool call(It const& it, F f)
+ {
+ return false;
+ }
+ };
+
+ template <typename Sequence, typename F>
+ inline bool
+ all(Sequence const& seq, F f, random_access_traversal_tag)
+ {
+ typedef typename result_of::begin<Sequence>::type begin;
+ typedef typename result_of::end<Sequence>::type end;
+ return detail::unrolled_all<result_of::distance<begin, end>::type::value>::call(
+ fusion::begin(seq), f);
+ }
+}}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+ Copyright (c) 2007 Dan Marsden
+
+ Distributed under the 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(FUSION_ANY_05052005_1229)
+#define FUSION_ANY_05052005_1229
+
+#include <boost/mpl/bool.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/distance.hpp>
+
+namespace boost { namespace fusion {
+ struct random_access_traversal_tag;
+namespace detail
+{
+ template <typename First, typename Last, typename F>
+ inline bool
+ linear_any(First const&, Last const&, F const&, mpl::true_)
+ {
+ return false;
+ }
+
+ template <typename First, typename Last, typename F>
+ inline bool
+ linear_any(First const& first, Last const& last, F& f, mpl::false_)
+ {
+ typename result_of::deref<First>::type x = *first;
+ return f(x) ||
+ detail::linear_any(
+ fusion::next(first)
+ , last
+ , f
+ , result_of::equal_to<typename result_of::next<First>::type, Last>());
+ }
+
+ template <typename Sequence, typename F, typename Tag>
+ inline bool
+ any(Sequence const& seq, F f, Tag)
+ {
+ return detail::linear_any(
+ fusion::begin(seq)
+ , fusion::end(seq)
+ , f
+ , result_of::equal_to<
+ typename result_of::begin<Sequence>::type
+ , typename result_of::end<Sequence>::type>());
+ }
+
+ template<int N>
+ struct unrolled_any
+ {
+ template <typename It, typename F>
+ static bool call(It const& it, F f)
+ {
+ return
+ f(*it) ||
+ f(*fusion::advance_c<1>(it))||
+ f(*fusion::advance_c<2>(it)) ||
+ f(*fusion::advance_c<3>(it)) ||
+ detail::unrolled_any<N-4>::call(fusion::advance_c<4>(it), f);
+ }
+ };
+
+ template<>
+ struct unrolled_any<3>
+ {
+ template <typename It, typename F>
+ static bool call(It const& it, F f)
+ {
+ return
+ f(*it) ||
+ f(*fusion::advance_c<1>(it)) ||
+ f(*fusion::advance_c<2>(it));
+ }
+ };
+
+ template<>
+ struct unrolled_any<2>
+ {
+ template <typename It, typename F>
+ static bool call(It const& it, F f)
+ {
+ return
+ f(*it) ||
+ f(*fusion::advance_c<1>(it));
+ }
+ };
+
+ template<>
+ struct unrolled_any<1>
+ {
+ template <typename It, typename F>
+ static bool call(It const& it, F f)
+ {
+ return f(*it);
+ }
+ };
+
+ template<>
+ struct unrolled_any<0>
+ {
+ template <typename It, typename F>
+ static bool call(It const& it, F f)
+ {
+ return false;
+ }
+ };
+
+ template <typename Sequence, typename F>
+ inline bool
+ any(Sequence const& seq, F f, random_access_traversal_tag)
+ {
+ typedef typename result_of::begin<Sequence>::type begin;
+ typedef typename result_of::end<Sequence>::type end;
+ return detail::unrolled_any<result_of::distance<begin, end>::type::value>::call(
+ fusion::begin(seq), f);
+ }
+}}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ASSOC_FIND_09242005_1133)
+#define FUSION_ASSOC_FIND_09242005_1133
+
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/type_traits/is_const.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Sequence, typename Key>
+ struct assoc_find
+ {
+ typedef typename
+ mpl::if_<
+ is_const<Sequence>
+ , typename Sequence::template meta_find_impl_const<Key>::type
+ , typename Sequence::template meta_find_impl<Key>::type
+ >::type
+ type;
+
+ static type
+ call(Sequence& s)
+ {
+ return s.find_impl(mpl::identity<Key>());
+ }
+ };
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_COUNT_09162005_0158)
+#define FUSION_COUNT_09162005_0158
+
+#include <boost/mpl/or.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/fusion/support/detail/access.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <bool is_convertible>
+ struct compare_convertible;
+
+ // T1 is convertible to T2 or vice versa
+ template <>
+ struct compare_convertible<true>
+ {
+ template <typename T1, typename T2>
+ static bool
+ call(T1 const& x, T2 const& y)
+ {
+ return x == y;
+ }
+ };
+
+ // T1 is NOT convertible to T2 NOR vice versa
+ template <>
+ struct compare_convertible<false>
+ {
+ template <typename T1, typename T2>
+ static bool
+ call(T1 const&, T2 const&)
+ {
+ return false;
+ }
+ };
+
+ template <typename T1>
+ struct count_compare
+ {
+ typedef typename detail::call_param<T1>::type param;
+ count_compare(param x)
+ : x(x) {}
+
+ template <typename T2>
+ bool
+ operator()(T2 const& y)
+ {
+ return
+ compare_convertible<
+ mpl::or_<
+ is_convertible<T1, T2>
+ , is_convertible<T2, T1>
+ >::value
+ >::call(x, y);
+ }
+
+ param x;
+ };
+}}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ Distributed under the 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_FUSION_COUNT_IF_09162005_0141)
+#define BOOST_FUSION_COUNT_IF_09162005_0141
+
+#include <boost/mpl/bool.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/iterator/distance.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+
+namespace boost { namespace fusion {
+ struct random_access_traversal_tag;
+namespace detail
+{
+ template <typename First, typename Last, typename F>
+ inline int
+ linear_count_if(First const&, Last const&, F const&, mpl::true_)
+ {
+ return 0;
+ }
+
+ template <typename First, typename Last, typename F>
+ inline int
+ linear_count_if(First const& first, Last const& last, F& f, mpl::false_)
+ {
+ int n =
+ detail::linear_count_if(
+ fusion::next(first)
+ , last
+ , f
+ , result_of::equal_to<typename result_of::next<First>::type, Last>());
+ if (f(*first))
+ ++n;
+ return n;
+ }
+
+ template <typename Sequence, typename F, typename Tag>
+ inline int
+ count_if(Sequence const& seq, F f, Tag)
+ {
+ return detail::linear_count_if(
+ fusion::begin(seq)
+ , fusion::end(seq)
+ , f
+ , result_of::equal_to<
+ typename result_of::begin<Sequence>::type
+ , typename result_of::end<Sequence>::type>());
+ }
+
+ template<int n>
+ struct unrolled_count_if
+ {
+ template<typename I0, typename F>
+ static int call(I0 const& i0, F f)
+ {
+ int ct = unrolled_count_if<n-4>::
+ call(fusion::advance_c<4>(i0), f);
+ if(f(*i0))
+ ++ct;
+
+ typedef typename result_of::next<I0>::type I1;
+ I1 i1(fusion::next(i0));
+ if(f(*i1))
+ ++ct;
+
+ typedef typename result_of::next<I1>::type I2;
+ I2 i2(fusion::next(i1));
+ if(f(*i2))
+ ++ct;
+
+ typedef typename result_of::next<I2>::type I3;
+ I3 i3(fusion::next(i2));
+ if(f(*i3))
+ ++ct;
+
+ return ct;
+ }
+ };
+
+ template<>
+ struct unrolled_count_if<3>
+ {
+ template<typename I0, typename F>
+ static int call(I0 const& i0, F f)
+ {
+ int ct = 0;
+ if(f(*i0))
+ ++ct;
+
+ typedef typename result_of::next<I0>::type I1;
+ I1 i1(fusion::next(i0));
+ if(f(*i1))
+ ++ct;
+
+ typedef typename result_of::next<I1>::type I2;
+ I2 i2(fusion::next(i1));
+ if(f(*i2))
+ ++ct;
+
+ return ct;
+ }
+ };
+
+ template<>
+ struct unrolled_count_if<2>
+ {
+ template<typename I0, typename F>
+ static int call(I0 const& i0, F f)
+ {
+ int ct = 0;
+
+ if(f(*i0))
+ ++ct;
+
+ typedef typename result_of::next<I0>::type I1;
+ I1 i1(fusion::next(i0));
+ if(f(*i1))
+ ++ct;
+
+ return ct;
+ }
+ };
+
+ template<>
+ struct unrolled_count_if<1>
+ {
+ template<typename I0, typename F>
+ static int call(I0 const& i0, F f)
+ {
+ int ct = 0;
+ if(f(*i0))
+ ++ct;
+ return ct;
+ }
+ };
+
+
+ template<>
+ struct unrolled_count_if<0>
+ {
+ template<typename I0, typename F>
+ static int call(I0 const&, F)
+ {
+ return 0;
+ }
+ };
+
+ template <typename Sequence, typename F>
+ inline int
+ count_if(Sequence const& seq, F f, random_access_traversal_tag)
+ {
+ typedef typename result_of::begin<Sequence>::type begin;
+ typedef typename result_of::end<Sequence>::type end;
+ return detail::unrolled_count_if<result_of::distance<begin, end>::type::value>::
+ call(fusion::begin(seq), f);
+ }
+}}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ Distributed under the 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(FUSION_FIND_IF_05052005_1107)
+#define FUSION_FIND_IF_05052005_1107
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/lambda.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/iterator/distance.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+
+namespace boost { namespace fusion {
+ struct random_access_traversal_tag;
+namespace detail
+{
+ template <typename Iterator, typename Pred>
+ struct apply_filter
+ {
+ typedef typename mpl::apply1<
+ Pred, typename result_of::value_of<Iterator>::type>::type type;
+ BOOST_STATIC_CONSTANT(int, value = type::value);
+ };
+
+ template <typename First, typename Last, typename Pred>
+ struct main_find_if;
+
+ template <typename First, typename Last, typename Pred>
+ struct recursive_find_if
+ {
+ typedef typename
+ main_find_if<
+ typename result_of::next<First>::type, Last, Pred
+ >::type
+ type;
+ };
+
+ template <typename First, typename Last, typename Pred>
+ struct main_find_if
+ {
+ typedef mpl::or_<
+ result_of::equal_to<First, Last>
+ , apply_filter<First, Pred> >
+ filter;
+
+ typedef typename
+ mpl::eval_if<
+ filter
+ , mpl::identity<First>
+ , recursive_find_if<First, Last, Pred>
+ >::type
+ type;
+ };
+
+ template<
+ typename First, typename Last,
+ typename Pred, bool>
+ struct choose_find_if;
+
+ template<typename First, typename Last, typename Pred>
+ struct choose_find_if<First, Last, Pred, false>
+ : main_find_if<First, Last, Pred>
+ {};
+
+ template<typename Iter, typename Pred, int n, int unrolling>
+ struct unroll_again;
+
+ template <typename Iter, typename Pred, int offset>
+ struct apply_offset_filter
+ {
+ typedef typename result_of::advance_c<Iter, offset>::type Shifted;
+ typedef typename
+ mpl::apply1<
+ Pred
+ , typename result_of::value_of<Shifted>::type
+ >::type
+ type;
+ BOOST_STATIC_CONSTANT(int, value = type::value);
+ };
+
+ template<typename Iter, typename Pred, int n>
+ struct unrolled_find_if
+ {
+ typedef typename mpl::eval_if<
+ apply_filter<Iter, Pred>,
+ mpl::identity<Iter>,
+ mpl::eval_if<
+ apply_offset_filter<Iter, Pred, 1>,
+ result_of::advance_c<Iter, 1>,
+ mpl::eval_if<
+ apply_offset_filter<Iter, Pred, 2>,
+ result_of::advance_c<Iter, 2>,
+ mpl::eval_if<
+ apply_offset_filter<Iter, Pred, 3>,
+ result_of::advance_c<Iter, 3>,
+ unroll_again<
+ Iter,
+ Pred,
+ n,
+ 4> > > > >::type type;
+ };
+
+ template<typename Iter, typename Pred>
+ struct unrolled_find_if<Iter, Pred, 3>
+ {
+ typedef typename mpl::eval_if<
+ apply_filter<Iter, Pred>,
+ mpl::identity<Iter>,
+ mpl::eval_if<
+ apply_offset_filter<Iter, Pred, 1>,
+ result_of::advance_c<Iter, 1>,
+ mpl::eval_if<
+ apply_offset_filter<Iter, Pred, 2>,
+ result_of::advance_c<Iter, 2>,
+ result_of::advance_c<Iter, 3> > > >::type type;
+ };
+
+ template<typename Iter, typename Pred>
+ struct unrolled_find_if<Iter, Pred, 2>
+ {
+ typedef typename mpl::eval_if<
+ apply_filter<Iter, Pred>,
+ mpl::identity<Iter>,
+ mpl::eval_if<
+ apply_offset_filter<Iter, Pred, 1>,
+ result_of::advance_c<Iter, 1>,
+ result_of::advance_c<Iter, 2> > >::type type;
+ };
+
+ template<typename Iter, typename Pred>
+ struct unrolled_find_if<Iter, Pred, 1>
+ {
+ typedef typename mpl::eval_if<
+ apply_filter<Iter, Pred>,
+ mpl::identity<Iter>,
+ result_of::advance_c<Iter, 1> >::type type;
+ };
+
+ template<typename Iter, typename Pred, int n, int unrolling>
+ struct unroll_again
+ {
+ typedef typename unrolled_find_if<
+ typename result_of::advance_c<Iter, unrolling>::type,
+ Pred,
+ n-unrolling>::type type;
+ };
+
+ template<typename Iter, typename Pred>
+ struct unrolled_find_if<Iter, Pred, 0>
+ {
+ typedef Iter type;
+ };
+
+ template<typename First, typename Last, typename Pred>
+ struct choose_find_if<First, Last, Pred, true>
+ {
+ typedef typename result_of::distance<First, Last>::type N;
+ typedef typename unrolled_find_if<First, Pred, N::value>::type type;
+ };
+
+ template <typename First, typename Last, typename Pred>
+ struct static_find_if
+ {
+ typedef typename
+ choose_find_if<
+ First
+ , Last
+ , typename mpl::lambda<Pred>::type
+ , is_base_of<random_access_traversal_tag, typename traits::category_of<First>::type>::value
+ >::type
+ type;
+
+ template <typename Iterator>
+ static type
+ recursive_call(Iterator const& iter, mpl::true_)
+ {
+ return iter;
+ }
+
+ template <typename Iterator>
+ static type
+ recursive_call(Iterator const& iter, mpl::false_)
+ {
+ return recursive_call(fusion::next(iter));
+ }
+
+ template <typename Iterator>
+ static type
+ recursive_call(Iterator const& iter)
+ {
+ typedef result_of::equal_to<Iterator, type> found;
+ return recursive_call(iter, found());
+ }
+
+ template <typename Iterator, typename Tag>
+ static type
+ choose_call(Iterator const& iter, Tag)
+ {
+ return recursive_call(iter);
+ }
+
+ template <typename Iterator>
+ static type
+ choose_call(Iterator const& iter, random_access_traversal_tag)
+ {
+ typedef typename result_of::distance<Iterator, type>::type N;
+ return fusion::advance<N>(iter);
+ }
+
+ template <typename Iterator>
+ static type
+ call(Iterator const& iter)
+ {
+ return choose_call(iter, typename traits::category_of<Iterator>::type());
+ }
+ };
+
+ template <typename First, typename Last, typename Pred>
+ struct static_seq_find_if : static_find_if<First, Last, Pred>
+ {
+ typedef typename static_find_if<First, Last, Pred>::type type;
+
+ template <typename Sequence>
+ static type
+ call(Sequence const& seq)
+ {
+ return static_find_if<First, Last, Pred>::call(fusion::begin(seq));
+ }
+
+ template <typename Sequence>
+ static type
+ call(Sequence& seq)
+ {
+ return static_find_if<First, Last, Pred>::call(fusion::begin(seq));
+ }
+ };
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006 Eric Niebler
+
+ Distributed under the 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(FIND_IF_S_05152006_1027)
+#define FIND_IF_S_05152006_1027
+
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/fusion/algorithm/query/find_if.hpp>
+#include <boost/fusion/container/list/cons.hpp>
+#include <boost/fusion/sequence/intrinsic/ext_/segments.hpp>
+#include <boost/fusion/view/ext_/segmented_iterator.hpp>
+#include <boost/fusion/view/ext_/segmented_iterator_range.hpp>
+#include <boost/fusion/support/ext_/is_segmented.hpp>
+
+// fwd declarations
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template<typename Sequence, typename Pred, bool IsSegmented = traits::is_segmented<Sequence>::value>
+ struct static_find_if_s_recurse;
+ }
+
+ namespace result_of
+ {
+ template <typename Sequence, typename Pred>
+ struct find_if_s;
+ }
+}}
+
+namespace boost { namespace fusion { namespace detail
+{
+
+ template<typename Sequence, typename Where, bool IsSegmented = traits::is_segmented<Sequence>::value>
+ struct is_found
+ : mpl::not_<result_of::equal_to<Where, typename result_of::end<Sequence>::type> >
+ {};
+
+ template<typename Sequence, typename Cons>
+ struct is_found<Sequence, Cons, true>
+ : mpl::not_<is_same<nil, Cons> >
+ {};
+
+ template<
+ typename SegmentedRange
+ , typename Where
+ , typename Sequence = typename remove_reference<
+ typename result_of::deref<
+ typename SegmentedRange::iterator_type
+ >::type
+ >::type
+ , bool IsSegmented = traits::is_segmented<Sequence>::value
+ >
+ struct as_segmented_cons
+ {
+ typedef cons<
+ SegmentedRange
+ , cons<segmented_range<Sequence, Where, false> >
+ > type;
+
+ static type call(SegmentedRange const &range, Where const &where)
+ {
+ return fusion::make_cons(
+ range
+ , fusion::make_cons(
+ segmented_range<Sequence, Where, false>(*fusion::begin(range), where)
+ )
+ );
+ }
+ };
+
+ template<
+ typename SegmentedRange
+ , typename Where
+ , typename Sequence
+ >
+ struct as_segmented_cons<SegmentedRange, Where, Sequence, true>
+ {
+ typedef cons<SegmentedRange, Where> type;
+
+ static type call(SegmentedRange const &range, Where const &where)
+ {
+ return fusion::make_cons(range, where);
+ }
+ };
+
+ template<
+ typename SegmentedRange
+ , typename Pred
+ , bool IsEmpty = is_empty<SegmentedRange>::value
+ >
+ struct static_find_if_s_seg
+ {
+ typedef typename SegmentedRange::iterator_type first;
+ typedef typename result_of::deref<first>::type segment_ref;
+ typedef typename remove_reference<segment_ref>::type segment;
+ typedef static_find_if_s_recurse<segment, Pred> where;
+ typedef range_next<SegmentedRange> next;
+ typedef is_found<segment, typename where::type> is_found;
+ typedef as_segmented_cons<SegmentedRange, typename where::type> found;
+ typedef static_find_if_s_seg<typename next::type, Pred> not_found;
+ typedef typename mpl::eval_if<is_found, found, not_found>::type type;
+
+ static type call(SegmentedRange const &range)
+ {
+ return call_(range, is_found());
+ }
+
+ private:
+ static type call_(SegmentedRange const &range, mpl::true_)
+ {
+ return found::call(range, where::call(*range.where_));
+ }
+
+ static type call_(SegmentedRange const &range, mpl::false_)
+ {
+ return not_found::call(next::call(range));
+ }
+ };
+
+ template<
+ typename SegmentedRange
+ , typename Pred
+ >
+ struct static_find_if_s_seg<SegmentedRange, Pred, true>
+ {
+ typedef nil type;
+
+ static type call(SegmentedRange const &)
+ {
+ return nil();
+ }
+ };
+
+ template<typename Sequence, typename Pred>
+ struct static_find_if_s_recurse<Sequence, Pred, true>
+ {
+ typedef typename as_segmented_range<Sequence>::type range;
+ typedef static_find_if_s_seg<range, Pred> find_if;
+ typedef typename find_if::type type;
+
+ static type call(Sequence &seq)
+ {
+ return find_if::call(range(fusion::segments(seq)));
+ }
+ };
+
+ template<typename Sequence, typename Pred>
+ struct static_find_if_s_recurse<Sequence, Pred, false>
+ {
+ typedef typename result_of::find_if<Sequence, Pred>::type type;
+
+ static type call(Sequence &seq)
+ {
+ return fusion::find_if<Pred>(seq);
+ }
+ };
+
+ template<typename Sequence, typename Pred, bool IsSegmented = traits::is_segmented<Sequence>::value>
+ struct static_find_if_s
+ : static_find_if_s_recurse<Sequence, Pred, IsSegmented>
+ {};
+
+ template<typename Sequence, typename Pred>
+ struct static_find_if_s<Sequence, Pred, true>
+ {
+ typedef typename as_segmented_range<Sequence>::type range;
+ typedef static_find_if_s_recurse<Sequence, Pred> find_if;
+ typedef typename find_if::type found;
+
+ typedef segmented_iterator<typename reverse_cons<found>::type> type;
+
+ static type call(Sequence &seq)
+ {
+ return type(reverse_cons<found>::call(find_if::call(seq)));
+ }
+ };
+}}}
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename Pred>
+ struct find_if_s
+ {
+ typedef typename
+ detail::static_find_if_s<
+ Sequence
+ , Pred
+ >::type
+ type;
+ };
+ }
+
+ template <typename Pred, typename Sequence>
+ typename lazy_disable_if<
+ is_const<Sequence>
+ , result_of::find_if_s<Sequence, Pred>
+ >::type
+ find_if_s(Sequence& seq)
+ {
+ return detail::static_find_if_s<Sequence, Pred>::call(seq);
+ }
+
+ template <typename Pred, typename Sequence>
+ typename result_of::find_if_s<Sequence const, Pred>::type
+ find_if_s(Sequence const& seq)
+ {
+ return detail::static_find_if_s<Sequence const, Pred>::call(seq);
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_FIND_05052005_1107)
+#define FUSION_FIND_05052005_1107
+
+#include <boost/fusion/algorithm/query/detail/find_if.hpp>
+#include <boost/fusion/algorithm/query/detail/assoc_find.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/utility/enable_if.hpp>
+
+namespace boost { namespace fusion
+{
+ struct associative_sequence_tag;
+
+ namespace result_of
+ {
+ template <
+ typename Sequence
+ , typename T
+ , bool is_associative_sequence = traits::is_associative<Sequence>::value >
+ struct find;
+
+ template <typename Sequence, typename T>
+ struct find<Sequence, T, false>
+ {
+ typedef
+ detail::static_seq_find_if<
+ typename result_of::begin<Sequence>::type
+ , typename result_of::end<Sequence>::type
+ , is_same<mpl::_, T>
+ >
+ filter;
+
+ typedef typename filter::type type;
+ };
+
+ template <typename Sequence, typename T>
+ struct find<Sequence, T, true>
+ {
+ typedef detail::assoc_find<Sequence, T> filter;
+ typedef typename filter::type type;
+ };
+ }
+
+ template <typename T, typename Sequence>
+ inline typename
+ lazy_disable_if<
+ is_const<Sequence>
+ , result_of::find<Sequence, T>
+ >::type const
+ find(Sequence& seq)
+ {
+ typedef typename result_of::find<Sequence, T>::filter filter;
+ return filter::call(seq);
+ }
+
+ template <typename T, typename Sequence>
+ inline typename result_of::find<Sequence const, T>::type const
+ find(Sequence const& seq)
+ {
+ typedef typename result_of::find<Sequence const, T>::filter filter;
+ return filter::call(seq);
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_FIND_IF_05052005_1108)
+#define FUSION_FIND_IF_05052005_1108
+
+#include <boost/fusion/algorithm/query/detail/find_if.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_const.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename Pred>
+ struct find_if
+ {
+ typedef typename
+ detail::static_find_if<
+ typename result_of::begin<Sequence>::type
+ , typename result_of::end<Sequence>::type
+ , Pred
+ >::type
+ type;
+ };
+ }
+
+ template <typename Pred, typename Sequence>
+ inline typename
+ lazy_disable_if<
+ is_const<Sequence>
+ , result_of::find_if<Sequence, Pred>
+ >::type
+ find_if(Sequence& seq)
+ {
+ typedef
+ detail::static_find_if<
+ typename result_of::begin<Sequence>::type
+ , typename result_of::end<Sequence>::type
+ , Pred
+ >
+ filter;
+
+ return filter::call(fusion::begin(seq));
+ }
+
+ template <typename Pred, typename Sequence>
+ inline typename result_of::find_if<Sequence const, Pred>::type const
+ find_if(Sequence const& seq)
+ {
+ typedef
+ detail::static_find_if<
+ typename result_of::begin<Sequence const>::type
+ , typename result_of::end<Sequence const>::type
+ , Pred
+ >
+ filter;
+
+ return filter::call(fusion::begin(seq));
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ Distributed under the 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_FUSION_NONE_07062005_1128)
+#define BOOST_FUSION_NONE_07062005_1128
+
+#include <boost/fusion/algorithm/query/any.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename F>
+ struct none
+ {
+ typedef bool type;
+ };
+ }
+
+ template <typename Sequence, typename F>
+ inline bool
+ none(Sequence const& seq, F f)
+ {
+ return !fusion::any(seq, f);
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ALGORITHM_TRANSFORMATION_10022005_0551)
+#define FUSION_ALGORITHM_TRANSFORMATION_10022005_0551
+
+#include <boost/fusion/algorithm/transformation/clear.hpp>
+#include <boost/fusion/algorithm/transformation/erase.hpp>
+#include <boost/fusion/algorithm/transformation/erase_key.hpp>
+#include <boost/fusion/algorithm/transformation/filter.hpp>
+#include <boost/fusion/algorithm/transformation/filter_if.hpp>
+#include <boost/fusion/algorithm/transformation/insert.hpp>
+#include <boost/fusion/algorithm/transformation/insert_range.hpp>
+#include <boost/fusion/algorithm/transformation/pop_back.hpp>
+#include <boost/fusion/algorithm/transformation/pop_front.hpp>
+#include <boost/fusion/algorithm/transformation/push_back.hpp>
+#include <boost/fusion/algorithm/transformation/push_front.hpp>
+#include <boost/fusion/algorithm/transformation/remove.hpp>
+#include <boost/fusion/algorithm/transformation/remove_if.hpp>
+#include <boost/fusion/algorithm/transformation/replace.hpp>
+#include <boost/fusion/algorithm/transformation/replace_if.hpp>
+#include <boost/fusion/algorithm/transformation/reverse.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_CLEAR_09172005_1127)
+#define FUSION_CLEAR_09172005_1127
+
+#include <boost/fusion/container/vector/vector10.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct clear
+ {
+ typedef vector0 type;
+ };
+ }
+
+ template <typename Sequence>
+ inline typename result_of::clear<Sequence const>::type
+ clear(Sequence const& seq)
+ {
+ return vector0();
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_REPLACE_08182005_0841)
+#define FUSION_REPLACE_08182005_0841
+
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <bool is_convertible>
+ struct replacer_helper;
+
+ template <>
+ struct replacer_helper<false>
+ {
+ template <typename U, typename T>
+ static U&
+ call(U& x, T const&, T const&)
+ {
+ return x;
+ }
+ };
+
+ template <>
+ struct replacer_helper<true>
+ {
+ template <typename U, typename T>
+ static U
+ call(U& x, T const& old_value, T const& new_value)
+ {
+ return (x == old_value) ? new_value : x;
+ }
+ };
+
+ template <typename T>
+ struct replacer
+ {
+ replacer(T const& old_value, T const& new_value)
+ : old_value(old_value), new_value(new_value) {}
+
+ template<typename Sig>
+ struct result;
+
+ template <typename U1, typename U2>
+ struct result<replacer<U1>(U2)>
+ {
+ typedef typename remove_reference<U2>::type value;
+ typedef typename
+ mpl::if_<is_convertible<T, value>, value, value const&>::type
+ type;
+ };
+
+ template <typename U>
+ typename result<replacer(U)>::type
+ operator()(U const& x) const
+ {
+ return replacer_helper<is_convertible<T, U>::value>::
+ call(x, old_value, new_value);
+ }
+
+ T old_value;
+ T new_value;
+ };
+}}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_REPLACE_IF_08182005_0946)
+#define FUSION_REPLACE_IF_08182005_0946
+
+#include <boost/utility/enable_if.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <bool is_convertible>
+ struct replacer_if_helper;
+
+ template <>
+ struct replacer_if_helper<false>
+ {
+ template <typename U, typename F, typename T>
+ static U&
+ call(U& x, F&, T const&)
+ {
+ return x;
+ }
+ };
+
+ template <>
+ struct replacer_if_helper<true>
+ {
+ template <typename U, typename F, typename T>
+ static U
+ call(U& x, F& f, T const& new_value)
+ {
+ return f(x) ? new_value : x;
+ }
+ };
+
+ template <typename F, typename T>
+ struct replacer_if
+ {
+ replacer_if(F f, T const& new_value)
+ : f(f), new_value(new_value) {}
+
+ template<typename Params>
+ struct result;
+
+ template <typename F1, typename T1, typename U>
+ struct result<replacer_if<F1, T1>(U)>
+ {
+ typedef typename remove_reference<U>::type value;
+ typedef typename
+ mpl::if_<is_convertible<T, value>, value, value const&>::type
+ type;
+ };
+
+ template <typename U>
+ typename result<replacer_if(U)>::type
+ operator()(U const& x) const
+ {
+ return replacer_if_helper<is_convertible<T, U>::value>::
+ call(x, f, new_value);
+ }
+
+ F f;
+ T new_value;
+ };
+}}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ERASE_07232005_0534)
+#define FUSION_ERASE_07232005_0534
+
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/iterator/mpl/convert_iterator.hpp>
+#include <boost/fusion/container/vector/vector10.hpp>
+#include <boost/fusion/view/joint_view/joint_view.hpp>
+#include <boost/fusion/view/iterator_range/iterator_range.hpp>
+#include <boost/fusion/support/detail/as_fusion_element.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename First>
+ struct compute_erase_last // put this in detail!!!
+ {
+ typedef typename result_of::end<Sequence>::type seq_last_type;
+ typedef typename convert_iterator<First>::type first_type;
+ typedef typename
+ mpl::if_<
+ result_of::equal_to<first_type, seq_last_type>
+ , first_type
+ , typename result_of::next<first_type>::type
+ >::type
+ type;
+
+ static type
+ call(First const& first, mpl::false_)
+ {
+ return fusion::next(convert_iterator<First>::call(first));
+ }
+
+ static type
+ call(First const& first, mpl::true_)
+ {
+ return convert_iterator<First>::call(first);
+ }
+
+ static type
+ call(First const& first)
+ {
+ return call(first, result_of::equal_to<first_type, seq_last_type>());
+ }
+ };
+
+ template <
+ typename Sequence
+ , typename First
+ , typename Last = typename compute_erase_last<Sequence, First>::type>
+ struct erase
+ {
+ typedef typename result_of::begin<Sequence>::type seq_first_type;
+ typedef typename result_of::end<Sequence>::type seq_last_type;
+ BOOST_STATIC_ASSERT((!result_of::equal_to<seq_first_type, seq_last_type>::value));
+
+ typedef typename convert_iterator<First>::type first_type;
+ typedef typename convert_iterator<Last>::type last_type;
+ typedef iterator_range<seq_first_type, first_type> left_type;
+ typedef iterator_range<last_type, seq_last_type> right_type;
+ typedef joint_view<left_type, right_type> type;
+ };
+ }
+
+ template <typename Sequence, typename First>
+ typename result_of::erase<Sequence const, First>::type
+ erase(Sequence const& seq, First const& first)
+ {
+ typedef result_of::erase<Sequence const, First> result_of;
+ typedef typename result_of::left_type left_type;
+ typedef typename result_of::right_type right_type;
+ typedef typename result_of::type result_type;
+
+ left_type left(
+ fusion::begin(seq)
+ , convert_iterator<First>::call(first));
+ right_type right(
+ fusion::result_of::compute_erase_last<Sequence const, First>::call(first)
+ , fusion::end(seq));
+ return result_type(left, right);
+ }
+
+ template <typename Sequence, typename First, typename Last>
+ typename result_of::erase<Sequence const, First, Last>::type
+ erase(Sequence const& seq, First const& first, Last const& last)
+ {
+ typedef result_of::erase<Sequence const, First, Last> result_of;
+ typedef typename result_of::left_type left_type;
+ typedef typename result_of::right_type right_type;
+ typedef typename result_of::type result_type;
+
+ left_type left(fusion::begin(seq), first);
+ right_type right(last, fusion::end(seq));
+ return result_type(left, right);
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ERASE_KEY_10022005_1851)
+#define FUSION_ERASE_KEY_10022005_1851
+
+#include <boost/fusion/algorithm/query/detail/assoc_find.hpp>
+#include <boost/fusion/algorithm/transformation/erase.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename Key>
+ struct erase_key
+ {
+ typedef detail::assoc_find<Sequence, Key> filter;
+ typedef typename erase<Sequence, typename filter::type>::type type;
+ };
+ }
+
+ template <typename Key, typename Sequence>
+ inline typename result_of::erase_key<Sequence const, Key>::type
+ erase_key(Sequence const& seq)
+ {
+ typedef typename result_of::erase_key<Sequence const, Key>::filter filter;
+ return erase(seq, filter::call(seq));
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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(FUSION_FILTER_02122005_1839)
+#define FUSION_FILTER_02122005_1839
+
+#include <boost/fusion/view/filter_view/filter_view.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename T>
+ struct filter
+ {
+ typedef filter_view<Sequence, is_same<mpl::_, T> > type;
+ };
+ }
+
+ template <typename T, typename Sequence>
+ inline typename result_of::filter<Sequence const, T>::type
+ filter(Sequence const& seq)
+ {
+ return filter_view<const Sequence, is_same<mpl::_, T> >(seq);
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_FILTER_IF_07172005_0818)
+#define FUSION_FILTER_IF_07172005_0818
+
+#include <boost/fusion/view/filter_view/filter_view.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename Pred>
+ struct filter_if
+ {
+ typedef filter_view<Sequence, Pred> type;
+ };
+ }
+
+ template <typename Pred, typename Sequence>
+ inline typename result_of::filter_if<Sequence const, Pred>::type
+ filter_if(Sequence const& seq)
+ {
+ return filter_view<Sequence const, Pred>(seq);
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_INSERT_07222005_0730)
+#define FUSION_INSERT_07222005_0730
+
+#include <boost/fusion/support/detail/as_fusion_element.hpp>
+#include <boost/fusion/iterator/mpl/convert_iterator.hpp>
+#include <boost/fusion/container/vector/vector10.hpp>
+#include <boost/fusion/view/joint_view/joint_view.hpp>
+#include <boost/fusion/view/single_view/single_view.hpp>
+#include <boost/fusion/view/iterator_range/iterator_range.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename Position, typename T>
+ struct insert
+ {
+ typedef typename detail::as_fusion_element<T>::type element_type;
+ typedef typename convert_iterator<Position>::type pos_type;
+ typedef typename result_of::begin<Sequence>::type first_type;
+ typedef typename result_of::end<Sequence>::type last_type;
+
+ typedef iterator_range<first_type, pos_type> left_type;
+ typedef iterator_range<pos_type, last_type> right_type;
+ typedef fusion::single_view<element_type> single_view;
+ typedef joint_view<left_type, single_view const> left_insert_type;
+ typedef joint_view<left_insert_type, right_type> type;
+ };
+ }
+
+ template <typename Sequence, typename Position, typename T>
+ inline typename result_of::insert<
+ Sequence const, Position, T>::type
+ insert(Sequence const& seq, Position const& pos, T const& x)
+ {
+ typedef result_of::insert<
+ Sequence const, Position, T>
+ result_of;
+ typedef typename result_of::left_type left_type;
+ typedef typename result_of::right_type right_type;
+ typedef typename result_of::single_view single_view;
+ typedef typename result_of::left_insert_type left_insert_type;
+ typedef typename result_of::type result;
+
+ left_type left(fusion::begin(seq), convert_iterator<Position>::call(pos));
+ right_type right(convert_iterator<Position>::call(pos), fusion::end(seq));
+ single_view insert(x);
+ left_insert_type left_insert(left, insert);
+ return result(left_insert, right);
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_INSERT_RANGE_009172005_1147)
+#define FUSION_INSERT_RANGE_009172005_1147
+
+#include <boost/fusion/iterator/mpl/convert_iterator.hpp>
+#include <boost/fusion/container/vector/vector10.hpp>
+#include <boost/fusion/view/joint_view/joint_view.hpp>
+#include <boost/fusion/view/iterator_range/iterator_range.hpp>
+#include <boost/fusion/support/detail/as_fusion_element.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename Position, typename Range>
+ struct insert_range
+ {
+ typedef typename convert_iterator<Position>::type pos_type;
+ typedef typename result_of::begin<Sequence>::type first_type;
+ typedef typename result_of::end<Sequence>::type last_type;
+
+ typedef iterator_range<first_type, pos_type> left_type;
+ typedef iterator_range<pos_type, last_type> right_type;
+ typedef joint_view<left_type, Range> left_insert_type;
+ typedef joint_view<left_insert_type, right_type> type;
+ };
+ }
+
+ template <typename Sequence, typename Position, typename Range>
+ inline typename result_of::insert_range<Sequence const, Position, Range const>::type
+ insert_range(Sequence const& seq, Position const& pos, Range const& range)
+ {
+ typedef result_of::insert_range<Sequence const, Position, Range const> result_of;
+ typedef typename result_of::left_type left_type;
+ typedef typename result_of::right_type right_type;
+ typedef typename result_of::left_insert_type left_insert_type;
+ typedef typename result_of::type result;
+
+ left_type left(fusion::begin(seq), convert_iterator<Position>::call(pos));
+ right_type right(convert_iterator<Position>::call(pos), fusion::end(seq));
+ left_insert_type left_insert(left, range);
+ return result(left_insert, right);
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_JOIN_200601222109)
+#define FUSION_JOIN_200601222109
+
+#include <boost/fusion/view/joint_view.hpp>
+
+namespace boost { namespace fusion {
+
+ namespace result_of
+ {
+ template<typename LhSequence, typename RhSequence>
+ struct join
+ {
+ typedef joint_view<LhSequence, RhSequence> type;
+ };
+ }
+
+ template<typename LhSequence, typename RhSequence>
+ inline typename result_of::join<LhSequence const, RhSequence const>::type
+ join(LhSequence const& lhs, RhSequence const& rhs)
+ {
+ return typename result_of::join<LhSequence const, RhSequence const>::type(
+ lhs, rhs);
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_POP_BACK_09172005_1038)
+#define FUSION_POP_BACK_09172005_1038
+
+#include <boost/fusion/view/iterator_range/iterator_range.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct pop_back
+ {
+ typedef
+ iterator_range<
+ typename begin<Sequence>::type
+ , typename prior<
+ typename end<Sequence>::type
+ >::type
+ >
+ type;
+ };
+ }
+
+ template <typename Sequence>
+ inline typename result_of::pop_back<Sequence const>::type
+ pop_back(Sequence const& seq)
+ {
+ typedef typename result_of::pop_back<Sequence const>::type result;
+ return result(fusion::begin(seq), fusion::prior(fusion::end(seq)));
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_POP_FRONT_09172005_1115)
+#define FUSION_POP_FRONT_09172005_1115
+
+#include <boost/fusion/view/iterator_range/iterator_range.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/next.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct pop_front
+ {
+ typedef
+ iterator_range<
+ typename next<
+ typename begin<Sequence>::type
+ >::type
+ , typename end<Sequence>::type
+ >
+ type;
+ };
+ }
+
+ template <typename Sequence>
+ inline typename result_of::pop_front<Sequence const>::type
+ pop_front(Sequence const& seq)
+ {
+ typedef typename result_of::pop_front<Sequence const>::type result;
+ return result(fusion::next(fusion::begin(seq)), fusion::end(seq));
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_PUSH_BACK_07162005_0235)
+#define FUSION_PUSH_BACK_07162005_0235
+
+#include <boost/fusion/support/detail/as_fusion_element.hpp>
+#include <boost/fusion/view/joint_view/joint_view.hpp>
+#include <boost/fusion/view/single_view/single_view.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename T>
+ struct push_back
+ {
+ typedef fusion::single_view<typename detail::as_fusion_element<T>::type> single_view;
+ typedef joint_view<Sequence, single_view const> type;
+ };
+ }
+
+ template <typename Sequence, typename T>
+ inline typename result_of::push_back<Sequence const, T>::type
+ push_back(Sequence const& seq, T const& x)
+ {
+ typedef typename result_of::push_back<Sequence const, T> push_back;
+ typedef typename push_back::single_view single_view;
+ typedef typename push_back::type result;
+ single_view x_(x);
+ return result(seq, x_);
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_PUSH_FRONT_07162005_0749)
+#define FUSION_PUSH_FRONT_07162005_0749
+
+#include <boost/fusion/support/detail/as_fusion_element.hpp>
+#include <boost/fusion/view/joint_view/joint_view.hpp>
+#include <boost/fusion/view/single_view/single_view.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename T>
+ struct push_front
+ {
+ typedef fusion::single_view<typename detail::as_fusion_element<T>::type> single_view;
+ typedef joint_view<single_view const, Sequence> type;
+ };
+ }
+
+ template <typename Sequence, typename T>
+ inline typename result_of::push_front<Sequence const, T>::type
+ push_front(Sequence const& seq, T const& x)
+ {
+ typedef typename result_of::push_front<Sequence const, T> push_front;
+ typedef typename push_front::single_view single_view;
+ typedef typename push_front::type result;
+ single_view x_(x);
+ return result(x_, seq);
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_REMOVE_07162005_0818)
+#define FUSION_REMOVE_07162005_0818
+
+#include <boost/fusion/view/filter_view/filter_view.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename T>
+ struct remove
+ {
+ typedef filter_view<Sequence, mpl::not_<is_same<mpl::_, T> > > type;
+ };
+ }
+
+ template <typename T, typename Sequence>
+ inline typename result_of::remove<Sequence const, T>::type
+ remove(Sequence const& seq)
+ {
+ typedef typename result_of::remove<Sequence const, T>::type result_type;
+ return result_type(seq);
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_REMOVE_IF_07162005_0818)
+#define FUSION_REMOVE_IF_07162005_0818
+
+#include <boost/fusion/view/filter_view/filter_view.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename Pred>
+ struct remove_if
+ {
+ typedef filter_view<Sequence, mpl::not_<Pred> > type;
+ };
+ }
+
+ template <typename Pred, typename Sequence>
+ inline typename result_of::remove_if<Sequence const, Pred>::type
+ remove_if(Sequence const& seq)
+ {
+ typedef typename result_of::remove_if<Sequence const, Pred>::type result_type;
+ return result_type(seq);
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_REPLACE_08182005_0830)
+#define FUSION_REPLACE_08182005_0830
+
+#include <boost/fusion/view/transform_view/transform_view.hpp>
+#include <boost/fusion/algorithm/transformation/detail/replace.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename T>
+ struct replace
+ {
+ typedef transform_view<Sequence, detail::replacer<T> > type;
+ };
+ }
+
+ template <typename Sequence, typename T>
+ inline typename result_of::replace<Sequence const, T>::type
+ replace(Sequence const& seq, T const& old_value, T const& new_value)
+ {
+ typedef typename result_of::replace<Sequence const, T>::type result;
+ detail::replacer<T> f(old_value, new_value);
+ return result(seq, f);
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_REPLACE_IF_08182005_0939)
+#define FUSION_REPLACE_IF_08182005_0939
+
+#include <boost/fusion/view/transform_view/transform_view.hpp>
+#include <boost/fusion/algorithm/transformation/detail/replace_if.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence, typename F, typename T>
+ struct replace_if
+ {
+ typedef transform_view<Sequence, detail::replacer_if<F, T> > type;
+ };
+ }
+
+ template <typename Sequence, typename F, typename T>
+ inline typename result_of::replace_if<Sequence const, F, T>::type
+ replace_if(Sequence const& seq, F pred, T const& new_value)
+ {
+ typedef typename result_of::replace_if<Sequence const, F, T>::type result;
+ detail::replacer_if<F, T> f(pred, new_value);
+ return result(seq, f);
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_REVERSE_07212005_1230)
+#define FUSION_REVERSE_07212005_1230
+
+#include <boost/fusion/view/reverse_view/reverse_view.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct reverse
+ {
+ typedef reverse_view<Sequence> type;
+ };
+ }
+
+ template <typename Sequence>
+ inline reverse_view<Sequence const>
+ reverse(Sequence const& view)
+ {
+ return reverse_view<Sequence const>(view);
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_TRANSFORM_07052005_1057)
+#define FUSION_TRANSFORM_07052005_1057
+
+#include <boost/fusion/view/transform_view/transform_view.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+
+ namespace result_of
+ {
+ template <typename Sequence1, typename Sequence2, typename F = void_>
+ struct transform
+ {
+ typedef transform_view<Sequence1, Sequence2, F> type;
+ };
+
+ template <typename Sequence, typename F>
+#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
+ struct transform<Sequence, F, void_>
+#else
+ struct transform<Sequence, F>
+#endif
+ {
+ typedef transform_view<Sequence, F> type;
+ };
+ }
+
+ template <typename Sequence, typename F>
+ inline typename result_of::transform<Sequence const, F>::type
+ transform(Sequence const& seq, F f)
+ {
+ return transform_view<Sequence const, F>(seq, f);
+ }
+
+ template <typename Sequence1, typename Sequence2, typename F>
+ inline typename result_of::transform<Sequence1 const, Sequence2 const, F>::type
+ transform(Sequence1 const& seq1, Sequence2 const& seq2, F f)
+ {
+ return transform_view<Sequence1 const, Sequence2 const, F>(seq1, seq2, f);
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_ZIP_HPP_20060125_2058)
+#define FUSION_ZIP_HPP_20060125_2058
+
+#include <boost/fusion/view/zip_view.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/mpl/transform.hpp>
+#include <boost/mpl/placeholders.hpp>
+
+#if !defined(FUSION_MAX_ZIP_SEQUENCES)
+#define FUSION_MAX_ZIP_SEQUENCES 10
+#endif
+
+namespace boost { namespace fusion {
+
+ struct void_;
+
+ namespace result_of
+ {
+ template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PP_INC(FUSION_MAX_ZIP_SEQUENCES), typename T, fusion::void_)>
+ struct zip;
+ }
+
+#define BOOST_PP_FILENAME_1 \
+ <boost/fusion/algorithm/transformation/zip.hpp>
+#define BOOST_PP_ITERATION_LIMITS (2, FUSION_MAX_ZIP_SEQUENCES)
+#include BOOST_PP_ITERATE()
+
+}}
+
+#endif
+
+#else
+
+#define ZIP_ITERATION BOOST_PP_ITERATION()
+
+ namespace result_of
+ {
+ template< BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, typename T) >
+#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
+ #define TEXT(z, n, text) , text
+ struct zip< BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(ZIP_ITERATION), FUSION_MAX_ZIP_SEQUENCES, TEXT, void_) >
+ #undef TEXT
+#else
+ struct zip< BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, T) >
+#endif
+ {
+ typedef mpl::vector< BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, T) > sequences;
+ typedef typename mpl::transform<sequences, add_reference<mpl::_> >::type ref_params;
+ typedef zip_view<typename result_of::as_vector<ref_params>::type> type;
+ };
+ }
+
+#define FUSION_REF_PARAM(z, n, data) const T ## n&
+
+ template<BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, typename T)>
+ inline typename result_of::zip<BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, const T)>::type
+ zip(BOOST_PP_ENUM_BINARY_PARAMS(ZIP_ITERATION, T, const& t))
+ {
+ fusion::vector<BOOST_PP_ENUM(ZIP_ITERATION, FUSION_REF_PARAM, _)> seqs(
+ BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, t));
+ return typename result_of::zip<BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, const T)>::type(
+ seqs);
+ }
+
+#undef FUSION_REF_PARAM
+#undef ZIP_ITERATION
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SEQUENCE_CLASS_10022005_0614)
+#define FUSION_SEQUENCE_CLASS_10022005_0614
+
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/container/list.hpp>
+#include <boost/fusion/container/map.hpp>
+#include <boost/fusion/container/set.hpp>
+#include <boost/fusion/container/deque.hpp>
+#include <boost/fusion/container/generation.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_SEQUENCE_CONTAINER_DEQUE_24112006_2036)
+#define BOOST_FUSION_SEQUENCE_CONTAINER_DEQUE_24112006_2036
+
+#include <boost/fusion/container/deque/deque.hpp>
+#include <boost/fusion/container/deque/convert.hpp>
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_BACK_EXTENDED_DEQUE_26112006_2209)
+#define BOOST_FUSION_BACK_EXTENDED_DEQUE_26112006_2209
+
+#include <boost/fusion/container/deque/detail/keyed_element.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/plus.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_reference.hpp>
+
+namespace boost { namespace fusion {
+ template<typename Deque, typename T>
+ struct back_extended_deque
+ : detail::keyed_element<typename Deque::next_up, T, Deque>,
+ sequence_base<back_extended_deque<Deque, T> >
+ {
+ typedef detail::keyed_element<typename Deque::next_up, T, Deque> base;
+ typedef typename Deque::next_down next_down;
+ typedef mpl::int_<mpl::plus<typename Deque::next_up, mpl::int_<1> >::value> next_up;
+ typedef mpl::plus<typename result_of::size<Deque>::type, mpl::int_<1> > size;
+
+ back_extended_deque(Deque const& deque, typename add_reference<typename add_const<T>::type>::type t)
+ : base(t, deque)
+ {}
+ };
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_CONVERT_20061213_2207)
+#define FUSION_CONVERT_20061213_2207
+
+#include <boost/fusion/container/deque/detail/as_deque.hpp>
+#include <boost/fusion/container/deque/detail/convert_impl.hpp>
+#include <boost/fusion/container/deque/deque.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct as_deque
+ {
+ typedef typename detail::as_deque<result_of::size<Sequence>::value> gen;
+ typedef typename gen::
+ template apply<typename result_of::begin<Sequence>::type>::type
+ type;
+ };
+ }
+
+ template <typename Sequence>
+ inline typename result_of::as_deque<Sequence>::type
+ as_deque(Sequence& seq)
+ {
+ typedef typename result_of::as_deque<Sequence>::gen gen;
+ return gen::call(fusion::begin(seq));
+ }
+
+ template <typename Sequence>
+ inline typename result_of::as_deque<Sequence const>::type
+ as_deque(Sequence const& seq)
+ {
+ typedef typename result_of::as_deque<Sequence const>::gen gen;
+ return gen::call(fusion::begin(seq));
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_DEQUE_26112006_1649)
+#define BOOST_FUSION_DEQUE_26112006_1649
+
+#include <boost/fusion/container/deque/limits.hpp>
+#include <boost/fusion/container/deque/front_extended_deque.hpp>
+#include <boost/fusion/container/deque/back_extended_deque.hpp>
+#include <boost/fusion/container/deque/detail/deque_keyed_values.hpp>
+#include <boost/fusion/container/deque/detail/deque_initial_size.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/container/deque/detail/keyed_element.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+
+#include <boost/fusion/container/deque/deque_fwd.hpp>
+#include <boost/fusion/container/deque/detail/value_at_impl.hpp>
+#include <boost/fusion/container/deque/detail/at_impl.hpp>
+#include <boost/fusion/container/deque/detail/begin_impl.hpp>
+#include <boost/fusion/container/deque/detail/end_impl.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/mpl/bool.hpp>
+
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/void.hpp>
+#include <boost/utility/enable_if.hpp>
+
+namespace boost { namespace fusion {
+
+ struct deque_tag;
+
+ template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename T)>
+ struct deque
+ :
+ detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type,
+ sequence_base<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)> >
+ {
+ typedef deque_tag fusion_tag;
+ typedef typename detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type base;
+ typedef typename detail::deque_initial_size<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type size;
+ typedef mpl::int_<size::value> next_up;
+ typedef mpl::int_<
+ mpl::if_<mpl::equal_to<size, mpl::int_<0> >, mpl::int_<0>, mpl::int_<-1> >::type::value> next_down;
+ typedef mpl::false_ is_view;
+
+#include <boost/fusion/container/deque/detail/deque_forward_ctor.hpp>
+
+ deque()
+ {}
+
+ explicit deque(typename add_reference<typename add_const<T0>::type>::type t0)
+ : base(t0, detail::nil_keyed_element())
+ {}
+
+ template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
+ deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)> const& seq)
+ : base(seq)
+ {}
+
+ template<typename Sequence>
+ deque(Sequence const& seq, typename disable_if<is_convertible<Sequence, T0> >::type* dummy = 0)
+ : base(base::from_iterator(fusion::begin(seq)))
+ {}
+
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
+ deque&
+ operator=(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)> const& rhs)
+ {
+ base::operator=(rhs);
+ return *this;
+ }
+
+ template <typename T>
+ deque&
+ operator=(T const& rhs)
+ {
+ base::operator=(rhs);
+ return *this;
+ }
+
+ };
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005-2007 Joel de Guzman
+ Copyright (c) 2005-2007 Dan Marsden
+
+ Distributed under the 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(FUSION_DEQUE_FORWARD_02092007_0749)
+#define FUSION_DEQUE_FORWARD_02092007_0749
+
+#include <boost/fusion/container/deque/limits.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+
+ template<
+ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ FUSION_MAX_DEQUE_SIZE, typename T, void_)>
+ struct deque;
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_DEQUE_ITERATOR_26112006_2154)
+#define BOOST_FUSION_DEQUE_ITERATOR_26112006_2154
+
+#include <boost/fusion/iterator/iterator_facade.hpp>
+#include <boost/fusion/container/deque/detail/keyed_element.hpp>
+#include <boost/mpl/minus.hpp>
+#include <boost/mpl/equal_to.hpp>
+
+namespace boost { namespace fusion {
+
+ struct bidirectional_traversal_tag;
+
+ template<typename Seq, int Pos>
+ struct deque_iterator
+ : iterator_facade<deque_iterator<Seq, Pos>, bidirectional_traversal_tag>
+ {
+ typedef Seq sequence;
+ typedef mpl::int_<Pos> index;
+
+ deque_iterator(Seq& seq)
+ : seq_(seq)
+ {}
+
+ template<typename Iterator>
+ struct value_of
+ : detail::keyed_element_value_at<
+ typename Iterator::sequence, typename Iterator::index>
+ {};
+
+ template<typename Iterator>
+ struct deref
+ {
+ typedef typename detail::keyed_element_value_at<
+ typename Iterator::sequence, typename Iterator::index>::type element_type;
+
+ typedef typename add_reference<
+ typename mpl::eval_if<
+ is_const<typename Iterator::sequence>,
+ add_const<element_type>,
+ mpl::identity<element_type> >::type>::type type;
+
+ static type
+ call(Iterator const& it)
+ {
+ return it.seq_.get(typename Iterator::index());
+ }
+ };
+
+ template <typename Iterator, typename N>
+ struct advance
+ {
+ typedef typename Iterator::index index;
+ typedef typename Iterator::sequence sequence;
+ typedef deque_iterator<sequence, index::value + N::value> type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return type(i.seq_);
+ }
+ };
+
+ template<typename Iterator>
+ struct next
+ : advance<Iterator, mpl::int_<1> >
+ {};
+
+ template<typename Iterator>
+ struct prior
+ : advance<Iterator, mpl::int_<-1> >
+ {};
+
+ template <typename I1, typename I2>
+ struct distance : mpl::minus<typename I2::index, typename I1::index>
+ {
+ typedef typename
+ mpl::minus<
+ typename I2::index, typename I1::index
+ >::type
+ type;
+
+ static type
+ call(I1 const&, I2 const&)
+ {
+ return type();
+ }
+ };
+
+ template<typename I1, typename I2>
+ struct equal_to
+ : mpl::equal_to<typename I1::index, typename I2::index>
+ {};
+
+ Seq& seq_;
+ };
+
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_AS_DEQUE_20061213_2210)
+#define FUSION_AS_DEQUE_20061213_2210
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/inc.hpp>
+#include <boost/preprocessor/dec.hpp>
+#include <boost/fusion/container/deque/deque.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <int size>
+ struct as_deque;
+
+ template <>
+ struct as_deque<0>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef deque<> type;
+ };
+
+ template <typename Iterator>
+ static typename apply<Iterator>::type
+ call(Iterator)
+ {
+ return deque<>();
+ }
+ };
+
+#define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \
+ typedef typename fusion::result_of::next<BOOST_PP_CAT(I, n)>::type \
+ BOOST_PP_CAT(I, BOOST_PP_INC(n));
+
+#define BOOST_FUSION_NEXT_CALL_ITERATOR(z, n, data) \
+ typename gen::BOOST_PP_CAT(I, BOOST_PP_INC(n)) \
+ BOOST_PP_CAT(i, BOOST_PP_INC(n)) = fusion::next(BOOST_PP_CAT(i, n));
+
+#define BOOST_FUSION_VALUE_OF_ITERATOR(z, n, data) \
+ typedef typename fusion::result_of::value_of<BOOST_PP_CAT(I, n)>::type \
+ BOOST_PP_CAT(T, n);
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/deque/detail/as_deque.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
+#include BOOST_PP_ITERATE()
+
+#undef BOOST_FUSION_NEXT_ITERATOR
+#undef BOOST_FUSION_NEXT_CALL_ITERATOR
+#undef BOOST_FUSION_VALUE_OF_ITERATOR
+
+}}}
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define N BOOST_PP_ITERATION()
+
+ template <>
+ struct as_deque<N>
+ {
+ template <typename I0>
+ struct apply
+ {
+ BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _)
+ BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _)
+ typedef deque<BOOST_PP_ENUM_PARAMS(N, T)> type;
+ };
+
+ template <typename Iterator>
+ static typename apply<Iterator>::type
+ call(Iterator const& i0)
+ {
+ typedef apply<Iterator> gen;
+ typedef typename gen::type result;
+ BOOST_PP_REPEAT(BOOST_PP_DEC(N), BOOST_FUSION_NEXT_CALL_ITERATOR, _)
+ return result(BOOST_PP_ENUM_PARAMS(N, *i));
+ }
+ };
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_DEQUE_AT_IMPL_09122006_2017)
+#define BOOST_FUSION_DEQUE_AT_IMPL_09122006_2017
+
+#include <boost/fusion/container/deque/detail/keyed_element.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/identity.hpp>
+
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_reference.hpp>
+
+namespace boost { namespace fusion {
+
+ struct deque_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct at_impl;
+
+ template<>
+ struct at_impl<deque_tag>
+ {
+ template<typename Sequence, typename N>
+ struct apply
+ {
+ typedef typename Sequence::next_up next_up;
+ typedef typename Sequence::next_down next_down;
+ BOOST_MPL_ASSERT_RELATION(next_down::value, !=, next_up::value);
+
+ typedef mpl::plus<next_down, mpl::int_<1> > offset;
+ typedef mpl::int_<mpl::plus<N, offset>::value> adjusted_index;
+ typedef typename detail::keyed_element_value_at<Sequence, adjusted_index>::type element_type;
+ typedef typename add_reference<
+ typename mpl::eval_if<
+ is_const<Sequence>,
+ add_const<element_type>,
+ mpl::identity<element_type> >::type>::type type;
+
+ static type call(Sequence& seq)
+ {
+ return seq.get(adjusted_index());
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_DEQUE_BEGIN_IMPL_09122006_2034)
+#define BOOST_FUSION_DEQUE_BEGIN_IMPL_09122006_2034
+
+#include <boost/fusion/container/deque/deque_iterator.hpp>
+
+#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/if.hpp>
+
+namespace boost { namespace fusion {
+
+ struct deque_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct begin_impl;
+
+ template<>
+ struct begin_impl<deque_tag>
+ {
+ template<typename Sequence>
+ struct apply
+ {
+ typedef typename mpl::if_<
+ mpl::equal_to<typename Sequence::next_down, typename Sequence::next_up>,
+ deque_iterator<Sequence, 0>,
+ deque_iterator<
+ Sequence, mpl::plus<typename Sequence::next_down, mpl::int_<1> >::value> >::type type;
+
+ static type call(Sequence& seq)
+ {
+ return type(seq);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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(FUSION_CONVERT_IMPL_20061213_2207)
+#define FUSION_CONVERT_IMPL_20061213_2207
+
+#include <boost/fusion/container/deque/detail/as_deque.hpp>
+#include <boost/fusion/container/deque/deque.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+
+namespace boost { namespace fusion
+{
+ struct deque_tag;
+
+ namespace extension
+ {
+ template <typename T>
+ struct convert_impl;
+
+ template <>
+ struct convert_impl<deque_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename detail::as_deque<result_of::size<Sequence>::value> gen;
+ typedef typename gen::
+ template apply<typename result_of::begin<Sequence>::type>::type
+ type;
+
+ static type call(Sequence& seq)
+ {
+ return gen::call(fusion::begin(seq));
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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)
+#if !defined(BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_FORWARD_CTOR_04122006_2212)
+#define BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_FORWARD_CTOR_04122006_2212
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+
+#define BOOST_PP_FILENAME_1 \
+ <boost/fusion/container/deque/detail/deque_forward_ctor.hpp>
+#define BOOST_PP_ITERATION_LIMITS (2, FUSION_MAX_DEQUE_SIZE)
+#include BOOST_PP_ITERATE()
+
+#endif
+#else
+
+#define N BOOST_PP_ITERATION()
+
+deque(BOOST_PP_ENUM_BINARY_PARAMS(N, typename add_reference<typename add_const<T, >::type>::type t))
+ : base(detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(N, T)>::call(BOOST_PP_ENUM_PARAMS(N, t)))
+{}
+
+#undef N
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_DEQUE_DETAIL_DEQUE_INITIAL_SIZE_26112006_2139)
+#define BOOST_FUSION_DEQUE_DETAIL_DEQUE_INITIAL_SIZE_26112006_2139
+
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/mpl/find.hpp>
+#include <boost/mpl/begin.hpp>
+#include <boost/mpl/distance.hpp>
+#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/vector.hpp>
+
+namespace boost { namespace fusion {
+
+ struct void_;
+
+namespace detail {
+
+ template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename T)>
+ struct deque_initial_size
+ {
+ typedef mpl::vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)> args;
+ typedef typename mpl::find<args, void_>::type first_void;
+ typedef typename mpl::distance<typename mpl::begin<args>::type, first_void>::type type;
+ };
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_DEQUE_DETAIL_DEQUE_KEYED_VALUES_26112006_1330)
+#define BOOST_FUSION_DEQUE_DETAIL_DEQUE_KEYED_VALUES_26112006_1330
+
+#include <boost/fusion/container/deque/limits.hpp>
+#include <boost/fusion/container/deque/detail/keyed_element.hpp>
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/type_traits/add_reference.hpp>
+
+#include <boost/mpl/plus.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/print.hpp>
+
+#define FUSION_VOID(z, n, _) void_
+
+namespace boost { namespace fusion {
+
+ struct void_;
+
+namespace detail {
+
+ template<typename Key, typename Value, typename Rest>
+ struct keyed_element;
+
+ struct nil_keyed_element;
+
+ template<typename N, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(FUSION_MAX_DEQUE_SIZE, typename T, void_)>
+ struct deque_keyed_values_impl;
+
+ template<typename N>
+ struct deque_keyed_values_impl<N, BOOST_PP_ENUM(FUSION_MAX_DEQUE_SIZE, FUSION_VOID, _)>
+ {
+ typedef nil_keyed_element type;
+
+ static type call()
+ {
+ return type();
+ }
+ };
+
+ template<typename N, BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename T)>
+ struct deque_keyed_values_impl
+ {
+ typedef mpl::int_<mpl::plus<N, mpl::int_<1> >::value> next_index;
+
+ typedef typename deque_keyed_values_impl<
+ next_index,
+ BOOST_PP_ENUM_SHIFTED_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type tail;
+ typedef keyed_element<N, T0, tail> type;
+
+#include <boost/fusion/container/deque/detail/deque_keyed_values_call.hpp>
+
+ };
+
+ template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(FUSION_MAX_DEQUE_SIZE, typename T, void_)>
+ struct deque_keyed_values
+ : deque_keyed_values_impl<mpl::int_<0>, BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>
+ {};
+
+}}}
+
+#undef FUSION_VOID
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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)
+#if !defined(BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_KEYED_VALUES_CALL_04122006_2211)
+#define BOOST_FUSION_SEQUENCE_DEQUE_DETAIL_DEQUE_KEYED_VALUES_CALL_04122006_2211
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+
+#define BOOST_PP_FILENAME_1 \
+ <boost/fusion/container/deque/detail/deque_keyed_values_call.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
+#include BOOST_PP_ITERATE()
+
+#endif
+#else
+
+#define N BOOST_PP_ITERATION()
+
+static type call(BOOST_PP_ENUM_BINARY_PARAMS(N, typename add_reference<typename add_const<T, >::type>::type t))
+{
+ return type(t0,
+ deque_keyed_values_impl<
+ next_index
+#if N > 1
+ , BOOST_PP_ENUM_SHIFTED_PARAMS(N, T)
+#endif
+ >::call(BOOST_PP_ENUM_SHIFTED_PARAMS(N, t)));
+}
+
+#undef N
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_DEQUE_END_IMPL_09122006_2034)
+#define BOOST_FUSION_DEQUE_END_IMPL_09122006_2034
+
+#include <boost/fusion/container/deque/deque_iterator.hpp>
+
+#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/if.hpp>
+
+namespace boost { namespace fusion {
+
+ struct deque_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct end_impl;
+
+ template<>
+ struct end_impl<deque_tag>
+ {
+ template<typename Sequence>
+ struct apply
+ {
+ typedef typename mpl::if_<
+ mpl::equal_to<typename Sequence::next_down, typename Sequence::next_up>,
+ deque_iterator<Sequence, 0>,
+ deque_iterator<
+ Sequence, Sequence::next_up::value> >::type type;
+
+ static type call(Sequence& seq)
+ {
+ return type(seq);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_DEQUE_DETAIL_KEYED_ELEMENT_26112006_1330)
+#define BOOST_FUSION_DEQUE_DETAIL_KEYED_ELEMENT_26112006_1330
+
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/add_const.hpp>
+
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+
+namespace boost { namespace fusion {
+
+ struct fusion_sequence_tag;
+
+namespace detail {
+
+ struct nil_keyed_element
+ {
+ typedef fusion_sequence_tag tag;
+ void get();
+
+ template<typename It>
+ static nil_keyed_element
+ from_iterator(It const&)
+ {
+ return nil_keyed_element();
+ }
+ };
+
+ template<typename Key, typename Value, typename Rest>
+ struct keyed_element
+ : Rest
+ {
+ typedef Rest base;
+ typedef fusion_sequence_tag tag;
+ using Rest::get;
+
+ template<typename It>
+ static keyed_element
+ from_iterator(It const& it)
+ {
+ return keyed_element(
+ *it, base::from_iterator(fusion::next(it)));
+ }
+
+ template<typename U, typename Rst>
+ keyed_element(keyed_element<Key, U, Rst> const& rhs)
+ : Rest(rhs.get_base()), value_(rhs.value_)
+ {}
+
+ Rest const get_base() const
+ {
+ return *this;
+ }
+
+ typename add_reference<typename add_const<Value>::type>::type get(Key) const
+ {
+ return value_;
+ }
+
+ typename add_reference<Value>::type get(Key)
+ {
+ return value_;
+ }
+
+ keyed_element(typename add_reference<typename add_const<Value>::type>::type value, Rest const& rest)
+ : Rest(rest), value_(value)
+ {}
+
+ keyed_element()
+ : Rest(), value_()
+ {}
+
+ template<typename U, typename Rst>
+ keyed_element& operator=(keyed_element<Key, U, Rst> const& rhs)
+ {
+ base::operator=(static_cast<Rst const&>(rhs)); // cast for msvc-7.1
+ value_ = rhs.value_;
+ return *this;
+ }
+
+ keyed_element& operator=(keyed_element const& rhs)
+ {
+ base::operator=(rhs);
+ value_ = rhs.value_;
+ return *this;
+ }
+
+ Value value_;
+ };
+
+ template<typename Elem, typename Key>
+ struct keyed_element_value_at
+ : keyed_element_value_at<typename Elem::base, Key>
+ {};
+
+ template<typename Key, typename Value, typename Rest>
+ struct keyed_element_value_at<keyed_element<Key, Value, Rest>, Key>
+ {
+ typedef Value type;
+ };
+
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_DEQUE_VALUE_AT_IMPL_08122006_0756)
+#define BOOST_FUSION_DEQUE_VALUE_AT_IMPL_08122006_0756
+
+#include <boost/fusion/container/deque/detail/keyed_element.hpp>
+
+#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/assert.hpp>
+
+namespace boost { namespace fusion {
+
+ struct deque_tag;
+
+ namespace extension
+ {
+ template<typename T>
+ struct value_at_impl;
+
+ template<>
+ struct value_at_impl<deque_tag>
+ {
+ template<typename Sequence, typename N>
+ struct apply
+ {
+ typedef typename Sequence::next_up next_up;
+ typedef typename Sequence::next_down next_down;
+ BOOST_MPL_ASSERT_RELATION(next_down::value, !=, next_up::value);
+
+ typedef mpl::plus<next_down, mpl::int_<1> > offset;
+ typedef mpl::int_<mpl::plus<N, offset>::value> adjusted_index;
+ typedef typename detail::keyed_element_value_at<Sequence, adjusted_index>::type type;
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_FRONT_EXTENDED_DEQUE_26112006_2209)
+#define BOOST_FUSION_FRONT_EXTENDED_DEQUE_26112006_2209
+
+#include <boost/fusion/container/deque/detail/keyed_element.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/minus.hpp>
+#include <boost/mpl/plus.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_reference.hpp>
+
+#include <boost/fusion/support/sequence_base.hpp>
+
+namespace boost { namespace fusion {
+ template<typename Deque, typename T>
+ struct front_extended_deque
+ : detail::keyed_element<typename Deque::next_down, T, Deque>,
+ sequence_base<front_extended_deque<Deque, T> >
+ {
+ typedef detail::keyed_element<typename Deque::next_down, T, Deque> base;
+ typedef mpl::int_<mpl::minus<typename Deque::next_down, mpl::int_<1> >::value> next_down;
+ typedef typename Deque::next_up next_up;
+ typedef mpl::plus<typename result_of::size<Deque>::type, mpl::int_<1> > size;
+
+ front_extended_deque(Deque const& deque, typename add_reference<typename add_const<T>::type>::type t)
+ : base(t, deque)
+ {}
+ };
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_DEQUE_LIMITS_26112006_1737)
+#define BOOST_FUSION_DEQUE_LIMITS_26112006_1737
+
+#if !defined(FUSION_MAX_DEQUE_SIZE)
+#define FUSION_MAX_DEQUE_SIZE 10
+#endif
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006 Eric Niebler
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef FUSION_BINARY_TREE_EAN_05032006_1027
+#define FUSION_BINARY_TREE_EAN_05032006_1027
+
+#include <boost/mpl/if.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/view/single_view.hpp>
+#include <boost/fusion/container/list/cons.hpp> // for nil
+#include <boost/fusion/container/vector/vector10.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/sequence/intrinsic/ext_/segments.hpp>
+#include <boost/fusion/support/ext_/is_segmented.hpp>
+#include <boost/fusion/view/ext_/segmented_iterator.hpp>
+
+namespace boost { namespace fusion
+{
+ struct tree_tag;
+
+ namespace detail
+ {
+ template<typename T, bool IsConst>
+ struct reference : add_reference<T> {};
+
+ template<typename T>
+ struct reference<T, true> : reference<typename add_const<T>::type, false> {};
+
+ template<typename T>
+ struct reference<T &, true> : reference<T, false> {};
+ }
+
+ template<typename Data, typename Left = nil, typename Right = nil>
+ struct tree
+ : sequence_base<tree<Data, Left, Right> >
+ {
+ typedef Data data_type;
+ typedef Left left_type;
+ typedef Right right_type;
+ typedef tree_tag fusion_tag;
+ typedef forward_traversal_tag category;
+ typedef mpl::false_ is_view;
+
+ typedef typename mpl::if_<
+ traits::is_sequence<Data>
+ , Data
+ , single_view<Data>
+ >::type data_view;
+
+ explicit tree(
+ typename fusion::detail::call_param<Data>::type data_
+ , typename fusion::detail::call_param<Left>::type left_ = Left()
+ , typename fusion::detail::call_param<Right>::type right_ = Right()
+ )
+ : segments(left_, data_view(data_), right_)
+ {}
+
+ typedef vector3<Left, data_view, Right> segments_type;
+ segments_type segments;
+ };
+
+ template<typename Data>
+ tree<Data> make_tree(Data const &data)
+ {
+ return tree<Data>(data);
+ }
+
+ template<typename Data, typename Left, typename Right>
+ tree<Data, Left, Right> make_tree(Data const &data, Left const &left, Right const &right)
+ {
+ return tree<Data, Left, Right>(data, left, right);
+ }
+
+ namespace extension
+ {
+ template<>
+ struct is_segmented_impl<tree_tag>
+ {
+ template<typename Sequence>
+ struct apply : mpl::true_ {};
+ };
+
+ template<>
+ struct segments_impl<tree_tag>
+ {
+ template<typename Sequence>
+ struct apply
+ {
+ typedef typename mpl::if_<
+ is_const<Sequence>
+ , typename Sequence::segments_type const &
+ , typename Sequence::segments_type &
+ >::type type;
+
+ static type call(Sequence &seq)
+ {
+ return seq.segments;
+ }
+ };
+ };
+
+ template<>
+ struct begin_impl<tree_tag>
+ {
+ template<typename Sequence>
+ struct apply
+ : segmented_begin<Sequence>
+ {};
+ };
+
+ template<>
+ struct end_impl<tree_tag>
+ {
+ template<typename Sequence>
+ struct apply
+ : segmented_end<Sequence>
+ {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SEQUENCE_GENERATION_10022005_0615)
+#define FUSION_SEQUENCE_GENERATION_10022005_0615
+
+#include <boost/fusion/container/generation/cons_tie.hpp>
+#include <boost/fusion/container/generation/ignore.hpp>
+#include <boost/fusion/container/generation/list_tie.hpp>
+#include <boost/fusion/container/generation/make_cons.hpp>
+#include <boost/fusion/container/generation/make_list.hpp>
+#include <boost/fusion/container/generation/make_map.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/container/generation/vector_tie.hpp>
+#include <boost/fusion/container/generation/make_set.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+
+ Distributed under the 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(FUSION_CONS_TIE_07182005_0854)
+#define FUSION_CONS_TIE_07182005_0854
+
+#include <boost/fusion/container/list/cons.hpp>
+
+namespace boost { namespace fusion
+{
+ struct nil;
+
+ namespace result_of
+ {
+ template <typename Car, typename Cdr = nil>
+ struct cons_tie
+ {
+ typedef cons<Car&, Cdr> type;
+ };
+ }
+
+ // $$$ do we really want a cons_tie? $$$
+ template <typename Car>
+ inline cons<Car&>
+ cons_tie(Car& car)
+ {
+ return cons<Car&>(car);
+ }
+
+ // $$$ do we really want a cons_tie? $$$
+ template <typename Car, typename Cdr>
+ inline cons<Car&, Cdr>
+ cons_tie(Car& car, Cdr const& cdr)
+ {
+ return cons<Car&, Cdr>(car, cdr);
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_DEQUE_TIE_07192005_1242)
+#define FUSION_DEQUE_TIE_07192005_1242
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/fusion/container/deque/deque.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+
+ namespace result_of
+ {
+ template <
+ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ FUSION_MAX_DEQUE_SIZE, typename T, void_)
+ , typename Extra = void_
+ >
+ struct deque_tie;
+ }
+
+#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)&
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/deque_tie.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
+#include BOOST_PP_ITERATE()
+
+#undef BOOST_FUSION_REF
+
+}}
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define N BOOST_PP_ITERATION()
+
+ namespace result_of
+ {
+ template <BOOST_PP_ENUM_PARAMS(N, typename T)>
+#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
+ #define TEXT(z, n, text) , text
+ struct deque_tie< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_DEQUE_SIZE, TEXT, void_) >
+ #undef TEXT
+#else
+ struct deque_tie<BOOST_PP_ENUM_PARAMS(N, T)>
+#endif
+ {
+ typedef deque<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> type;
+ };
+ }
+
+ template <BOOST_PP_ENUM_PARAMS(N, typename T)>
+ inline deque<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>
+ deque_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _))
+ {
+ return deque<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>(
+ BOOST_PP_ENUM_PARAMS(N, _));
+ }
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001 Doug Gregor
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_IGNORE_07192005_0329)
+#define FUSION_IGNORE_07192005_0329
+
+namespace boost { namespace fusion
+{
+ // Swallows any assignment (by Doug Gregor)
+ namespace detail
+ {
+ struct swallow_assign
+ {
+ template<typename T>
+ swallow_assign const&
+ operator=(const T&) const
+ {
+ return *this;
+ }
+ };
+ }
+
+ // "ignore" allows tuple positions to be ignored when using "tie".
+ detail::swallow_assign const ignore = detail::swallow_assign();
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_LIST_TIE_07192005_0109)
+#define FUSION_LIST_TIE_07192005_0109
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/fusion/container/list/list.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+
+ namespace result_of
+ {
+ template <
+ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ FUSION_MAX_LIST_SIZE, typename T, void_)
+ , typename Extra = void_
+ >
+ struct list_tie;
+ }
+
+// $$$ shouldn't we remove_reference first to allow references? $$$
+#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)&
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/list_tie.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE)
+#include BOOST_PP_ITERATE()
+
+#undef BOOST_FUSION_REF
+
+}}
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define N BOOST_PP_ITERATION()
+
+ namespace result_of
+ {
+ template <BOOST_PP_ENUM_PARAMS(N, typename T)>
+#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
+ #define TEXT(z, n, text) , text
+ struct list_tie< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_LIST_SIZE, TEXT, void_) >
+ #undef TEXT
+#else
+ struct list_tie<BOOST_PP_ENUM_PARAMS(N, T)>
+#endif
+ {
+ typedef list<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> type;
+ };
+ }
+
+ template <BOOST_PP_ENUM_PARAMS(N, typename T)>
+ inline list<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>
+ list_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _))
+ {
+ return list<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>(
+ BOOST_PP_ENUM_PARAMS(N, _));
+ }
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ Distributed under the 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(FUSION_MAKE_CONS_07172005_0918)
+#define FUSION_MAKE_CONS_07172005_0918
+
+#include <boost/fusion/support/detail/as_fusion_element.hpp>
+#include <boost/fusion/container/list/cons.hpp>
+
+namespace boost { namespace fusion
+{
+ struct nil;
+
+ namespace result_of
+ {
+ template <typename Car, typename Cdr = nil>
+ struct make_cons
+ {
+ typedef cons<typename detail::as_fusion_element<Car>::type, Cdr> type;
+ };
+ }
+
+ template <typename Car>
+ inline cons<typename detail::as_fusion_element<Car>::type>
+ make_cons(Car const& car)
+ {
+ return cons<typename detail::as_fusion_element<Car>::type>(car);
+ }
+
+ template <typename Car, typename Cdr>
+ inline cons<typename detail::as_fusion_element<Car>::type, Cdr>
+ make_cons(Car const& car, Cdr const& cdr)
+ {
+ return cons<typename detail::as_fusion_element<Car>::type, Cdr>(car, cdr);
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_MAKE_DEQUE_07162005_0243)
+#define FUSION_MAKE_DEQUE_07162005_0243
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/fusion/container/deque/deque.hpp>
+#include <boost/fusion/support/detail/as_fusion_element.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+
+ namespace result_of
+ {
+ template <
+ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ FUSION_MAX_DEQUE_SIZE, typename T, void_)
+ , typename Extra = void_
+ >
+ struct make_deque;
+
+ template <>
+ struct make_deque<>
+ {
+ typedef deque<> type;
+ };
+ }
+
+ inline deque<>
+ make_deque()
+ {
+ return deque<>();
+ }
+
+#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \
+ typename detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/make_deque.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
+#include BOOST_PP_ITERATE()
+
+#undef BOOST_FUSION_AS_FUSION_ELEMENT
+
+}}
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define N BOOST_PP_ITERATION()
+
+ namespace result_of
+ {
+ template <BOOST_PP_ENUM_PARAMS(N, typename T)>
+#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
+ #define TEXT(z, n, text) , text
+ struct make_deque< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_DEQUE_SIZE, TEXT, void_) >
+ #undef TEXT
+#else
+ struct make_deque<BOOST_PP_ENUM_PARAMS(N, T)>
+#endif
+ {
+ typedef deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type;
+ };
+ }
+
+ template <BOOST_PP_ENUM_PARAMS(N, typename T)>
+ inline deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>
+ make_deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _))
+ {
+ return deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>(
+ BOOST_PP_ENUM_PARAMS(N, _));
+ }
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_MAKE_LIST_07192005_1239)
+#define FUSION_MAKE_LIST_07192005_1239
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/fusion/container/list/list.hpp>
+#include <boost/fusion/support/detail/as_fusion_element.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+
+ namespace result_of
+ {
+ template <
+ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ FUSION_MAX_LIST_SIZE, typename T, void_)
+ , typename Extra = void_
+ >
+ struct make_list;
+
+ template <>
+ struct make_list<>
+ {
+ typedef list<> type;
+ };
+ }
+
+ inline list<>
+ make_list()
+ {
+ return list<>();
+ }
+
+#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \
+ typename detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/make_list.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE)
+#include BOOST_PP_ITERATE()
+
+#undef BOOST_FUSION_AS_FUSION_ELEMENT
+
+}}
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define N BOOST_PP_ITERATION()
+
+ namespace result_of
+ {
+ template <BOOST_PP_ENUM_PARAMS(N, typename T)>
+#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
+ #define TEXT(z, n, text) , text
+ struct make_list< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_LIST_SIZE, TEXT, void_) >
+ #undef TEXT
+#else
+ struct make_list<BOOST_PP_ENUM_PARAMS(N, T)>
+#endif
+ {
+ typedef list<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type;
+ };
+ }
+
+ template <BOOST_PP_ENUM_PARAMS(N, typename T)>
+ inline list<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>
+ make_list(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _))
+ {
+ return list<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>(
+ BOOST_PP_ENUM_PARAMS(N, _));
+ }
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_MAKE_MAP_07222005_1247)
+#define FUSION_MAKE_MAP_07222005_1247
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/fusion/container/map/map.hpp>
+#include <boost/fusion/support/detail/as_fusion_element.hpp>
+#include <boost/fusion/support/pair.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+
+ namespace result_of
+ {
+ template <
+ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ FUSION_MAX_VECTOR_SIZE, typename K, void_)
+ , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ FUSION_MAX_VECTOR_SIZE, typename D, void_)
+ , typename Extra = void_
+ >
+ struct make_map;
+
+ template <>
+ struct make_map<>
+ {
+ typedef map<> type;
+ };
+ }
+
+ inline map<>
+ make_map()
+ {
+ return map<>();
+ }
+
+#define BOOST_FUSION_PAIR(z, n, data) \
+ fusion::pair< \
+ BOOST_PP_CAT(K, n) \
+ , typename detail::as_fusion_element<BOOST_PP_CAT(D, n)>::type>
+
+#define BOOST_FUSION_MAKE_PAIR(z, n, data) \
+ fusion::make_pair<BOOST_PP_CAT(K, n)>(BOOST_PP_CAT(_, n)) \
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/make_map.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
+#include BOOST_PP_ITERATE()
+
+#undef BOOST_FUSION_PAIR
+#undef BOOST_FUSION_MAKE_PAIR
+
+}}
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define N BOOST_PP_ITERATION()
+
+ namespace result_of
+ {
+ template <
+ BOOST_PP_ENUM_PARAMS(N, typename K)
+ , BOOST_PP_ENUM_PARAMS(N, typename D)
+ >
+#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
+ #define TEXT(z, n, text) , text
+ struct make_map<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D) BOOST_PP_REPEAT_FROM_TO(N, FUSION_MAX_VECTOR_SIZE, TEXT, void_) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_VECTOR_SIZE, TEXT, void_)>
+ #undef TEXT
+#else
+ struct make_map<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D)>
+#endif
+ {
+ typedef map<BOOST_PP_ENUM(N, BOOST_FUSION_PAIR, _)> type;
+ };
+ }
+
+ template <
+ BOOST_PP_ENUM_PARAMS(N, typename K)
+ , BOOST_PP_ENUM_PARAMS(N, typename D)
+ >
+ inline map<BOOST_PP_ENUM(N, BOOST_FUSION_PAIR, _)>
+ make_map(BOOST_PP_ENUM_BINARY_PARAMS(N, D, const& _))
+ {
+ return map<BOOST_PP_ENUM(N, BOOST_FUSION_PAIR, _)>(
+ BOOST_PP_ENUM(N, BOOST_FUSION_MAKE_PAIR, _));
+ }
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_MAKE_SET_09162005_1125)
+#define FUSION_MAKE_SET_09162005_1125
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/fusion/container/set/set.hpp>
+#include <boost/fusion/support/detail/as_fusion_element.hpp>
+#include <boost/fusion/support/pair.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+
+ namespace result_of
+ {
+ template <
+ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ FUSION_MAX_VECTOR_SIZE, typename T, void_)
+ , typename Extra = void_
+ >
+ struct make_set;
+
+ template <>
+ struct make_set<>
+ {
+ typedef set<> type;
+ };
+ }
+
+ inline set<>
+ make_set()
+ {
+ return set<>();
+ }
+
+#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \
+ typename detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/make_set.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
+#include BOOST_PP_ITERATE()
+
+#undef BOOST_FUSION_ELEMENT
+#undef BOOST_FUSION_AS_ELEMENT
+
+}}
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define N BOOST_PP_ITERATION()
+
+ namespace result_of
+ {
+ template <BOOST_PP_ENUM_PARAMS(N, typename T)>
+#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
+ #define TEXT(z, n, text) , text
+ struct make_set< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_SET_SIZE, TEXT, void_) >
+ #undef TEXT
+#else
+ struct make_set<BOOST_PP_ENUM_PARAMS(N, T)>
+#endif
+ {
+ typedef set<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type;
+ };
+ }
+
+ template <BOOST_PP_ENUM_PARAMS(N, typename T)>
+ inline set<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>
+ make_set(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _))
+ {
+ return set<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>(
+ BOOST_PP_ENUM_PARAMS(N, _));
+ }
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_MAKE_VECTOR_07162005_0243)
+#define FUSION_MAKE_VECTOR_07162005_0243
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/support/detail/as_fusion_element.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+
+ namespace result_of
+ {
+ template <
+ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ FUSION_MAX_VECTOR_SIZE, typename T, void_)
+ , typename Extra = void_
+ >
+ struct make_vector;
+
+ template <>
+ struct make_vector<>
+ {
+ typedef vector<> type;
+ };
+ }
+
+ inline vector<>
+ make_vector()
+ {
+ return vector<>();
+ }
+
+#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \
+ typename detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/make_vector.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
+#include BOOST_PP_ITERATE()
+
+#undef BOOST_FUSION_AS_FUSION_ELEMENT
+
+}}
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define N BOOST_PP_ITERATION()
+
+ namespace result_of
+ {
+ template <BOOST_PP_ENUM_PARAMS(N, typename T)>
+#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
+ #define TEXT(z, n, text) , text
+ struct make_vector< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_VECTOR_SIZE, TEXT, void_) >
+ #undef TEXT
+#else
+ struct make_vector<BOOST_PP_ENUM_PARAMS(N, T)>
+#endif
+ {
+ typedef vector<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type;
+ };
+ }
+
+ template <BOOST_PP_ENUM_PARAMS(N, typename T)>
+ inline vector<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>
+ make_vector(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _))
+ {
+ return vector<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>(
+ BOOST_PP_ENUM_PARAMS(N, _));
+ }
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_MAP_TIE_20060814_1116)
+#define FUSION_MAP_TIE_20060814_1116
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/fusion/container/map/map.hpp>
+#include <boost/fusion/container/map/limits.hpp>
+#include <boost/fusion/support/pair.hpp>
+#include <boost/fusion/container/generation/pair_tie.hpp>
+#include <boost/type_traits/add_reference.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+
+ namespace result_of
+ {
+ template <
+ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ FUSION_MAX_MAP_SIZE, typename K, void_)
+ , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ FUSION_MAX_MAP_SIZE, typename D, void_)
+ , typename Extra = void_
+ >
+ struct map_tie;
+
+ template <>
+ struct map_tie<>
+ {
+ typedef map<> type;
+ };
+ }
+
+ inline map<>
+ map_tie()
+ {
+ return map<>();
+ }
+
+#define BOOST_FUSION_TIED_PAIR(z, n, data) \
+ fusion::pair< \
+ BOOST_PP_CAT(K, n) \
+ , typename add_reference<BOOST_PP_CAT(D, n)>::type>
+
+#define BOOST_FUSION_PAIR_TIE(z, n, data) \
+ fusion::pair_tie<BOOST_PP_CAT(K, n)>(BOOST_PP_CAT(_, n)) \
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/map_tie.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE)
+#include BOOST_PP_ITERATE()
+
+#undef BOOST_FUSION_PAIR
+#undef BOOST_FUSION_MAKE_PAIR
+
+}}
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define N BOOST_PP_ITERATION()
+
+ namespace result_of
+ {
+ template <
+ BOOST_PP_ENUM_PARAMS(N, typename K)
+ , BOOST_PP_ENUM_PARAMS(N, typename D)
+ >
+#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
+ #define TEXT(z, n, text) , text
+
+ struct map_tie<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D) BOOST_PP_REPEAT_FROM_TO(N, FUSION_MAX_MAP_SIZE, TEXT, void_) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_MAP_SIZE, TEXT, void_)>
+ #undef TEXT
+#else
+ struct map_tie<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D)>
+#endif
+ {
+ typedef map<BOOST_PP_ENUM(N, BOOST_FUSION_TIED_PAIR, _)> type;
+ };
+ }
+
+ template <
+ BOOST_PP_ENUM_PARAMS(N, typename K)
+ , BOOST_PP_ENUM_PARAMS(N, typename D)
+ >
+ inline map<BOOST_PP_ENUM(N, BOOST_FUSION_TIED_PAIR, _)>
+ map_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, D, & _))
+ {
+ return map<BOOST_PP_ENUM(N, BOOST_FUSION_TIED_PAIR, _)>(
+ BOOST_PP_ENUM(N, BOOST_FUSION_PAIR_TIE, _));
+ }
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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_FUSION_PAIR_TIE_20060812_2058)
+#define BOOST_FUSION_PAIR_TIE_20060812_2058
+
+#include <boost/type_traits/is_const.hpp>
+#include <boost/utility/enable_if.hpp>
+
+namespace boost { namespace fusion {
+
+ template<typename Key, typename T>
+ struct pair;
+
+ namespace result_of
+ {
+ template<typename Key, typename T>
+ struct pair_tie
+ {
+ typedef fusion::pair<Key, T&> type;
+ };
+ }
+
+ template<typename Key, typename T>
+ typename disable_if<is_const<T>, typename result_of::pair_tie<Key, T>::type>::type
+ pair_tie(T& t)
+ {
+ return typename result_of::pair_tie<Key, T>::type(t);
+ }
+
+ template<typename Key, typename T>
+ typename result_of::pair_tie<Key, T const>::type
+ pair_tie(T const& t)
+ {
+ return typename result_of::pair_tie<Key, T const>::type(t);
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_VECTOR_TIE_07192005_1242)
+#define FUSION_VECTOR_TIE_07192005_1242
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+
+ namespace result_of
+ {
+ template <
+ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ FUSION_MAX_VECTOR_SIZE, typename T, void_)
+ , typename Extra = void_
+ >
+ struct vector_tie;
+ }
+
+#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)&
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/vector_tie.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
+#include BOOST_PP_ITERATE()
+
+#undef BOOST_FUSION_REF
+
+}}
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define N BOOST_PP_ITERATION()
+
+ namespace result_of
+ {
+ template <BOOST_PP_ENUM_PARAMS(N, typename T)>
+#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
+ #define TEXT(z, n, text) , text
+ struct vector_tie< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_VECTOR_SIZE, TEXT, void_) >
+ #undef TEXT
+#else
+ struct vector_tie<BOOST_PP_ENUM_PARAMS(N, T)>
+#endif
+ {
+ typedef vector<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> type;
+ };
+ }
+
+ template <BOOST_PP_ENUM_PARAMS(N, typename T)>
+ inline vector<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>
+ vector_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _))
+ {
+ return vector<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>(
+ BOOST_PP_ENUM_PARAMS(N, _));
+ }
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SEQUENCE_CLASS_LIST_10022005_0605)
+#define FUSION_SEQUENCE_CLASS_LIST_10022005_0605
+
+#include <boost/fusion/container/list/cons.hpp>
+#include <boost/fusion/container/list/cons_iterator.hpp>
+#include <boost/fusion/container/list/limits.hpp>
+#include <boost/fusion/container/list/list.hpp>
+#include <boost/fusion/container/list/list_fwd.hpp>
+#include <boost/fusion/container/list/convert.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ Distributed under the 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(FUSION_CONS_07172005_0843)
+#define FUSION_CONS_07172005_0843
+
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/container/list/cons_iterator.hpp>
+#include <boost/fusion/container/list/detail/begin_impl.hpp>
+#include <boost/fusion/container/list/detail/end_impl.hpp>
+#include <boost/fusion/container/list/detail/at_impl.hpp>
+#include <boost/fusion/container/list/detail/value_at_impl.hpp>
+#include <boost/fusion/container/list/detail/empty_impl.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/or.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+ struct cons_tag;
+ struct forward_traversal_tag;
+ struct fusion_sequence_tag;
+
+ struct nil : sequence_base<nil>
+ {
+ typedef mpl::int_<0> size;
+ typedef cons_tag fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef mpl::false_ is_view;
+ typedef forward_traversal_tag category;
+ typedef void_ car_type;
+ typedef void_ cdr_type;
+
+ nil() {}
+
+ template <typename Iterator>
+ nil(Iterator const& iter, mpl::true_ /*this_is_an_iterator*/)
+ {}
+
+ template <typename Iterator>
+ void assign_from_iter(Iterator const& iter)
+ {
+ }
+ };
+
+ template <typename Car, typename Cdr = nil>
+ struct cons : sequence_base<cons<Car, Cdr> >
+ {
+ typedef mpl::int_<Cdr::size::value+1> size;
+ typedef cons_tag fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef mpl::false_ is_view;
+ typedef forward_traversal_tag category;
+ typedef Car car_type;
+ typedef Cdr cdr_type;
+
+ cons()
+ : car(), cdr() {}
+
+ explicit cons(typename detail::call_param<Car>::type car)
+ : car(car), cdr() {}
+
+ cons(
+ typename detail::call_param<Car>::type car
+ , typename detail::call_param<Cdr>::type cdr)
+ : car(car), cdr(cdr) {}
+
+ template <typename Car2, typename Cdr2>
+ cons(cons<Car2, Cdr2> const& rhs)
+ : car(rhs.car), cdr(rhs.cdr) {}
+
+ cons(cons const& rhs)
+ : car(rhs.car), cdr(rhs.cdr) {}
+
+ template <typename Sequence>
+ cons(
+ Sequence const& seq
+ , typename disable_if<
+ mpl::or_<
+ is_convertible<Sequence, cons> // use copy ctor instead
+ , is_convertible<Sequence, Car> // use copy to car instead
+ >
+ >::type* dummy = 0
+ )
+ : car(*fusion::begin(seq))
+ , cdr(fusion::next(fusion::begin(seq)), mpl::true_()) {}
+
+ template <typename Iterator>
+ cons(Iterator const& iter, mpl::true_ /*this_is_an_iterator*/)
+ : car(*iter)
+ , cdr(fusion::next(iter), mpl::true_()) {}
+
+ template <typename Car2, typename Cdr2>
+ cons& operator=(cons<Car2, Cdr2> const& rhs)
+ {
+ car = rhs.car;
+ cdr = rhs.cdr;
+ return *this;
+ }
+
+ cons& operator=(cons const& rhs)
+ {
+ car = rhs.car;
+ cdr = rhs.cdr;
+ return *this;
+ }
+
+ template <typename Sequence>
+ typename disable_if<is_convertible<Sequence, Car>, cons&>::type
+ operator=(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type Iterator;
+ Iterator iter = fusion::begin(seq);
+ this->assign_from_iter(iter);
+ return *this;
+ }
+
+ template <typename Iterator>
+ void assign_from_iter(Iterator const& iter)
+ {
+ car = *iter;
+ cdr.assign_from_iter(fusion::next(iter));
+ }
+
+ car_type car;
+ cdr_type cdr;
+ };
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ Distributed under the 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(FUSION_CONS_ITERATOR_07172005_0849)
+#define FUSION_CONS_ITERATOR_07172005_0849
+
+#include <boost/type_traits/add_const.hpp>
+#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/container/list/detail/deref_impl.hpp>
+#include <boost/fusion/container/list/detail/next_impl.hpp>
+#include <boost/fusion/container/list/detail/value_of_impl.hpp>
+#include <boost/fusion/container/list/detail/equal_to_impl.hpp>
+#include <boost/fusion/container/list/list_fwd.hpp>
+
+namespace boost { namespace fusion
+{
+ struct nil;
+ struct cons_iterator_tag;
+ struct forward_traversal_tag;
+
+ template <typename Cons>
+ struct cons_iterator_identity;
+
+ template <typename Cons = nil>
+ struct cons_iterator : iterator_base<cons_iterator<Cons> >
+ {
+ typedef cons_iterator_tag fusion_tag;
+ typedef forward_traversal_tag category;
+ typedef Cons cons_type;
+ typedef cons_iterator_identity<
+ typename add_const<Cons>::type>
+ identity;
+
+ explicit cons_iterator(cons_type& cons)
+ : cons(cons) {}
+
+ cons_type& cons;
+ };
+
+ struct nil_iterator : iterator_base<nil_iterator>
+ {
+ typedef forward_traversal_tag category;
+ typedef cons_iterator_tag fusion_tag;
+ typedef nil cons_type;
+ typedef cons_iterator_identity<
+ add_const<nil>::type>
+ identity;
+ nil_iterator() {}
+ explicit nil_iterator(nil const&) {}
+ };
+
+ template <>
+ struct cons_iterator<nil> : nil_iterator
+ {
+ cons_iterator() {}
+ explicit cons_iterator(nil const&) {}
+ };
+
+ template <>
+ struct cons_iterator<nil const> : nil_iterator
+ {
+ cons_iterator() {}
+ explicit cons_iterator(nil const&) {}
+ };
+
+ template <>
+ struct cons_iterator<list<> > : nil_iterator
+ {
+ cons_iterator() {}
+ explicit cons_iterator(nil const&) {}
+ };
+
+ template <>
+ struct cons_iterator<list<> const> : nil_iterator
+ {
+ cons_iterator() {}
+ explicit cons_iterator(nil const&) {}
+ };
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_CONVERT_09232005_1215)
+#define FUSION_CONVERT_09232005_1215
+
+#include <boost/fusion/container/list/cons.hpp>
+#include <boost/fusion/container/list/detail/build_cons.hpp>
+#include <boost/fusion/container/list/detail/convert_impl.hpp>
+#include <boost/fusion/sequence/intrinsic/empty.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct as_list
+ {
+ typedef typename
+ detail::build_cons<
+ typename result_of::begin<Sequence>::type
+ , typename result_of::end<Sequence>::type
+ >
+ build_cons;
+
+ typedef typename build_cons::type type;
+
+ static type
+ call(Sequence& seq)
+ {
+ return build_cons::call(fusion::begin(seq), fusion::end(seq));
+ }
+ };
+ }
+
+ template <typename Sequence>
+ inline typename result_of::as_list<Sequence>::type
+ as_list(Sequence& seq)
+ {
+ return result_of::as_list<Sequence>::call(seq);
+ }
+
+ template <typename Sequence>
+ inline typename result_of::as_list<Sequence const>::type
+ as_list(Sequence const& seq)
+ {
+ return result_of::as_list<Sequence const>::call(seq);
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_AT_IMPL_07172005_0726)
+#define FUSION_AT_IMPL_07172005_0726
+
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template <typename Cons>
+ struct cons_deref
+ {
+ typedef typename Cons::car_type type;
+ };
+
+ template <typename Cons, int I>
+ struct cons_advance
+ {
+ typedef typename
+ cons_advance<Cons, I-1>::type::cdr_type
+ type;
+ };
+
+ template <typename Cons>
+ struct cons_advance<Cons, 0>
+ {
+ typedef Cons type;
+ };
+
+ template <typename Cons>
+ struct cons_advance<Cons, 1>
+ {
+ typedef typename Cons::cdr_type type;
+ };
+
+ template <typename Cons>
+ struct cons_advance<Cons, 2>
+ {
+#if BOOST_WORKAROUND(BOOST_MSVC, > 1400) // VC8 and above
+ typedef typename Cons::cdr_type::cdr_type type;
+#else
+ typedef typename Cons::cdr_type _a;
+ typedef typename _a::cdr_type type;
+#endif
+ };
+
+ template <typename Cons>
+ struct cons_advance<Cons, 3>
+ {
+#if BOOST_WORKAROUND(BOOST_MSVC, > 1400) // VC8 and above
+ typedef typename Cons::cdr_type::cdr_type::cdr_type type;
+#else
+ typedef typename Cons::cdr_type _a;
+ typedef typename _a::cdr_type _b;
+ typedef typename _b::cdr_type type;
+#endif
+ };
+
+ template <typename Cons>
+ struct cons_advance<Cons, 4>
+ {
+#if BOOST_WORKAROUND(BOOST_MSVC, > 1400) // VC8 and above
+ typedef typename Cons::cdr_type::cdr_type::cdr_type::cdr_type type;
+#else
+ typedef typename Cons::cdr_type _a;
+ typedef typename _a::cdr_type _b;
+ typedef typename _b::cdr_type _c;
+ typedef typename _c::cdr_type type;
+#endif
+ };
+ }
+
+ struct cons_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct at_impl;
+
+ template <>
+ struct at_impl<cons_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply
+ {
+ typedef detail::cons_deref<
+ typename detail::cons_advance<Sequence, N::value>::type>
+ element;
+
+ typedef typename
+ mpl::eval_if<
+ is_const<Sequence>
+ , detail::cref_result<element>
+ , detail::ref_result<element>
+ >::type
+ type;
+
+ template <typename Cons, int N2>
+ static type
+ call(Cons& s, mpl::int_<N2>)
+ {
+ return call(s.cdr, mpl::int_<N2-1>());
+ }
+
+ template <typename Cons>
+ static type
+ call(Cons& s, mpl::int_<0>)
+ {
+ return s.car;
+ }
+
+ static type
+ call(Sequence& s)
+ {
+ return call(s, mpl::int_<N::value>());
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ Distributed under the 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(FUSION_BEGIN_IMPL_07172005_0824)
+#define FUSION_BEGIN_IMPL_07172005_0824
+
+#include <boost/mpl/if.hpp>
+#include <boost/type_traits/is_const.hpp>
+
+namespace boost { namespace fusion
+{
+ struct nil;
+
+ struct cons_tag;
+
+ template <typename Car, typename Cdr>
+ struct cons;
+
+ template <typename Cons>
+ struct cons_iterator;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<cons_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef cons_iterator<Sequence> type;
+
+ static type
+ call(Sequence& t)
+ {
+ return type(t);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_BUILD_CONS_09232005_1222)
+#define FUSION_BUILD_CONS_09232005_1222
+
+#include <boost/fusion/container/list/cons.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <
+ typename First
+ , typename Last
+ , bool is_empty = result_of::equal_to<First, Last>::value>
+ struct build_cons;
+
+ template <typename First, typename Last>
+ struct build_cons<First, Last, true>
+ {
+ typedef nil type;
+
+ static nil
+ call(First const&, Last const&)
+ {
+ return nil();
+ }
+ };
+
+ template <typename First, typename Last>
+ struct build_cons<First, Last, false>
+ {
+ typedef
+ build_cons<typename result_of::next<First>::type, Last>
+ next_build_cons;
+
+ typedef cons<
+ typename result_of::value_of<First>::type
+ , typename next_build_cons::type>
+ type;
+
+ static type
+ call(First const& f, Last const& l)
+ {
+ return type(*f, next_build_cons::call(fusion::next(f), l));
+ }
+ };
+
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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(FUSION_CONVERT_IMPL_09232005_1215)
+#define FUSION_CONVERT_IMPL_09232005_1215
+
+#include <boost/fusion/container/list/cons.hpp>
+#include <boost/fusion/container/list/detail/build_cons.hpp>
+#include <boost/fusion/sequence/intrinsic/empty.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+
+namespace boost { namespace fusion
+{
+ struct cons_tag;
+
+ namespace extension
+ {
+ template <typename T>
+ struct convert_impl;
+
+ template <>
+ struct convert_impl<cons_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename
+ detail::build_cons<
+ typename result_of::begin<Sequence>::type
+ , typename result_of::end<Sequence>::type
+ >
+ build_cons;
+
+ typedef typename build_cons::type type;
+
+ static type
+ call(Sequence& seq)
+ {
+ return build_cons::call(fusion::begin(seq), fusion::end(seq));
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ Distributed under the 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(FUSION_DEREF_IMPL_07172005_0831)
+#define FUSION_DEREF_IMPL_07172005_0831
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_reference.hpp>
+
+namespace boost { namespace fusion
+{
+ struct cons_iterator_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<cons_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::cons_type cons_type;
+ typedef typename cons_type::car_type value_type;
+
+ typedef typename mpl::eval_if<
+ is_const<cons_type>
+ , add_reference<typename add_const<value_type>::type>
+ , add_reference<value_type> >::type
+ type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return i.cons.car;
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ Distributed under the 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_FUSION_SEQUENCE_EMPTY_IMPL_HPP_INCLUDED)
+#define BOOST_FUSION_SEQUENCE_EMPTY_IMPL_HPP_INCLUDED
+
+#include <boost/type_traits/is_convertible.hpp>
+
+namespace boost { namespace fusion
+{
+ struct cons_tag;
+
+ struct nil;
+
+ template <typename Car, typename Cdr>
+ struct cons;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct empty_impl;
+
+ template <>
+ struct empty_impl<cons_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ : boost::is_convertible<Sequence, nil>
+ {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ Distributed under the 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(FUSION_END_IMPL_07172005_0828)
+#define FUSION_END_IMPL_07172005_0828
+
+#include <boost/mpl/if.hpp>
+#include <boost/type_traits/is_const.hpp>
+
+namespace boost { namespace fusion
+{
+ struct nil;
+
+ struct cons_tag;
+
+ template <typename Car, typename Cdr>
+ struct cons;
+
+ template <typename Cons>
+ struct cons_iterator;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<cons_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef cons_iterator<
+ typename mpl::if_<is_const<Sequence>, nil const, nil>::type>
+ type;
+
+ static type
+ call(Sequence&)
+ {
+ return type();
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_EQUAL_TO_IMPL_09172005_1120)
+#define FUSION_EQUAL_TO_IMPL_09172005_1120
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/and.hpp>
+
+namespace boost { namespace fusion
+{
+ struct cons_iterator_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct equal_to_impl;
+
+ template <>
+ struct equal_to_impl<cons_iterator_tag>
+ {
+ template <typename I1, typename I2>
+ struct apply
+ : is_same<
+ typename I1::identity
+ , typename I2::identity
+ >
+ {
+ };
+ };
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_LIST_FORWARD_CTOR_07172005_0113)
+#define FUSION_LIST_FORWARD_CTOR_07172005_0113
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/repetition/enum_shifted.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+
+#define FUSION_LIST_CTOR_MAKE_CONS(z, n, type) tie_cons(BOOST_PP_CAT(_, n)
+#define FUSION_LIST_CL_PAREN(z, n, type) )
+
+#define BOOST_PP_FILENAME_1 \
+ <boost/fusion/container/list/detail/list_forward_ctor.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE)
+#include BOOST_PP_ITERATE()
+
+#undef FUSION_LIST_CTOR_MAKE_CONS
+#undef FUSION_LIST_CL_PAREN
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+#define N BOOST_PP_ITERATION()
+
+#if N == 1
+ explicit
+#endif
+ list(BOOST_PP_ENUM_BINARY_PARAMS(
+ N, typename detail::call_param<T, >::type _))
+ : inherited_type(list_to_cons::call(BOOST_PP_ENUM_PARAMS(N, _)))
+ {}
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+
+ Distributed under the 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(FUSION_LIST_TO_CONS_07172005_1041)
+#define FUSION_LIST_TO_CONS_07172005_1041
+
+#include <boost/fusion/container/list/cons.hpp>
+#include <boost/fusion/container/list/limits.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+
+#define FUSION_VOID(z, n, _) void_
+
+namespace boost { namespace fusion
+{
+ struct nil;
+ struct void_;
+}}
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename T)>
+ struct list_to_cons
+ {
+ typedef T0 head_type;
+ typedef list_to_cons<
+ BOOST_PP_ENUM_SHIFTED_PARAMS(FUSION_MAX_LIST_SIZE, T), void_>
+ tail_list_to_cons;
+ typedef typename tail_list_to_cons::type tail_type;
+
+ typedef cons<head_type, tail_type> type;
+
+ #include <boost/fusion/container/list/detail/list_to_cons_call.hpp>
+ };
+
+ template <>
+ struct list_to_cons<BOOST_PP_ENUM(FUSION_MAX_LIST_SIZE, FUSION_VOID, _)>
+ {
+ typedef nil type;
+ };
+}}}
+
+#undef FUSION_VOID
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_LIST_TO_CONS_CALL_07192005_0138)
+#define FUSION_LIST_TO_CONS_CALL_07192005_0138
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+
+#define BOOST_PP_FILENAME_1 \
+ <boost/fusion/container/list/detail/list_to_cons_call.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE)
+#include BOOST_PP_ITERATE()
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+#define N BOOST_PP_ITERATION()
+
+ static type
+ call(BOOST_PP_ENUM_BINARY_PARAMS(
+ N, typename detail::call_param<T, >::type _))
+ {
+ return type(_0
+#if N > 1
+ , tail_list_to_cons::call(BOOST_PP_ENUM_SHIFTED_PARAMS(N, _)));
+#else
+ );
+#endif
+ }
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ Distributed under the 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(FUSION_NEXT_IMPL_07172005_0836)
+#define FUSION_NEXT_IMPL_07172005_0836
+
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/add_const.hpp>
+
+namespace boost { namespace fusion
+{
+ struct cons_iterator_tag;
+
+ template <typename Cons>
+ struct cons_iterator;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct next_impl;
+
+ template <>
+ struct next_impl<cons_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::cons_type cons_type;
+ typedef typename cons_type::cdr_type cdr_type;
+
+ typedef cons_iterator<
+ typename mpl::eval_if<
+ is_const<cons_type>
+ , add_const<cdr_type>
+ , mpl::identity<cdr_type>
+ >::type>
+ type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return type(i.cons.cdr);
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_VALUE_AT_IMPL_07172005_0952)
+#define FUSION_VALUE_AT_IMPL_07172005_0952
+
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct cons_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_at_impl;
+
+ template <>
+ struct value_at_impl<cons_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply
+ {
+ typedef typename
+ mpl::eval_if<
+ mpl::bool_<N::value == 0>
+ , mpl::identity<typename Sequence::car_type>
+ , apply<typename Sequence::cdr_type, mpl::int_<N::value-1> >
+ >::type
+ type;
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ Distributed under the 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(FUSION_VALUE_OF_IMPL_07172005_0838)
+#define FUSION_VALUE_OF_IMPL_07172005_0838
+
+namespace boost { namespace fusion
+{
+ struct cons_iterator_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<cons_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::cons_type cons_type;
+ typedef typename cons_type::car_type type;
+ };
+ };
+ }
+
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_LIST_LIMITS_07172005_0112)
+#define FUSION_LIST_LIMITS_07172005_0112
+
+#if !defined(FUSION_MAX_LIST_SIZE)
+# define FUSION_MAX_LIST_SIZE 10
+#else
+# if FUSION_MAX_LIST_SIZE < 3
+# undef FUSION_MAX_LIST_SIZE
+# define FUSION_MAX_LIST_SIZE 10
+# endif
+#endif
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+
+ Distributed under the 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(FUSION_LIST_07172005_1153)
+#define FUSION_LIST_07172005_1153
+
+#include <boost/fusion/container/list/list_fwd.hpp>
+#include <boost/fusion/container/list/detail/list_to_cons.hpp>
+
+namespace boost { namespace fusion
+{
+ struct nil;
+ struct void_;
+
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename T)>
+ struct list
+ : detail::list_to_cons<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, T)>::type
+ {
+ private:
+ typedef
+ detail::list_to_cons<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, T)>
+ list_to_cons;
+
+ public:
+ typedef typename list_to_cons::type inherited_type;
+
+ list()
+ : inherited_type() {}
+
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename U)>
+ list(list<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, U)> const& rhs)
+ : inherited_type(rhs) {}
+
+ template <typename Sequence>
+ list(Sequence const& rhs)
+ : inherited_type(rhs) {}
+
+ // Expand a couple of forwarding constructors for arguments
+ // of type (T0), (T0, T1), (T0, T1, T2) etc. Exanple:
+ //
+ // list(
+ // typename detail::call_param<T0>::type _0
+ // , typename detail::call_param<T1>::type _1)
+ // : inherited_type(list_to_cons::call(_0, _1)) {}
+ #include <boost/fusion/container/list/detail/list_forward_ctor.hpp>
+
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename U)>
+ list&
+ operator=(list<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, U)> const& rhs)
+ {
+ inherited_type::operator=(rhs);
+ return *this;
+ }
+
+ template <typename T>
+ list&
+ operator=(T const& rhs)
+ {
+ inherited_type::operator=(rhs);
+ return *this;
+ }
+ };
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+
+ Distributed under the 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(FUSION_LIST_FORWARD_07172005_0224)
+#define FUSION_LIST_FORWARD_07172005_0224
+
+#include <boost/fusion/container/list/limits.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+
+ template <
+ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ FUSION_MAX_LIST_SIZE, typename T, void_)
+ >
+ struct list;
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SEQUENCE_CLASS_MAP_10022005_0606)
+#define FUSION_SEQUENCE_CLASS_MAP_10022005_0606
+
+#include <boost/fusion/container/map/limits.hpp>
+#include <boost/fusion/container/map/map.hpp>
+#include <boost/fusion/container/map/map_fwd.hpp>
+#include <boost/fusion/container/map/convert.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_CONVERT_09232005_1340)
+#define FUSION_CONVERT_09232005_1340
+
+#include <boost/fusion/container/map/detail/as_map.hpp>
+#include <boost/fusion/container/map/detail/convert_impl.hpp>
+#include <boost/fusion/container/map/map.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct as_map
+ {
+ typedef typename detail::as_map<result_of::size<Sequence>::value> gen;
+ typedef typename gen::
+ template apply<typename result_of::begin<Sequence>::type>::type
+ type;
+ };
+ }
+
+ template <typename Sequence>
+ inline typename result_of::as_map<Sequence>::type
+ as_map(Sequence& seq)
+ {
+ typedef typename result_of::as_map<Sequence>::gen gen;
+ return gen::call(fusion::begin(seq));
+ }
+
+ template <typename Sequence>
+ inline typename result_of::as_map<Sequence const>::type
+ as_map(Sequence const& seq)
+ {
+ typedef typename result_of::as_map<Sequence const>::gen gen;
+ return gen::call(fusion::begin(seq));
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_AS_MAP_0932005_1339)
+#define FUSION_AS_MAP_0932005_1339
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/inc.hpp>
+#include <boost/preprocessor/dec.hpp>
+#include <boost/fusion/container/map/map.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <int size>
+ struct as_map;
+
+ template <>
+ struct as_map<0>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef map<> type;
+ };
+
+ template <typename Iterator>
+ static typename apply<Iterator>::type
+ call(Iterator)
+ {
+ return map<>();
+ }
+ };
+
+#define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \
+ typedef typename fusion::result_of::next<BOOST_PP_CAT(I, n)>::type \
+ BOOST_PP_CAT(I, BOOST_PP_INC(n));
+
+#define BOOST_FUSION_NEXT_CALL_ITERATOR(z, n, data) \
+ typename gen::BOOST_PP_CAT(I, BOOST_PP_INC(n)) \
+ BOOST_PP_CAT(i, BOOST_PP_INC(n)) = fusion::next(BOOST_PP_CAT(i, n));
+
+#define BOOST_FUSION_VALUE_OF_ITERATOR(z, n, data) \
+ typedef typename fusion::result_of::value_of<BOOST_PP_CAT(I, n)>::type \
+ BOOST_PP_CAT(T, n);
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/map/detail/as_map.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE)
+#include BOOST_PP_ITERATE()
+
+#undef BOOST_FUSION_NEXT_ITERATOR
+#undef BOOST_FUSION_NEXT_CALL_ITERATOR
+#undef BOOST_FUSION_VALUE_OF_ITERATOR
+
+}}}
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define N BOOST_PP_ITERATION()
+
+ template <>
+ struct as_map<N>
+ {
+ template <typename I0>
+ struct apply
+ {
+ BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _)
+ BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _)
+ typedef map<BOOST_PP_ENUM_PARAMS(N, T)> type;
+ };
+
+ template <typename Iterator>
+ static typename apply<Iterator>::type
+ call(Iterator const& i0)
+ {
+ typedef apply<Iterator> gen;
+ typedef typename gen::type result;
+ BOOST_PP_REPEAT(BOOST_PP_DEC(N), BOOST_FUSION_NEXT_CALL_ITERATOR, _)
+ return result(BOOST_PP_ENUM_PARAMS(N, *i));
+ }
+ };
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_AT_KEY_IMPL_05222005_0254)
+#define FUSION_AT_KEY_IMPL_05222005_0254
+
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/mpl/identity.hpp>
+
+namespace boost { namespace fusion
+{
+ struct map_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct at_key_impl;
+
+ template <>
+ struct at_key_impl<map_tag>
+ {
+ template <typename Sequence, typename Key>
+ struct apply
+ {
+ typedef typename Sequence::template meta_at_impl<Key> element;
+
+ typedef typename
+ mpl::eval_if<
+ is_const<Sequence>
+ , detail::cref_result<element>
+ , detail::ref_result<element>
+ >::type
+ type;
+
+ static type
+ call(Sequence& m)
+ {
+ return m.at_impl(mpl::identity<Key>());
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_BEGIN_IMPL_05222005_1108)
+#define FUSION_BEGIN_IMPL_05222005_1108
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+
+namespace boost { namespace fusion
+{
+ struct map_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<map_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename
+ result_of::begin<typename Sequence::storage_type>::type
+ iterator_type;
+
+ typedef typename
+ result_of::begin<typename Sequence::storage_type const>::type
+ const_iterator_type;
+
+ typedef typename
+ mpl::eval_if<
+ is_const<Sequence>
+ , mpl::identity<const_iterator_type>
+ , mpl::identity<iterator_type>
+ >::type
+ type;
+
+ static type
+ call(Sequence& m)
+ {
+ return fusion::begin(m.get_data());
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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(FUSION_CONVERT_IMPL_09232005_1340)
+#define FUSION_CONVERT_IMPL_09232005_1340
+
+#include <boost/fusion/container/map/detail/as_map.hpp>
+#include <boost/fusion/container/map/map.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+
+namespace boost { namespace fusion
+{
+ struct map_tag;
+
+ namespace extension
+ {
+ template <typename T>
+ struct convert_impl;
+
+ template <>
+ struct convert_impl<map_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename detail::as_map<result_of::size<Sequence>::value> gen;
+ typedef typename gen::
+ template apply<typename result_of::begin<Sequence>::type>::type
+ type;
+
+ static type call(Sequence& seq)
+ {
+ return gen::call(fusion::begin(seq));
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_END_IMPL_05222005_1108)
+#define FUSION_END_IMPL_05222005_1108
+
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+
+namespace boost { namespace fusion
+{
+ struct map_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<map_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename
+ result_of::end<typename Sequence::storage_type>::type
+ iterator_type;
+
+ typedef typename
+ result_of::end<typename Sequence::storage_type const>::type
+ const_iterator_type;
+
+ typedef typename
+ mpl::eval_if<
+ is_const<Sequence>
+ , mpl::identity<const_iterator_type>
+ , mpl::identity<iterator_type>
+ >::type
+ type;
+
+ static type
+ call(Sequence& m)
+ {
+ return fusion::end(m.get_data());
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_LOOKUP_KEY_07222005_1248)
+#define FUSION_LOOKUP_KEY_07222005_1248
+
+#include <boost/mpl/int.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/fusion/support/detail/unknown_key.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+}}
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename T>
+ struct map_data_type
+ {
+ typedef typename
+ add_reference<
+ typename T::second_type
+ >::type
+ type;
+ };
+
+ template <>
+ struct map_data_type<void_>
+ {
+ typedef void_& type;
+ };
+
+ template <typename T>
+ struct map_const_data_type
+ {
+ typedef typename
+ add_reference<
+ typename add_const<
+ typename T::second_type
+ >::type
+ >::type
+ type;
+ };
+
+ template <>
+ struct map_const_data_type<void_>
+ {
+ typedef void_ const& type;
+ };
+
+ template <typename T>
+ struct map_value_type
+ {
+ typedef typename T::second_type type;
+ };
+
+ template <>
+ struct map_value_type<void_>
+ {
+ typedef void_ type;
+ };
+
+ template <typename T, int index>
+ struct map_key_type
+ {
+ typedef typename T::first_type type;
+ };
+
+ template <int index>
+ struct map_key_type<void_, index>
+ {
+ typedef unknown_key<index> type;
+ };
+
+ template <int index, typename RT, typename Key, typename Vector>
+ struct map_lookup_key
+ {
+ static RT
+ call(Vector& vec)
+ {
+ return vec.at_impl(mpl::int_<index>()).second;
+ }
+ };
+
+ template <int index, typename Vector>
+ struct map_lookup_key<index, void_&, unknown_key<index>, Vector>
+ {
+ static void_&
+ call(Vector& vec); // intentionally undefined
+ };
+}}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_MAP_FORWARD_CTOR_07222005_0106)
+#define FUSION_MAP_FORWARD_CTOR_07222005_0106
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+
+#define BOOST_PP_FILENAME_1 \
+ <boost/fusion/container/map/detail/map_forward_ctor.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE)
+#include BOOST_PP_ITERATE()
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define N BOOST_PP_ITERATION()
+
+#if N == 1
+ explicit
+#endif
+ map(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _))
+ : data(BOOST_PP_ENUM_PARAMS(N, _)) {}
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_MAP_LOOKUP_07212005_1118)
+#define FUSION_MAP_LOOKUP_07212005_1118
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+
+#if defined(BOOST_MSVC) && (BOOST_MSVC == 1310)
+#pragma warning (push)
+#pragma warning(disable: 4348) // redefinition of default parameter
+#endif
+
+ template <typename Key, typename dummy = int>
+ struct meta_at_impl
+ {
+ typedef void_ type;
+ };
+
+ template <typename Key, typename dummy = int>
+ struct meta_find_impl
+ {
+ typedef vector_iterator<storage_type, storage_type::size::value> type;
+ };
+
+ template <typename Key, typename dummy = int>
+ struct meta_find_impl_const
+ {
+ typedef vector_iterator<storage_type const, storage_type::size::value> type;
+ };
+
+ template <typename Key>
+ vector_iterator<storage_type const, storage_type::size::value>
+ find_impl(mpl::identity<Key>) const
+ {
+ return vector_iterator<storage_type const, storage_type::size::value>(data);
+ }
+
+ template <typename Key>
+ vector_iterator<storage_type, storage_type::size::value>
+ find_impl(mpl::identity<Key>)
+ {
+ return vector_iterator<storage_type, storage_type::size::value>(data);
+ }
+
+#define BOOST_PP_FILENAME_1 \
+ <boost/fusion/container/map/detail/map_lookup.hpp>
+#define BOOST_PP_ITERATION_LIMITS (0, BOOST_PP_DEC(FUSION_MAX_MAP_SIZE))
+#include BOOST_PP_ITERATE()
+
+#if defined(BOOST_MSVC) && (BOOST_MSVC == 1310)
+#pragma warning (pop)
+#endif
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define N BOOST_PP_ITERATION()
+
+ template <typename dummy>
+ struct meta_at_impl<
+ typename detail::map_key_type<BOOST_PP_CAT(T, N), N>::type, dummy>
+ {
+ typedef typename detail::map_value_type<BOOST_PP_CAT(T, N)>::type type;
+ };
+
+ typename detail::map_data_type<BOOST_PP_CAT(T, N)>::type
+ at_impl(mpl::identity<typename detail::map_key_type<BOOST_PP_CAT(T, N), N>::type>)
+ {
+ return detail::map_lookup_key<
+ N
+ , typename detail::map_data_type<BOOST_PP_CAT(T, N)>::type
+ , typename detail::map_key_type<BOOST_PP_CAT(T, N), N>::type
+ , storage_type>::call(data);
+ }
+
+ typename detail::map_const_data_type<BOOST_PP_CAT(T, N)>::type
+ at_impl(mpl::identity<typename detail::map_key_type<BOOST_PP_CAT(T, N), N>::type>) const
+ {
+ return detail::map_lookup_key<
+ N
+ , typename detail::map_const_data_type<BOOST_PP_CAT(T, N)>::type
+ , typename detail::map_key_type<BOOST_PP_CAT(T, N), N>::type
+ , storage_type const>::call(data);
+ }
+
+ template <typename dummy>
+ struct meta_find_impl<
+ typename detail::map_key_type<BOOST_PP_CAT(T, N), N>::type, dummy>
+ {
+ typedef vector_iterator<storage_type, N> type;
+ };
+
+ template <typename dummy>
+ struct meta_find_impl_const<
+ typename detail::map_key_type<BOOST_PP_CAT(T, N), N>::type, dummy>
+ {
+ typedef vector_iterator<storage_type const, N> type;
+ };
+
+ vector_iterator<storage_type, N>
+ find_impl(mpl::identity<typename detail::map_key_type<BOOST_PP_CAT(T, N), N>::type>)
+ {
+ return vector_iterator<storage_type, N>(data);
+ }
+
+ vector_iterator<storage_type const, N>
+ find_impl(mpl::identity<typename detail::map_key_type<BOOST_PP_CAT(T, N), N>::type>) const
+ {
+ return vector_iterator<storage_type const, N>(data);
+ }
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_VALUE_AT_KEY_IMPL_05222005_0325)
+#define FUSION_VALUE_AT_KEY_IMPL_05222005_0325
+
+namespace boost { namespace fusion
+{
+ struct map_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_at_key_impl;
+
+ template <>
+ struct value_at_key_impl<map_tag>
+ {
+ template <typename Sequence, typename Key>
+ struct apply
+ {
+ typedef typename Sequence::
+ template meta_at_impl<Key>::type type;
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_MAP_LIMITS_07212005_1104)
+#define FUSION_MAP_LIMITS_07212005_1104
+
+#include <boost/fusion/container/vector/limits.hpp>
+
+#if !defined(FUSION_MAX_MAP_SIZE)
+# define FUSION_MAX_MAP_SIZE FUSION_MAX_VECTOR_SIZE
+#else
+# if FUSION_MAX_MAP_SIZE < 3
+# undef FUSION_MAX_MAP_SIZE
+# if (FUSION_MAX_VECTOR_SIZE > 10)
+# define FUSION_MAX_MAP_SIZE 10
+# else
+# define FUSION_MAX_MAP_SIZE FUSION_MAX_VECTOR_SIZE
+# endif
+# endif
+#endif
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+
+ Distributed under the 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(FUSION_MAP_07212005_1106)
+#define FUSION_MAP_07212005_1106
+
+#include <boost/fusion/support/pair.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/fusion/container/map/map_fwd.hpp>
+#include <boost/fusion/container/map/detail/lookup_key.hpp>
+#include <boost/fusion/container/map/detail/begin_impl.hpp>
+#include <boost/fusion/container/map/detail/end_impl.hpp>
+#include <boost/fusion/container/map/detail/at_key_impl.hpp>
+#include <boost/fusion/container/map/detail/value_at_key_impl.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+ struct map_tag;
+ struct fusion_sequence_tag;
+
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, typename T)>
+ struct map : sequence_base<map<BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, T)> >
+ {
+ struct category : forward_traversal_tag, associative_sequence_tag {};
+
+ typedef map_tag fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef mpl::false_ is_view;
+
+ typedef vector<
+ BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, T)>
+ storage_type;
+
+ typedef typename storage_type::size size;
+
+ map()
+ : data() {}
+
+ template <typename Sequence>
+ map(Sequence const& rhs)
+ : data(rhs) {}
+
+ #include <boost/fusion/container/map/detail/map_forward_ctor.hpp>
+ #include <boost/fusion/container/map/detail/map_lookup.hpp>
+
+ template <typename T>
+ map&
+ operator=(T const& rhs)
+ {
+ data = rhs;
+ return *this;
+ }
+
+ storage_type& get_data() { return data; }
+ storage_type const& get_data() const { return data; }
+
+ private:
+
+ storage_type data;
+ };
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+
+ Distributed under the 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(FUSION_MAP_FORWARD_07212005_1105)
+#define FUSION_MAP_FORWARD_07212005_1105
+
+#include <boost/fusion/container/map/limits.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+
+ template <
+ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ FUSION_MAX_MAP_SIZE, typename T, void_)
+ >
+ struct map;
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SEQUENCE_CLASS_SET_10022005_0607)
+#define FUSION_SEQUENCE_CLASS_SET_10022005_0607
+
+#include <boost/fusion/container/set/limits.hpp>
+#include <boost/fusion/container/set/set.hpp>
+#include <boost/fusion/container/set/set_fwd.hpp>
+#include <boost/fusion/container/set/convert.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_CONVERT_09232005_1341)
+#define FUSION_CONVERT_09232005_1341
+
+#include <boost/fusion/container/set/detail/as_set.hpp>
+#include <boost/fusion/container/set/detail/convert_impl.hpp>
+#include <boost/fusion/container/set/set.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct as_set
+ {
+ typedef typename detail::as_set<result_of::size<Sequence>::value> gen;
+ typedef typename gen::
+ template apply<typename result_of::begin<Sequence>::type>::type
+ type;
+ };
+ }
+
+ template <typename Sequence>
+ inline typename result_of::as_set<Sequence>::type
+ as_set(Sequence& seq)
+ {
+ typedef typename result_of::as_set<Sequence>::gen gen;
+ return gen::call(fusion::begin(seq));
+ }
+
+ template <typename Sequence>
+ inline typename result_of::as_set<Sequence const>::type
+ as_set(Sequence const& seq)
+ {
+ typedef typename result_of::as_set<Sequence const>::gen gen;
+ return gen::call(fusion::begin(seq));
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_AS_SET_0932005_1341)
+#define FUSION_AS_SET_0932005_1341
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/inc.hpp>
+#include <boost/preprocessor/dec.hpp>
+#include <boost/fusion/container/set/set.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <int size>
+ struct as_set;
+
+ template <>
+ struct as_set<0>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef set<> type;
+ };
+
+ template <typename Iterator>
+ static typename apply<Iterator>::type
+ call(Iterator)
+ {
+ return set<>();
+ }
+ };
+
+#define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \
+ typedef typename fusion::result_of::next<BOOST_PP_CAT(I, n)>::type \
+ BOOST_PP_CAT(I, BOOST_PP_INC(n));
+
+#define BOOST_FUSION_NEXT_CALL_ITERATOR(z, n, data) \
+ typename gen::BOOST_PP_CAT(I, BOOST_PP_INC(n)) \
+ BOOST_PP_CAT(i, BOOST_PP_INC(n)) = fusion::next(BOOST_PP_CAT(i, n));
+
+#define BOOST_FUSION_VALUE_OF_ITERATOR(z, n, data) \
+ typedef typename fusion::result_of::value_of<BOOST_PP_CAT(I, n)>::type \
+ BOOST_PP_CAT(T, n);
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/set/detail/as_set.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_SET_SIZE)
+#include BOOST_PP_ITERATE()
+
+#undef BOOST_FUSION_NEXT_ITERATOR
+#undef BOOST_FUSION_NEXT_CALL_ITERATOR
+#undef BOOST_FUSION_VALUE_OF_ITERATOR
+
+}}}
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define N BOOST_PP_ITERATION()
+
+ template <>
+ struct as_set<N>
+ {
+ template <typename I0>
+ struct apply
+ {
+ BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _)
+ BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _)
+ typedef set<BOOST_PP_ENUM_PARAMS(N, T)> type;
+ };
+
+ template <typename Iterator>
+ static typename apply<Iterator>::type
+ call(Iterator const& i0)
+ {
+ typedef apply<Iterator> gen;
+ typedef typename gen::type result;
+ BOOST_PP_REPEAT(BOOST_PP_DEC(N), BOOST_FUSION_NEXT_CALL_ITERATOR, _)
+ return result(BOOST_PP_ENUM_PARAMS(N, *i));
+ }
+ };
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_AT_KEY_IMPL_09162005_1118)
+#define FUSION_AT_KEY_IMPL_09162005_1118
+
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/mpl/identity.hpp>
+
+namespace boost { namespace fusion
+{
+ struct set_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct at_key_impl;
+
+ template <>
+ struct at_key_impl<set_tag>
+ {
+ template <typename Sequence, typename Key>
+ struct apply
+ {
+ typedef typename Sequence::template meta_at_impl<Key> element;
+
+ typedef typename
+ mpl::eval_if<
+ is_const<Sequence>
+ , detail::cref_result<element>
+ , detail::ref_result<element>
+ >::type
+ type;
+
+ static type
+ call(Sequence& s)
+ {
+ return s.at_impl(mpl::identity<Key>());
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_BEGIN_IMPL_09162005_1120)
+#define FUSION_BEGIN_IMPL_09162005_1120
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+
+namespace boost { namespace fusion
+{
+ struct set_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<set_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename
+ result_of::begin<typename Sequence::storage_type>::type
+ iterator_type;
+
+ typedef typename
+ result_of::begin<typename Sequence::storage_type const>::type
+ const_iterator_type;
+
+ typedef typename
+ mpl::eval_if<
+ is_const<Sequence>
+ , mpl::identity<const_iterator_type>
+ , mpl::identity<iterator_type>
+ >::type
+ type;
+
+ static type
+ call(Sequence& s)
+ {
+ return fusion::begin(s.get_data());
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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(FUSION_CONVERT_IMPL_09232005_1341)
+#define FUSION_CONVERT_IMPL_09232005_1341
+
+#include <boost/fusion/container/set/detail/as_set.hpp>
+#include <boost/fusion/container/set/set.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+
+namespace boost { namespace fusion
+{
+ struct set_tag;
+
+ namespace extension
+ {
+ template <typename T>
+ struct convert_impl;
+
+ template <>
+ struct convert_impl<set_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename detail::as_set<result_of::size<Sequence>::value> gen;
+ typedef typename gen::
+ template apply<typename result_of::begin<Sequence>::type>::type
+ type;
+
+ static type call(Sequence& seq)
+ {
+ return gen::call(fusion::begin(seq));
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_END_IMPL_09162005_1121)
+#define FUSION_END_IMPL_09162005_1121
+
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+
+namespace boost { namespace fusion
+{
+ struct set_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<set_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename
+ result_of::end<typename Sequence::storage_type>::type
+ iterator_type;
+
+ typedef typename
+ result_of::end<typename Sequence::storage_type const>::type
+ const_iterator_type;
+
+ typedef typename
+ mpl::eval_if<
+ is_const<Sequence>
+ , mpl::identity<const_iterator_type>
+ , mpl::identity<iterator_type>
+ >::type
+ type;
+
+ static type
+ call(Sequence& s)
+ {
+ return fusion::end(s.get_data());
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_LOOKUP_KEY_09162005_1111)
+#define FUSION_LOOKUP_KEY_09162005_1111
+
+#include <boost/mpl/int.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/fusion/support/detail/unknown_key.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+}}
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename T>
+ struct set_data_type
+ {
+ typedef typename add_reference<T>::type type;
+ };
+
+ template <>
+ struct set_data_type<void_>
+ {
+ typedef void_& type;
+ };
+
+ template <typename T>
+ struct set_const_data_type
+ {
+ typedef typename
+ add_reference<
+ typename add_const<T>::type
+ >::type
+ type;
+ };
+
+ template <>
+ struct set_const_data_type<void_>
+ {
+ typedef void_ const& type;
+ };
+
+ template <typename T>
+ struct set_value_type
+ {
+ typedef T type;
+ };
+
+ template <>
+ struct set_value_type<void_>
+ {
+ typedef void_ type;
+ };
+
+ template <typename T, int index>
+ struct set_key_type
+ {
+ typedef T type;
+ };
+
+ template <int index>
+ struct set_key_type<void_, index>
+ {
+ typedef unknown_key<index> type;
+ };
+
+ template <int index, typename RT, typename Key, typename Vector>
+ struct set_lookup_key
+ {
+ static RT
+ call(Vector& vec)
+ {
+ return vec.at_impl(mpl::int_<index>());
+ }
+ };
+
+ template <int index, typename Vector>
+ struct set_lookup_key<index, void_&, unknown_key<index>, Vector>
+ {
+ static void_&
+ call(Vector& vec); // intentionally undefined
+ };
+}}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_SET_FORWARD_CTOR_09162005_1115)
+#define FUSION_SET_FORWARD_CTOR_09162005_1115
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+
+#define BOOST_PP_FILENAME_1 \
+ <boost/fusion/container/set/detail/set_forward_ctor.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_SET_SIZE)
+#include BOOST_PP_ITERATE()
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define N BOOST_PP_ITERATION()
+
+#if N == 1
+ explicit
+#endif
+ set(BOOST_PP_ENUM_BINARY_PARAMS(
+ N, typename detail::call_param<T, >::type _))
+ : data(BOOST_PP_ENUM_PARAMS(N, _)) {}
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_SET_LOOKUP_09162005_1116)
+#define FUSION_SET_LOOKUP_09162005_1116
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+
+#if defined(BOOST_MSVC) && (BOOST_MSVC == 1310)
+#pragma warning (push)
+#pragma warning(disable: 4348) // redefinition of default parameter
+#endif
+
+ template <typename Key, typename dummy = int>
+ struct meta_at_impl
+ {
+ typedef void_ type;
+ };
+
+ template <typename Key, typename dummy = int>
+ struct meta_find_impl
+ {
+ typedef vector_iterator<storage_type, storage_type::size::value> type;
+ };
+
+ template <typename Key, typename dummy = int>
+ struct meta_find_impl_const
+ {
+ typedef vector_iterator<storage_type const, storage_type::size::value> type;
+ };
+
+ template <typename Key>
+ vector_iterator<storage_type const, storage_type::size::value>
+ find_impl(mpl::identity<Key>) const
+ {
+ return vector_iterator<storage_type const, storage_type::size::value>(data);
+ }
+
+ template <typename Key>
+ vector_iterator<storage_type, storage_type::size::value>
+ find_impl(mpl::identity<Key>)
+ {
+ return vector_iterator<storage_type, storage_type::size::value>(data);
+ }
+
+#define BOOST_PP_FILENAME_1 \
+ <boost/fusion/container/set/detail/set_lookup.hpp>
+#define BOOST_PP_ITERATION_LIMITS (0, BOOST_PP_DEC(FUSION_MAX_SET_SIZE))
+#include BOOST_PP_ITERATE()
+
+#if defined(BOOST_MSVC) && (BOOST_MSVC == 1310)
+#pragma warning (pop)
+#endif
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define N BOOST_PP_ITERATION()
+
+ template <typename dummy>
+ struct meta_at_impl<
+ typename detail::set_key_type<BOOST_PP_CAT(T, N), N>::type, dummy>
+ {
+ typedef typename detail::set_value_type<BOOST_PP_CAT(T, N)>::type type;
+ };
+
+ typename detail::set_data_type<BOOST_PP_CAT(T, N)>::type
+ at_impl(mpl::identity<typename detail::set_key_type<BOOST_PP_CAT(T, N), N>::type>)
+ {
+ return detail::set_lookup_key<
+ N
+ , typename detail::set_data_type<BOOST_PP_CAT(T, N)>::type
+ , typename detail::set_key_type<BOOST_PP_CAT(T, N), N>::type
+ , storage_type>::call(data);
+ }
+
+ typename detail::set_const_data_type<BOOST_PP_CAT(T, N)>::type
+ at_impl(mpl::identity<typename detail::set_key_type<BOOST_PP_CAT(T, N), N>::type>) const
+ {
+ return detail::set_lookup_key<
+ N
+ , typename detail::set_const_data_type<BOOST_PP_CAT(T, N)>::type
+ , typename detail::set_key_type<BOOST_PP_CAT(T, N), N>::type
+ , storage_type const>::call(data);
+ }
+
+ template <typename dummy>
+ struct meta_find_impl<
+ typename detail::set_key_type<BOOST_PP_CAT(T, N), N>::type, dummy>
+ {
+ typedef vector_iterator<storage_type, N> type;
+ };
+
+ template <typename dummy>
+ struct meta_find_impl_const<
+ typename detail::set_key_type<BOOST_PP_CAT(T, N), N>::type, dummy>
+ {
+ typedef vector_iterator<storage_type const, N> type;
+ };
+
+ vector_iterator<storage_type, N>
+ find_impl(mpl::identity<typename detail::set_key_type<BOOST_PP_CAT(T, N), N>::type>)
+ {
+ return vector_iterator<storage_type, N>(data);
+ }
+
+ vector_iterator<storage_type const, N>
+ find_impl(mpl::identity<typename detail::set_key_type<BOOST_PP_CAT(T, N), N>::type>) const
+ {
+ return vector_iterator<storage_type const, N>(data);
+ }
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_VALUE_AT_KEY_IMPL_09162005_1123)
+#define FUSION_VALUE_AT_KEY_IMPL_09162005_1123
+
+#include <boost/mpl/at.hpp>
+
+namespace boost { namespace fusion
+{
+ struct set_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_at_key_impl;
+
+ template <>
+ struct value_at_key_impl<set_tag>
+ {
+ template <typename Sequence, typename Key>
+ struct apply
+ {
+ typedef typename Sequence::
+ template meta_at_impl<Key>::type type;
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SET_LIMITS_09162005_1103)
+#define FUSION_SET_LIMITS_09162005_1103
+
+#include <boost/fusion/container/vector/limits.hpp>
+
+#if !defined(FUSION_MAX_SET_SIZE)
+# define FUSION_MAX_SET_SIZE FUSION_MAX_VECTOR_SIZE
+#else
+# if FUSION_MAX_SET_SIZE < 3
+# undef FUSION_MAX_SET_SIZE
+# if (FUSION_MAX_VECTOR_SIZE > 10)
+# define FUSION_MAX_SET_SIZE 10
+# else
+# define FUSION_MAX_SET_SIZE FUSION_MAX_VECTOR_SIZE
+# endif
+# endif
+#endif
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+
+ Distributed under the 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(FUSION_SET_09162005_1104)
+#define FUSION_SET_09162005_1104
+
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/fusion/container/set/set_fwd.hpp>
+#include <boost/fusion/container/set/detail/lookup_key.hpp>
+#include <boost/fusion/container/set/detail/begin_impl.hpp>
+#include <boost/fusion/container/set/detail/end_impl.hpp>
+#include <boost/fusion/container/set/detail/at_key_impl.hpp>
+#include <boost/fusion/container/set/detail/value_at_key_impl.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+ struct set_tag;
+ struct fusion_sequence_tag;
+
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, typename T)>
+ struct set : sequence_base<set<BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, T)> >
+ {
+ struct category : forward_traversal_tag, associative_sequence_tag {};
+
+ typedef set_tag fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef mpl::false_ is_view;
+
+ typedef vector<
+ BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, T)>
+ storage_type;
+
+ typedef typename storage_type::size size;
+
+ set()
+ : data() {}
+
+ template <typename Sequence>
+ set(Sequence const& rhs)
+ : data(rhs) {}
+
+ #include <boost/fusion/container/set/detail/set_forward_ctor.hpp>
+ #include <boost/fusion/container/set/detail/set_lookup.hpp>
+
+ template <typename T>
+ set&
+ operator=(T const& rhs)
+ {
+ data = rhs;
+ return *this;
+ }
+
+ storage_type& get_data() { return data; }
+ storage_type const& get_data() const { return data; }
+
+ private:
+
+ storage_type data;
+ };
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+
+ Distributed under the 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(FUSION_SET_FORWARD_09162005_1102)
+#define FUSION_SET_FORWARD_09162005_1102
+
+#include <boost/fusion/container/set/limits.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+
+ template <
+ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ FUSION_MAX_SET_SIZE, typename T, void_)
+ >
+ struct set;
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SEQUENCE_CLASS_VECTOR_10022005_0602)
+#define FUSION_SEQUENCE_CLASS_VECTOR_10022005_0602
+
+#include <boost/fusion/container/vector/limits.hpp>
+#include <boost/fusion/container/vector/vector10.hpp>
+#include <boost/fusion/container/vector/vector20.hpp>
+#include <boost/fusion/container/vector/vector30.hpp>
+#include <boost/fusion/container/vector/vector40.hpp>
+#include <boost/fusion/container/vector/vector50.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/container/vector/vector_fwd.hpp>
+#include <boost/fusion/container/vector/vector_iterator.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_CONVERT_09222005_1104)
+#define FUSION_CONVERT_09222005_1104
+
+#include <boost/fusion/container/vector/detail/as_vector.hpp>
+#include <boost/fusion/container/vector/detail/convert_impl.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct as_vector
+ {
+ typedef typename detail::as_vector<result_of::size<Sequence>::value> gen;
+ typedef typename gen::
+ template apply<typename result_of::begin<Sequence>::type>::type
+ type;
+ };
+ }
+
+ template <typename Sequence>
+ inline typename result_of::as_vector<Sequence>::type
+ as_vector(Sequence& seq)
+ {
+ typedef typename result_of::as_vector<Sequence>::gen gen;
+ return gen::call(fusion::begin(seq));
+ }
+
+ template <typename Sequence>
+ inline typename result_of::as_vector<Sequence const>::type
+ as_vector(Sequence const& seq)
+ {
+ typedef typename result_of::as_vector<Sequence const>::gen gen;
+ return gen::call(fusion::begin(seq));
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ADVANCE_IMPL_09172005_1156)
+#define FUSION_ADVANCE_IMPL_09172005_1156
+
+namespace boost { namespace fusion
+{
+ struct vector_iterator_tag;
+
+ template <typename Vector, int N>
+ struct vector_iterator;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct advance_impl;
+
+ template <>
+ struct advance_impl<vector_iterator_tag>
+ {
+ template <typename Iterator, typename N>
+ struct apply
+ {
+ typedef typename Iterator::index index;
+ typedef typename Iterator::vector vector;
+ typedef vector_iterator<vector, index::value+N::value> type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return type(i.vec);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_AS_VECTOR_09222005_0950)
+#define FUSION_AS_VECTOR_09222005_0950
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/inc.hpp>
+#include <boost/preprocessor/dec.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <int size>
+ struct as_vector;
+
+ template <>
+ struct as_vector<0>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef vector<> type;
+ };
+
+ template <typename Iterator>
+ static typename apply<Iterator>::type
+ call(Iterator)
+ {
+ return vector<>();
+ }
+ };
+
+#define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \
+ typedef typename fusion::result_of::next<BOOST_PP_CAT(I, n)>::type \
+ BOOST_PP_CAT(I, BOOST_PP_INC(n));
+
+#define BOOST_FUSION_NEXT_CALL_ITERATOR(z, n, data) \
+ typename gen::BOOST_PP_CAT(I, BOOST_PP_INC(n)) \
+ BOOST_PP_CAT(i, BOOST_PP_INC(n)) = fusion::next(BOOST_PP_CAT(i, n));
+
+#define BOOST_FUSION_VALUE_OF_ITERATOR(z, n, data) \
+ typedef typename fusion::result_of::value_of<BOOST_PP_CAT(I, n)>::type \
+ BOOST_PP_CAT(T, n);
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/as_vector.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
+#include BOOST_PP_ITERATE()
+
+#undef BOOST_FUSION_NEXT_ITERATOR
+#undef BOOST_FUSION_NEXT_CALL_ITERATOR
+#undef BOOST_FUSION_VALUE_OF_ITERATOR
+
+}}}
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define N BOOST_PP_ITERATION()
+
+ template <>
+ struct as_vector<N>
+ {
+ template <typename I0>
+ struct apply
+ {
+ BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _)
+ BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _)
+ typedef vector<BOOST_PP_ENUM_PARAMS(N, T)> type;
+ };
+
+ template <typename Iterator>
+ static typename apply<Iterator>::type
+ call(Iterator const& i0)
+ {
+ typedef apply<Iterator> gen;
+ typedef typename gen::type result;
+ BOOST_PP_REPEAT(BOOST_PP_DEC(N), BOOST_FUSION_NEXT_CALL_ITERATOR, _)
+ return result(BOOST_PP_ENUM_PARAMS(N, *i));
+ }
+ };
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_AT_IMPL_05042005_0741)
+#define FUSION_AT_IMPL_05042005_0741
+
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/mpl/at.hpp>
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace fusion
+{
+ struct vector_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct at_impl;
+
+ template <>
+ struct at_impl<vector_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply
+ {
+ typedef mpl::at<typename Sequence::types, N> element;
+ typedef typename
+ mpl::eval_if<
+ is_const<Sequence>
+ , detail::cref_result<element>
+ , detail::ref_result<element>
+ >::type
+ type;
+
+ static type
+ call(Sequence& v)
+ {
+ return v.at_impl(N());
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_BEGIN_IMPL_05042005_1136)
+#define FUSION_BEGIN_IMPL_05042005_1136
+
+#include <boost/fusion/container/vector/vector_iterator.hpp>
+
+namespace boost { namespace fusion
+{
+ struct vector_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<vector_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef vector_iterator<Sequence, 0> type;
+
+ static type
+ call(Sequence& v)
+ {
+ return type(v);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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(FUSION_CONVERT_IMPL_09222005_1104)
+#define FUSION_CONVERT_IMPL_09222005_1104
+
+#include <boost/fusion/container/vector/detail/as_vector.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+
+namespace boost { namespace fusion
+{
+ struct vector_tag;
+
+ namespace extension
+ {
+ template <typename T>
+ struct convert_impl;
+
+ template <>
+ struct convert_impl<vector_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename detail::as_vector<result_of::size<Sequence>::value> gen;
+ typedef typename gen::
+ template apply<typename result_of::begin<Sequence>::type>::type
+ type;
+
+ static type call(Sequence& seq)
+ {
+ return gen::call(fusion::begin(seq));
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_DEREF_IMPL_05042005_1037)
+#define FUSION_DEREF_IMPL_05042005_1037
+
+#include <boost/mpl/at.hpp>
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/type_traits/is_const.hpp>
+
+namespace boost { namespace fusion
+{
+ struct vector_iterator_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<vector_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::vector vector;
+ typedef typename Iterator::index index;
+ typedef typename mpl::at<
+ typename vector::types, index>
+ element;
+
+ typedef typename
+ mpl::eval_if<
+ is_const<vector>
+ , fusion::detail::cref_result<element>
+ , fusion::detail::ref_result<element>
+ >::type
+ type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return i.vec.at_impl(index());
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_DISTANCE_IMPL_09172005_0751)
+#define FUSION_DISTANCE_IMPL_09172005_0751
+
+#include <boost/mpl/minus.hpp>
+
+namespace boost { namespace fusion
+{
+ struct vector_iterator_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct distance_impl;
+
+ template <>
+ struct distance_impl<vector_iterator_tag>
+ {
+ template <typename First, typename Last>
+ struct apply : mpl::minus<typename Last::index, typename First::index>
+ {
+ static typename mpl::minus<
+ typename Last::index, typename First::index>::type
+ call(First const&, Last const&)
+ {
+ typedef typename mpl::minus<
+ typename Last::index, typename First::index>::type
+ result;
+ return result();
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_END_IMPL_05042005_1142)
+#define FUSION_END_IMPL_05042005_1142
+
+#include <boost/fusion/container/vector/vector_iterator.hpp>
+
+namespace boost { namespace fusion
+{
+ struct vector_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<vector_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::size size;
+ typedef vector_iterator<Sequence, size::value> type;
+
+ static type
+ call(Sequence& v)
+ {
+ return type(v);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_EQUAL_TO_IMPL_05052005_1215)
+#define FUSION_EQUAL_TO_IMPL_05052005_1215
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/and.hpp>
+
+namespace boost { namespace fusion
+{
+ struct vector_iterator_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct equal_to_impl;
+
+ template <>
+ struct equal_to_impl<vector_iterator_tag>
+ {
+ template <typename I1, typename I2>
+ struct apply
+ : is_same<
+ typename I1::identity
+ , typename I2::identity
+ >
+ {
+ };
+ };
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_NEXT_IMPL_05042005_1058)
+#define FUSION_NEXT_IMPL_05042005_1058
+
+#include <boost/fusion/container/vector/vector_iterator.hpp>
+
+namespace boost { namespace fusion
+{
+ struct vector_iterator_tag;
+ template <typename Vector, int N>
+ struct vector_iterator;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct next_impl;
+
+ template <>
+ struct next_impl<vector_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::vector vector;
+ typedef typename Iterator::index index;
+ typedef vector_iterator<vector, index::value+1> type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return type(i.vec);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_PRIOR_IMPL_05042005_1145)
+#define FUSION_PRIOR_IMPL_05042005_1145
+
+#include <boost/fusion/container/vector/vector_iterator.hpp>
+
+namespace boost { namespace fusion
+{
+ struct vector_iterator_tag;
+ template <typename Vector, int N>
+ struct vector_iterator;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct prior_impl;
+
+ template <>
+ struct prior_impl<vector_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::vector vector;
+ typedef typename Iterator::index index;
+ typedef vector_iterator<vector, index::value-1> type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return type(i.vec);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_VALUE_AT_IMPL_05052005_0232)
+#define FUSION_VALUE_AT_IMPL_05052005_0232
+
+#include <boost/mpl/at.hpp>
+
+namespace boost { namespace fusion
+{
+ struct vector_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_at_impl;
+
+ template <>
+ struct value_at_impl<vector_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply
+ {
+ typedef typename mpl::at<typename Sequence::types, N>::type type;
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_VALUE_OF_IMPL_05052005_1128)
+#define FUSION_VALUE_OF_IMPL_05052005_1128
+
+#include <boost/mpl/at.hpp>
+
+namespace boost { namespace fusion
+{
+ struct vector_iterator_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<vector_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::vector vector;
+ typedef typename Iterator::index index;
+ typedef typename mpl::at<
+ typename vector::types, index>::type
+ type;
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_VECTOR_FORWARD_CTOR_07122005_1123)
+#define FUSION_VECTOR_FORWARD_CTOR_07122005_1123
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+
+#define BOOST_PP_FILENAME_1 \
+ <boost/fusion/container/vector/detail/vector_forward_ctor.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
+#include BOOST_PP_ITERATE()
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define N BOOST_PP_ITERATION()
+
+#if N == 1
+ explicit
+#endif
+ vector(BOOST_PP_ENUM_BINARY_PARAMS(
+ N, typename detail::call_param<T, >::type _))
+ : vec(BOOST_PP_ENUM_PARAMS(N, _)) {}
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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 guard. This file is meant to be included many times
+
+#if !defined(FUSION_MACRO_05042005)
+#define FUSION_MACRO_05042005
+
+#define FUSION_MEMBER_DEFAULT_INIT(z, n, _) m##n(T##n())
+#define FUSION_MEMBER_INIT(z, n, _) m##n(_##n)
+#define FUSION_COPY_INIT(z, n, _) m##n(other.m##n)
+#define FUSION_MEMBER_DECL(z, n, _) T##n m##n;
+
+#define FUSION_MEMBER_ASSIGN(z, n, _) \
+ this->BOOST_PP_CAT(m, n) = vec.BOOST_PP_CAT(m, n);
+
+#define FUSION_DEREF_MEMBER_ASSIGN(z, n, _) \
+ this->BOOST_PP_CAT(m, n) = *BOOST_PP_CAT(i, n);
+
+#define FUSION_AT_IMPL(z, n, _) \
+ typename add_reference<T##n>::type \
+ at_impl(mpl::int_<n>) { return this->m##n; } \
+ typename add_reference<typename add_const<T##n>::type>::type \
+ at_impl(mpl::int_<n>) const { return this->m##n; }
+
+#define FUSION_ITER_DECL_VAR(z, n, _) \
+ typedef typename result_of::next< \
+ BOOST_PP_CAT(I, BOOST_PP_DEC(n))>::type BOOST_PP_CAT(I, n); \
+ BOOST_PP_CAT(I, n) BOOST_PP_CAT(i, n) \
+ = fusion::next(BOOST_PP_CAT(i, BOOST_PP_DEC(n)));
+
+#endif
+
+#define N BOOST_PP_ITERATION()
+
+ template <typename Derived, BOOST_PP_ENUM_PARAMS(N, typename T)>
+ struct BOOST_PP_CAT(vector_data, N) : sequence_base<Derived>
+ {
+ BOOST_PP_CAT(vector_data, N)()
+ : BOOST_PP_ENUM(N, FUSION_MEMBER_DEFAULT_INIT, _) {}
+
+ BOOST_PP_CAT(vector_data, N)(
+ BOOST_PP_ENUM_BINARY_PARAMS(
+ N, typename detail::call_param<T, >::type _))
+ : BOOST_PP_ENUM(N, FUSION_MEMBER_INIT, _) {}
+
+ BOOST_PP_CAT(vector_data, N)(
+ BOOST_PP_CAT(vector_data, N) const& other)
+ : BOOST_PP_ENUM(N, FUSION_COPY_INIT, _) {}
+
+ BOOST_PP_CAT(vector_data, N)&
+ operator=(BOOST_PP_CAT(vector_data, N) const& vec)
+ {
+ BOOST_PP_REPEAT(N, FUSION_MEMBER_ASSIGN, _)
+ return *this;
+ }
+
+ template <typename Sequence>
+ static BOOST_PP_CAT(vector_data, N)
+ init_from_sequence(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ BOOST_PP_REPEAT_FROM_TO(1, N, FUSION_ITER_DECL_VAR, _)
+ return BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_PARAMS(N, *i));
+ }
+
+ BOOST_PP_REPEAT(N, FUSION_MEMBER_DECL, _)
+ };
+
+ template <BOOST_PP_ENUM_PARAMS(N, typename T)>
+ struct BOOST_PP_CAT(vector, N)
+ : BOOST_PP_CAT(vector_data, N)<
+ BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, T)>
+ , BOOST_PP_ENUM_PARAMS(N, T)>
+ {
+ typedef BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, T)> this_type;
+ typedef BOOST_PP_CAT(vector_data, N)<this_type, BOOST_PP_ENUM_PARAMS(N, T)> base_type;
+ typedef mpl::BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, T)> types;
+ typedef vector_tag fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef mpl::false_ is_view;
+ typedef random_access_traversal_tag category;
+ typedef mpl::int_<N> size;
+
+ BOOST_PP_CAT(vector, N)() {}
+
+#if (N == 1)
+ explicit
+#endif
+ BOOST_PP_CAT(vector, N)(
+ BOOST_PP_ENUM_BINARY_PARAMS(
+ N, typename detail::call_param<T, >::type _))
+ : base_type(BOOST_PP_ENUM_PARAMS(N, _)) {}
+
+ template <BOOST_PP_ENUM_PARAMS(N, typename U)>
+ BOOST_PP_CAT(vector, N)(
+ BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, U)> const& vec)
+ : base_type(BOOST_PP_ENUM_PARAMS(N, vec.m)) {}
+
+ template <typename Sequence>
+ BOOST_PP_CAT(vector, N)(
+ Sequence const& seq
+#if (N == 1)
+ , typename disable_if<is_convertible<Sequence, T0> >::type* dummy = 0
+#endif
+ )
+ : base_type(base_type::init_from_sequence(seq)) {}
+
+ template <BOOST_PP_ENUM_PARAMS(N, typename U)>
+ BOOST_PP_CAT(vector, N)&
+ operator=(BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, U)> const& vec)
+ {
+ BOOST_PP_REPEAT(N, FUSION_MEMBER_ASSIGN, _)
+ return *this;
+ }
+
+ template <typename Sequence>
+ typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
+ operator=(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ BOOST_PP_REPEAT_FROM_TO(1, N, FUSION_ITER_DECL_VAR, _)
+ BOOST_PP_REPEAT(N, FUSION_DEREF_MEMBER_ASSIGN, _)
+ return *this;
+ }
+
+ BOOST_PP_REPEAT(N, FUSION_AT_IMPL, _)
+
+ template<typename I>
+ typename add_reference<typename mpl::at<types, I>::type>::type
+ at_impl(I i)
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+
+ template<typename I>
+ typename add_reference<typename add_const<typename mpl::at<types, I>::type>::type>::type
+ at_impl(I i) const
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ };
+
+#undef N
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_VECTOR_N_CHOOSER_07072005_1248)
+#define FUSION_VECTOR_N_CHOOSER_07072005_1248
+
+#include <boost/fusion/container/vector/limits.hpp>
+
+// include vector0..N where N is FUSION_MAX_VECTOR_SIZE
+#include <boost/fusion/container/vector/vector10.hpp>
+#if (FUSION_MAX_VECTOR_SIZE > 10)
+#include <boost/fusion/container/vector/vector20.hpp>
+#endif
+#if (FUSION_MAX_VECTOR_SIZE > 20)
+#include <boost/fusion/container/vector/vector30.hpp>
+#endif
+#if (FUSION_MAX_VECTOR_SIZE > 30)
+#include <boost/fusion/container/vector/vector40.hpp>
+#endif
+#if (FUSION_MAX_VECTOR_SIZE > 40)
+#include <boost/fusion/container/vector/vector50.hpp>
+#endif
+
+#include <boost/mpl/distance.hpp>
+#include <boost/mpl/find.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+}}
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <int N>
+ struct get_vector_n;
+
+ template <>
+ struct get_vector_n<0>
+ {
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
+ struct call
+ {
+ typedef vector0 type;
+ };
+ };
+
+#define BOOST_PP_FILENAME_1 \
+ <boost/fusion/container/vector/detail/vector_n_chooser.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
+#include BOOST_PP_ITERATE()
+
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
+ struct vector_n_chooser
+ {
+ typedef
+ mpl::BOOST_PP_CAT(vector, FUSION_MAX_VECTOR_SIZE)
+ <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>
+ input;
+
+ typedef typename mpl::begin<input>::type begin;
+ typedef typename mpl::find<input, void_>::type end;
+ typedef typename mpl::distance<begin, end>::type size;
+
+ typedef typename get_vector_n<size::value>::template
+ call<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>::type
+ type;
+ };
+}}}
+
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+#else // defined(BOOST_PP_IS_ITERATING)
+
+#define N BOOST_PP_ITERATION()
+
+ template <>
+ struct get_vector_n<N>
+ {
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
+ struct call
+ {
+ typedef BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, T)> type;
+ };
+ };
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_VECTOR_LIMITS_07072005_1246)
+#define FUSION_VECTOR_LIMITS_07072005_1246
+
+#if !defined(FUSION_MAX_VECTOR_SIZE)
+# define FUSION_MAX_VECTOR_SIZE 10
+#else
+# if FUSION_MAX_VECTOR_SIZE < 3
+# undef FUSION_MAX_VECTOR_SIZE
+# define FUSION_MAX_VECTOR_SIZE 10
+# endif
+#endif
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_VECTOR_07072005_1244)
+#define FUSION_VECTOR_07072005_1244
+
+#include <boost/fusion/container/vector/vector_fwd.hpp>
+#include <boost/fusion/container/vector/detail/vector_n_chooser.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/mpl/at.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+#include <boost/detail/workaround.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+ struct fusion_sequence_tag;
+
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
+ struct vector
+ : sequence_base<vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)> >
+ {
+ private:
+
+ typedef typename detail::vector_n_chooser<
+ BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>::type
+ vector_n;
+
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)>
+ friend struct vector;
+
+ public:
+
+ typedef typename vector_n::types types;
+ typedef typename vector_n::fusion_tag fusion_tag;
+ typedef typename vector_n::tag tag;
+ typedef typename vector_n::size size;
+ typedef typename vector_n::category category;
+ typedef typename vector_n::is_view is_view;
+
+ vector()
+ : vec() {}
+
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)>
+ vector(vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, U)> const& rhs)
+ : vec(rhs.vec) {}
+
+ vector(vector const& rhs)
+ : vec(rhs.vec) {}
+
+ template <typename Sequence>
+ vector(Sequence const& rhs)
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
+ : vec(ctor_helper(rhs, is_base_of<vector, Sequence>())) {}
+#else
+ : vec(rhs) {}
+#endif
+
+ // Expand a couple of forwarding constructors for arguments
+ // of type (T0), (T0, T1), (T0, T1, T2) etc. Example:
+ //
+ // vector(
+ // typename detail::call_param<T0>::type _0
+ // , typename detail::call_param<T1>::type _1)
+ // : vec(_0, _1) {}
+ #include <boost/fusion/container/vector/detail/vector_forward_ctor.hpp>
+
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)>
+ vector&
+ operator=(vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, U)> const& rhs)
+ {
+ vec = rhs.vec;
+ return *this;
+ }
+
+ template <typename T>
+ vector&
+ operator=(T const& rhs)
+ {
+ vec = rhs;
+ return *this;
+ }
+
+ template <int N>
+ typename add_reference<
+ typename mpl::at_c<types, N>::type
+ >::type
+ at_impl(mpl::int_<N> index)
+ {
+ return vec.at_impl(index);
+ }
+
+ template <int N>
+ typename add_reference<
+ typename add_const<
+ typename mpl::at_c<types, N>::type
+ >::type
+ >::type
+ at_impl(mpl::int_<N> index) const
+ {
+ return vec.at_impl(index);
+ }
+
+ template <typename I>
+ typename add_reference<
+ typename mpl::at<types, I>::type
+ >::type
+ at_impl(I index)
+ {
+ return vec.at_impl(mpl::int_<I::value>());
+ }
+
+ template<typename I>
+ typename add_reference<
+ typename add_const<
+ typename mpl::at<types, I>::type
+ >::type
+ >::type
+ at_impl(I index) const
+ {
+ return vec.at_impl(mpl::int_<I::value>());
+ }
+
+ private:
+
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
+ static vector_n const&
+ ctor_helper(vector const& rhs, mpl::true_)
+ {
+ return rhs.vec;
+ }
+
+ template <typename T>
+ static T const&
+ ctor_helper(T const& rhs, mpl::false_)
+ {
+ return rhs;
+ }
+#endif
+
+ vector_n vec;
+ };
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_VECTOR10_05042005_0257)
+#define FUSION_VECTOR10_05042005_0257
+
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/container/vector/detail/at_impl.hpp>
+#include <boost/fusion/container/vector/detail/value_at_impl.hpp>
+#include <boost/fusion/container/vector/detail/begin_impl.hpp>
+#include <boost/fusion/container/vector/detail/end_impl.hpp>
+
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/at.hpp>
+#include <boost/mpl/vector/vector10.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/utility/enable_if.hpp>
+
+#include <boost/preprocessor/dec.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_shifted.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+
+namespace boost { namespace fusion
+{
+ struct vector_tag;
+ struct fusion_sequence_tag;
+ struct random_access_traversal_tag;
+
+ struct vector0 : sequence_base<vector0>
+ {
+ typedef mpl::vector0<> types;
+ typedef vector_tag fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef mpl::false_ is_view;
+ typedef random_access_traversal_tag category;
+ typedef mpl::int_<0> size;
+
+ vector0() {}
+
+ template<typename Sequence>
+ vector0(Sequence const& seq)
+ {}
+ };
+
+// expand vector1 to vector10
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/vector_n.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, 10)
+#include BOOST_PP_ITERATE()
+
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_VECTOR20_05052005_0205)
+#define FUSION_VECTOR20_05052005_0205
+
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/container/vector/detail/at_impl.hpp>
+#include <boost/fusion/container/vector/detail/value_at_impl.hpp>
+#include <boost/fusion/container/vector/detail/begin_impl.hpp>
+#include <boost/fusion/container/vector/detail/end_impl.hpp>
+
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/at.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/vector/vector20.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/utility/enable_if.hpp>
+
+#include <boost/preprocessor/dec.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_shifted.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+
+namespace boost { namespace fusion
+{
+ struct vector_tag;
+ struct fusion_sequence_tag;
+ struct random_access_traversal_tag;
+
+// expand vector11 to vector20
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/vector_n.hpp>
+#define BOOST_PP_ITERATION_LIMITS (11, 20)
+#include BOOST_PP_ITERATE()
+
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_VECTOR30_05052005_0206)
+#define FUSION_VECTOR30_05052005_0206
+
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/container/vector/detail/at_impl.hpp>
+#include <boost/fusion/container/vector/detail/value_at_impl.hpp>
+#include <boost/fusion/container/vector/detail/begin_impl.hpp>
+#include <boost/fusion/container/vector/detail/end_impl.hpp>
+
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/at.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/vector/vector30.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/utility/enable_if.hpp>
+
+#include <boost/preprocessor/dec.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_shifted.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+
+namespace boost { namespace fusion
+{
+ struct vector_tag;
+ struct fusion_sequence_tag;
+ struct random_access_traversal_tag;
+
+// expand vector21 to vector30
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/vector_n.hpp>
+#define BOOST_PP_ITERATION_LIMITS (21, 30)
+#include BOOST_PP_ITERATE()
+
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_VECTOR40_05052005_0208)
+#define FUSION_VECTOR40_05052005_0208
+
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/container/vector/detail/at_impl.hpp>
+#include <boost/fusion/container/vector/detail/value_at_impl.hpp>
+#include <boost/fusion/container/vector/detail/begin_impl.hpp>
+#include <boost/fusion/container/vector/detail/end_impl.hpp>
+
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/at.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/vector/vector40.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/utility/enable_if.hpp>
+
+#include <boost/preprocessor/dec.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_shifted.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+
+namespace boost { namespace fusion
+{
+ struct vector_tag;
+ struct fusion_sequence_tag;
+ struct random_access_traversal_tag;
+
+// expand vector31 to vector40
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/vector_n.hpp>
+#define BOOST_PP_ITERATION_LIMITS (31, 40)
+#include BOOST_PP_ITERATE()
+
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_VECTOR50_05052005_0207)
+#define FUSION_VECTOR50_05052005_0207
+
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/container/vector/detail/at_impl.hpp>
+#include <boost/fusion/container/vector/detail/value_at_impl.hpp>
+#include <boost/fusion/container/vector/detail/begin_impl.hpp>
+#include <boost/fusion/container/vector/detail/end_impl.hpp>
+
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/at.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/vector/vector50.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/utility/enable_if.hpp>
+
+#include <boost/preprocessor/dec.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_shifted.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+
+namespace boost { namespace fusion
+{
+ struct vector_tag;
+ struct fusion_sequence_tag;
+ struct random_access_traversal_tag;
+
+// expand vector41 to vector50
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/vector_n.hpp>
+#define BOOST_PP_ITERATION_LIMITS (41, 50)
+#include BOOST_PP_ITERATE()
+
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_VECTOR_FORWARD_07072005_0125)
+#define FUSION_VECTOR_FORWARD_07072005_0125
+
+#include <boost/fusion/container/vector/limits.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+
+ template <
+ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ FUSION_MAX_VECTOR_SIZE, typename T, void_)
+ >
+ struct vector;
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_VECTOR_ITERATOR_05042005_0635)
+#define FUSION_VECTOR_ITERATOR_05042005_0635
+
+#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/container/vector/detail/deref_impl.hpp>
+#include <boost/fusion/container/vector/detail/value_of_impl.hpp>
+#include <boost/fusion/container/vector/detail/next_impl.hpp>
+#include <boost/fusion/container/vector/detail/prior_impl.hpp>
+#include <boost/fusion/container/vector/detail/equal_to_impl.hpp>
+#include <boost/fusion/container/vector/detail/distance_impl.hpp>
+#include <boost/fusion/container/vector/detail/advance_impl.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace fusion
+{
+ struct vector_iterator_tag;
+ struct random_access_traversal_tag;
+
+ template <typename Vector, int N>
+ struct vector_iterator_identity;
+
+ template <typename Vector, int N>
+ struct vector_iterator : iterator_base<vector_iterator<Vector, N> >
+ {
+ typedef mpl::int_<N> index;
+ typedef Vector vector;
+ typedef vector_iterator_tag fusion_tag;
+ typedef random_access_traversal_tag category;
+ typedef vector_iterator_identity<
+ typename add_const<Vector>::type, N> identity;
+
+ vector_iterator(Vector& vec)
+ : vec(vec) {}
+ Vector& vec;
+ };
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_HPP_INCLUDED
+
+#include <boost/fusion/functional/invocation.hpp>
+#include <boost/fusion/functional/adapter.hpp>
+#include <boost/fusion/functional/generation.hpp>
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_HPP_INCLUDED
+#include <boost/fusion/functional/adapter/fused.hpp>
+#include <boost/fusion/functional/adapter/fused_procedure.hpp>
+#include <boost/fusion/functional/adapter/fused_function_object.hpp>
+#include <boost/fusion/functional/adapter/unfused_generic.hpp>
+#include <boost/fusion/functional/adapter/unfused_lvalue_args.hpp>
+#include <boost/fusion/functional/adapter/unfused_rvalue_args.hpp>
+#include <boost/fusion/functional/adapter/unfused_typed.hpp>
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_ACCESS_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_ACCESS_HPP_INCLUDED
+
+namespace boost { namespace fusion { namespace detail
+{
+ // const reference deduction for function templates that accept T const &
+ template <typename T> struct cref { typedef T const& type; };
+ template <typename T> struct cref<T&> { typedef T const& type; };
+ template <typename T> struct cref<T const> { typedef T const& type; };
+
+ // mutable reference deduction for function templates that accept T &
+ template <typename T> struct mref { typedef T & type; };
+ template <typename T> struct mref<T&> { typedef T & type; };
+
+ // generic reference deduction for function templates that are overloaded
+ // to accept both T const & and T &
+ template <typename T> struct gref { typedef T const& type; };
+ template <typename T> struct gref<T&> { typedef T & type; };
+ template <typename T> struct gref<T const> { typedef T const& type; };
+
+ // appropriately qualified target function in const context
+ template <typename T> struct qf_c { typedef T const type; };
+ template <typename T> struct qf_c<T const> { typedef T const type; };
+ template <typename T> struct qf_c<T &> { typedef T type; };
+
+ // appropriately qualified target function in non-const context
+ template <typename T> struct qf { typedef T type; };
+ template <typename T> struct qf<T const> { typedef T const type; };
+ template <typename T> struct qf<T &> { typedef T type; };
+}}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_PP_IS_ITERATING)
+# error "This file has to be included by a preprocessor loop construct!"
+#elif BOOST_PP_ITERATION_DEPTH() == 1
+
+# if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_POW2_EXPLODE_HPP_INCLUDED)
+# include <boost/preprocessor/config/limits.hpp>
+# include <boost/preprocessor/slot/slot.hpp>
+# include <boost/preprocessor/arithmetic/dec.hpp>
+# define BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_POW2_EXPLODE_HPP_INCLUDED
+# endif
+
+# define BOOST_PP_VALUE 0
+# include BOOST_PP_ASSIGN_SLOT(1)
+
+# define BOOST_PP_FILENAME_2 \
+ <boost/fusion/functional/adapter/detail/pow2_explode.hpp>
+# define BOOST_PP_VALUE (1 << N) >> 4
+# if BOOST_PP_VALUE > BOOST_PP_LIMIT_ITERATION
+# error "Preprocessor limit exceeded."
+# endif
+
+# include BOOST_PP_ASSIGN_SLOT(2)
+# define BOOST_PP_ITERATION_LIMITS (0,BOOST_PP_DEC(BOOST_PP_SLOT_2()))
+# include BOOST_PP_ITERATE()
+
+#elif BOOST_PP_ITERATION_DEPTH() == 2
+
+# if BOOST_PP_SLOT_1() < 1 << N
+# include BOOST_PP_INDIRECT_SELF
+# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
+# include BOOST_PP_ASSIGN_SLOT(1)
+# if BOOST_PP_SLOT_1() < 1 << N
+# include BOOST_PP_INDIRECT_SELF
+# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
+# include BOOST_PP_ASSIGN_SLOT(1)
+# if BOOST_PP_SLOT_1() < 1 << N
+# include BOOST_PP_INDIRECT_SELF
+# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
+# include BOOST_PP_ASSIGN_SLOT(1)
+# if BOOST_PP_SLOT_1() < 1 << N
+# include BOOST_PP_INDIRECT_SELF
+# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
+# include BOOST_PP_ASSIGN_SLOT(1)
+# if BOOST_PP_SLOT_1() < 1 << N
+# include BOOST_PP_INDIRECT_SELF
+# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
+# include BOOST_PP_ASSIGN_SLOT(1)
+# if BOOST_PP_SLOT_1() < 1 << N
+# include BOOST_PP_INDIRECT_SELF
+# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
+# include BOOST_PP_ASSIGN_SLOT(1)
+# if BOOST_PP_SLOT_1() < 1 << N
+# include BOOST_PP_INDIRECT_SELF
+# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
+# include BOOST_PP_ASSIGN_SLOT(1)
+# if BOOST_PP_SLOT_1() < 1 << N
+# include BOOST_PP_INDIRECT_SELF
+# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
+# include BOOST_PP_ASSIGN_SLOT(1)
+# if BOOST_PP_SLOT_1() < 1 << N
+# include BOOST_PP_INDIRECT_SELF
+# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
+# include BOOST_PP_ASSIGN_SLOT(1)
+# if BOOST_PP_SLOT_1() < 1 << N
+# include BOOST_PP_INDIRECT_SELF
+# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
+# include BOOST_PP_ASSIGN_SLOT(1)
+# if BOOST_PP_SLOT_1() < 1 << N
+# include BOOST_PP_INDIRECT_SELF
+# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
+# include BOOST_PP_ASSIGN_SLOT(1)
+# if BOOST_PP_SLOT_1() < 1 << N
+# include BOOST_PP_INDIRECT_SELF
+# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
+# include BOOST_PP_ASSIGN_SLOT(1)
+# if BOOST_PP_SLOT_1() < 1 << N
+# include BOOST_PP_INDIRECT_SELF
+# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
+# include BOOST_PP_ASSIGN_SLOT(1)
+# if BOOST_PP_SLOT_1() < 1 << N
+# include BOOST_PP_INDIRECT_SELF
+# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
+# include BOOST_PP_ASSIGN_SLOT(1)
+# if BOOST_PP_SLOT_1() < 1 << N
+# include BOOST_PP_INDIRECT_SELF
+# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
+# include BOOST_PP_ASSIGN_SLOT(1)
+# if BOOST_PP_SLOT_1() < 1 << N
+# include BOOST_PP_INDIRECT_SELF
+# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
+# include BOOST_PP_ASSIGN_SLOT(1)
+# endif
+# endif
+# endif
+# endif
+# endif
+# endif
+# endif
+# endif
+# endif
+# endif
+# endif
+# endif
+# endif
+# endif
+# endif
+# endif
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+// No include guard - this file is included multiple times intentionally.
+
+#if BOOST_PP_SLOT_1() & 0x001
+# define PT0 T0 &
+#else
+# define PT0 T0 const &
+#endif
+#if BOOST_PP_SLOT_1() & 0x002
+# define PT1 T1 &
+#else
+# define PT1 T1 const &
+#endif
+#if BOOST_PP_SLOT_1() & 0x004
+# define PT2 T2 &
+#else
+# define PT2 T2 const &
+#endif
+#if BOOST_PP_SLOT_1() & 0x008
+# define PT3 T3 &
+#else
+# define PT3 T3 const &
+#endif
+#if BOOST_PP_SLOT_1() & 0x010
+# define PT4 T4 &
+#else
+# define PT4 T4 const &
+#endif
+#if BOOST_PP_SLOT_1() & 0x020
+# define PT5 T5 &
+#else
+# define PT5 T5 const &
+#endif
+#if BOOST_PP_SLOT_1() & 0x040
+# define PT6 T6 &
+#else
+# define PT6 T6 const &
+#endif
+#if BOOST_PP_SLOT_1() & 0x080
+# define PT7 T7 &
+#else
+# define PT7 T7 const &
+#endif
+#if BOOST_PP_SLOT_1() & 0x100
+# define PT8 T8 &
+#else
+# define PT8 T8 const &
+#endif
+#if BOOST_PP_SLOT_1() & 0x200
+# define PT9 T9 &
+#else
+# define PT9 T9 const &
+#endif
+#if BOOST_PP_SLOT_1() & 0x400
+# define PT10 T10 &
+#else
+# define PT10 T10 const &
+#endif
+#if BOOST_PP_SLOT_1() & 0x800
+# define PT11 T11 &
+#else
+# define PT11 T11 const &
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+// No include guard - this file is included multiple times intentionally.
+
+#undef PT0
+#undef PT1
+#undef PT2
+#undef PT3
+#undef PT4
+#undef PT5
+#undef PT6
+#undef PT7
+#undef PT8
+#undef PT9
+#undef PT10
+#undef PT11
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_HPP_INCLUDED
+
+#include <boost/type_traits/add_reference.hpp>
+
+#include <boost/fusion/functional/adapter/detail/access.hpp>
+#include <boost/fusion/functional/invocation/invoke.hpp>
+
+namespace boost { namespace fusion
+{
+ template <typename Function> class fused;
+
+ //----- ---- --- -- - - - -
+
+ template <typename Function>
+ class fused
+ {
+ Function fnc_transformed;
+
+ typedef typename detail::qf_c<Function>::type & func_const_fwd_t;
+ typedef typename detail::qf<Function>::type & func_fwd_t;
+
+ public:
+
+ inline explicit fused(func_const_fwd_t f = Function())
+ : fnc_transformed(f)
+ { }
+
+ template <class Seq>
+ inline typename result_of::invoke<func_const_fwd_t,Seq const>::type
+ operator()(Seq const & s) const
+ {
+ return fusion::invoke<func_const_fwd_t>(this->fnc_transformed,s);
+ }
+
+ template <class Seq>
+ inline typename result_of::invoke<func_fwd_t,Seq const>::type
+ operator()(Seq const & s)
+ {
+ return fusion::invoke<func_fwd_t>(this->fnc_transformed,s);
+ }
+
+ template <class Seq>
+ inline typename result_of::invoke<func_const_fwd_t,Seq>::type
+ operator()(Seq & s) const
+ {
+ return fusion::invoke<func_const_fwd_t>(this->fnc_transformed,s);
+ }
+
+ template <class Seq>
+ inline typename result_of::invoke<func_fwd_t,Seq>::type
+ operator()(Seq & s)
+ {
+ return fusion::invoke<func_fwd_t>(this->fnc_transformed,s);
+ }
+
+ template <typename Sig>
+ struct result;
+
+ template <class Self, class Seq>
+ struct result< Self const (Seq) >
+ : result_of::invoke<func_const_fwd_t,
+ typename boost::remove_reference<Seq>::type >
+ { };
+
+ template <class Self, class Seq>
+ struct result< Self(Seq) >
+ : result_of::invoke<func_fwd_t,
+ typename boost::remove_reference<Seq>::type >
+ { };
+
+ };
+
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_FUNCTION_OBJECT_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_FUNCTION_OBJECT_HPP_INCLUDED
+
+#include <boost/type_traits/add_reference.hpp>
+
+#include <boost/fusion/functional/adapter/detail/access.hpp>
+#include <boost/fusion/functional/invocation/invoke_function_object.hpp>
+
+namespace boost { namespace fusion
+{
+ template <class Function> class fused_function_object;
+
+ //----- ---- --- -- - - - -
+
+ template <class Function>
+ class fused_function_object
+ {
+ Function fnc_transformed;
+
+ typedef typename detail::qf_c<Function>::type & func_const_fwd_t;
+ typedef typename detail::qf<Function>::type & func_fwd_t;
+
+ public:
+
+ inline explicit fused_function_object(func_const_fwd_t f = Function())
+ : fnc_transformed(f)
+ { }
+
+ template <class Seq>
+ inline typename result_of::invoke_function_object<func_const_fwd_t,
+ Seq const>::type operator()(Seq const & s) const
+ {
+ return fusion::invoke_function_object<
+ func_const_fwd_t >(this->fnc_transformed,s);
+ }
+
+ template <class Seq>
+ inline typename result_of::invoke_function_object<func_fwd_t,
+ Seq const>::type
+ operator()(Seq const & s)
+ {
+ return fusion::invoke_function_object<
+ func_fwd_t >(this->fnc_transformed,s);
+ }
+
+ template <class Seq>
+ inline typename result_of::invoke_function_object<func_const_fwd_t,
+ Seq>::type
+ operator()(Seq & s) const
+ {
+ return fusion::invoke_function_object<
+ func_const_fwd_t >(this->fnc_transformed,s);
+ }
+
+ template <class Seq>
+ inline typename result_of::invoke_function_object<func_fwd_t,Seq>::type
+ operator()(Seq & s)
+ {
+ return fusion::invoke_function_object<
+ func_fwd_t >(this->fnc_transformed,s);
+ }
+
+ template <typename Sig>
+ struct result;
+
+ template <class Self, class Seq>
+ struct result< Self const (Seq) >
+ : result_of::invoke_function_object<func_const_fwd_t,
+ typename boost::remove_reference<Seq>::type >
+ { };
+
+ template <class Self, class Seq>
+ struct result< Self(Seq) >
+ : result_of::invoke_function_object<func_fwd_t,
+ typename boost::remove_reference<Seq>::type >
+ { };
+ };
+
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_PROCEDURE_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_PROCEDURE_HPP_INCLUDED
+
+#include <boost/type_traits/add_reference.hpp>
+
+#include <boost/fusion/functional/adapter/detail/access.hpp>
+#include <boost/fusion/functional/invocation/invoke_procedure.hpp>
+
+namespace boost { namespace fusion
+{
+ template <typename Function> class fused_procedure;
+
+ //----- ---- --- -- - - - -
+
+ template <typename Function>
+ class fused_procedure
+ {
+ Function fnc_transformed;
+
+ typedef typename detail::qf_c<Function>::type & func_const_fwd_t;
+ typedef typename detail::qf<Function>::type & func_fwd_t;
+
+ public:
+
+ inline explicit fused_procedure(func_const_fwd_t f = Function())
+ : fnc_transformed(f)
+ { }
+
+ template <class Seq>
+ inline void operator()(Seq const & s) const
+ {
+ fusion::invoke_procedure<
+ func_const_fwd_t >(this->fnc_transformed,s);
+ }
+
+ template <class Seq>
+ inline void operator()(Seq const & s)
+ {
+ fusion::invoke_procedure<
+ func_fwd_t >(this->fnc_transformed,s);
+ }
+
+ template <class Seq>
+ inline void operator()(Seq & s) const
+ {
+ fusion::invoke_procedure<
+ func_const_fwd_t >(this->fnc_transformed,s);
+ }
+
+ template <class Seq>
+ inline void operator()(Seq & s)
+ {
+ return fusion::invoke_procedure<
+ func_fwd_t >(this->fnc_transformed,s);
+ }
+
+ typedef void result_type;
+ };
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_LIMITS_HPP_INCLUDED)
+# define BOOST_FUSION_FUNCTIONAL_ADAPTER_LIMITS_HPP_INCLUDED
+
+# include <boost/fusion/container/vector/limits.hpp>
+
+# if !defined(BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY)
+# define BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY 6
+# elif BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY > FUSION_MAX_VECTOR_SIZE
+# error "BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY > FUSION_MAX_VECTOR_SIZE"
+# endif
+# if !defined(BOOST_FUSION_UNFUSED_RVALUE_ARGS_MAX_ARITY)
+# define BOOST_FUSION_UNFUSED_RVALUE_ARGS_MAX_ARITY 6
+# elif BOOST_FUSION_UNFUSED_RVALUE_ARGS_MAX_ARITY > FUSION_MAX_VECTOR_SIZE
+# error "BOOST_FUSION_UNFUSED_RVALUE_ARGS_MAX_ARITY > FUSION_MAX_VECTOR_SIZE"
+# endif
+# if !defined(BOOST_FUSION_UNFUSED_LVALUE_ARGS_MAX_ARITY)
+# define BOOST_FUSION_UNFUSED_LVALUE_ARGS_MAX_ARITY 6
+# elif BOOST_FUSION_UNFUSED_LVALUE_ARGS_MAX_ARITY > FUSION_MAX_VECTOR_SIZE
+# error "BOOST_FUSION_UNFUSED_LVALUE_ARGS_MAX_ARITY > FUSION_MAX_VECTOR_SIZE"
+# endif
+# if !defined(BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY)
+# define BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY 6
+# elif BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY > FUSION_MAX_VECTOR_SIZE
+# error "BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY > FUSION_MAX_VECTOR_SIZE"
+# endif
+# if !defined(BOOST_FUSION_CONSTRUCTOR_MAX_ARITY)
+# define BOOST_FUSION_CONSTRUCTOR_MAX_ARITY 6
+# endif
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_GENERIC_HPP_INCLUDED)
+#if !defined(BOOST_PP_IS_ITERATING)
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/facilities/intercept.hpp>
+
+#include <boost/fusion/container/vector/vector.hpp>
+
+#include <boost/fusion/functional/adapter/limits.hpp>
+#include <boost/fusion/functional/adapter/detail/access.hpp>
+
+#include <boost/utility/result_of.hpp>
+
+namespace boost { namespace fusion
+{
+ template <class Function> class unfused_generic;
+
+ //----- ---- --- -- - - - -
+
+ template <class Function>
+ class unfused_generic
+ {
+ Function fnc_transformed;
+
+ typedef typename detail::qf_c<Function>::type function_c;
+ typedef typename detail::qf<Function>::type function;
+
+ typedef typename detail::call_param<Function>::type func_const_fwd_t;
+
+ public:
+
+ inline explicit unfused_generic(func_const_fwd_t f = Function())
+ : fnc_transformed(f)
+ { }
+
+ template <typename Sig>
+ struct result;
+
+ typedef typename boost::result_of<
+ function_c(fusion::vector0 &) >::type call_const_0_result;
+
+ inline call_const_0_result operator()() const
+ {
+ fusion::vector0 arg;
+ return this->fnc_transformed(arg);
+ }
+
+ typedef typename boost::result_of<
+ function (fusion::vector0 &) >::type call_0_result;
+
+ inline call_0_result operator()()
+ {
+ fusion::vector0 arg;
+ return this->fnc_transformed(arg);
+ }
+
+ #define BOOST_FUSION_CODE(tpl_params,arg_types,params,args) \
+ template <tpl_params> \
+ inline typename boost::result_of<function_c( \
+ BOOST_PP_CAT(fusion::vector,N)<arg_types> & )>::type \
+ operator()(params) const \
+ { \
+ BOOST_PP_CAT(fusion::vector,N)<arg_types> arg(args); \
+ return this->fnc_transformed(arg); \
+ } \
+ template <tpl_params> \
+ inline typename boost::result_of<function( \
+ BOOST_PP_CAT(fusion::vector,N)<arg_types> & )>::type \
+ operator()(params) \
+ { \
+ BOOST_PP_CAT(fusion::vector,N)<arg_types> arg(args); \
+ return this->fnc_transformed(arg); \
+ }
+
+ #define BOOST_PP_INDIRECT_SELF \
+ <boost/fusion/functional/adapter/unfused_generic.hpp>
+ #define BOOST_PP_FILENAME_1 \
+ <boost/fusion/functional/adapter/detail/pow2_explode.hpp>
+ #define BOOST_PP_ITERATION_LIMITS \
+ (1,BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY)
+ #define N BOOST_PP_ITERATION_1
+ #include BOOST_PP_ITERATE()
+ #undef N
+
+ #undef BOOST_FUSION_CODE
+ };
+}}
+
+namespace boost
+{
+ template<class F>
+ struct result_of<boost::fusion::unfused_generic<F> const ()>
+ {
+ typedef typename boost::fusion::unfused_generic<F>::call_const_0_result type;
+ };
+ template<class F>
+ struct result_of<boost::fusion::unfused_generic<F>()>
+ {
+ typedef typename boost::fusion::unfused_generic<F>::call_0_result type;
+ };
+}
+
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_GENERIC_HPP_INCLUDED
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include <boost/fusion/functional/adapter/detail/pt_def.hpp>
+
+#if BOOST_PP_SLOT_1() == 0
+ template <class Self, BOOST_PP_ENUM_PARAMS(N,typename T)>
+ struct result
+ < Self const (BOOST_PP_ENUM_PARAMS(N,T)) >
+ : boost::result_of<function_c(
+ BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N,
+ typename detail::gref<T,>::type BOOST_PP_INTERCEPT) > & )>
+ { };
+
+ template <class Self, BOOST_PP_ENUM_PARAMS(N,typename T)>
+ struct result
+ < Self(BOOST_PP_ENUM_PARAMS(N,T)) >
+ : boost::result_of<function(
+ BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N,
+ typename detail::gref<T,>::type BOOST_PP_INTERCEPT) > & )>
+ { };
+#endif
+
+#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1400))
+ template <BOOST_PP_ENUM_PARAMS(N,typename T)>
+ inline typename boost::result_of<function_c(
+ BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)> & )>::type
+ operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a)) const
+ {
+ BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)>
+ arg(BOOST_PP_ENUM_PARAMS(N,a));
+ return this->fnc_transformed(arg);
+ }
+ template <BOOST_PP_ENUM_PARAMS(N,typename T)>
+ inline typename boost::result_of<function(
+ BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)> & )>::type
+ operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a))
+ {
+ BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)>
+ arg(BOOST_PP_ENUM_PARAMS(N,a));
+ return this->fnc_transformed(arg);
+ }
+#else
+ BOOST_FUSION_CODE(BOOST_PP_ENUM_PARAMS(N,typename T),
+ BOOST_PP_ENUM_PARAMS(N,PT), BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a),
+ BOOST_PP_ENUM_PARAMS(N,a) )
+ // ...generates uglier code but is faster - it caches ENUM_*
+#endif
+
+#include <boost/fusion/functional/adapter/detail/pt_undef.hpp>
+
+#endif // defined(BOOST_PP_IS_ITERATING)
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_LVALUE_ARGS_HPP_INCLUDED)
+#if !defined(BOOST_PP_IS_ITERATING)
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/facilities/intercept.hpp>
+
+#include <boost/utility/result_of.hpp>
+
+#include <boost/fusion/container/vector/vector.hpp>
+
+#include <boost/fusion/functional/adapter/limits.hpp>
+#include <boost/fusion/functional/adapter/detail/access.hpp>
+
+namespace boost { namespace fusion
+{
+ template <class Function> class unfused_lvalue_args;
+
+ //----- ---- --- -- - - - -
+
+ template <class Function> class unfused_lvalue_args
+ {
+ Function fnc_transformed;
+
+ typedef typename detail::qf_c<Function>::type function_c;
+ typedef typename detail::qf<Function>::type function;
+
+ typedef typename detail::call_param<Function>::type func_const_fwd_t;
+
+ public:
+
+ inline explicit unfused_lvalue_args(func_const_fwd_t f = function())
+ : fnc_transformed(f)
+ { }
+
+ template <typename Sig>
+ struct result;
+
+ typedef typename boost::result_of<
+ function_c(fusion::vector0 &) >::type call_const_0_result;
+
+ inline call_const_0_result operator()() const
+ {
+ fusion::vector0 arg;
+ return this->fnc_transformed(arg);
+ }
+
+ typedef typename boost::result_of<
+ function(fusion::vector0 &) >::type call_0_result;
+
+ inline call_0_result operator()()
+ {
+ fusion::vector0 arg;
+ return this->fnc_transformed(arg);
+ }
+
+ #define BOOST_PP_FILENAME_1 \
+ <boost/fusion/functional/adapter/unfused_lvalue_args.hpp>
+ #define BOOST_PP_ITERATION_LIMITS \
+ (1,BOOST_FUSION_UNFUSED_LVALUE_ARGS_MAX_ARITY)
+ #include BOOST_PP_ITERATE()
+ };
+}}
+
+namespace boost
+{
+ template<class F>
+ struct result_of< boost::fusion::unfused_lvalue_args<F> const () >
+ {
+ typedef typename boost::fusion::unfused_lvalue_args<F>::call_const_0_result type;
+ };
+ template<class F>
+ struct result_of< boost::fusion::unfused_lvalue_args<F>() >
+ {
+ typedef typename boost::fusion::unfused_lvalue_args<F>::call_0_result type;
+ };
+}
+
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_LVALUE_ARGS_HPP_INCLUDED
+#else // defined(BOOST_PP_IS_ITERATING)
+////////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+////////////////////////////////////////////////////////////////////////////////
+#define N BOOST_PP_ITERATION()
+
+ template <class Self, BOOST_PP_ENUM_PARAMS(N,typename T)>
+ struct result< Self const (BOOST_PP_ENUM_PARAMS(N,T)) >
+ : boost::result_of< function_c(
+ BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N,
+ typename detail::mref<T,>::type BOOST_PP_INTERCEPT) > & )>
+ { };
+
+ template <class Self, BOOST_PP_ENUM_PARAMS(N,typename T)>
+ struct result< Self(BOOST_PP_ENUM_PARAMS(N,T)) >
+ : boost::result_of< function(
+ BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N,
+ typename detail::mref<T,>::type BOOST_PP_INTERCEPT) > & )>
+ { };
+
+ template <BOOST_PP_ENUM_PARAMS(N,typename T)>
+ inline typename boost::result_of<function_c(BOOST_PP_CAT(fusion::vector,N)
+ <BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT)> & )>::type
+ operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& a)) const
+ {
+ BOOST_PP_CAT(fusion::vector,N)<
+ BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT) >
+ arg(BOOST_PP_ENUM_PARAMS(N,a));
+ return this->fnc_transformed(arg);
+ }
+
+ template <BOOST_PP_ENUM_PARAMS(N,typename T)>
+ inline typename boost::result_of<function(BOOST_PP_CAT(fusion::vector,N)
+ <BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT)> & )>::type
+ operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& a))
+ {
+ BOOST_PP_CAT(fusion::vector,N)<
+ BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT) >
+ arg(BOOST_PP_ENUM_PARAMS(N,a));
+ return this->fnc_transformed(arg);
+ }
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_RVALUE_ARGS_HPP_INCLUDED)
+#if !defined(BOOST_PP_IS_ITERATING)
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/facilities/intercept.hpp>
+
+#include <boost/utility/result_of.hpp>
+
+#include <boost/fusion/container/vector/vector.hpp>
+
+#include <boost/fusion/functional/adapter/limits.hpp>
+#include <boost/fusion/functional/adapter/detail/access.hpp>
+
+namespace boost { namespace fusion
+{
+ template <class Function> class unfused_rvalue_args;
+
+ //----- ---- --- -- - - - -
+
+ template <class Function> class unfused_rvalue_args
+ {
+ Function fnc_transformed;
+
+ typedef typename detail::qf_c<Function>::type function_c;
+ typedef typename detail::qf<Function>::type function;
+
+ typedef typename detail::call_param<Function>::type func_const_fwd_t;
+
+ public:
+
+ inline explicit unfused_rvalue_args(func_const_fwd_t f = function())
+ : fnc_transformed(f)
+ { }
+
+ template <typename Sig>
+ struct result;
+
+ typedef typename boost::result_of<
+ function_c(fusion::vector0 &) >::type call_const_0_result;
+
+ inline call_const_0_result operator()() const
+ {
+ fusion::vector0 arg;
+ return this->fnc_transformed(arg);
+ }
+
+ typedef typename boost::result_of<
+ function(fusion::vector0 &) >::type call_0_result;
+
+ inline call_0_result operator()()
+ {
+ fusion::vector0 arg;
+ return this->fnc_transformed(arg);
+ }
+
+ #define BOOST_PP_FILENAME_1 \
+ <boost/fusion/functional/adapter/unfused_rvalue_args.hpp>
+ #define BOOST_PP_ITERATION_LIMITS \
+ (1,BOOST_FUSION_UNFUSED_RVALUE_ARGS_MAX_ARITY)
+ #include BOOST_PP_ITERATE()
+ };
+}}
+
+namespace boost
+{
+ template<class F>
+ struct result_of<boost::fusion::unfused_rvalue_args<F> const ()>
+ {
+ typedef typename boost::fusion::unfused_rvalue_args<F>::call_const_0_result type;
+ };
+ template<class F>
+ struct result_of<boost::fusion::unfused_rvalue_args<F>()>
+ {
+ typedef typename boost::fusion::unfused_rvalue_args<F>::call_0_result type;
+ };
+}
+
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_RVALUE_ARGS_HPP_INCLUDED
+#else // defined(BOOST_PP_IS_ITERATING)
+////////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+////////////////////////////////////////////////////////////////////////////////
+#define N BOOST_PP_ITERATION()
+
+ template <class Self, BOOST_PP_ENUM_PARAMS(N,typename T)>
+ struct result< Self const (BOOST_PP_ENUM_PARAMS(N,T)) >
+ : boost::result_of< function_c(
+ BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N,
+ typename detail::cref<T,>::type BOOST_PP_INTERCEPT) > & )>
+ { };
+
+ template <class Self, BOOST_PP_ENUM_PARAMS(N,typename T)>
+ struct result< Self (BOOST_PP_ENUM_PARAMS(N,T)) >
+ : boost::result_of< function(
+ BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N,
+ typename detail::cref<T,>::type BOOST_PP_INTERCEPT) > & )>
+ { };
+
+ template <BOOST_PP_ENUM_PARAMS(N,typename T)>
+ inline typename boost::result_of<function_c(BOOST_PP_CAT(fusion::vector,N)
+ <BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& BOOST_PP_INTERCEPT)> & )>::type
+ operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& a)) const
+ {
+ BOOST_PP_CAT(fusion::vector,N)<
+ BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& BOOST_PP_INTERCEPT) >
+ arg(BOOST_PP_ENUM_PARAMS(N,a));
+ return this->fnc_transformed(arg);
+ }
+
+ template <BOOST_PP_ENUM_PARAMS(N,typename T)>
+ inline typename boost::result_of<function(BOOST_PP_CAT(fusion::vector,N)
+ <BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& BOOST_PP_INTERCEPT)> & )>::type
+ operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& a))
+ {
+ BOOST_PP_CAT(fusion::vector,N)<
+ BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& BOOST_PP_INTERCEPT) >
+ arg(BOOST_PP_ENUM_PARAMS(N,a));
+ return this->fnc_transformed(arg);
+ }
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_TYPED_HPP_INCLUDED)
+#if !defined(BOOST_PP_IS_ITERATING)
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
+
+#include <boost/config.hpp>
+
+#include <boost/utility/result_of.hpp>
+
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+
+#include <boost/fusion/functional/adapter/limits.hpp>
+#include <boost/fusion/functional/adapter/detail/access.hpp>
+
+
+namespace boost { namespace fusion
+{
+
+ template <class Function, class Sequence> class unfused_typed;
+
+ //----- ---- --- -- - - - -
+
+ namespace detail
+ {
+ template <class Derived, class Function,
+ class Sequence, long Arity>
+ struct unfused_typed_impl;
+ }
+
+ template <class Function, class Sequence>
+ class unfused_typed
+ : public detail::unfused_typed_impl
+ < unfused_typed<Function,Sequence>, Function, Sequence,
+ result_of::size<Sequence>::value >
+ {
+ Function fnc_transformed;
+
+ template <class D, class F, class S, long A>
+ friend struct detail::unfused_typed_impl;
+
+ typedef typename detail::call_param<Function>::type func_const_fwd_t;
+
+ public:
+
+ inline explicit unfused_typed(func_const_fwd_t f = Function())
+ : fnc_transformed(f)
+ { }
+ };
+
+ #define BOOST_PP_FILENAME_1 <boost/fusion/functional/adapter/unfused_typed.hpp>
+ #define BOOST_PP_ITERATION_LIMITS (0,BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY)
+ #include BOOST_PP_ITERATE()
+
+}}
+
+namespace boost
+{
+ template<class F, class Seq>
+ struct result_of< boost::fusion::unfused_typed<F,Seq> const () >
+ : boost::fusion::unfused_typed<F,Seq>::template result<
+ boost::fusion::unfused_typed<F,Seq> const () >
+ { };
+ template<class F, class Seq>
+ struct result_of< boost::fusion::unfused_typed<F,Seq>() >
+ : boost::fusion::unfused_typed<F,Seq>::template result<
+ boost::fusion::unfused_typed<F,Seq> () >
+ { };
+}
+
+
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_TYPED_HPP_INCLUDED
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+#define N BOOST_PP_ITERATION()
+
+ namespace detail
+ {
+
+ template <class Derived, class Function, class Sequence>
+ struct unfused_typed_impl<Derived,Function,Sequence,N>
+ {
+ typedef typename detail::qf_c<Function>::type function_c;
+ typedef typename detail::qf<Function>::type function;
+ typedef typename result_of::as_vector<Sequence>::type arg_vector_t;
+
+ public:
+
+#define M(z,i,s) \
+ typename call_param<typename result_of::value_at_c<s,i>::type>::type a##i
+
+ inline typename boost::result_of<
+ function_c(arg_vector_t &) >::type
+ operator()(BOOST_PP_ENUM(N,M,arg_vector_t)) const
+ {
+#if N > 0
+ arg_vector_t arg(BOOST_PP_ENUM_PARAMS(N,a));
+#else
+ arg_vector_t arg;
+#endif
+ return static_cast<Derived const *>(this)->fnc_transformed(arg);
+ }
+
+ inline typename boost::result_of<
+ function(arg_vector_t &) >::type
+ operator()(BOOST_PP_ENUM(N,M,arg_vector_t))
+ {
+#if N > 0
+ arg_vector_t arg(BOOST_PP_ENUM_PARAMS(N,a));
+#else
+ arg_vector_t arg;
+#endif
+ return static_cast<Derived *>(this)->fnc_transformed(arg);
+ }
+
+#undef M
+
+ template <typename Sig> struct result { typedef void type; };
+
+ template <class Self BOOST_PP_ENUM_TRAILING_PARAMS(N,typename T)>
+ struct result< Self const (BOOST_PP_ENUM_PARAMS(N,T)) >
+ : boost::result_of< function_c(arg_vector_t &) >
+ { };
+
+ template <class Self BOOST_PP_ENUM_TRAILING_PARAMS(N,typename T)>
+ struct result< Self (BOOST_PP_ENUM_PARAMS(N,T)) >
+ : boost::result_of< function(arg_vector_t &) >
+ { };
+ };
+
+ } // namespace detail
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_GENERATION_HPP_INCLUDED
+
+#include <boost/fusion/functional/generation/make_fused.hpp>
+#include <boost/fusion/functional/generation/make_fused_procedure.hpp>
+#include <boost/fusion/functional/generation/make_fused_function_object.hpp>
+#include <boost/fusion/functional/generation/make_unfused_generic.hpp>
+#include <boost/fusion/functional/generation/make_unfused_lvalue_args.hpp>
+#include <boost/fusion/functional/generation/make_unfused_rvalue_args.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+// No include guard - this file is included multiple times intentionally.
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/fusion/support/detail/as_fusion_element.hpp>
+
+#if !defined(BOOST_FUSION_CLASS_TPL_NAME)
+# error "BOOST_FUSION_CLASS_TPL_NAME undefined"
+#endif
+
+#define BOOST_FUSION_FUNC_NAME BOOST_PP_CAT(make_,BOOST_FUSION_CLASS_TPL_NAME)
+
+namespace boost { namespace fusion
+{
+
+ namespace result_of
+ {
+ template <typename F>
+ struct BOOST_FUSION_FUNC_NAME
+ {
+ typedef fusion::BOOST_FUSION_CLASS_TPL_NAME<
+ typename fusion::detail::as_fusion_element<F>::type > type;
+ };
+ }
+
+ template <typename F>
+ inline typename result_of::BOOST_FUSION_FUNC_NAME<F>::type
+ BOOST_FUSION_FUNC_NAME(F const & f)
+ {
+ return typename result_of::BOOST_FUSION_FUNC_NAME<F>::type(f);
+ }
+
+}}
+
+#undef BOOST_FUSION_CLASS_TPL_NAME
+#undef BOOST_FUSION_FUNC_NAME
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_HPP_INCLUDED
+
+#include <boost/fusion/functional/adapter/fused.hpp>
+
+#define BOOST_FUSION_CLASS_TPL_NAME fused
+#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_FUNCTION_OBJECT_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_FUNCTION_OBJECT_HPP_INCLUDED
+
+#include <boost/fusion/functional/adapter/fused_function_object.hpp>
+
+#define BOOST_FUSION_CLASS_TPL_NAME fused_function_object
+#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_PROCEDURE_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_PROCEDURE_HPP_INCLUDED
+
+#include <boost/fusion/functional/adapter/fused_procedure.hpp>
+
+#define BOOST_FUSION_CLASS_TPL_NAME fused_procedure
+#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_GENERIC_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_GENERIC_HPP_INCLUDED
+
+#include <boost/fusion/functional/adapter/unfused_generic.hpp>
+
+#define BOOST_FUSION_CLASS_TPL_NAME unfused_generic
+#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_LVALUE_ARGS_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_LVALUE_ARGS_HPP_INCLUDED
+
+#include <boost/fusion/functional/adapter/unfused_lvalue_args.hpp>
+
+#define BOOST_FUSION_CLASS_TPL_NAME unfused_lvalue_args
+#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_RVALUE_ARGS_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_RVALUE_ARGS_HPP_INCLUDED
+
+#include <boost/fusion/functional/adapter/unfused_rvalue_args.hpp>
+
+#define BOOST_FUSION_CLASS_TPL_NAME unfused_rvalue_args
+#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_HPP_INCLUDED
+
+#include <boost/fusion/functional/invocation/invoke.hpp>
+#include <boost/fusion/functional/invocation/invoke_procedure.hpp>
+#include <boost/fusion/functional/invocation/invoke_function_object.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_THAT_PTR_HPP_INCLUDED)
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_THAT_PTR_HPP_INCLUDED
+
+#include <boost/get_pointer.hpp>
+#include <boost/utility/addressof.hpp>
+#include <boost/type_traits/config.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Wanted>
+ struct that_ptr
+ {
+ private:
+
+ typedef typename remove_reference<Wanted>::type pointee;
+
+ template <typename T>
+ static inline pointee * do_get_pointer(T &, pointee * x)
+ {
+ return x;
+ }
+ template <typename T>
+ static inline pointee * do_get_pointer(T & x, void const *)
+ {
+ return get_pointer(x);
+ }
+
+ public:
+
+ static inline pointee * get(pointee * x)
+ {
+ return x;
+ }
+
+ static inline pointee * get(pointee & x)
+ {
+ return boost::addressof(x);
+ }
+
+ template <typename T> static inline pointee * get(T & x)
+ {
+ return do_get_pointer(x, boost::addressof(x));
+ }
+ };
+
+ template <typename PtrOrSmartPtr> struct non_const_pointee;
+
+ namespace adl_barrier
+ {
+ using boost::get_pointer;
+ void const * BOOST_TT_DECL get_pointer(...); // fallback
+
+ template< typename T> char const_tester(T *);
+ template< typename T> long const_tester(T const *);
+
+ template <typename Ptr>
+ struct non_const_pointee_impl
+ {
+ static Ptr & what;
+
+ static bool const value =
+ sizeof(const_tester(get_pointer(what))) == 1;
+ };
+ }
+
+ template <typename PtrOrSmartPtr> struct non_const_pointee
+ : adl_barrier::non_const_pointee_impl<
+ typename remove_cv<
+ typename remove_reference<PtrOrSmartPtr>::type >::type >
+ {
+ typedef non_const_pointee type;
+ typedef bool value_type;
+ };
+
+}}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005-2006 Joao Abecasis
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_HPP_INCLUDED)
+#if !defined(BOOST_PP_IS_ITERATING)
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_shifted.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
+
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/front.hpp>
+#include <boost/mpl/identity.hpp>
+
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+
+#include <boost/function_types/is_function.hpp>
+#include <boost/function_types/is_callable_builtin.hpp>
+#include <boost/function_types/is_member_pointer.hpp>
+#include <boost/function_types/is_member_function_pointer.hpp>
+#include <boost/function_types/result_type.hpp>
+#include <boost/function_types/parameter_types.hpp>
+
+#include <boost/utility/result_of.hpp>
+
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/functional/invocation/limits.hpp>
+#include <boost/fusion/functional/invocation/detail/that_ptr.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Function, class Sequence> struct invoke;
+ }
+
+ template <typename Function, class Sequence>
+ inline typename result_of::invoke<Function, Sequence>::type
+ invoke(Function, Sequence &);
+
+ template <typename Function, class Sequence>
+ inline typename result_of::invoke<Function, Sequence const>::type
+ invoke(Function, Sequence const &);
+
+ //----- ---- --- -- - - - -
+
+ namespace detail
+ {
+ namespace ft = function_types;
+
+ template<
+ typename Function, class Sequence,
+ int N = result_of::size<Sequence>::value,
+ bool CBI = ft::is_callable_builtin<Function>::value,
+ bool RandomAccess = traits::is_random_access<Sequence>::value
+ >
+ struct invoke_impl;
+
+ template <class Sequence, int N>
+ struct invoke_param_types;
+
+ template <typename T, class Sequence>
+ struct invoke_data_member;
+
+ template <typename Function, class Sequence, int N, bool RandomAccess>
+ struct invoke_mem_fn;
+
+ #define BOOST_PP_FILENAME_1 <boost/fusion/functional/invocation/invoke.hpp>
+ #define BOOST_PP_ITERATION_LIMITS (0, BOOST_FUSION_INVOKE_MAX_ARITY)
+ #include BOOST_PP_ITERATE()
+
+ template <typename F, class Sequence, int N, bool RandomAccess>
+ struct invoke_nonmember_builtin
+ // use same implementation as for function objects but...
+ : invoke_impl< // ...work around boost::result_of bugs
+ typename mpl::eval_if< ft::is_function<F>,
+ boost::add_reference<F>, boost::remove_cv<F> >::type,
+ Sequence, N, false, RandomAccess >
+ { };
+
+ template <typename Function, class Sequence, int N, bool RandomAccess>
+ struct invoke_impl<Function,Sequence,N,true,RandomAccess>
+ : mpl::if_< ft::is_member_function_pointer<Function>,
+ invoke_mem_fn<Function,Sequence,N,RandomAccess>,
+ invoke_nonmember_builtin<Function,Sequence,N,RandomAccess>
+ >::type
+ { };
+
+ template <typename Function, class Sequence, bool RandomAccess>
+ struct invoke_impl<Function,Sequence,1,true,RandomAccess>
+ : mpl::eval_if< ft::is_member_pointer<Function>,
+ mpl::if_< ft::is_member_function_pointer<Function>,
+ invoke_mem_fn<Function,Sequence,1,RandomAccess>,
+ invoke_data_member<Function, Sequence> >,
+ mpl::identity< invoke_nonmember_builtin<
+ Function,Sequence,1,RandomAccess> >
+ >::type
+ { };
+
+ template <typename T, class C, class Sequence>
+ struct invoke_data_member< T C::*, Sequence >
+ {
+ private:
+
+ typedef typename result_of::front<Sequence>::type that;
+
+ typedef mpl::or_< boost::is_convertible<that,C*>,
+ boost::is_convertible<that,C&>,
+ non_const_pointee<that> > non_const_cond;
+
+ typedef typename mpl::eval_if< non_const_cond,
+ mpl::identity<C>, add_const<C> >::type qualified_class;
+
+ typedef typename mpl::eval_if< non_const_cond,
+ mpl::identity<T>, add_const<T> >::type qualified_type;
+
+ public:
+
+ typedef typename boost::add_reference<qualified_type>::type
+ result_type;
+
+ static inline result_type call(T C::* f, Sequence & s)
+ {
+ typename result_of::front<Sequence>::type c = fusion::front(s);
+ return that_ptr<qualified_class>::get(c)->*f;
+ }
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename Function, class Sequence> struct invoke
+ {
+ typedef typename detail::invoke_impl<
+ typename boost::remove_reference<Function>::type, Sequence
+ >::result_type type;
+ };
+ }
+
+ template <typename Function, class Sequence>
+ inline typename result_of::invoke<Function,Sequence>::type
+ invoke(Function f, Sequence & s)
+ {
+ return detail::invoke_impl<
+ typename boost::remove_reference<Function>::type,Sequence
+ >::call(f,s);
+ }
+
+ template <typename Function, class Sequence>
+ inline typename result_of::invoke<Function,Sequence const>::type
+ invoke(Function f, Sequence const & s)
+ {
+ return detail::invoke_impl<
+ typename boost::remove_reference<Function>::type,Sequence const
+ >::call(f,s);
+ }
+
+}}
+
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_HPP_INCLUDED
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+#define N BOOST_PP_ITERATION()
+
+ template <typename Function, class Sequence>
+ struct invoke_impl<Function,Sequence,N,false,true>
+ {
+ public:
+
+ typedef typename boost::result_of<
+#define M(z,j,data) typename result_of::at_c<Sequence,j>::type
+ Function(BOOST_PP_ENUM(N,M,~)) >::type result_type;
+#undef M
+
+ template <typename F>
+ static inline result_type
+ call(F & f, Sequence & s)
+ {
+#define M(z,j,data) fusion::at_c<j>(s)
+ return f( BOOST_PP_ENUM(N,M,~) );
+ }
+ };
+
+
+#if N > 0
+ template <typename Function, class Sequence>
+ struct invoke_mem_fn<Function,Sequence,N,true>
+ {
+ public:
+
+ typedef typename ft::result_type<Function>::type result_type;
+
+ template <typename F>
+ static inline result_type
+ call(F & f, Sequence & s)
+ {
+ return (that_ptr<typename mpl::front<
+ ft::parameter_types<Function> >::type
+ >::get(fusion::at_c<0>(s))->*f)(BOOST_PP_ENUM_SHIFTED(N,M,~));
+ }
+ };
+#endif
+
+#undef M
+
+#define M(z,j,data) \
+ typename seq::I##j i##j = \
+ fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(j)));
+
+ template <typename Function, class Sequence>
+ struct invoke_impl<Function,Sequence,N,false,false>
+ {
+ private:
+ typedef invoke_param_types<Sequence,N> seq;
+ public:
+
+ typedef typename boost::result_of<
+ Function(BOOST_PP_ENUM_PARAMS(N,typename seq::T))
+ >::type result_type;
+
+ template <typename F>
+ static inline result_type
+ call(F & f, Sequence & s)
+ {
+#if N > 0
+ typename seq::I0 i0 = fusion::begin(s);
+ BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
+#endif
+ return f( BOOST_PP_ENUM_PARAMS(N,*i) );
+ }
+ };
+
+#if N > 0
+ template <typename Function, class Sequence>
+ struct invoke_mem_fn<Function,Sequence,N,false>
+ {
+ private:
+ typedef invoke_param_types<Sequence,N> seq;
+ public:
+
+ typedef typename ft::result_type<Function>::type result_type;
+
+ template <typename F>
+ static inline result_type
+ call(F & f, Sequence & s)
+ {
+ typename seq::I0 i0 = fusion::begin(s);
+ BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
+
+ return (that_ptr< typename mpl::front<
+ ft::parameter_types<Function> >::type
+ >::get(*i0)->*f)(BOOST_PP_ENUM_SHIFTED_PARAMS(N,*i));
+ }
+ };
+#endif
+
+#undef M
+
+ template <class Sequence> struct invoke_param_types<Sequence,N>
+ {
+#if N > 0
+ typedef typename result_of::begin<Sequence>::type I0;
+ typedef typename result_of::deref<I0>::type T0;
+
+#define M(z,i,data) \
+ typedef typename result_of::next< \
+ BOOST_PP_CAT(I,BOOST_PP_DEC(i))>::type I##i; \
+ typedef typename result_of::deref<I##i>::type T##i;
+
+ BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
+#undef M
+#endif
+ };
+
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005-2006 Joao Abecasis
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_FUNCTION_OBJECT_HPP_INCLUDED)
+#if !defined(BOOST_PP_IS_ITERATING)
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+
+#include <boost/utility/result_of.hpp>
+
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/remove_const.hpp>
+
+#include <boost/utility/result_of.hpp>
+
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/functional/invocation/limits.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <class Function, class Sequence> struct invoke_function_object;
+ }
+
+ template <class Function, class Sequence>
+ inline typename result_of::invoke_function_object<Function, Sequence>::type
+ invoke_function_object(Function, Sequence &);
+
+ template <class Function, class Sequence>
+ inline typename result_of::invoke_function_object<Function, Sequence const
+ >::type invoke_function_object(Function, Sequence const &);
+
+ //----- ---- --- -- - - - -
+
+ namespace detail
+ {
+ template<
+ class Function, class Sequence,
+ int N = result_of::size<Sequence>::value,
+ bool RandomAccess = traits::is_random_access<Sequence>::value
+ >
+ struct invoke_function_object_impl;
+
+ template <class Sequence, int N>
+ struct invoke_function_object_param_types;
+
+ #define BOOST_PP_FILENAME_1 \
+ <boost/fusion/functional/invocation/invoke_function_object.hpp>
+ #define BOOST_PP_ITERATION_LIMITS \
+ (0, BOOST_FUSION_INVOKE_FUNCTION_OBJECT_MAX_ARITY)
+ #include BOOST_PP_ITERATE()
+ }
+
+ namespace result_of
+ {
+ template <class Function, class Sequence> struct invoke_function_object
+ {
+ typedef typename detail::invoke_function_object_impl<
+ typename boost::remove_reference<Function>::type, Sequence
+ >::result_type type;
+ };
+ }
+
+ template <class Function, class Sequence>
+ inline typename result_of::invoke_function_object<Function,Sequence>::type
+ invoke_function_object(Function f, Sequence & s)
+ {
+ return detail::invoke_function_object_impl<
+ typename boost::remove_reference<Function>::type,Sequence
+ >::call(f,s);
+ }
+
+ template <class Function, class Sequence>
+ inline typename result_of::invoke_function_object<Function,Sequence const>::type
+ invoke_function_object(Function f, Sequence const & s)
+ {
+ return detail::invoke_function_object_impl<
+ typename boost::remove_reference<Function>::type,Sequence const
+ >::call(f,s);
+ }
+
+}}
+
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_FUNCTION_OBJECT_HPP_INCLUDED
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+#define N BOOST_PP_ITERATION()
+
+ template <class Function, class Sequence>
+ struct invoke_function_object_impl<Function,Sequence,N,true>
+ {
+ public:
+
+ typedef typename boost::result_of<
+#define M(z,j,data) \
+ typename result_of::at_c<Sequence,j>::type
+ Function (BOOST_PP_ENUM(N,M,~)) >::type result_type;
+#undef M
+
+ template <class F>
+ static inline result_type
+ call(F & f, Sequence & s)
+ {
+#define M(z,j,data) fusion::at_c<j>(s)
+ return f( BOOST_PP_ENUM(N,M,~) );
+#undef M
+ }
+ };
+
+ template <class Function, class Sequence>
+ struct invoke_function_object_impl<Function,Sequence,N,false>
+ {
+ private:
+ typedef invoke_function_object_param_types<Sequence,N> seq;
+ public:
+ typedef typename boost::result_of<
+ Function (BOOST_PP_ENUM_PARAMS(N,typename seq::T))
+ >::type result_type;
+
+ template <class F>
+ static inline result_type
+ call(F & f, Sequence & s)
+ {
+#if N > 0
+ typename seq::I0 i0 = fusion::begin(s);
+#define M(z,j,data) \
+ typename seq::I##j i##j = \
+ fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(j)));
+ BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
+#undef M
+#endif
+ return f( BOOST_PP_ENUM_PARAMS(N,*i) );
+ }
+ };
+
+ template <class Sequence>
+ struct invoke_function_object_param_types<Sequence,N>
+ {
+#if N > 0
+ typedef typename result_of::begin<Sequence>::type I0;
+ typedef typename result_of::deref<I0>::type T0;
+
+#define M(z,i,data) \
+ typedef typename result_of::next< \
+ BOOST_PP_CAT(I,BOOST_PP_DEC(i))>::type I##i; \
+ typedef typename result_of::deref<I##i>::type T##i;
+
+ BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
+#undef M
+#endif
+ };
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005-2006 Joao Abecasis
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_PROCEDURE_HPP_INCLUDED)
+#if !defined(BOOST_PP_IS_ITERATING)
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_shifted.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
+
+#include <boost/type_traits/remove_reference.hpp>
+
+#include <boost/mpl/front.hpp>
+
+#include <boost/function_types/is_callable_builtin.hpp>
+#include <boost/function_types/is_member_function_pointer.hpp>
+#include <boost/function_types/parameter_types.hpp>
+
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/functional/invocation/limits.hpp>
+#include <boost/fusion/functional/invocation/detail/that_ptr.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Function, class Sequence> struct invoke_procedure
+ {
+ typedef void type;
+ };
+ }
+
+ template <typename Function, class Sequence>
+ inline void invoke_procedure(Function, Sequence &);
+
+ template <typename Function, class Sequence>
+ inline void invoke_procedure(Function, Sequence const &);
+
+ //----- ---- --- -- - - - -
+
+ namespace detail
+ {
+ namespace ft = function_types;
+
+ template<
+ typename Function, class Sequence,
+ int N = result_of::size<Sequence>::value,
+ bool MFP = ft::is_member_function_pointer<Function>::value,
+ bool RandomAccess = traits::is_random_access<Sequence>::value
+ >
+ struct invoke_procedure_impl;
+
+ #define BOOST_PP_FILENAME_1 \
+ <boost/fusion/functional/invocation/invoke_procedure.hpp>
+ #define BOOST_PP_ITERATION_LIMITS \
+ (0, BOOST_FUSION_INVOKE_PROCEDURE_MAX_ARITY)
+ #include BOOST_PP_ITERATE()
+
+ }
+
+ template <typename Function, class Sequence>
+ inline void invoke_procedure(Function f, Sequence & s)
+ {
+ detail::invoke_procedure_impl<
+ typename boost::remove_reference<Function>::type,Sequence
+ >::call(f,s);
+ }
+
+ template <typename Function, class Sequence>
+ inline void invoke_procedure(Function f, Sequence const & s)
+ {
+ detail::invoke_procedure_impl<
+ typename boost::remove_reference<Function>::type,Sequence const
+ >::call(f,s);
+ }
+
+}}
+
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_PROCEDURE_HPP_INCLUDED
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+#define N BOOST_PP_ITERATION()
+
+#define M(z,j,data) fusion::at_c<j>(s)
+
+ template <typename Function, class Sequence>
+ struct invoke_procedure_impl<Function,Sequence,N,false,true>
+ {
+ static inline void call(Function & f, Sequence & s)
+ {
+ f(BOOST_PP_ENUM(N,M,~));
+ }
+ };
+
+#if N > 0
+ template <typename Function, class Sequence>
+ struct invoke_procedure_impl<Function,Sequence,N,true,true>
+ {
+ static inline void call(Function & f, Sequence & s)
+ {
+ (that_ptr<typename mpl::front<
+ ft::parameter_types<Function> >::type
+ >::get(fusion::at_c<0>(s))->*f)(BOOST_PP_ENUM_SHIFTED(N,M,~));
+ }
+ };
+#endif
+
+#undef M
+
+#define M(z,j,data) \
+ typedef typename result_of::next< BOOST_PP_CAT(I,BOOST_PP_DEC(j)) \
+ >::type I ## j ; \
+ I##j i##j = fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(j)));
+
+ template <typename Function, class Sequence>
+ struct invoke_procedure_impl<Function,Sequence,N,false,false>
+ {
+ static inline void call(Function & f, Sequence & s)
+ {
+#if N > 0
+ typedef typename result_of::begin<Sequence>::type I0;
+ I0 i0 = fusion::begin(s);
+ BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
+#endif
+ f( BOOST_PP_ENUM_PARAMS(N,*i) );
+ }
+ };
+
+#if N > 0
+ template <typename Function, class Sequence>
+ struct invoke_procedure_impl<Function,Sequence,N,true,false>
+ {
+ static inline void call(Function & f, Sequence & s)
+ {
+ typedef typename result_of::begin<Sequence>::type I0;
+ I0 i0 = fusion::begin(s);
+ BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
+
+ (that_ptr<typename mpl::front<
+ ft::parameter_types<Function> >::type
+ >::get(*i0)->*f)(BOOST_PP_ENUM_SHIFTED_PARAMS(N,*i));
+ }
+ };
+#endif
+
+#undef M
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_LIMITS_HPP_INCLUDED)
+# define BOOST_FUSION_FUNCTIONAL_INVOCATION_LIMITS_HPP_INCLUDED
+
+# if !defined(BOOST_FUSION_INVOKE_MAX_ARITY)
+# define BOOST_FUSION_INVOKE_MAX_ARITY 6
+# endif
+# if !defined(BOOST_FUSION_INVOKE_PROCEDURE_MAX_ARITY)
+# define BOOST_FUSION_INVOKE_PROCEDURE_MAX_ARITY 6
+# endif
+# if !defined(BOOST_FUSION_INVOKE_FUNCTION_OBJECT_MAX_ARITY)
+# define BOOST_FUSION_INVOKE_FUNCTION_OBJECT_MAX_ARITY 6
+# endif
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_ACCUMULATE)
+#define FUSION_INCLUDE_ACCUMULATE
+
+#include <boost/fusion/algorithm/iteration/accumulate.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_ADAPT_STRUCT)
+#define FUSION_INCLUDE_ADAPT_STRUCT
+
+#include <boost/fusion/adapted/struct/adapt_struct.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_ADAPTED)
+#define FUSION_INCLUDE_ADAPTED
+
+#include <boost/fusion/adapted.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_ADAPTER)
+#define FUSION_INCLUDE_ADAPTER
+
+#include <boost/fusion/functional/adapter.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_ADVANCE)
+#define FUSION_INCLUDE_ADVANCE
+
+#include <boost/fusion/iterator/advance.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_ALGORITHM)
+#define FUSION_INCLUDE_ALGORITHM
+
+#include <boost/fusion/algorithm.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_ALL)
+#define FUSION_INCLUDE_ALL
+
+#include <boost/fusion/algorithm/query/all.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_ANY)
+#define FUSION_INCLUDE_ANY
+
+#include <boost/fusion/algorithm/query/any.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_ARRAY)
+#define FUSION_INCLUDE_ARRAY
+
+#include <boost/fusion/adapted/array.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_AS_DEQUE)
+#define FUSION_INCLUDE_AS_DEQUE
+
+#include <boost/fusion/container/deque/convert.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_AS_LIST)
+#define FUSION_INCLUDE_AS_LIST
+
+#include <boost/fusion/container/list/convert.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_AS_MAP)
+#define FUSION_INCLUDE_AS_MAP
+
+#include <boost/fusion/container/map/convert.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_AS_SET)
+#define FUSION_INCLUDE_AS_SET
+
+#include <boost/fusion/container/set/convert.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_AS_VECTOR)
+#define FUSION_INCLUDE_AS_VECTOR
+
+#include <boost/fusion/container/vector/convert.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_AT)
+#define FUSION_INCLUDE_AT
+
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_AT_C)
+#define FUSION_INCLUDE_AT_C
+
+#include <boost/fusion/sequence/intrinsic/at_c.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_AT_KEY)
+#define FUSION_INCLUDE_AT_KEY
+
+#include <boost/fusion/sequence/intrinsic/at_key.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_BACK)
+#define FUSION_INCLUDE_BACK
+
+#include <boost/fusion/sequence/intrinsic/back.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_BEGIN)
+#define FUSION_INCLUDE_BEGIN
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_BOOST_TUPLE)
+#define FUSION_INCLUDE_BOOST_TUPLE
+
+#include <boost/fusion/adapted/boost_tuple.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_CATEGORY_OF)
+#define FUSION_INCLUDE_CATEGORY_OF
+
+#include <boost/fusion/support/category_of.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_CLEAR)
+#define FUSION_INCLUDE_CLEAR
+
+#include <boost/fusion/algorithm/transformation/clear.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_COMPARISON)
+#define FUSION_INCLUDE_COMPARISON
+
+#include <boost/fusion/sequence/comparison.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_CONS)
+#define FUSION_INCLUDE_CONS
+
+#include <boost/fusion/container/list/cons.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_CONS_TIE)
+#define FUSION_INCLUDE_CONS_TIE
+
+#include <boost/fusion/container/generation/cons_tie.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_CONTAINER)
+#define FUSION_INCLUDE_CONTAINER
+
+#include <boost/fusion/container.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_CONVERT)
+#define FUSION_INCLUDE_CONVERT
+
+#include <boost/fusion/sequence/convert.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_COUNT)
+#define FUSION_INCLUDE_COUNT
+
+#include <boost/fusion/algorithm/query/count.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_COUNT_IF)
+#define FUSION_INCLUDE_COUNT_IF
+
+#include <boost/fusion/algorithm/query/count_if.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_DEDUCE)
+#define FUSION_INCLUDE_DEDUCE
+
+#include <boost/fusion/support/deduce.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_DEDUCE_SEQUENCE)
+#define FUSION_INCLUDE_DEDUCE_SEQUENCE
+
+#include <boost/fusion/support/deduce_sequence.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_DEQUE)
+#define FUSION_INCLUDE_DEQUE
+
+#include <boost/fusion/container/deque.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_DEQUE)
+#define FUSION_INCLUDE_DEQUE
+
+#include <boost/fusion/container/deque/deque_fwd.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_GENERATION)
+#define FUSION_INCLUDE_GENERATION
+
+#include <boost/fusion/container/generation.hpp>
+#include <boost/fusion/functional/generation.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_DEREF)
+#define FUSION_INCLUDE_DEREF
+
+#include <boost/fusion/iterator/deref.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_DISTANCE)
+#define FUSION_INCLUDE_DISTANCE
+
+#include <boost/fusion/iterator/distance.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_EMPTY)
+#define FUSION_INCLUDE_EMPTY
+
+#include <boost/fusion/sequence/intrinsic/empty.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_END)
+#define FUSION_INCLUDE_END
+
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_EQUAL_TO)
+#define FUSION_INCLUDE_EQUAL_TO
+
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_ERASE)
+#define FUSION_INCLUDE_ERASE
+
+#include <boost/fusion/algorithm/transformation/erase.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_ERASE_KEY)
+#define FUSION_INCLUDE_ERASE_KEY
+
+#include <boost/fusion/algorithm/transformation/erase_key.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_FILTER)
+#define FUSION_INCLUDE_FILTER
+
+#include <boost/fusion/algorithm/transformation/filter.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_FILTER_IF)
+#define FUSION_INCLUDE_FILTER_IF
+
+#include <boost/fusion/algorithm/transformation/filter_if.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_FILTER_VIEW)
+#define FUSION_INCLUDE_FILTER_VIEW
+
+#include <boost/fusion/view/filter_view.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_FIND)
+#define FUSION_INCLUDE_FIND
+
+#include <boost/fusion/algorithm/query/find.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_FIND_IF)
+#define FUSION_INCLUDE_FIND_IF
+
+#include <boost/fusion/algorithm/query/find_if.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_FOLD)
+#define FUSION_INCLUDE_FOLD
+
+#include <boost/fusion/algorithm/iteration/fold.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_FOR_EACH)
+#define FUSION_INCLUDE_FOR_EACH
+
+#include <boost/fusion/algorithm/iteration/for_each.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_FRONT)
+#define FUSION_INCLUDE_FRONT
+
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_FUNCTIONAL)
+#define FUSION_INCLUDE_FUNCTIONAL
+
+#include <boost/fusion/functional.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_FUSED)
+#define FUSION_INCLUDE_FUSED
+
+#include <boost/fusion/functional/adapter/fused.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_FUSED_FUNCTION_OBJECT)
+#define FUSION_INCLUDE_FUSED_FUNCTION_OBJECT
+
+#include <boost/fusion/functional/adapter/fused_function_object.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_FUSED_PROCEDURE)
+#define FUSION_INCLUDE_FUSED_PROCEDURE
+
+#include <boost/fusion/functional/adapter/fused_procedure.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_GENERATION)
+#define FUSION_INCLUDE_GENERATION
+
+#include <boost/fusion/container/generation.hpp>
+#include <boost/fusion/functional/generation.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_NOT_GREATER)
+#define FUSION_INCLUDE_NOT_GREATER
+
+#include <boost/fusion/sequence/comparison/greater.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_GREATER_EQUAL)
+#define FUSION_INCLUDE_GREATER_EQUAL
+
+#include <boost/fusion/sequence/comparison/greater_equal.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_HAS_KEY)
+#define FUSION_INCLUDE_EMPTY
+
+#include <boost/fusion/sequence/intrinsic/has_key.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_GENERATION)
+#define FUSION_INCLUDE_GENERATION
+
+#include <boost/fusion/container/generation.hpp>
+#include <boost/fusion/functional/generation.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Hartmut Kaiser
+
+ Distributed under the 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(FUSION_INCLUDE_IN)
+#define FUSION_INCLUDE_IN
+
+#include <boost/fusion/sequence/io/in.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_INSERT)
+#define FUSION_INCLUDE_INSERT
+
+#include <boost/fusion/algorithm/transformation/insert.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_INSERT_RANGE)
+#define FUSION_INCLUDE_INSERT_RANGE
+
+#include <boost/fusion/algorithm/transformation/insert_range.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_INTRINSIC)
+#define FUSION_INCLUDE_INTRINSIC
+
+#include <boost/fusion/sequence/intrinsic.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_INVOCATION)
+#define FUSION_INCLUDE_INVOCATION
+
+#include <boost/fusion/functional/invocation.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_INVOKE)
+#define FUSION_INCLUDE_INVOKE
+
+#include <boost/fusion/functional/invocation/invoke.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_INVOKE_FUNCTION_OBJECT)
+#define FUSION_INCLUDE_INVOKE_FUNCTION_OBJECT
+
+#include <boost/fusion/functional/invocation/invoke_function_object.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_INVOKE_PROCEDURE)
+#define FUSION_INCLUDE_INVOKE_PROCEDURE
+
+#include <boost/fusion/functional/invocation/invoke_procedure.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Hartmut Kaiser
+
+ Distributed under the 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(FUSION_INCLUDE_IO)
+#define FUSION_INCLUDE_IO
+
+#include <boost/fusion/sequence/io.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_IS_ITERATOR)
+#define FUSION_INCLUDE_IS_ITERATOR
+
+#include <boost/fusion/support/is_iterator.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_IS_SEQUENCE)
+#define FUSION_INCLUDE_IS_SEQUENCE
+
+#include <boost/fusion/support/is_sequence.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_IS_VIEW)
+#define FUSION_INCLUDE_IS_VIEW
+
+#include <boost/fusion/support/is_view.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_ITERATION)
+#define FUSION_INCLUDE_ITERATION
+
+#include <boost/fusion/algorithm/iteration.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_ITERATOR)
+#define FUSION_INCLUDE_ITERATOR
+
+#include <boost/fusion/iterator.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_ITERATOR_BASE)
+#define FUSION_INCLUDE_ITERATOR_BASE
+
+#include <boost/fusion/support/iterator_base.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_ITERATOR_FACADE)
+#define FUSION_INCLUDE_ITERATOR_FACADE
+
+#include <boost/fusion/iterator/iterator_facade.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_ITERATOR_RANGE)
+#define FUSION_INCLUDE_ITERATOR_RANGE
+
+#include <boost/fusion/view/iterator_range.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_JOIN)
+#define FUSION_INCLUDE_JOIN
+
+#include <boost/fusion/algorithm/transformation/join.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_JOINT_VIEW)
+#define FUSION_INCLUDE_JOINT_VIEW
+
+#include <boost/fusion/view/joint_view.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_LESS)
+#define FUSION_INCLUDE_LESS
+
+#include <boost/fusion/sequence/comparison/less.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_LESS_EQUAL)
+#define FUSION_INCLUDE_LESS_EQUAL
+
+#include <boost/fusion/sequence/comparison/less_equal.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_LIST)
+#define FUSION_INCLUDE_LIST
+
+#include <boost/fusion/container/list.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_LIST_FWD)
+#define FUSION_INCLUDE_LIST_FWD
+
+#include <boost/fusion/container/list/list_fwd.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_GENERATION)
+#define FUSION_INCLUDE_GENERATION
+
+#include <boost/fusion/container/generation.hpp>
+#include <boost/fusion/functional/generation.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_MAKE_CONS)
+#define FUSION_INCLUDE_MAKE_CONS
+
+#include <boost/fusion/container/generation/make_cons.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_MAKE_DEQUE)
+#define FUSION_INCLUDE_MAKE_DEQUE
+
+#include <boost/fusion/container/generation/make_deque.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_MAKE_FUSED)
+#define FUSION_INCLUDE_MAKE_FUSED
+
+#include <boost/fusion/functional/generation/make_fused.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_MAKE_FUSED_FUNCTION_OBJECT)
+#define FUSION_INCLUDE_MAKE_FUSED_FUNCTION_OBJECT
+
+#include <boost/fusion/functional/generation/make_fused_function_object.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_MAKE_FUSED_PROCEDURE)
+#define FUSION_INCLUDE_MAKE_FUSED_PROCEDURE
+
+#include <boost/fusion/functional/generation/make_fused_procedure.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_MAKE_LIST)
+#define FUSION_INCLUDE_MAKE_LIST
+
+#include <boost/fusion/container/generation/make_list.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_MAKE_MAP)
+#define FUSION_INCLUDE_MAKE_MAP
+
+#include <boost/fusion/container/generation/make_map.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_MAKE_SET)
+#define FUSION_INCLUDE_MAKE_SET
+
+#include <boost/fusion/container/generation/make_set.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_MAKE_TUPLE)
+#define FUSION_INCLUDE_MAKE_TUPLE
+
+#include <boost/fusion/tuple/make_tuple.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_MAKE_UNFUSED_GENERIC)
+#define FUSION_INCLUDE_MAKE_UNFUSED_GENERIC
+
+#include <boost/fusion/functional/generation/make_unfused_generic.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_MAKE_UNFUSED_LVALUE_ARGS)
+#define FUSION_INCLUDE_MAKE_UNFUSED_LVALUE_ARGS
+
+#include <boost/fusion/functional/generation/make_unfused_lvalue_args.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_MAKE_UNFUSED_RVALUE_ARGS)
+#define FUSION_INCLUDE_MAKE_UNFUSED_RVALUE_ARGS
+
+#include <boost/fusion/functional/generation/make_unfused_rvalue_args.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_MAKE_VECTOR)
+#define FUSION_INCLUDE_MAKE_VECTOR
+
+#include <boost/fusion/container/generation/make_vector.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_MAP)
+#define FUSION_INCLUDE_MAP
+
+#include <boost/fusion/container/map.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_MAP_FWD)
+#define FUSION_INCLUDE_MAP_FWD
+
+#include <boost/fusion/container/map/map_fwd.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_MAP_TIE)
+#define FUSION_INCLUDE_MAP_TIE
+
+#include <boost/fusion/container/generation/map_tie.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_MPL)
+#define FUSION_INCLUDE_MPL
+
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/mpl.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_NEXT)
+#define FUSION_INCLUDE_NEXT
+
+#include <boost/fusion/iterator/next.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_NONE)
+#define FUSION_INCLUDE_NONE
+
+#include <boost/fusion/algorithm/query/none.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_NOT_EQUAL_TO)
+#define FUSION_INCLUDE_NOT_EQUAL_TO
+
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/sequence/comparison/not_equal_to.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Hartmut Kaiser
+
+ Distributed under the 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(FUSION_INCLUDE_OUT)
+#define FUSION_INCLUDE_OUT
+
+#include <boost/fusion/sequence/io/out.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_PAIR)
+#define FUSION_INCLUDE_PAIR
+
+#include <boost/fusion/support/pair.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_PAIR_TIE)
+#define FUSION_INCLUDE_PAIR_TIE
+
+#include <boost/fusion/container/generation/pair_tie.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_POP_BACK)
+#define FUSION_INCLUDE_POP_BACK
+
+#include <boost/fusion/algorithm/transformation/pop_back.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_POP_FRONT)
+#define FUSION_INCLUDE_POP_FRONT
+
+#include <boost/fusion/algorithm/transformation/pop_front.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_PRIOR)
+#define FUSION_INCLUDE_PRIOR
+
+#include <boost/fusion/iterator/prior.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_PUSH_BACK)
+#define FUSION_INCLUDE_PUSH_BACK
+
+#include <boost/fusion/algorithm/transformation/push_back.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_PUSH_FRONT)
+#define FUSION_INCLUDE_PUSH_FRONT
+
+#include <boost/fusion/algorithm/transformation/push_front.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_QUERY)
+#define FUSION_INCLUDE_QUERY
+
+#include <boost/fusion/algorithm/query.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_REMOVE_IF)
+#define FUSION_INCLUDE_REMOVE_IF
+
+#include <boost/fusion/algorithm/transformation/remove_if.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_REMOVE_IF)
+#define FUSION_INCLUDE_REMOVE_IF
+
+#include <boost/fusion/algorithm/transformation/remove_if.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_REPETETIVE_VIEW)
+#define FUSION_INCLUDE_REPETETIVE_VIEW
+
+#include <boost/fusion/view/repetitive_view.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_REPLACE)
+#define FUSION_INCLUDE_REPLACE
+
+#include <boost/fusion/algorithm/transformation/replace.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_REPLACE_IF)
+#define FUSION_INCLUDE_REPLACE_IF
+
+#include <boost/fusion/algorithm/transformation/replace_if.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_REVERSE)
+#define FUSION_INCLUDE_REVERSE
+
+#include <boost/fusion/algorithm/transformation/reverse.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_REVERSE_VIEW)
+#define FUSION_INCLUDE_REVERSE_VIEW
+
+#include <boost/fusion/view/reverse_view.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_SEQUENCE)
+#define FUSION_INCLUDE_SEQUENCE
+
+#include <boost/fusion/sequence.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_SEQUENCE_BASE)
+#define FUSION_INCLUDE_SEQUENCE_BASE
+
+#include <boost/fusion/support/sequence_base.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_SEQUENCE_FACADE)
+#define FUSION_INCLUDE_SEQUENCE_FACADE
+
+#include <boost/fusion/sequence/sequence_facade.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_SET)
+#define FUSION_INCLUDE_SET
+
+#include <boost/fusion/container/set.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_SET_FWD)
+#define FUSION_INCLUDE_SET_FWD
+
+#include <boost/fusion/container/set/set_fwd.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_SINGLE_VIEW)
+#define FUSION_INCLUDE_SINGLE_VIEW
+
+#include <boost/fusion/view/single_view.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_SIZE)
+#define FUSION_INCLUDE_SIZE
+
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_STD_PAIR)
+#define FUSION_INCLUDE_STD_PAIR
+
+#include <boost/fusion/adapted/std_pair.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_STRUCT)
+#define FUSION_INCLUDE_STRUCT
+
+#include <boost/fusion/adapted/struct.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_SUPPORT)
+#define FUSION_INCLUDE_SUPPORT
+
+#include <boost/fusion/support.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_SWAP)
+#define FUSION_INCLUDE_SWAP
+
+#include <boost/fusion/sequence/intrinsic/swap.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_TAG_OF)
+#define FUSION_INCLUDE_TAG_OF
+
+#include <boost/fusion/support/tag_of.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_TAG_OF_FWD)
+#define FUSION_INCLUDE_TAG_OF_FWD
+
+#include <boost/fusion/support/tag_of_fwd.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_TRANSFORM)
+#define FUSION_INCLUDE_TRANSFORM
+
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_TRANSFORM_VIEW)
+#define FUSION_INCLUDE_TRANSFORM_VIEW
+
+#include <boost/fusion/view/transform_view.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_TRANSFORMATION)
+#define FUSION_INCLUDE_TRANSFORMATION
+
+#include <boost/fusion/algorithm/transformation.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_TUPLE)
+#define FUSION_INCLUDE_TUPLE
+
+#include <boost/fusion/tuple.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_TUPLE_FWD)
+#define FUSION_INCLUDE_TUPLE_FWD
+
+#include <boost/fusion/tuple/tuple_fwd.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_TUPLE_TIE)
+#define FUSION_INCLUDE_TUPLE_TIE
+
+#include <boost/fusion/tuple/tuple_tie.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_UNFUSED_GENERIC)
+#define FUSION_INCLUDE_UNFUSED_GENERIC
+
+#include <boost/fusion/functional/adapter/unfused_generic.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_UNFUSED_LVALUE_ARGS)
+#define FUSION_INCLUDE_UNFUSED_LVALUE_ARGS
+
+#include <boost/fusion/functional/adapter/unfused_lvalue_args.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_UNFUSED_RVALUE_ARGS)
+#define FUSION_INCLUDE_UNFUSED_RVALUE_ARGS
+
+#include <boost/fusion/functional/adapter/unfused_rvalue_args.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_UNFUSED_TYPED)
+#define FUSION_INCLUDE_UNFUSED_TYPED
+
+#include <boost/fusion/functional/adapter/unfused_typed.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_UNUSED)
+#define FUSION_INCLUDE_UNUSED
+
+#include <boost/fusion/support/unused.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Hartmut Kaiser
+
+ Distributed under the 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(FUSION_INCLUDE_VALUE_AT)
+#define FUSION_INCLUDE_VALUE_AT
+
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_VALUE_AT_KEY)
+#define FUSION_INCLUDE_VALUE_AT_KEY
+
+#include <boost/fusion/sequence/intrinsic/value_at_key.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_VALUE_OF)
+#define FUSION_INCLUDE_VALUE_OF
+
+#include <boost/fusion/iterator/value_of.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_VECTOR)
+#define FUSION_INCLUDE_VECTOR
+
+#include <boost/fusion/container/vector.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_VECTOR10)
+#define FUSION_INCLUDE_VECTOR10
+
+#include <boost/fusion/container/vector/vector10.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_VECTOR20)
+#define FUSION_INCLUDE_VECTOR20
+
+#include <boost/fusion/container/vector/vector20.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_VECTOR30)
+#define FUSION_INCLUDE_VECTOR30
+
+#include <boost/fusion/container/vector/vector30.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_VECTOR40)
+#define FUSION_INCLUDE_VECTOR40
+
+#include <boost/fusion/container/vector/vector40.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_VECTOR50)
+#define FUSION_INCLUDE_VECTOR50
+
+#include <boost/fusion/container/vector/vector50.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_VECTOR_FWD)
+#define FUSION_INCLUDE_VECTOR_FWD
+
+#include <boost/fusion/container/vector/vector_fwd.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_VECTOR_TIE)
+#define FUSION_INCLUDE_VECTOR_TIE
+
+#include <boost/fusion/container/generation/vector_tie.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_VIEW)
+#define FUSION_INCLUDE_VIEW
+
+#include <boost/fusion/view.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_VOID)
+#define FUSION_INCLUDE_VOID
+
+#include <boost/fusion/support/void.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_ZIP)
+#define FUSION_INCLUDE_ZIP
+
+#include <boost/fusion/algorithm/transformation/zip.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ Distributed under the 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(FUSION_INCLUDE_ZIP_VIEW)
+#define FUSION_INCLUDE_ZIP_VIEW
+
+#include <boost/fusion/view/zip_view.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ITERATOR_10022005_0559)
+#define FUSION_ITERATOR_10022005_0559
+
+#include <boost/fusion/iterator/iterator_facade.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/distance.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/iterator/mpl.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ADVANCE_09172005_1146)
+#define FUSION_ADVANCE_09172005_1146
+
+#include <boost/fusion/iterator/detail/advance.hpp>
+#include <boost/fusion/support/category_of.hpp>
+
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace fusion
+{
+ struct random_access_traversal_tag;
+
+ // Special tags:
+ struct iterator_facade_tag; // iterator facade tag
+ struct array_iterator_tag; // boost::array iterator tag
+ struct mpl_iterator_tag; // mpl sequence iterator tag
+ struct std_pair_iterator_tag; // std::pair iterator tag
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct advance_impl
+ {
+ // default implementation
+ template <typename Iterator, typename N>
+ struct apply :
+ mpl::if_c<
+ (N::value > 0)
+ , advance_detail::forward<Iterator, N::value>
+ , advance_detail::backward<Iterator, N::value>
+ >::type
+ {
+ BOOST_MPL_ASSERT_NOT((traits::is_random_access<Iterator>));
+ };
+ };
+
+ template <>
+ struct advance_impl<iterator_facade_tag>
+ {
+ template <typename Iterator, typename N>
+ struct apply : Iterator::template advance<Iterator, N> {};
+ };
+
+ template <>
+ struct advance_impl<array_iterator_tag>;
+
+ template <>
+ struct advance_impl<mpl_iterator_tag>;
+
+ template <>
+ struct advance_impl<std_pair_iterator_tag>;
+ }
+
+ namespace result_of
+ {
+ template <typename Iterator, int N>
+ struct advance_c
+ : extension::advance_impl<typename detail::tag_of<Iterator>::type>::template apply<Iterator, mpl::int_<N> >
+ {};
+
+ template <typename Iterator, typename N>
+ struct advance
+ : extension::advance_impl<typename detail::tag_of<Iterator>::type>::template apply<Iterator, N>
+ {};
+ }
+
+ template <int N, typename Iterator>
+ inline typename result_of::advance_c<Iterator, N>::type const
+ advance_c(Iterator const& i)
+ {
+ return result_of::advance_c<Iterator, N>::call(i);
+ }
+
+ template<typename N, typename Iterator>
+ inline typename result_of::advance<Iterator, N>::type const
+ advance(Iterator const& i)
+ {
+ return result_of::advance<Iterator, N>::call(i);
+ }
+
+}} // namespace boost::fusion
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_DEREF_05042005_1019)
+#define FUSION_DEREF_05042005_1019
+
+#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace fusion
+{
+ // Special tags:
+ struct iterator_facade_tag; // iterator facade tag
+ struct array_iterator_tag; // boost::array iterator tag
+ struct mpl_iterator_tag; // mpl sequence iterator tag
+ struct std_pair_iterator_tag; // std::pair iterator tag
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct deref_impl
+ {
+ template <typename Iterator>
+ struct apply {};
+ };
+
+ template <>
+ struct deref_impl<iterator_facade_tag>
+ {
+ template <typename Iterator>
+ struct apply : Iterator::template deref<Iterator> {};
+ };
+
+ template <>
+ struct deref_impl<array_iterator_tag>;
+
+ template <>
+ struct deref_impl<mpl_iterator_tag>;
+
+ template <>
+ struct deref_impl<std_pair_iterator_tag>;
+ }
+
+ namespace result_of
+ {
+ template <typename Iterator>
+ struct deref
+ : extension::deref_impl<typename detail::tag_of<Iterator>::type>::
+ template apply<Iterator>
+ {};
+ }
+
+ template <typename Iterator>
+ typename result_of::deref<Iterator>::type
+ deref(Iterator const& i)
+ {
+ typedef result_of::deref<Iterator> deref_meta;
+ return deref_meta::call(i);
+ }
+
+ template <typename Iterator>
+ typename result_of::deref<Iterator>::type
+ operator*(iterator_base<Iterator> const& i)
+ {
+ return fusion::deref(i.cast());
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ADAPT_DEREF_TRAITS_05062005_0900)
+#define FUSION_ADAPT_DEREF_TRAITS_05062005_0900
+
+#include <boost/fusion/iterator/deref.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ struct adapt_deref_traits
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename
+ result_of::deref<typename Iterator::first_type>::type
+ type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return *i.first;
+ }
+ };
+ };
+}}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ADAPT_VALUE_TRAITS_05062005_0859)
+#define FUSION_ADAPT_VALUE_TRAITS_05062005_0859
+
+#include <boost/fusion/iterator/value_of.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ struct adapt_value_traits
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename
+ result_of::value_of<typename Iterator::first_type>::type
+ type;
+ };
+ };
+}}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ADVANCE_09172005_1149)
+#define FUSION_ADVANCE_09172005_1149
+
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+
+namespace boost { namespace fusion { namespace advance_detail
+{
+ // Default advance implementation, perform next(i)
+ // or prior(i) N times.
+
+ template <typename Iterator, int N>
+ struct forward;
+
+ template <typename Iterator, int N>
+ struct next_forward
+ {
+ typedef typename
+ forward<
+ typename result_of::next<Iterator>::type
+ , N-1
+ >::type
+ type;
+ };
+
+ template <typename Iterator, int N>
+ struct forward
+ {
+ typedef typename
+ mpl::eval_if_c<
+ (N == 0)
+ , mpl::identity<Iterator>
+ , next_forward<Iterator, N>
+ >::type
+ type;
+
+ static type const&
+ call(type const& i)
+ {
+ return i;
+ }
+
+ template <typename I>
+ static type
+ call(I const& i)
+ {
+ return call(fusion::next(i));
+ }
+ };
+
+ template <typename Iterator, int N>
+ struct backward;
+
+ template <typename Iterator, int N>
+ struct next_backward
+ {
+ typedef typename
+ backward<
+ typename result_of::prior<Iterator>::type
+ , N+1
+ >::type
+ type;
+ };
+
+ template <typename Iterator, int N>
+ struct backward
+ {
+ typedef typename
+ mpl::eval_if_c<
+ (N == 0)
+ , mpl::identity<Iterator>
+ , next_backward<Iterator, N>
+ >::type
+ type;
+
+ static type const&
+ call(type const& i)
+ {
+ return i;
+ }
+
+ template <typename I>
+ static type
+ call(I const& i)
+ {
+ return call(fusion::prior(i));
+ }
+ };
+
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_DISTANCE_09172005_0730)
+#define FUSION_DISTANCE_09172005_0730
+
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+
+namespace boost { namespace fusion { namespace distance_detail
+{
+ // Default distance implementation, linear
+ // search for the Last iterator.
+
+ template <typename First, typename Last>
+ struct linear_distance;
+
+ template <typename First, typename Last>
+ struct next_distance
+ {
+ typedef typename
+ mpl::next<
+ typename linear_distance<
+ typename result_of::next<First>::type
+ , Last
+ >::type
+ >::type
+ type;
+ };
+
+ template <typename First, typename Last>
+ struct linear_distance
+ : mpl::eval_if<
+ result_of::equal_to<First, Last>
+ , mpl::identity<mpl::int_<0> >
+ , next_distance<First, Last>
+ >::type
+ {
+ typedef typename
+ mpl::eval_if<
+ result_of::equal_to<First, Last>
+ , mpl::identity<mpl::int_<0> >
+ , next_distance<First, Last>
+ >::type
+ type;
+
+ static type
+ call(First const&, Last const&)
+ {
+ return type();
+ }
+ };
+
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_DISTANCE_09172005_0721)
+#define FUSION_DISTANCE_09172005_0721
+
+#include <boost/fusion/iterator/detail/distance.hpp>
+#include <boost/fusion/support/category_of.hpp>
+
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace fusion
+{
+ struct random_access_traversal_tag;
+
+ // Special tags:
+ struct iterator_facade_tag; // iterator facade tag
+ struct array_iterator_tag; // boost::array iterator tag
+ struct mpl_iterator_tag; // mpl sequence iterator tag
+ struct std_pair_iterator_tag; // std::pair iterator tag
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct distance_impl
+ {
+ // default implementation
+ template <typename First, typename Last>
+ struct apply : distance_detail::linear_distance<First, Last>
+ {
+ BOOST_MPL_ASSERT_NOT((traits::is_random_access<First>));
+ BOOST_MPL_ASSERT_NOT((traits::is_random_access<Last>));
+ };
+ };
+
+ template <>
+ struct distance_impl<iterator_facade_tag>
+ {
+ template <typename First, typename Last>
+ struct apply : First::template distance<First, Last> {};
+ };
+
+ template <>
+ struct distance_impl<array_iterator_tag>;
+
+ template <>
+ struct distance_impl<mpl_iterator_tag>;
+
+ template <>
+ struct distance_impl<std_pair_iterator_tag>;
+ }
+
+ namespace result_of
+ {
+ template <typename First, typename Last>
+ struct distance
+ : extension::distance_impl<typename detail::tag_of<First>::type>::
+ template apply<First, Last>
+ {
+ typedef typename extension::distance_impl<typename detail::tag_of<First>::type>::
+ template apply<First, Last>::type distance_application;
+ BOOST_STATIC_CONSTANT(int, value = distance_application::value);
+ };
+ }
+
+ template <typename First, typename Last>
+ inline typename result_of::distance<First, Last>::type
+ distance(First const& a, Last const& b)
+ {
+ return result_of::distance<First, Last>::call(a,b);
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_EQUAL_TO_05052005_1208)
+#define FUSION_EQUAL_TO_05052005_1208
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/fusion/support/is_iterator.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/utility/enable_if.hpp>
+
+namespace boost { namespace fusion
+{
+ // Special tags:
+ struct iterator_facade_tag; // iterator facade tag
+ struct array_iterator_tag; // boost::array iterator tag
+ struct mpl_iterator_tag; // mpl sequence iterator tag
+ struct std_pair_iterator_tag; // std::pair iterator tag
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct equal_to_impl
+ {
+ // default implementation
+ template <typename I1, typename I2>
+ struct apply
+ : is_same<typename add_const<I1>::type, typename add_const<I2>::type>
+ {};
+ };
+
+ template <>
+ struct equal_to_impl<iterator_facade_tag>
+ {
+ template <typename I1, typename I2>
+ struct apply : I1::template equal_to<I1, I2> {};
+ };
+
+ template <>
+ struct equal_to_impl<array_iterator_tag>;
+
+ template <>
+ struct equal_to_impl<mpl_iterator_tag>;
+
+ template <>
+ struct equal_to_impl<std_pair_iterator_tag>;
+ }
+
+ namespace result_of
+ {
+ template <typename I1, typename I2>
+ struct equal_to
+ : extension::equal_to_impl<typename detail::tag_of<I1>::type>::
+ template apply<I1, I2>
+ {};
+ }
+
+ namespace iterator_operators
+ {
+ template <typename Iter1, typename Iter2>
+ inline typename
+ enable_if<
+ mpl::and_<is_fusion_iterator<Iter1>, is_fusion_iterator<Iter2> >
+ , bool
+ >::type
+ operator==(Iter1 const&, Iter2 const&)
+ {
+ return result_of::equal_to<Iter1, Iter2>::value;
+ }
+
+ template <typename Iter1, typename Iter2>
+ inline typename
+ enable_if<
+ mpl::and_<is_fusion_iterator<Iter1>, is_fusion_iterator<Iter2> >
+ , bool
+ >::type
+ operator!=(Iter1 const&, Iter2 const&)
+ {
+ return !result_of::equal_to<Iter1, Iter2>::value;
+ }
+ }
+
+ using iterator_operators::operator==;
+ using iterator_operators::operator!=;
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ITERATOR_FACADE_09252006_1011)
+#define FUSION_ITERATOR_FACADE_09252006_1011
+
+#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/iterator/detail/advance.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/mpl/assert.hpp>
+
+namespace boost { namespace fusion
+{
+ struct iterator_facade_tag;
+
+ template <typename Derived, typename Category>
+ struct iterator_facade : iterator_base<Derived>
+ {
+ typedef iterator_facade_tag fusion_tag;
+ typedef Derived derived_type;
+ typedef Category category;
+
+ // default implementation
+ template <typename I1, typename I2>
+ struct equal_to // default implementation
+ : is_same<
+ typename I1::derived_type
+ , typename I2::derived_type
+ >
+ {};
+
+ // default implementation
+ template <typename Iterator, typename N>
+ struct advance :
+ mpl::if_c<
+ (N::value > 0)
+ , advance_detail::forward<Iterator, N::value>
+ , advance_detail::backward<Iterator, N::value>
+ >::type
+ {
+ BOOST_MPL_ASSERT_NOT((traits::is_random_access<Iterator>));
+ };
+ };
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ITERATOR_MPL_10022005_0557)
+#define FUSION_ITERATOR_MPL_10022005_0557
+
+#include <boost/fusion/iterator/mpl/convert_iterator.hpp>
+#include <boost/fusion/iterator/mpl/fusion_iterator.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_CONVERT_ITERATOR_05062005_1218)
+#define FUSION_CONVERT_ITERATOR_05062005_1218
+
+#include <boost/fusion/support/is_iterator.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ template <typename Iterator>
+ struct mpl_iterator; // forward declaration
+
+ // Test T. If it is a fusion iterator, return a reference to it.
+ // else, assume it is an mpl iterator.
+
+ template <typename T>
+ struct convert_iterator
+ {
+ typedef typename
+ mpl::if_<
+ is_fusion_iterator<T>
+ , T
+ , mpl_iterator<T>
+ >::type
+ type;
+
+ static T const&
+ call(T const& x, mpl::true_)
+ {
+ return x;
+ }
+
+ static mpl_iterator<T>
+ call(T const& x, mpl::false_)
+ {
+ return mpl_iterator<T>();
+ }
+
+ static typename
+ mpl::if_<
+ is_fusion_iterator<T>
+ , T const&
+ , mpl_iterator<T>
+ >::type
+ call(T const& x)
+ {
+ return call(x, is_fusion_iterator<T>());
+ }
+ };
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_FUSION_ITERATOR_10012005_1551)
+#define FUSION_FUSION_ITERATOR_10012005_1551
+
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/iterator/distance.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/mpl/next_prior.hpp>
+#include <boost/mpl/advance_fwd.hpp>
+#include <boost/mpl/distance_fwd.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Iterator>
+ struct fusion_iterator
+ {
+ typedef typename fusion::result_of::value_of<Iterator>::type type;
+ typedef typename fusion::traits::category_of<Iterator>::type category;
+ typedef Iterator iterator;
+ };
+
+ template <typename Iterator>
+ struct next<fusion_iterator<Iterator> >
+ {
+ typedef fusion_iterator<typename fusion::result_of::next<Iterator>::type> type;
+ };
+
+ template <typename Iterator>
+ struct prior<fusion_iterator<Iterator> >
+ {
+ typedef fusion_iterator<typename fusion::result_of::prior<Iterator>::type> type;
+ };
+
+ template <typename Iterator, typename N>
+ struct advance<fusion_iterator<Iterator>, N>
+ {
+ typedef fusion_iterator<typename fusion::result_of::advance<Iterator, N>::type> type;
+ };
+
+ template <typename First, typename Last>
+ struct distance<fusion_iterator<First>, fusion_iterator<Last> >
+ : fusion::result_of::distance<First, Last>
+ {};
+
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_NEXT_05042005_1101)
+#define FUSION_NEXT_05042005_1101
+
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace fusion
+{
+ // Special tags:
+ struct iterator_facade_tag; // iterator facade tag
+ struct array_iterator_tag; // boost::array iterator tag
+ struct mpl_iterator_tag; // mpl sequence iterator tag
+ struct std_pair_iterator_tag; // std::pair iterator tag
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct next_impl
+ {
+ template <typename Iterator>
+ struct apply {};
+ };
+
+ template <>
+ struct next_impl<iterator_facade_tag>
+ {
+ template <typename Iterator>
+ struct apply : Iterator::template next<Iterator> {};
+ };
+
+ template <>
+ struct next_impl<array_iterator_tag>;
+
+ template <>
+ struct next_impl<mpl_iterator_tag>;
+
+ template <>
+ struct next_impl<std_pair_iterator_tag>;
+ }
+
+ namespace result_of
+ {
+ template <typename Iterator>
+ struct next
+ : extension::next_impl<typename detail::tag_of<Iterator>::type>::
+ template apply<Iterator>
+ {};
+ }
+
+ template <typename Iterator>
+ typename result_of::next<Iterator>::type const
+ next(Iterator const& i)
+ {
+ return result_of::next<Iterator>::call(i);
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_PRIOR_05042005_1144)
+#define FUSION_PRIOR_05042005_1144
+
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace fusion
+{
+ // Special tags:
+ struct iterator_facade_tag; // iterator facade tag
+ struct array_iterator_tag; // boost::array iterator tag
+ struct mpl_iterator_tag; // mpl sequence iterator tag
+ struct std_pair_iterator_tag; // std::pair iterator tag
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct prior_impl
+ {
+ template <typename Iterator>
+ struct apply {};
+ };
+
+ template <>
+ struct prior_impl<iterator_facade_tag>
+ {
+ template <typename Iterator>
+ struct apply : Iterator::template prior<Iterator> {};
+ };
+
+ template <>
+ struct prior_impl<array_iterator_tag>;
+
+ template <>
+ struct prior_impl<mpl_iterator_tag>;
+
+ template <>
+ struct prior_impl<std_pair_iterator_tag>;
+ }
+
+ namespace result_of
+ {
+ template <typename Iterator>
+ struct prior
+ : extension::prior_impl<typename detail::tag_of<Iterator>::type>::
+ template apply<Iterator>
+ {};
+ }
+
+ template <typename Iterator>
+ typename result_of::prior<Iterator>::type const
+ prior(Iterator const& i)
+ {
+ return result_of::prior<Iterator>::call(i);
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_VALUE_OF_05052005_1126)
+#define FUSION_VALUE_OF_05052005_1126
+
+#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace fusion
+{
+ // Special tags:
+ struct iterator_facade_tag; // iterator facade tag
+ struct array_iterator_tag; // boost::array iterator tag
+ struct mpl_iterator_tag; // mpl sequence iterator tag
+ struct std_pair_iterator_tag; // std::pair iterator tag
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_of_impl
+ {
+ template <typename Iterator>
+ struct apply {};
+ };
+
+ template <>
+ struct value_of_impl<iterator_facade_tag>
+ {
+ template <typename Iterator>
+ struct apply : Iterator::template value_of<Iterator> {};
+ };
+
+ template <>
+ struct value_of_impl<array_iterator_tag>;
+
+ template <>
+ struct value_of_impl<mpl_iterator_tag>;
+
+ template <>
+ struct value_of_impl<std_pair_iterator_tag>;
+ }
+
+ namespace result_of
+ {
+ template <typename Iterator>
+ struct value_of
+ : extension::value_of_impl<typename detail::tag_of<Iterator>::type>::
+ template apply<Iterator>
+ {};
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_MPL_09172006_2049)
+#define FUSION_MPL_09172006_2049
+
+// The fusion <--> MPL link headers
+#include <boost/fusion/iterator/mpl.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+
+#include <boost/fusion/mpl/at.hpp>
+#include <boost/fusion/mpl/back.hpp>
+#include <boost/fusion/mpl/begin.hpp>
+#include <boost/fusion/mpl/clear.hpp>
+#include <boost/fusion/mpl/empty.hpp>
+#include <boost/fusion/mpl/end.hpp>
+#include <boost/fusion/mpl/erase.hpp>
+#include <boost/fusion/mpl/erase_key.hpp>
+#include <boost/fusion/mpl/front.hpp>
+#include <boost/fusion/mpl/has_key.hpp>
+#include <boost/fusion/mpl/insert.hpp>
+#include <boost/fusion/mpl/insert_range.hpp>
+#include <boost/fusion/mpl/pop_back.hpp>
+#include <boost/fusion/mpl/pop_front.hpp>
+#include <boost/fusion/mpl/push_back.hpp>
+#include <boost/fusion/mpl/push_front.hpp>
+#include <boost/fusion/mpl/size.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_AT_10022005_1616)
+#define FUSION_AT_10022005_1616
+
+#include <boost/mpl/at.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+
+namespace boost {
+namespace fusion
+{
+ struct fusion_sequence_tag;
+}
+
+namespace mpl
+{
+ template <typename Tag>
+ struct at_impl;
+
+ template <>
+ struct at_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply : fusion::result_of::value_at<Sequence, N> {};
+ };
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_BACK_10022005_1620)
+#define FUSION_BACK_10022005_1620
+
+#include <boost/mpl/back.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct back_impl;
+
+ template <>
+ struct back_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply :
+ fusion::result_of::value_of<
+ typename fusion::result_of::prior<
+ typename fusion::result_of::end<Sequence>::type
+ >::type> {};
+ };
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_BEGIN_10022005_1620)
+#define FUSION_BEGIN_10022005_1620
+
+#include <boost/mpl/begin_end.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/adapted/mpl/detail/begin_impl.hpp>
+#include <boost/fusion/iterator/mpl/fusion_iterator.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef fusion_iterator<typename fusion::result_of::begin<Sequence>::type> type;
+ };
+ };
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_CLEAR_10022005_1817)
+#define FUSION_CLEAR_10022005_1817
+
+#include <boost/mpl/clear.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/mpl/detail/clear.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct clear_impl;
+
+ template <>
+ struct clear_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename
+ fusion::detail::clear<typename fusion::detail::tag_of<Sequence>::type>::type
+ type;
+ };
+ };
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_CLEAR_10022005_1442)
+#define FUSION_CLEAR_10022005_1442
+
+#include <boost/fusion/container/vector/vector_fwd.hpp>
+#include <boost/fusion/container/list/list_fwd.hpp>
+#include <boost/fusion/container/map/map_fwd.hpp>
+#include <boost/fusion/container/set/set_fwd.hpp>
+#include <boost/fusion/container/deque/deque_fwd.hpp>
+
+namespace boost { namespace fusion
+{
+ struct cons_tag;
+ struct map_tag;
+ struct set_tag;
+ struct vector_tag;
+ struct deque_tag;
+
+ namespace detail
+ {
+ template <typename Tag>
+ struct clear;
+
+ template <>
+ struct clear<cons_tag> : mpl::identity<list<> > {};
+
+ template <>
+ struct clear<map_tag> : mpl::identity<map<> > {};
+
+ template <>
+ struct clear<set_tag> : mpl::identity<set<> > {};
+
+ template <>
+ struct clear<vector_tag> : mpl::identity<vector<> > {};
+
+ template <>
+ struct clear<deque_tag> : mpl::identity<deque<> > {};
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_EMPTY_10022005_1619)
+#define FUSION_EMPTY_10022005_1619
+
+#include <boost/mpl/empty.hpp>
+#include <boost/fusion/sequence/intrinsic/empty.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct empty_impl;
+
+ template <>
+ struct empty_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply : fusion::result_of::empty<Sequence> {};
+ };
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_END_10022005_1619)
+#define FUSION_END_10022005_1619
+
+#include <boost/mpl/begin_end.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/adapted/mpl/detail/end_impl.hpp>
+#include <boost/fusion/iterator/mpl/fusion_iterator.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef fusion_iterator<typename fusion::result_of::end<Sequence>::type> type;
+ };
+ };
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ERASE_10022005_1835)
+#define FUSION_ERASE_10022005_1835
+
+#include <boost/mpl/erase.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/algorithm/transformation/erase.hpp>
+#include <boost/fusion/sequence/convert.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct erase_impl;
+
+ template <>
+ struct erase_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence, typename First, typename Last>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::erase<Sequence, First, Last>::type
+ result;
+
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::detail::tag_of<Sequence>::type, result>::type
+ type;
+ };
+ };
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ERASE_KEY_10022005_1907)
+#define FUSION_ERASE_KEY_10022005_1907
+
+#include <boost/mpl/erase_key.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/algorithm/transformation/erase_key.hpp>
+#include <boost/fusion/sequence/convert.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct erase_key_impl;
+
+ template <>
+ struct erase_key_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence, typename Key>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::erase_key<Sequence, Key>::type
+ result;
+
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::detail::tag_of<Sequence>::type, result>::type
+ type;
+ };
+ };
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_FRONT_10022005_1618)
+#define FUSION_FRONT_10022005_1618
+
+#include <boost/mpl/front.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct front_impl;
+
+ template <>
+ struct front_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply :
+ fusion::result_of::value_of<typename fusion::result_of::begin<Sequence>::type> {};
+ };
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_HAS_KEY_10022005_1617)
+#define FUSION_HAS_KEY_10022005_1617
+
+#include <boost/mpl/has_key.hpp>
+#include <boost/fusion/sequence/intrinsic/has_key.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct has_key_impl;
+
+ template <>
+ struct has_key_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence, typename Key>
+ struct apply : fusion::result_of::has_key<Sequence, Key> {};
+ };
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_INSERT_10022005_1837)
+#define FUSION_INSERT_10022005_1837
+
+#include <boost/mpl/insert.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/algorithm/transformation/insert.hpp>
+#include <boost/fusion/sequence/convert.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct insert_impl;
+
+ template <>
+ struct insert_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence, typename Pos, typename T>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::insert<Sequence, Pos, T>::type
+ result;
+
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::detail::tag_of<Sequence>::type, result>::type
+ type;
+ };
+ };
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_INSERT_RANGE_10022005_1838)
+#define FUSION_INSERT_RANGE_10022005_1838
+
+#include <boost/mpl/insert_range.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/algorithm/transformation/insert_range.hpp>
+#include <boost/fusion/sequence/convert.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct insert_range_impl;
+
+ template <>
+ struct insert_range_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence, typename Pos, typename Range>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::insert_range<Sequence, Pos, Range>::type
+ result;
+
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::detail::tag_of<Sequence>::type, result>::type
+ type;
+ };
+ };
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_POP_BACK_10022005_1801)
+#define FUSION_POP_BACK_10022005_1801
+
+#include <boost/mpl/pop_back.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/algorithm/transformation/pop_back.hpp>
+#include <boost/fusion/sequence/convert.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct pop_back_impl;
+
+ template <>
+ struct pop_back_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::pop_back<Sequence>::type
+ result;
+
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::detail::tag_of<Sequence>::type, result>::type
+ type;
+ };
+ };
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_POP_FRONT_10022005_1800)
+#define FUSION_POP_FRONT_10022005_1800
+
+#include <boost/mpl/pop_front.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/algorithm/transformation/pop_front.hpp>
+#include <boost/fusion/sequence/convert.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct pop_front_impl;
+
+ template <>
+ struct pop_front_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::pop_front<Sequence>::type
+ result;
+
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::detail::tag_of<Sequence>::type, result>::type
+ type;
+ };
+ };
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_PUSH_BACK_10022005_1647)
+#define FUSION_PUSH_BACK_10022005_1647
+
+#include <boost/mpl/push_back.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/algorithm/transformation/push_back.hpp>
+#include <boost/fusion/sequence/convert.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct push_back_impl;
+
+ template <>
+ struct push_back_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence, typename T>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::push_back<Sequence, T>::type
+ result;
+
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::detail::tag_of<Sequence>::type, result>::type
+ type;
+ };
+ };
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_PUSH_FRONT_10022005_1720)
+#define FUSION_PUSH_FRONT_10022005_1720
+
+#include <boost/mpl/push_front.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/algorithm/transformation/push_front.hpp>
+#include <boost/fusion/sequence/convert.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct push_front_impl;
+
+ template <>
+ struct push_front_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence, typename T>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::push_front<Sequence, T>::type
+ result;
+
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::detail::tag_of<Sequence>::type, result>::type
+ type;
+ };
+ };
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SIZE_10022005_1617)
+#define FUSION_SIZE_10022005_1617
+
+#include <boost/mpl/size.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct size_impl;
+
+ template <>
+ struct size_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Sequence>
+ struct apply : fusion::result_of::size<Sequence> {};
+ };
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SEQUENCE_10022005_0559)
+#define FUSION_ITERATOR_10022005_0559
+
+#include <boost/fusion/sequence/sequence_facade.hpp>
+#include <boost/fusion/sequence/comparison.hpp>
+#include <boost/fusion/sequence/intrinsic.hpp>
+#include <boost/fusion/sequence/io.hpp>
+#include <boost/fusion/sequence/convert.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SEQUENCE_COMPARISON_10022005_0615)
+#define FUSION_SEQUENCE_COMPARISON_10022005_0615
+
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/sequence/comparison/greater.hpp>
+#include <boost/fusion/sequence/comparison/greater_equal.hpp>
+#include <boost/fusion/sequence/comparison/less.hpp>
+#include <boost/fusion/sequence/comparison/less_equal.hpp>
+#include <boost/fusion/sequence/comparison/not_equal_to.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ENABLE_COMPARISON_09232005_1958)
+#define FUSION_ENABLE_COMPARISON_09232005_1958
+
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/equal_to.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/support/detail/is_mpl_sequence.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Sequence>
+ struct is_native_fusion_sequence : is_base_of<sequence_root, Sequence> {};
+
+ template <typename Seq1, typename Seq2>
+ struct enable_equality
+ : mpl::or_<is_native_fusion_sequence<Seq1>, is_native_fusion_sequence<Seq2> >
+ {};
+
+ template <typename Seq1, typename Seq2>
+ struct enable_comparison
+ : mpl::and_<
+ mpl::or_<is_native_fusion_sequence<Seq1>, is_native_fusion_sequence<Seq2> >
+ , mpl::equal_to<result_of::size<Seq1>, result_of::size<Seq2> >
+ >
+ {};
+
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_EQUAL_TO_05052005_1142)
+#define FUSION_EQUAL_TO_05052005_1142
+
+#include <boost/mpl/bool.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Seq1, typename Seq2, bool same_size>
+ struct sequence_equal_to
+ {
+ typedef typename result_of::end<Seq1>::type end1_type;
+ typedef typename result_of::end<Seq2>::type end2_type;
+
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const&, I2 const&, mpl::true_)
+ {
+ return true;
+ }
+
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const& a, I2 const& b, mpl::false_)
+ {
+ return *a == *b
+ && call(fusion::next(a), fusion::next(b));
+ }
+
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const& a, I2 const& b)
+ {
+ typename result_of::equal_to<I1, end1_type>::type eq;
+ return call(a, b, eq);
+ }
+ };
+
+ template <typename Seq1, typename Seq2>
+ struct sequence_equal_to<Seq1, Seq2, false>
+ {
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const& a, I2 const& b)
+ {
+ return false;
+ }
+ };
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_GREATER_05052005_1142)
+#define FUSION_GREATER_05052005_1142
+
+#include <boost/mpl/bool.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Seq1, typename Seq2>
+ struct sequence_greater
+ {
+ typedef typename result_of::end<Seq1>::type end1_type;
+ typedef typename result_of::end<Seq2>::type end2_type;
+
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const&, I2 const&, mpl::true_)
+ {
+ return false;
+ }
+
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const& a, I2 const& b, mpl::false_)
+ {
+ return *a > *b
+ || !(*b > *a)
+ && call(fusion::next(a), fusion::next(b));
+ }
+
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const& a, I2 const& b)
+ {
+ typename result_of::equal_to<I1, end1_type>::type eq;
+ return call(a, b, eq);
+ }
+ };
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_GREATER_EQUAL_05052005_1142)
+#define FUSION_GREATER_EQUAL_05052005_1142
+
+#include <boost/mpl/bool.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Seq1, typename Seq2>
+ struct sequence_greater_equal
+ {
+ typedef typename result_of::end<Seq1>::type end1_type;
+ typedef typename result_of::end<Seq2>::type end2_type;
+
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const&, I2 const&, mpl::true_)
+ {
+ return true;
+ }
+
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const& a, I2 const& b, mpl::false_)
+ {
+ return *a >= *b
+ && (!(*b >= *a) || call(fusion::next(a), fusion::next(b)));
+ }
+
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const& a, I2 const& b)
+ {
+ typename result_of::equal_to<I1, end1_type>::type eq;
+ return call(a, b, eq);
+ }
+ };
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_LESS_05052005_1141)
+#define FUSION_LESS_05052005_1141
+
+#include <boost/mpl/bool.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Seq1, typename Seq2>
+ struct sequence_less
+ {
+ typedef typename result_of::end<Seq1>::type end1_type;
+ typedef typename result_of::end<Seq2>::type end2_type;
+
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const&, I2 const&, mpl::true_)
+ {
+ return false;
+ }
+
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const& a, I2 const& b, mpl::false_)
+ {
+ return *a < *b
+ || !(*b < *a)
+ && call(fusion::next(a), fusion::next(b));
+ }
+
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const& a, I2 const& b)
+ {
+ typename result_of::equal_to<I1, end1_type>::type eq;
+ return call(a, b, eq);
+ }
+ };
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_LESS_EQUAL_05052005_1141)
+#define FUSION_LESS_EQUAL_05052005_1141
+
+#include <boost/mpl/bool.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Seq1, typename Seq2>
+ struct sequence_less_equal
+ {
+ typedef typename result_of::end<Seq1>::type end1_type;
+ typedef typename result_of::end<Seq2>::type end2_type;
+
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const&, I2 const&, mpl::true_)
+ {
+ return true;
+ }
+
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const& a, I2 const& b, mpl::false_)
+ {
+ return *a <= *b
+ && (!(*b <= *a) || call(fusion::next(a), fusion::next(b)));
+ }
+
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const& a, I2 const& b)
+ {
+ typename result_of::equal_to<I1, end1_type>::type eq;
+ return call(a, b, eq);
+ }
+ };
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_NOT_EQUAL_TO_05052005_1141)
+#define FUSION_NOT_EQUAL_TO_05052005_1141
+
+#include <boost/mpl/bool.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Seq1, typename Seq2, bool same_size>
+ struct sequence_not_equal_to
+ {
+ typedef typename result_of::end<Seq1>::type end1_type;
+ typedef typename result_of::end<Seq2>::type end2_type;
+
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const&, I2 const&, mpl::true_)
+ {
+ return false;
+ }
+
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const& a, I2 const& b, mpl::false_)
+ {
+ return *a != *b
+ || call(fusion::next(a), fusion::next(b));
+ }
+
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const& a, I2 const& b)
+ {
+ typename result_of::equal_to<I1, end1_type>::type eq;
+ return call(a, b, eq);
+ }
+ };
+
+ template <typename Seq1, typename Seq2>
+ struct sequence_not_equal_to<Seq1, Seq2, false>
+ {
+ template <typename I1, typename I2>
+ static bool
+ call(I1 const& a, I2 const& b)
+ {
+ return true;
+ }
+ };
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_EQUAL_TO_05052005_0431)
+#define FUSION_EQUAL_TO_05052005_0431
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/comparison/detail/equal_to.hpp>
+#include <boost/fusion/sequence/comparison/detail/enable_comparison.hpp>
+
+namespace boost { namespace fusion
+{
+ template <typename Seq1, typename Seq2>
+ inline bool
+ equal_to(Seq1 const& a, Seq2 const& b)
+ {
+ return result_of::size<Seq1>::value == result_of::size<Seq2>::value
+ && detail::sequence_equal_to<
+ Seq1 const, Seq2 const
+ , result_of::size<Seq1>::value == result_of::size<Seq2>::value>::
+ call(fusion::begin(a), fusion::begin(b));
+ }
+
+ namespace operators
+ {
+ template <typename Seq1, typename Seq2>
+ inline typename
+ enable_if<
+ detail::enable_equality<Seq1, Seq2>
+ , bool
+ >::type
+ operator==(Seq1 const& a, Seq2 const& b)
+ {
+ return fusion::equal_to(a, b);
+ }
+ }
+ using operators::operator==;
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_GREATER_05052005_0432)
+#define FUSION_GREATER_05052005_0432
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/comparison/detail/enable_comparison.hpp>
+
+#if defined(FUSION_DIRECT_OPERATOR_USAGE)
+#include <boost/fusion/sequence/comparison/detail/greater.hpp>
+#else
+#include <boost/fusion/sequence/comparison/less.hpp>
+#endif
+
+namespace boost { namespace fusion
+{
+ template <typename Seq1, typename Seq2>
+ inline bool
+ greater(Seq1 const& a, Seq2 const& b)
+ {
+#if defined(FUSION_DIRECT_OPERATOR_USAGE)
+ return detail::sequence_greater<Seq1 const, Seq2 const>::
+ call(fusion::begin(a), fusion::begin(b));
+#else
+ return (b < a);
+#endif
+ }
+
+ namespace operators
+ {
+ template <typename Seq1, typename Seq2>
+ inline typename
+ enable_if<
+ detail::enable_comparison<Seq1, Seq2>
+ , bool
+ >::type
+ operator>(Seq1 const& a, Seq2 const& b)
+ {
+ return fusion::greater(a, b);
+ }
+ }
+ using operators::operator>;
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_GREATER_EQUAL_05052005_0432)
+#define FUSION_GREATER_EQUAL_05052005_0432
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/comparison/detail/enable_comparison.hpp>
+
+#if defined(FUSION_DIRECT_OPERATOR_USAGE)
+#include <boost/fusion/sequence/comparison/detail/greater_equal.hpp>
+#else
+#include <boost/fusion/sequence/comparison/less.hpp>
+#endif
+
+namespace boost { namespace fusion
+{
+ template <typename Seq1, typename Seq2>
+ inline bool
+ greater_equal(Seq1 const& a, Seq2 const& b)
+ {
+#if defined(FUSION_DIRECT_OPERATOR_USAGE)
+ return detail::sequence_greater_equal<Seq1 const, Seq2 const>::
+ call(fusion::begin(a), fusion::begin(b));
+#else
+ return !(a < b);
+#endif
+ }
+
+ namespace operators
+ {
+ template <typename Seq1, typename Seq2>
+ inline typename
+ enable_if<
+ detail::enable_comparison<Seq1, Seq2>
+ , bool
+ >::type
+ operator>=(Seq1 const& a, Seq2 const& b)
+ {
+ return fusion::greater_equal(a, b);
+ }
+ }
+ using operators::operator>=;
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_LESS_05052005_0432)
+#define FUSION_LESS_05052005_0432
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/comparison/detail/less.hpp>
+#include <boost/fusion/sequence/comparison/detail/enable_comparison.hpp>
+
+namespace boost { namespace fusion
+{
+ template <typename Seq1, typename Seq2>
+ inline bool
+ less(Seq1 const& a, Seq2 const& b)
+ {
+ return detail::sequence_less<Seq1 const, Seq2 const>::
+ call(fusion::begin(a), fusion::begin(b));
+ }
+
+ namespace operators
+ {
+ template <typename Seq1, typename Seq2>
+ inline typename
+ enable_if<
+ detail::enable_comparison<Seq1, Seq2>
+ , bool
+ >::type
+ operator<(Seq1 const& a, Seq2 const& b)
+ {
+ return fusion::less(a, b);
+ }
+ }
+ using operators::operator<;
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_LESS_EQUAL_05052005_0432)
+#define FUSION_LESS_EQUAL_05052005_0432
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/comparison/detail/enable_comparison.hpp>
+
+#if defined(FUSION_DIRECT_OPERATOR_USAGE)
+#include <boost/fusion/sequence/comparison/detail/less_equal.hpp>
+#else
+#include <boost/fusion/sequence/comparison/less.hpp>
+#endif
+
+namespace boost { namespace fusion
+{
+ template <typename Seq1, typename Seq2>
+ inline bool
+ less_equal(Seq1 const& a, Seq2 const& b)
+ {
+#if defined(FUSION_DIRECT_OPERATOR_USAGE)
+ return detail::sequence_less_equal<Seq1 const, Seq2 const>::
+ call(fusion::begin(a), fusion::begin(b));
+#else
+ return !(b < a);
+#endif
+ }
+
+ namespace operators
+ {
+#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1400)
+// Workaround for VC8.0 and VC7.1
+ template <typename Seq1, typename Seq2>
+ inline bool
+ operator<=(sequence_base<Seq1> const& a, sequence_base<Seq2> const& b)
+ {
+ return less_equal(a.derived(), b.derived());
+ }
+
+ template <typename Seq1, typename Seq2>
+ inline typename disable_if<detail::is_native_fusion_sequence<Seq2>, bool>::type
+ operator<=(sequence_base<Seq1> const& a, Seq2 const& b)
+ {
+ return less_equal(a.derived(), b);
+ }
+
+ template <typename Seq1, typename Seq2>
+ inline typename disable_if<detail::is_native_fusion_sequence<Seq1>, bool>::type
+ operator<=(Seq1 const& a, sequence_base<Seq2> const& b)
+ {
+ return less_equal(a, b.derived());
+ }
+
+#else
+// Somehow VC8.0 and VC7.1 does not like this code
+// but barfs somewhere else.
+
+ template <typename Seq1, typename Seq2>
+ inline typename
+ enable_if<
+ detail::enable_comparison<Seq1, Seq2>
+ , bool
+ >::type
+ operator<=(Seq1 const& a, Seq2 const& b)
+ {
+ return fusion::less_equal(a, b);
+ }
+#endif
+ }
+ using operators::operator<=;
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_NOT_EQUAL_TO_05052005_0431)
+#define FUSION_NOT_EQUAL_TO_05052005_0431
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/comparison/detail/enable_comparison.hpp>
+
+#if defined(FUSION_DIRECT_OPERATOR_USAGE)
+#include <boost/fusion/sequence/comparison/detail/not_equal_to.hpp>
+#else
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#endif
+
+namespace boost { namespace fusion
+{
+ template <typename Seq1, typename Seq2>
+ inline bool
+ not_equal_to(Seq1 const& a, Seq2 const& b)
+ {
+#if defined(FUSION_DIRECT_OPERATOR_USAGE)
+ return result_of::size<Seq1>::value != result_of::size<Seq2>::value
+ || detail::sequence_not_equal_to<
+ Seq1 const, Seq2 const
+ , result_of::size<Seq1>::value == result_of::size<Seq2>::value>::
+ call(fusion::begin(a), fusion::begin(b));
+#else
+ return !(a == b);
+#endif
+ }
+
+ namespace operators
+ {
+ template <typename Seq1, typename Seq2>
+ inline typename
+ enable_if<
+ detail::enable_equality<Seq1, Seq2>
+ , bool
+ >::type
+ operator!=(Seq1 const& a, Seq2 const& b)
+ {
+ return fusion::not_equal_to(a, b);
+ }
+ }
+ using operators::operator!=;
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_CONVERT_10022005_1442)
+#define FUSION_CONVERT_10022005_1442
+
+namespace boost { namespace fusion
+{
+ namespace extension
+ {
+ template <typename Tag>
+ struct convert_impl;
+ }
+
+ namespace result_of
+ {
+ template <typename Tag, typename Sequence>
+ struct convert
+ {
+ typedef typename extension::convert_impl<Tag> gen;
+
+ typedef typename
+ gen::template apply<Sequence>::type
+ type;
+ };
+ }
+
+ template <typename Tag, typename Sequence>
+ inline typename result_of::convert<Tag, Sequence>::type
+ convert(Sequence& seq)
+ {
+ typedef typename result_of::convert<Tag, Sequence>::gen gen;
+ return gen::call(seq);
+ }
+
+ template <typename Tag, typename Sequence>
+ inline typename result_of::convert<Tag, Sequence const>::type
+ convert(Sequence const& seq)
+ {
+ typedef typename result_of::convert<Tag, Sequence const>::gen gen;
+ return gen::call(seq);
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SEQUENCE_INTRINSIC_10022005_0618)
+#define FUSION_SEQUENCE_INTRINSIC_10022005_0618
+
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/back.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/empty.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+#include <boost/fusion/sequence/intrinsic/has_key.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+#include <boost/fusion/sequence/intrinsic/at_key.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at_key.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_AT_05042005_0722)
+#define FUSION_AT_05042005_0722
+
+#include <boost/mpl/int.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/detail/access.hpp>
+
+namespace boost { namespace fusion
+{
+ // Special tags:
+ struct sequence_facade_tag;
+ struct boost_tuple_tag; // boost::tuples::tuple tag
+ struct array_tag; // boost::array tag
+ struct mpl_sequence_tag; // mpl sequence tag
+ struct std_pair_tag; // std::pair tag
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct at_impl
+ {
+ template <typename Sequence, typename N>
+ struct apply;
+ };
+
+ template <>
+ struct at_impl<sequence_facade_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply : Sequence::template at<Sequence, N> {};
+ };
+
+ template <>
+ struct at_impl<boost_tuple_tag>;
+
+ template <>
+ struct at_impl<array_tag>;
+
+ template <>
+ struct at_impl<mpl_sequence_tag>;
+
+ template <>
+ struct at_impl<std_pair_tag>;
+ }
+
+ namespace result_of
+ {
+ template <typename Sequence, typename N>
+ struct at
+ : extension::at_impl<typename detail::tag_of<Sequence>::type>::
+ template apply<Sequence, N>
+ {};
+
+ template <typename Sequence, int N>
+ struct at_c
+ : at<Sequence, mpl::int_<N> >
+ {};
+ }
+
+
+ template <typename N, typename Sequence>
+ inline typename
+ lazy_disable_if<
+ is_const<Sequence>
+ , result_of::at<Sequence, N>
+ >::type
+ at(Sequence& seq)
+ {
+ return result_of::at<Sequence, N>::call(seq);
+ }
+
+ template <typename N, typename Sequence>
+ inline typename result_of::at<Sequence const, N>::type
+ at(Sequence const& seq)
+ {
+ return result_of::at<Sequence const, N>::call(seq);
+ }
+
+ template <int N, typename Sequence>
+ inline typename
+ lazy_disable_if<
+ is_const<Sequence>
+ , result_of::at_c<Sequence, N>
+ >::type
+ at_c(Sequence& seq)
+ {
+ return at<mpl::int_<N> >(seq);
+ }
+
+ template <int N, typename Sequence>
+ inline typename result_of::at_c<Sequence const, N>::type
+ at_c(Sequence const& seq)
+ {
+ return at<mpl::int_<N> >(seq);
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_AT_C_08252008_0308)
+#define FUSION_AT_C_08252008_0308
+
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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_FUSION_AT_KEY_20060304_1755)
+#define BOOST_FUSION_AT_KEY_20060304_1755
+
+#include <boost/type_traits/is_const.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/detail/access.hpp>
+
+namespace boost { namespace fusion
+{
+ // Special tags:
+ struct sequence_facade_tag;
+ struct array_tag; // boost::array tag
+ struct mpl_sequence_tag; // mpl sequence tag
+ struct std_pair_tag; // std::pair tag
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct at_key_impl
+ {
+ template <typename Sequence, typename Key>
+ struct apply;
+ };
+
+ template <>
+ struct at_key_impl<sequence_facade_tag>
+ {
+ template <typename Sequence, typename Key>
+ struct apply : Sequence::template at_key<Sequence, Key> {};
+ };
+
+ template <>
+ struct at_key_impl<array_tag>;
+
+ template <>
+ struct at_key_impl<mpl_sequence_tag>;
+
+ template <>
+ struct at_key_impl<std_pair_tag>;
+ }
+
+ namespace result_of
+ {
+ template <typename Sequence, typename Key>
+ struct at_key
+ : extension::at_key_impl<typename detail::tag_of<Sequence>::type>::
+ template apply<Sequence, Key>
+ {};
+ }
+
+ template <typename Key, typename Sequence>
+ inline typename
+ lazy_disable_if<
+ is_const<Sequence>
+ , result_of::at_key<Sequence, Key>
+ >::type
+ at_key(Sequence& seq)
+ {
+ return result_of::at_key<Sequence, Key>::call(seq);
+ }
+
+ template <typename Key, typename Sequence>
+ inline typename result_of::at_key<Sequence const, Key>::type
+ at_key(Sequence const& seq)
+ {
+ return result_of::at_key<Sequence const, Key>::call(seq);
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_BACK_09162005_0350)
+#define FUSION_BACK_09162005_0350
+
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct fusion_sequence_tag;
+
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct back
+ : result_of::deref<typename result_of::prior<typename result_of::end<Sequence>::type>::type>
+ {};
+ }
+
+ template <typename Sequence>
+ inline typename result_of::back<Sequence>::type
+ back(Sequence& seq)
+ {
+ return *fusion::prior(fusion::end(seq));
+ }
+
+ template <typename Sequence>
+ inline typename result_of::back<Sequence const>::type
+ back(Sequence const& seq)
+ {
+ return *fusion::prior(fusion::end(seq));
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_BEGIN_04052005_1132)
+#define FUSION_BEGIN_04052005_1132
+
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace fusion
+{
+ // Special tags:
+ struct sequence_facade_tag; // iterator facade tag
+ struct boost_tuple_tag; // boost::tuples::tuple tag
+ struct array_tag; // boost::array tag
+ struct mpl_sequence_tag; // mpl sequence tag
+ struct std_pair_tag; // std::pair tag
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl
+ {
+ template <typename Sequence>
+ struct apply;
+ };
+
+ template <>
+ struct begin_impl<sequence_facade_tag>
+ {
+ template <typename Sequence>
+ struct apply : Sequence::template begin<Sequence> {};
+ };
+
+ template <>
+ struct begin_impl<boost_tuple_tag>;
+
+ template <>
+ struct begin_impl<array_tag>;
+
+ template <>
+ struct begin_impl<mpl_sequence_tag>;
+
+ template <>
+ struct begin_impl<std_pair_tag>;
+ }
+
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct begin
+ : extension::begin_impl<typename detail::tag_of<Sequence>::type>::
+ template apply<Sequence>
+ {};
+ }
+
+ template <typename Sequence>
+ inline typename result_of::begin<Sequence>::type const
+ begin(Sequence& seq)
+ {
+ return result_of::begin<Sequence>::call(seq);
+ }
+
+ template <typename Sequence>
+ inline typename result_of::begin<Sequence const>::type const
+ begin(Sequence const& seq)
+ {
+ return result_of::begin<Sequence const>::call(seq);
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_EMPTY_09162005_0335)
+#define FUSION_EMPTY_09162005_0335
+
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace fusion
+{
+ // Special tags:
+ struct sequence_facade_tag;
+ struct mpl_sequence_tag; // mpl sequence tag
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct empty_impl
+ {
+ template <typename Sequence>
+ struct apply
+ : mpl::bool_<(result_of::size<Sequence>::value == 0)>
+ {};
+ };
+
+ template <>
+ struct empty_impl<sequence_facade_tag>
+ {
+ template <typename Sequence>
+ struct apply : Sequence::template empty<Sequence> {};
+ };
+
+ template <>
+ struct empty_impl<mpl_sequence_tag>;
+ }
+
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct empty
+ : extension::empty_impl<typename detail::tag_of<Sequence>::type>::
+ template apply<Sequence>
+ {};
+ }
+
+ template <typename Sequence>
+ inline typename result_of::empty<Sequence>::type
+ empty(Sequence const&)
+ {
+ typedef typename result_of::empty<Sequence>::type result;
+ return result();
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_END_04052005_1141)
+#define FUSION_END_04052005_1141
+
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace fusion
+{
+ // Special tags:
+ struct sequence_facade_tag;
+ struct boost_tuple_tag; // boost::tuples::tuple tag
+ struct array_tag; // boost::array tag
+ struct mpl_sequence_tag; // mpl sequence tag
+ struct std_pair_tag; // std::pair tag
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl
+ {
+ template <typename Sequence>
+ struct apply;
+ };
+
+ template <>
+ struct end_impl<sequence_facade_tag>
+ {
+ template <typename Sequence>
+ struct apply : Sequence::template end<Sequence> {};
+ };
+
+ template <>
+ struct end_impl<boost_tuple_tag>;
+
+ template <>
+ struct end_impl<array_tag>;
+
+ template <>
+ struct end_impl<mpl_sequence_tag>;
+
+ template <>
+ struct end_impl<std_pair_tag>;
+ }
+
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct end
+ : extension::end_impl<typename detail::tag_of<Sequence>::type>::
+ template apply<Sequence>
+ {};
+ }
+
+ template <typename Sequence>
+ inline typename result_of::end<Sequence>::type const
+ end(Sequence& seq)
+ {
+ return result_of::end<Sequence>::call(seq);
+ }
+
+ template <typename Sequence>
+ inline typename result_of::end<Sequence const>::type const
+ end(Sequence const& seq)
+ {
+ return result_of::end<Sequence const>::call(seq);
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006 Eric Niebler
+
+ Distributed under the 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(FUSION_SEGMENTS_04052005_1141)
+#define FUSION_SEGMENTS_04052005_1141
+
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace fusion
+{
+ // segments: returns a sequence of sequences
+ namespace extension
+ {
+ template <typename Tag>
+ struct segments_impl
+ {
+ template <typename Sequence>
+ struct apply {};
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct segments
+ {
+ typedef typename
+ extension::segments_impl<typename traits::tag_of<Sequence>::type>::
+ template apply<Sequence>::type
+ type;
+ };
+ }
+
+ template <typename Sequence>
+ typename result_of::segments<Sequence>::type
+ segments(Sequence & seq)
+ {
+ return
+ extension::segments_impl<typename traits::tag_of<Sequence>::type>::
+ template apply<Sequence>::call(seq);
+ }
+
+ template <typename Sequence>
+ typename result_of::segments<Sequence const>::type
+ segments(Sequence const& seq)
+ {
+ return
+ extension::segments_impl<typename traits::tag_of<Sequence>::type>::
+ template apply<Sequence const>::call(seq);
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006 Eric Niebler
+
+ Distributed under the 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(FUSION_SIZE_S_08112006_1141)
+#define FUSION_SIZE_S_08112006_1141
+
+#include <boost/mpl/plus.hpp>
+#include <boost/mpl/size_t.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/fusion/algorithm/iteration/fold.hpp>
+#include <boost/fusion/support/ext_/is_segmented.hpp>
+#include <boost/fusion/sequence/intrinsic/ext_/segments.hpp>
+
+namespace boost { namespace fusion
+{
+ ///////////////////////////////////////////////////////////////////////////
+ // calculates the size of any segmented data structure.
+ template<typename Sequence, bool IsSegmented = traits::is_segmented<Sequence>::value>
+ struct segmented_size;
+
+ namespace detail
+ {
+ struct size_plus
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename This, typename Seq, typename State>
+ struct result<This(Seq, State)>
+ : mpl::plus<
+ segmented_size<typename remove_reference<Seq>::type>
+ , typename remove_reference<State>::type
+ >
+ {};
+ };
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ template<typename Sequence, bool IsSegmented>
+ struct segmented_size
+ : result_of::fold<
+ typename result_of::segments<Sequence>::type
+ , mpl::size_t<0>
+ , detail::size_plus
+ >::type
+ {};
+
+ template<typename Sequence>
+ struct segmented_size<Sequence, false>
+ : result_of::size<Sequence>
+ {};
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_FRONT_09162005_0343)
+#define FUSION_FRONT_09162005_0343
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct fusion_sequence_tag;
+
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct front
+ : result_of::deref<typename result_of::begin<Sequence>::type>
+ {};
+ }
+
+ template <typename Sequence>
+ inline typename result_of::front<Sequence>::type
+ front(Sequence& seq)
+ {
+ return *fusion::begin(seq);
+ }
+
+ template <typename Sequence>
+ inline typename result_of::front<Sequence const>::type
+ front(Sequence const& seq)
+ {
+ return *fusion::begin(seq);
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_HAS_KEY_09232005_1454)
+#define FUSION_HAS_KEY_09232005_1454
+
+#include <boost/mpl/not.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+
+ // Special tags:
+ struct sequence_facade_tag;
+ struct array_tag; // boost::array tag
+ struct mpl_sequence_tag; // mpl sequence tag
+ struct std_pair_tag; // std::pair tag
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct has_key_impl
+ {
+ template <typename Sequence, typename Key>
+ struct apply
+ : mpl::not_<is_same<typename Sequence::
+ template meta_at_impl<Key>::type, void_> >
+ {};
+ };
+
+ template <>
+ struct has_key_impl<sequence_facade_tag>
+ {
+ template <typename Sequence, typename Key>
+ struct apply : Sequence::template has_key<Sequence, Key> {};
+ };
+
+ template <>
+ struct has_key_impl<array_tag>;
+
+ template <>
+ struct has_key_impl<mpl_sequence_tag>;
+
+ template <>
+ struct has_key_impl<std_pair_tag>;
+ }
+
+ namespace result_of
+ {
+ template <typename Sequence, typename Key>
+ struct has_key
+ : extension::has_key_impl<typename detail::tag_of<Sequence>::type>::
+ template apply<Sequence, Key>
+ {};
+ }
+
+ template <typename Key, typename Sequence>
+ inline typename result_of::has_key<Sequence, Key>::type
+ has_key(Sequence const& seq)
+ {
+ typedef typename result_of::has_key<Sequence, Key>::type result;
+ return result();
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SIZE_05052005_0214)
+#define FUSION_SIZE_05052005_0214
+
+#include <boost/mpl/int.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace fusion
+{
+ // Special tags:
+ struct sequence_facade_tag;
+ struct boost_tuple_tag; // boost::tuples::tuple tag
+ struct array_tag; // boost::array tag
+ struct mpl_sequence_tag; // mpl sequence tag
+ struct std_pair_tag; // std::pair tag
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct size_impl
+ {
+ template <typename Sequence>
+ struct apply : Sequence::size {};
+ };
+
+ template <>
+ struct size_impl<sequence_facade_tag>
+ {
+ template <typename Sequence>
+ struct apply : Sequence::template size<Sequence> {};
+ };
+
+ template <>
+ struct size_impl<boost_tuple_tag>;
+
+ template <>
+ struct size_impl<array_tag>;
+
+ template <>
+ struct size_impl<mpl_sequence_tag>;
+
+ template <>
+ struct size_impl<std_pair_tag>;
+ }
+
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct size
+ : extension::size_impl<typename detail::tag_of<Sequence>::type>::
+ template apply<Sequence>
+
+ {
+ typedef typename extension::size_impl<typename detail::tag_of<Sequence>::type>::
+ template apply<Sequence>::type size_application;
+ BOOST_STATIC_CONSTANT(int, value = size_application::value);
+ };
+ }
+
+ template <typename Sequence>
+ inline typename result_of::size<Sequence>::type
+ size(Sequence const&)
+ {
+ typedef typename result_of::size<Sequence>::type result;
+ return result();
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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_FUSION_SWAP_20070501_1956)
+#define BOOST_FUSION_SWAP_20070501_1956
+
+#include <algorithm>
+
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/fusion/view/zip_view.hpp>
+#include <boost/fusion/algorithm/iteration/for_each.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+#include <boost/fusion/sequence/intrinsic/back.hpp>
+#include <boost/mpl/and.hpp>
+
+namespace boost { namespace fusion {
+ namespace result_of
+ {
+ template<typename Seq1, typename Seq2>
+ struct swap
+ {
+ typedef void type;
+ };
+ }
+
+ namespace detail
+ {
+ struct swap
+ {
+ template<typename Elem>
+ struct result
+ {
+ typedef void type;
+ };
+
+ template<typename Elem>
+ void operator()(Elem const& e) const
+ {
+ using std::swap;
+ swap(front(e), back(e));
+ }
+ };
+ }
+
+ template<typename Seq1, typename Seq2>
+ typename enable_if<mpl::and_<traits::is_sequence<Seq1>, traits::is_sequence<Seq2> >, void>::type
+ swap(Seq1& lhs, Seq2& rhs)
+ {
+ typedef vector<Seq1&, Seq2&> references;
+ for_each(zip_view<references>(references(lhs, rhs)), detail::swap());
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_VALUE_AT_05052005_0229)
+#define FUSION_VALUE_AT_05052005_0229
+
+#include <boost/mpl/int.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace fusion
+{
+ // Special tags:
+ struct sequence_facade_tag;
+ struct boost_tuple_tag; // boost::tuples::tuple tag
+ struct array_tag; // boost::array tag
+ struct mpl_sequence_tag; // mpl sequence tag
+ struct std_pair_tag; // std::pair tag
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_at_impl
+ {
+ template <typename Sequence, typename N>
+ struct apply;
+ };
+
+ template <>
+ struct value_at_impl<sequence_facade_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply : Sequence::template value_at<Sequence, N> {};
+ };
+
+ template <>
+ struct value_at_impl<boost_tuple_tag>;
+
+ template <>
+ struct value_at_impl<array_tag>;
+
+ template <>
+ struct value_at_impl<mpl_sequence_tag>;
+
+ template <>
+ struct value_at_impl<std_pair_tag>;
+ }
+
+ namespace result_of
+ {
+ template <typename Sequence, typename N>
+ struct value_at
+ : extension::value_at_impl<typename detail::tag_of<Sequence>::type>::
+ template apply<Sequence, N>
+ {};
+
+ template <typename Sequence, int N>
+ struct value_at_c
+ : fusion::result_of::value_at<Sequence, mpl::int_<N> >
+ {};
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_VALUE_AT_KEY_05052005_0229)
+#define FUSION_VALUE_AT_KEY_05052005_0229
+
+#include <boost/mpl/int.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace fusion
+{
+ // Special tags:
+ struct sequence_facade_tag;
+ struct array_tag; // boost::array tag
+ struct mpl_sequence_tag; // mpl sequence tag
+ struct std_pair_tag; // std::pair tag
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_at_key_impl
+ {
+ template <typename Sequence, typename Key>
+ struct apply;
+ };
+
+ template <>
+ struct value_at_key_impl<sequence_facade_tag>
+ {
+ template <typename Sequence, typename Key>
+ struct apply : Sequence::template value_at_key<Sequence, Key> {};
+ };
+
+ template <>
+ struct value_at_key_impl<array_tag>;
+
+ template <>
+ struct value_at_key_impl<mpl_sequence_tag>;
+
+ template <>
+ struct value_at_key_impl<std_pair_tag>;
+ }
+
+ namespace result_of
+ {
+ template <typename Sequence, typename N>
+ struct value_at_key
+ : extension::value_at_key_impl<typename detail::tag_of<Sequence>::type>::
+ template apply<Sequence, N>
+ {};
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SEQUENCE_IO_10032005_0836)
+#define FUSION_SEQUENCE_IO_10032005_0836
+
+#include <boost/fusion/sequence/io/in.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 1999-2003 Jeremiah Willcock
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_IN_05052005_0121)
+#define FUSION_IN_05052005_0121
+
+#include <istream>
+#include <boost/fusion/sequence/io/detail/manip.hpp>
+
+#include <boost/mpl/bool.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Tag>
+ struct delimiter_in
+ {
+ // read a delimiter
+ template <typename IS>
+ static void
+ read(IS& is, char const* delim, mpl::false_ = mpl::false_())
+ {
+ detail::string_ios_manip<Tag, IS> manip(is);
+ manip.read(delim);
+ }
+
+ template <typename IS>
+ static void
+ read(IS& is, char const* delim, mpl::true_)
+ {
+ }
+ };
+
+ struct read_sequence_loop
+ {
+ template <typename IS, typename First, typename Last>
+ static void
+ call(IS& is, First const&, Last const&, mpl::true_)
+ {
+ }
+
+ template <typename IS, typename First, typename Last>
+ static void
+ call(IS& is, First const& first, Last const& last, mpl::false_)
+ {
+ result_of::equal_to<
+ typename result_of::next<First>::type
+ , Last
+ >
+ is_last;
+
+ is >> *first;
+ delimiter_in<tuple_delimiter_tag>::read(is, " ", is_last);
+ call(is, fusion::next(first), last, is_last);
+ }
+
+ template <typename IS, typename First, typename Last>
+ static void
+ call(IS& is, First const& first, Last const& last)
+ {
+ result_of::equal_to<First, Last> eq;
+ call(is, first, last, eq);
+ }
+ };
+
+ template <typename IS, typename Sequence>
+ inline void
+ read_sequence(IS& is, Sequence& seq)
+ {
+ delimiter_in<tuple_open_tag>::read(is, "(");
+ read_sequence_loop::call(is, fusion::begin(seq), fusion::end(seq));
+ delimiter_in<tuple_close_tag>::read(is, ")");
+ }
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 1999-2003 Jeremiah Willcock
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_MANIP_05052005_1200)
+#define FUSION_MANIP_05052005_1200
+
+#include <boost/config.hpp>
+#include <string>
+#include <vector>
+#include <cctype>
+
+// Tuple I/O manipulators
+
+#define FUSION_GET_CHAR_TYPE(T) typename T::char_type
+#define FUSION_GET_TRAITS_TYPE(T) typename T::traits_type
+
+#if defined (BOOST_NO_TEMPLATED_STREAMS)
+#define FUSION_STRING_OF_STREAM(Stream) std::string
+#else
+#define FUSION_STRING_OF_STREAM(Stream) \
+ std::basic_string< \
+ FUSION_GET_CHAR_TYPE(Stream) \
+ , FUSION_GET_TRAITS_TYPE(Stream) \
+ >
+#endif
+
+//$$$ these should be part of the public API$$$
+//$$$ rename tuple_open, tuple_close and tuple_delimiter to
+// open, close and delimeter and add these synonyms to the
+// TR1 tuple module.
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template <typename Tag>
+ int get_xalloc_index(Tag* = 0)
+ {
+ // each Tag will have a unique index
+ static int index = std::ios::xalloc();
+ return index;
+ }
+
+ template <typename Stream, typename Tag, typename T>
+ struct stream_data
+ {
+ struct arena
+ {
+ ~arena()
+ {
+ for (
+ typename std::vector<T*>::iterator i = data.begin()
+ ; i != data.end()
+ ; ++i)
+ {
+ delete *i;
+ }
+ }
+
+ std::vector<T*> data;
+ };
+
+ static void attach(Stream& stream, T const& data)
+ {
+ static arena ar; // our arena
+ ar.data.push_back(new T(data));
+ stream.pword(get_xalloc_index<Tag>()) = ar.data.back();
+ }
+
+ static T const* get(Stream& stream)
+ {
+ return (T const*)stream.pword(get_xalloc_index<Tag>());
+ }
+ };
+
+ template <typename Tag, typename Stream>
+ class string_ios_manip
+ {
+ public:
+
+ typedef FUSION_STRING_OF_STREAM(Stream) string_type;
+
+ typedef stream_data<Stream, Tag, string_type> stream_data_t;
+
+ string_ios_manip(Stream& str_)
+ : stream(str_)
+ {}
+
+ void
+ set(string_type const& s)
+ {
+ stream_data_t::attach(stream, s);
+ }
+
+ void
+ print(char const* default_) const
+ {
+ // print a delimiter
+ string_type const* p = stream_data_t::get(stream);
+ if (p)
+ stream << *p;
+ else
+ stream << default_;
+ }
+
+ void
+ read(char const* default_) const
+ {
+ // read a delimiter
+ string_type const* p = stream_data_t::get(stream);
+ using namespace std;
+ ws(stream);
+
+ if (p)
+ {
+ typedef typename string_type::const_iterator iterator;
+ for (iterator i = p->begin(); i != p->end(); ++i)
+ check_delim(*i);
+ }
+ else
+ {
+ while (*default_)
+ check_delim(*default_++);
+ }
+ }
+
+ private:
+
+ template <typename Char>
+ void
+ check_delim(Char c) const
+ {
+ if (!isspace(c))
+ {
+ if (stream.get() != c)
+ {
+ stream.unget();
+ stream.setstate(std::ios::failbit);
+ }
+ }
+ }
+
+ Stream& stream;
+ };
+
+ } // detail
+
+#if defined (BOOST_NO_TEMPLATED_STREAMS)
+
+#define STD_TUPLE_DEFINE_MANIPULATOR(name) \
+ namespace detail \
+ { \
+ struct name##_tag; \
+ \
+ struct name##_type \
+ { \
+ typedef std::string string_type; \
+ string_type data; \
+ name##_type(const string_type& d): data(d) {} \
+ }; \
+ \
+ template <typename Stream> \
+ Stream& operator>>(Stream& s, const name##_type& m) \
+ { \
+ string_ios_manip<name##_tag, Stream>(s).set(m.data); \
+ return s; \
+ } \
+ \
+ template <typename Stream> \
+ Stream& operator<<(Stream& s, const name##_type& m) \
+ { \
+ string_ios_manip<name##_tag, Stream>(s).set(m.data); \
+ return s; \
+ } \
+ }
+
+#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name) \
+ inline detail::name##_type \
+ name(const std::string& s) \
+ { \
+ return detail::name##_type(s); \
+ } \
+ \
+ inline detail::name##_type \
+ name(const char* s) \
+ { \
+ return detail::name##_type(std::string(s)); \
+ } \
+ \
+ inline detail::name##_type \
+ name(char c) \
+ { \
+ return detail::name##_type(std::string(1, c)); \
+ }
+
+#else // defined(BOOST_NO_TEMPLATED_STREAMS)
+
+#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
+
+#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name) \
+ template <typename Char, typename Traits> \
+ inline detail::name##_type<Char, Traits> \
+ name(const std::basic_string<Char, Traits>& s) \
+ { \
+ return detail::name##_type<Char, Traits>(s); \
+ } \
+ \
+ inline detail::name##_type<char> \
+ name(char const* s) \
+ { \
+ return detail::name##_type<char>(std::basic_string<char>(s)); \
+ } \
+ \
+ inline detail::name##_type<wchar_t> \
+ name(wchar_t const* s) \
+ { \
+ return detail::name##_type<wchar_t>(std::basic_string<wchar_t>(s)); \
+ } \
+ \
+ inline detail::name##_type<char> \
+ name(char c) \
+ { \
+ return detail::name##_type<char>(std::basic_string<char>(1, c)); \
+ } \
+ \
+ inline detail::name##_type<wchar_t> \
+ name(wchar_t c) \
+ { \
+ return detail::name##_type<wchar_t>(std::basic_string<wchar_t>(1, c)); \
+ }
+
+#else // defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
+
+#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name) \
+ template <typename Char, typename Traits> \
+ inline detail::name##_type<Char, Traits> \
+ name(const std::basic_string<Char, Traits>& s) \
+ { \
+ return detail::name##_type<Char, Traits>(s); \
+ } \
+ \
+ template <typename Char> \
+ inline detail::name##_type<Char> \
+ name(Char s[]) \
+ { \
+ return detail::name##_type<Char>(std::basic_string<Char>(s)); \
+ } \
+ \
+ template <typename Char> \
+ inline detail::name##_type<Char> \
+ name(Char const s[]) \
+ { \
+ return detail::name##_type<Char>(std::basic_string<Char>(s)); \
+ } \
+ \
+ template <typename Char> \
+ inline detail::name##_type<Char> \
+ name(Char c) \
+ { \
+ return detail::name##_type<Char>(std::basic_string<Char>(1, c)); \
+ }
+
+#endif
+
+#define STD_TUPLE_DEFINE_MANIPULATOR(name) \
+ namespace detail \
+ { \
+ struct name##_tag; \
+ \
+ template <typename Char, typename Traits = std::char_traits<Char> > \
+ struct name##_type \
+ { \
+ typedef std::basic_string<Char, Traits> string_type; \
+ string_type data; \
+ name##_type(const string_type& d): data(d) {} \
+ }; \
+ \
+ template <typename Stream, typename Char, typename Traits> \
+ Stream& operator>>(Stream& s, const name##_type<Char,Traits>& m) \
+ { \
+ string_ios_manip<name##_tag, Stream>(s).set(m.data); \
+ return s; \
+ } \
+ \
+ template <typename Stream, typename Char, typename Traits> \
+ Stream& operator<<(Stream& s, const name##_type<Char,Traits>& m) \
+ { \
+ string_ios_manip<name##_tag, Stream>(s).set(m.data); \
+ return s; \
+ } \
+ } \
+
+#endif // defined(BOOST_NO_TEMPLATED_STREAMS)
+
+ STD_TUPLE_DEFINE_MANIPULATOR(tuple_open)
+ STD_TUPLE_DEFINE_MANIPULATOR(tuple_close)
+ STD_TUPLE_DEFINE_MANIPULATOR(tuple_delimiter)
+
+ STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(tuple_open)
+ STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(tuple_close)
+ STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(tuple_delimiter)
+
+#undef STD_TUPLE_DEFINE_MANIPULATOR
+#undef STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS
+#undef FUSION_STRING_OF_STREAM
+#undef FUSION_GET_CHAR_TYPE
+#undef FUSION_GET_TRAITS_TYPE
+
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 1999-2003 Jeremiah Willcock
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_OUT_05052005_0121)
+#define FUSION_OUT_05052005_0121
+
+#include <ostream>
+#include <boost/fusion/sequence/io/detail/manip.hpp>
+
+#include <boost/mpl/bool.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Tag>
+ struct delimiter_out
+ {
+ // print a delimiter
+ template <typename OS>
+ static void
+ print(OS& os, char const* delim, mpl::false_ = mpl::false_())
+ {
+ detail::string_ios_manip<Tag, OS> manip(os);
+ manip.print(delim);
+ }
+
+ template <typename OS>
+ static void
+ print(OS& os, char const* delim, mpl::true_)
+ {
+ }
+ };
+
+ struct print_sequence_loop
+ {
+ template <typename OS, typename First, typename Last>
+ static void
+ call(OS& os, First const&, Last const&, mpl::true_)
+ {
+ }
+
+ template <typename OS, typename First, typename Last>
+ static void
+ call(OS& os, First const& first, Last const& last, mpl::false_)
+ {
+ result_of::equal_to<
+ typename result_of::next<First>::type
+ , Last
+ >
+ is_last;
+
+ os << *first;
+ delimiter_out<tuple_delimiter_tag>::print(os, " ", is_last);
+ call(os, fusion::next(first), last, is_last);
+ }
+
+ template <typename OS, typename First, typename Last>
+ static void
+ call(OS& os, First const& first, Last const& last)
+ {
+ result_of::equal_to<First, Last> eq;
+ call(os, first, last, eq);
+ }
+ };
+
+ template <typename OS, typename Sequence>
+ inline void
+ print_sequence(OS& os, Sequence const& seq)
+ {
+ delimiter_out<tuple_open_tag>::print(os, "(");
+ print_sequence_loop::call(os, fusion::begin(seq), fusion::end(seq));
+ delimiter_out<tuple_close_tag>::print(os, ")");
+ }
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 1999-2003 Jeremiah Willcock
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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_IN_05042005_0120)
+#define BOOST_IN_05042005_0120
+
+#include <istream>
+#include <boost/fusion/sequence/io/detail/in.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+
+namespace boost { namespace fusion
+{
+ template <typename Sequence>
+ inline std::istream&
+ in(std::istream& is, Sequence& seq)
+ {
+ detail::read_sequence(is, seq);
+ return is;
+ }
+
+ namespace operators
+ {
+ template <typename Sequence>
+ inline typename
+ enable_if<
+ fusion::traits::is_sequence<Sequence>
+ , std::istream&
+ >::type
+ operator>>(std::istream& is, Sequence& seq)
+ {
+ return fusion::in(is, seq);
+ }
+ }
+ using operators::operator>>;
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 1999-2003 Jeremiah Willcock
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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_OUT_05042005_0120)
+#define BOOST_OUT_05042005_0120
+
+#include <ostream>
+#include <boost/fusion/sequence/io/detail/out.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/mpl/or.hpp>
+
+namespace boost { namespace fusion
+{
+ template <typename Sequence>
+ inline std::ostream&
+ out(std::ostream& os, Sequence& seq)
+ {
+ detail::print_sequence(os, seq);
+ return os;
+ }
+
+ namespace operators
+ {
+ template <typename Sequence>
+ inline typename
+ enable_if<
+ fusion::traits::is_sequence<Sequence>
+ , std::ostream&
+ >::type
+ operator<<(std::ostream& os, Sequence const& seq)
+ {
+ return fusion::out(os, seq);
+ }
+ }
+ using operators::operator<<;
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SEQUENCE_FACADE_09252006_1044)
+#define FUSION_SEQUENCE_FACADE_09252006_1044
+
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+
+ template <typename Derived, typename Category, typename IsView = mpl::false_>
+ struct sequence_facade : sequence_base<Derived>
+ {
+ typedef sequence_facade_tag fusion_tag;
+ typedef Derived derived_type;
+ typedef Category category;
+ typedef IsView is_view;
+ };
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SUPPORT_10022005_0545)
+#define FUSION_SUPPORT_10022005_0545
+
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/support/is_iterator.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/support/pair.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/deduce.hpp>
+#include <boost/fusion/support/deduce_sequence.hpp>
+#include <boost/fusion/support/unused.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_CATEGORY_OF_07202005_0308)
+#define FUSION_CATEGORY_OF_07202005_0308
+
+#include <boost/fusion/support/detail/category_of.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+
+namespace boost { namespace fusion
+{
+ // Special tags:
+ struct boost_tuple_tag; // boost::tuples::tuple tag
+ struct array_tag; // boost::array tag
+ struct mpl_sequence_tag; // mpl sequence tag
+ struct std_pair_tag; // std::pair tag
+
+ struct incrementable_traversal_tag {};
+
+ struct single_pass_traversal_tag
+ : incrementable_traversal_tag {};
+
+ struct forward_traversal_tag
+ : single_pass_traversal_tag {};
+
+ struct bidirectional_traversal_tag
+ : forward_traversal_tag {};
+
+ struct random_access_traversal_tag
+ : bidirectional_traversal_tag {};
+
+ struct associative_sequence_tag {};
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct category_of_impl
+ {
+ template<typename T>
+ struct apply : detail::fusion_category_of<T> {};
+ };
+
+ template <>
+ struct category_of_impl<boost_tuple_tag>;
+
+ template <>
+ struct category_of_impl<array_tag>;
+
+ template <>
+ struct category_of_impl<mpl_sequence_tag>;
+
+ template <>
+ struct category_of_impl<std_pair_tag>;
+ }
+
+ namespace traits
+ {
+ template <typename T>
+ struct category_of
+ : extension::category_of_impl<typename fusion::detail::tag_of<T>::type>::
+ template apply<T>
+ {};
+
+ template <typename T>
+ struct is_associative
+ : is_base_of<
+ associative_sequence_tag
+ , typename category_of<T>::type>
+ {};
+
+ template <typename T>
+ struct is_incrementable
+ : is_base_of<
+ incrementable_traversal_tag
+ , typename category_of<T>::type>
+ {};
+
+ template <typename T>
+ struct is_single_pass
+ : is_base_of<
+ single_pass_traversal_tag
+ , typename category_of<T>::type>
+ {};
+
+ template <typename T>
+ struct is_forward
+ : is_base_of<
+ forward_traversal_tag
+ , typename category_of<T>::type>
+ {};
+
+ template <typename T>
+ struct is_bidirectional
+ : is_base_of<
+ bidirectional_traversal_tag
+ , typename category_of<T>::type>
+ {};
+
+ template <typename T>
+ struct is_random_access
+ : is_base_of<
+ random_access_traversal_tag
+ , typename category_of<T>::type>
+ {};
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_SUPPORT_DEDUCE_HPP_INCLUDED)
+#define BOOST_FUSION_SUPPORT_DEDUCE_HPP_INCLUDED
+
+#include <boost/ref.hpp>
+
+namespace boost { namespace fusion { namespace traits
+{
+ template <typename T> struct deduce;
+
+ //----- ---- --- -- - - - -
+
+ // Non-references pass unchanged
+
+ template <typename T>
+ struct deduce
+ {
+ typedef T type;
+ };
+
+ template <typename T>
+ struct deduce<T const>
+ {
+ typedef T type;
+ };
+
+ template <typename T>
+ struct deduce<T volatile>
+ {
+ typedef T type;
+ };
+
+ template <typename T>
+ struct deduce<T const volatile>
+ {
+ typedef T type;
+ };
+
+ // Keep references on mutable LValues
+
+ template <typename T>
+ struct deduce<T &>
+ {
+ typedef T & type;
+ };
+
+ template <typename T>
+ struct deduce<T volatile&>
+ {
+ typedef T volatile& type;
+ };
+
+ // Store away potential RValues
+
+ template <typename T>
+ struct deduce<T const&>
+ {
+ typedef T type;
+ };
+
+ template <typename T>
+ struct deduce<T const volatile&>
+ {
+ typedef T type;
+ };
+
+ // Unwrap Boost.RefS (referencee cv is deduced)
+
+ template <typename T>
+ struct deduce<reference_wrapper<T> & >
+ {
+ typedef T& type;
+ };
+
+ template <typename T>
+ struct deduce<reference_wrapper<T> const & >
+ {
+ typedef T& type;
+ };
+
+ // Keep references on arrays, even if const
+
+ template <typename T, int N>
+ struct deduce<const T(&)[N]>
+ {
+ typedef const T(&type)[N];
+ };
+
+ template <typename T, int N>
+ struct deduce<const volatile T(&)[N]>
+ {
+ typedef const volatile T(&type)[N];
+ };
+
+}}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ 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).
+==============================================================================*/
+
+#if !defined(BOOST_FUSION_SUPPORT_DEDUCE_SEQUENCE_HPP_INCLUDED)
+#define BOOST_FUSION_SUPPORT_DEDUCE_SEQUENCE_HPP_INCLUDED
+
+#include <boost/fusion/support/deduce.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/view/transform_view.hpp>
+
+
+namespace boost { namespace fusion { namespace traits
+{
+ template <class Sequence> struct deduce_sequence;
+
+ namespace detail
+ {
+ struct deducer
+ {
+ template <typename Sig>
+ struct result;
+
+ template <class Self, typename T>
+ struct result< Self(T) >
+ : fusion::traits::deduce<T>
+ { };
+ };
+ }
+
+ template <class Sequence>
+ struct deduce_sequence
+ : result_of::as_vector<
+ fusion::transform_view<Sequence, detail::deducer> >
+ { };
+
+}}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ACCESS_04182005_0737)
+#define FUSION_ACCESS_04182005_0737
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename T>
+ struct ref_result
+ {
+ typedef typename add_reference<typename T::type>::type type;
+ };
+
+ template <typename T>
+ struct cref_result
+ {
+ typedef typename
+ add_reference<
+ typename add_const<typename T::type>::type
+ >::type
+ type;
+ };
+
+ template <typename T>
+ struct non_ref_parameter
+ {
+ typedef typename boost::remove_cv<T>::type const& type;
+ };
+
+ template <typename T>
+ struct call_param
+ {
+ typedef typename
+ mpl::eval_if<
+ is_reference<T>
+ , mpl::identity<T>
+ , non_ref_parameter<T>
+ >::type
+ type;
+ };
+}}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_AS_FUSION_ELEMENT_05052005_0338)
+#define FUSION_AS_FUSION_ELEMENT_05052005_0338
+
+#include <boost/ref.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename T>
+ struct as_fusion_element
+ {
+ typedef T type;
+ };
+
+ template <typename T>
+ struct as_fusion_element<reference_wrapper<T> >
+ {
+ typedef T& type;
+ };
+
+ template <typename T, int N>
+ struct as_fusion_element<T[N]>
+ {
+ typedef const T(&type)[N];
+ };
+
+ template <typename T, int N>
+ struct as_fusion_element<volatile T[N]>
+ {
+ typedef const volatile T(&type)[N];
+ };
+
+ template <typename T, int N>
+ struct as_fusion_element<const volatile T[N]>
+ {
+ typedef const volatile T(&type)[N];
+ };
+
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_CATEGORY_OF_07212005_1025)
+#define FUSION_CATEGORY_OF_07212005_1025
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename T>
+ struct fusion_category_of
+ {
+ typedef typename T::category type;
+ };
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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(FUSION_DETAIL_IS_MPL_SEQUENCE_29122006_1105)
+#define FUSION_DETAIL_IS_MPL_SEQUENCE_29122006_1105
+
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+#include <boost/mpl/is_sequence.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/not.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename T>
+ struct is_mpl_sequence
+ : mpl::and_<
+ mpl::not_<is_base_of<sequence_root, T> >
+ , mpl::is_sequence<T> >
+ {};
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_IS_VIEW_03202006_0018)
+#define FUSION_IS_VIEW_03202006_0018
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename T>
+ struct fusion_is_view
+ {
+ typedef typename T::is_view type;
+ };
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_MPL_ITERATOR_CATEGORY_07212005_0923)
+#define FUSION_MPL_ITERATOR_CATEGORY_07212005_0923
+
+namespace boost { namespace mpl
+{
+ struct forward_iterator_tag;
+ struct bidirectional_iterator_tag;
+ struct random_access_iterator_tag;
+}}
+
+namespace boost { namespace fusion
+{
+ struct forward_traversal_tag;
+ struct bidirectional_traversal_tag;
+ struct random_access_traversal_tag;
+}}
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Category>
+ struct mpl_iterator_category;
+
+ template <>
+ struct mpl_iterator_category<mpl::forward_iterator_tag>
+ {
+ typedef forward_traversal_tag type;
+ };
+
+ template <>
+ struct mpl_iterator_category<mpl::bidirectional_iterator_tag>
+ {
+ typedef bidirectional_traversal_tag type;
+ };
+
+ template <>
+ struct mpl_iterator_category<mpl::random_access_iterator_tag>
+ {
+ typedef random_access_traversal_tag type;
+ };
+
+ template <>
+ struct mpl_iterator_category<forward_traversal_tag>
+ {
+ typedef forward_traversal_tag type;
+ };
+
+ template <>
+ struct mpl_iterator_category<bidirectional_traversal_tag>
+ {
+ typedef bidirectional_traversal_tag type;
+ };
+
+ template <>
+ struct mpl_iterator_category<random_access_traversal_tag>
+ {
+ typedef random_access_traversal_tag type;
+ };
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_UNKNOWN_KEY_09242005_1219)
+#define FUSION_UNKNOWN_KEY_09242005_1219
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <int index>
+ struct unknown_key {};
+}}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006 Eric Niebler
+
+ Distributed under the 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(FUSION_IS_SEGMENTED_03202006_0015)
+#define FUSION_IS_SEGMENTED_03202006_0015
+
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace fusion
+{
+ // Special tags:
+ struct sequence_facade_tag;
+ struct boost_tuple_tag; // boost::tuples::tuple tag
+ struct array_tag; // boost::array tag
+ struct mpl_sequence_tag; // mpl sequence tag
+ struct std_pair_tag; // std::pair tag
+ struct iterator_range_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_segmented_impl
+ {
+ template<typename Sequence>
+ struct apply
+ : mpl::false_
+ {};
+ };
+
+ template<>
+ struct is_segmented_impl<iterator_range_tag>;
+ }
+
+ namespace traits
+ {
+ template <typename Sequence>
+ struct is_segmented
+ : extension::is_segmented_impl<typename traits::tag_of<Sequence>::type>::
+ template apply<Sequence>
+ {
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_IS_ITERATOR_05062005_1219)
+#define FUSION_IS_ITERATOR_05062005_1219
+
+#include <boost/type_traits/is_base_of.hpp>
+
+namespace boost { namespace fusion
+{
+ struct iterator_root;
+
+ template <typename T>
+ struct is_fusion_iterator : is_base_of<iterator_root, T> {};
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_IS_SEQUENCE_05052005_1002)
+#define FUSION_IS_SEQUENCE_05052005_1002
+
+#include <boost/type_traits/is_base_of.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/mpl/is_sequence.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ // Special tags:
+ struct non_fusion_tag;
+ struct boost_tuple_tag; // boost::tuples::tuple tag
+ struct array_tag; // boost::array tag
+ struct mpl_sequence_tag; // mpl sequence tag
+ struct std_pair_tag; // std::pair tag
+
+ namespace extension
+ {
+ template <typename T>
+ struct is_sequence_impl
+ {
+ template <typename Sequence>
+ struct apply : is_base_of<sequence_root, Sequence> {};
+ };
+
+ template <>
+ struct is_sequence_impl<non_fusion_tag>
+ {
+ template <typename T>
+ struct apply : mpl::false_ {};
+ };
+
+ template <>
+ struct is_sequence_impl<boost_tuple_tag>;
+
+ template <>
+ struct is_sequence_impl<array_tag>;
+
+ template <>
+ struct is_sequence_impl<mpl_sequence_tag>;
+
+ template <>
+ struct is_sequence_impl<std_pair_tag>;
+ }
+
+ namespace traits
+ {
+ template <typename T>
+ struct is_sequence
+ : extension::is_sequence_impl<typename detail::tag_of<T>::type>::
+ template apply<T>
+ {};
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_IS_VIEW_03202006_0015)
+#define FUSION_IS_VIEW_03202006_0015
+
+#include <boost/fusion/support/detail/is_view.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace fusion
+{
+ // Special tags:
+ struct sequence_facade_tag;
+ struct boost_tuple_tag; // boost::tuples::tuple tag
+ struct array_tag; // boost::array tag
+ struct mpl_sequence_tag; // mpl sequence tag
+ struct std_pair_tag; // std::pair tag
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_view_impl
+ {
+ template <typename T>
+ struct apply
+ : detail::fusion_is_view<T>
+ {};
+ };
+
+ template <>
+ struct is_view_impl<sequence_facade_tag>
+ {
+ template <typename Sequence>
+ struct apply : Sequence::is_view {};
+ };
+
+ template <>
+ struct is_view_impl<boost_tuple_tag>;
+
+ template <>
+ struct is_view_impl<array_tag>;
+
+ template <>
+ struct is_view_impl<mpl_sequence_tag>;
+
+ template <>
+ struct is_view_impl<std_pair_tag>;
+ }
+
+ namespace traits
+ {
+ template <typename T>
+ struct is_view :
+ extension::is_view_impl<typename fusion::detail::tag_of<T>::type>::
+ template apply<T>::type
+ {};
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ITERATOR_BASE_05042005_1008)
+#define FUSION_ITERATOR_BASE_05042005_1008
+
+namespace boost { namespace fusion
+{
+ struct iterator_root {};
+
+ template <typename Iterator>
+ struct iterator_base : iterator_root
+ {
+ Iterator const&
+ cast() const
+ {
+ return static_cast<Iterator const&>(*this);
+ }
+
+ Iterator&
+ cast()
+ {
+ return static_cast<Iterator&>(*this);
+ }
+ };
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2006 Tobias Schwinger
+
+ Distributed under the 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(FUSION_PAIR_07222005_1203)
+#define FUSION_PAIR_07222005_1203
+
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/fusion/support/detail/as_fusion_element.hpp>
+
+namespace boost { namespace fusion
+{
+ // A half runtime pair where the first type does not have data
+ template <typename First, typename Second>
+ struct pair
+ {
+ pair()
+ : second() {}
+
+ pair(typename detail::call_param<Second>::type val)
+ : second(val) {}
+
+ template <typename Second2>
+ pair(pair<First, Second2> const& rhs)
+ : second(rhs.second) {}
+
+ template <typename Second2>
+ pair& operator=(pair<First, Second2> const& rhs)
+ {
+ second = rhs.second;
+ return *this;
+ }
+
+ typedef First first_type;
+ typedef Second second_type;
+ Second second;
+ };
+
+ namespace result_of
+ {
+ template<typename First, typename Second>
+ struct make_pair
+ {
+ typedef fusion::pair<First,
+ typename detail::as_fusion_element<Second>::type> type;
+ };
+
+ template<class Pair>
+ struct first
+ {
+ typedef typename Pair::first_type type;
+ };
+
+ template<class Pair>
+ struct second
+ {
+ typedef typename Pair::second_type type;
+ };
+ }
+
+ template <typename First, typename Second>
+ inline typename result_of::make_pair<First,Second>::type
+ make_pair(Second const& val)
+ {
+ return pair<First, typename detail::as_fusion_element<Second>::type>(val);
+ }
+
+ template <typename OStream, typename First, typename Second>
+ inline OStream&
+ operator<<(OStream& os, pair<First, Second> const& p)
+ {
+ os << p.second;
+ return os;
+ }
+
+ template <typename IStream, typename First, typename Second>
+ inline IStream&
+ operator>>(IStream& is, pair<First, Second>& p)
+ {
+ is >> p.second;
+ return is;
+ }
+
+ template <typename First, typename SecondL, typename SecondR>
+ inline bool
+ operator==(pair<First, SecondL> const& l, pair<First, SecondR> const& r)
+ {
+ return l.second == r.second;
+ }
+
+ template <typename First, typename SecondL, typename SecondR>
+ inline bool
+ operator!=(pair<First, SecondL> const& l, pair<First, SecondR> const& r)
+ {
+ return l.second != r.second;
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007 Tobias Schwinger
+
+ Distributed under the 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(FUSION_SEQUENCE_BASE_04182005_0737)
+#define FUSION_SEQUENCE_BASE_04182005_0737
+
+#include <boost/mpl/begin_end_fwd.hpp>
+
+namespace boost { namespace fusion
+{
+ struct sequence_root {};
+
+ template <typename Sequence>
+ struct sequence_base : sequence_root
+ {
+ Sequence const&
+ derived() const
+ {
+ return static_cast<Sequence const&>(*this);
+ }
+
+ Sequence&
+ derived()
+ {
+ return static_cast<Sequence&>(*this);
+ }
+ };
+
+ struct fusion_sequence_tag;
+}}
+
+namespace boost { namespace mpl
+{
+ // Deliberately break mpl::begin, so it doesn't lie that a Fusion sequence
+ // is not an MPL sequence by returning mpl::void_.
+ // In other words: Fusion Sequences are always MPL Sequences, but they can
+ // be incompletely defined.
+ template<> struct begin_impl< boost::fusion::fusion_sequence_tag >;
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_TAG_OF_09232005_0845)
+#define FUSION_TAG_OF_09232005_0845
+
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/fusion/support/tag_of_fwd.hpp>
+#include <boost/fusion/support/detail/is_mpl_sequence.hpp>
+#include <boost/mpl/has_xxx.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/config/no_tr1/utility.hpp>
+
+namespace boost
+{
+ template <typename T, std::size_t N>
+ class array; // forward
+
+ namespace tuples
+ {
+ struct null_type;
+
+ template <
+ class T0, class T1, class T2, class T3, class T4,
+ class T5, class T6, class T7, class T8, class T9
+ >
+ class tuple;
+
+ template <class Head, class Tail>
+ struct cons;
+ }
+}
+
+namespace boost { namespace fusion
+{
+ struct non_fusion_tag;
+ struct mpl_sequence_tag;
+
+ namespace detail
+ {
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(fusion_tag)
+
+ template<typename Sequence>
+ struct is_specialized
+ : mpl::false_
+ {};
+
+ template <
+ class T0, class T1, class T2, class T3, class T4,
+ class T5, class T6, class T7, class T8, class T9
+ >
+ struct is_specialized<tuples::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
+ : mpl::true_
+ {};
+
+ template <class Head, class Tail>
+ struct is_specialized<tuples::cons<Head, Tail> >
+ : mpl::true_
+ {};
+
+ template <>
+ struct is_specialized<tuples::null_type>
+ : mpl::true_
+ {};
+
+ template <typename T, std::size_t N>
+ struct is_specialized<boost::array<T, N> >
+ : mpl::true_
+ {};
+
+ template<typename T1, typename T2>
+ struct is_specialized<std::pair<T1, T2> >
+ : mpl::true_
+ {};
+ }
+
+ namespace traits
+ {
+ template <typename Sequence, typename Active>
+ struct tag_of
+ : mpl::if_< detail::is_mpl_sequence<Sequence>,
+ mpl::identity<mpl_sequence_tag>,
+ mpl::identity<non_fusion_tag> >::type
+ {
+ BOOST_MPL_ASSERT_NOT((detail::is_specialized<Sequence>));
+ };
+
+ template <typename Sequence>
+ struct tag_of<Sequence, typename boost::enable_if<detail::has_fusion_tag<Sequence> >::type>
+ {
+ typedef typename Sequence::fusion_tag type;
+ };
+ }
+
+ namespace detail
+ {
+ template<typename T>
+ struct tag_of
+ : traits::tag_of<typename remove_const<T>::type>
+ {};
+ }
+}}
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_TAG_OF_FWD_31122005_1445)
+#define BOOST_FUSION_TAG_OF_FWD_31122005_1445
+
+namespace boost { namespace fusion
+{
+ namespace traits
+ {
+ template<typename T, typename Active = void>
+ struct tag_of;
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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_FUSION_SUPPORT_UNUSED_20070305_1038)
+#define BOOST_FUSION_SUPPORT_UNUSED_20070305_1038
+
+#include <boost/config.hpp>
+#if defined(BOOST_MSVC)
+# pragma warning(push)
+# pragma warning(disable: 4522) // multiple assignment operators specified warning
+#endif
+
+namespace boost { namespace fusion {
+ struct unused_type
+ {
+ unused_type()
+ {
+ }
+
+ template <typename T>
+ unused_type(T const&)
+ {
+ }
+
+ template <typename T>
+ unused_type const&
+ operator=(T const&) const
+ {
+ return *this;
+ }
+
+ template <typename T>
+ unused_type&
+ operator=(T const&)
+ {
+ return *this;
+ }
+
+ unused_type const&
+ operator=(unused_type const&) const
+ {
+ return *this;
+ }
+
+ unused_type&
+ operator=(unused_type const&)
+ {
+ return *this;
+ }
+ };
+
+ unused_type const unused = unused_type();
+}}
+
+#if defined(BOOST_MSVC)
+# pragma warning(pop)
+#endif
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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_FUSION_SUPPORT_VOID_20070706_2125)
+#define BOOST_FUSION_SUPPORT_VOID_20070706_2125
+
+namespace boost { namespace fusion
+{
+ struct void_ {};
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_TUPLE_10032005_0806)
+#define FUSION_TUPLE_10032005_0806
+
+#include <boost/fusion/tuple/tuple.hpp>
+#include <boost/fusion/tuple/make_tuple.hpp>
+#include <boost/fusion/tuple/tuple_tie.hpp>
+#include <boost/fusion/container/generation/ignore.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_TUPLE_EXPAND_10032005_0815)
+#define FUSION_TUPLE_EXPAND_10032005_0815
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+
+#define BOOST_PP_FILENAME_1 \
+ <boost/fusion/tuple/detail/tuple_expand.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
+#include BOOST_PP_ITERATE()
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define N BOOST_PP_ITERATION()
+
+#if N == 1
+ explicit
+#endif
+ tuple(BOOST_PP_ENUM_BINARY_PARAMS(
+ N, typename detail::call_param<T, >::type _))
+ : base_type(BOOST_PP_ENUM_PARAMS(N, _)) {}
+
+ template <BOOST_PP_ENUM_PARAMS(N, typename U)>
+ tuple(tuple<BOOST_PP_ENUM_PARAMS(N, U)> const& rhs)
+ : base_type(rhs) {}
+
+ template <BOOST_PP_ENUM_PARAMS(N, typename U)>
+ tuple& operator=(tuple<BOOST_PP_ENUM_PARAMS(N, U)> const& rhs)
+ {
+ base_type::operator=(rhs);
+ return *this;
+ }
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_MAKE_TUPLE_10032005_0843)
+#define FUSION_MAKE_TUPLE_10032005_0843
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/fusion/tuple/tuple.hpp>
+#include <boost/fusion/support/detail/as_fusion_element.hpp>
+
+namespace boost { namespace fusion
+{
+ inline tuple<>
+ make_tuple()
+ {
+ return tuple<>();
+ }
+
+#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \
+ typename detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/tuple/make_tuple.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
+#include BOOST_PP_ITERATE()
+
+#undef BOOST_FUSION_AS_FUSION_ELEMENT
+
+}}
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define N BOOST_PP_ITERATION()
+
+ template <BOOST_PP_ENUM_PARAMS(N, typename T)>
+ inline tuple<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>
+ make_tuple(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _))
+ {
+ return tuple<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>(
+ BOOST_PP_ENUM_PARAMS(N, _));
+ }
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+
+ Distributed under the 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(FUSION_TUPLE_10032005_0810)
+#define FUSION_TUPLE_10032005_0810
+
+#include <boost/fusion/tuple/tuple_fwd.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/comparison.hpp>
+#include <boost/fusion/sequence/io.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/config/no_tr1/utility.hpp>
+
+namespace boost { namespace fusion
+{
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
+ struct tuple : vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>
+ {
+ typedef vector<
+ BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>
+ base_type;
+
+ tuple()
+ : base_type() {}
+
+ tuple(tuple const& rhs)
+ : base_type(rhs) {}
+
+ template <typename U1, typename U2>
+ tuple(std::pair<U1, U2> const& rhs)
+ : base_type(rhs) {}
+
+ #include <boost/fusion/tuple/detail/tuple_expand.hpp>
+
+ template <typename T>
+ tuple& operator=(T const& rhs)
+ {
+ base_type::operator=(rhs);
+ return *this;
+ }
+
+ tuple& operator=(tuple const& rhs)
+ {
+ base_type::operator=(rhs);
+ return *this;
+ }
+
+ template <typename U1, typename U2>
+ tuple& operator=(std::pair<U1, U2> const& rhs)
+ {
+ base_type::operator=(rhs);
+ return *this;
+ }
+ };
+
+ template <typename Tuple>
+ struct tuple_size : result_of::size<Tuple> {};
+
+ template <int N, typename Tuple>
+ struct tuple_element : result_of::value_at_c<Tuple, N> {};
+
+ template <int N, typename Tuple>
+ inline typename
+ lazy_disable_if<
+ is_const<Tuple>
+ , result_of::at_c<Tuple, N>
+ >::type
+ get(Tuple& tup)
+ {
+ return at_c<N>(tup);
+ }
+
+ template <int N, typename Tuple>
+ inline typename result_of::at_c<Tuple const, N>::type
+ get(Tuple const& tup)
+ {
+ return at_c<N>(tup);
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+
+ Distributed under the 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(FUSION_TUPLE_FORWARD_10032005_0956)
+#define FUSION_TUPLE_FORWARD_10032005_0956
+
+#include <boost/fusion/container/vector/limits.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+
+ template <
+ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ FUSION_MAX_VECTOR_SIZE, typename T, void_)
+ >
+ struct tuple;
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef BOOST_PP_IS_ITERATING
+#if !defined(FUSION_TUPLE_TIE_10032005_0846)
+#define FUSION_TUPLE_TIE_10032005_0846
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/fusion/tuple/tuple.hpp>
+
+namespace boost { namespace fusion
+{
+#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)&
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/tuple/tuple_tie.hpp>
+#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
+#include BOOST_PP_ITERATE()
+
+#undef BOOST_FUSION_REF
+
+}}
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#define N BOOST_PP_ITERATION()
+
+ template <BOOST_PP_ENUM_PARAMS(N, typename T)>
+ inline tuple<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>
+ tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _))
+ {
+ return tuple<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>(
+ BOOST_PP_ENUM_PARAMS(N, _));
+ }
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SEQUENCE_VIEW_10022005_0620)
+#define FUSION_SEQUENCE_VIEW_10022005_0620
+
+#include <boost/fusion/view/filter_view.hpp>
+#include <boost/fusion/view/iterator_range.hpp>
+#include <boost/fusion/view/joint_view.hpp>
+#include <boost/fusion/view/transform_view.hpp>
+#include <boost/fusion/view/reverse_view.hpp>
+#include <boost/fusion/view/zip_view.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_STRICTEST_TRAVERSAL_20060123_2101)
+#define FUSION_STRICTEST_TRAVERSAL_20060123_2101
+
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/mpl.hpp>
+#include <boost/fusion/algorithm/iteration/fold.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+
+namespace boost { namespace fusion
+{
+ struct forward_traversal_tag;
+ struct bidirectional_traversal_tag;
+ struct random_access_traversal_tag;
+
+ namespace detail
+ {
+ template<typename Tag1, typename Tag2,
+ bool Tag1Stricter = boost::is_convertible<Tag2,Tag1>::value>
+ struct stricter_traversal
+ {
+ typedef Tag1 type;
+ };
+
+ template<typename Tag1, typename Tag2>
+ struct stricter_traversal<Tag1,Tag2,false>
+ {
+ typedef Tag2 type;
+ };
+
+ struct strictest_traversal_impl
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename Next, typename StrictestSoFar>
+ struct result<strictest_traversal_impl(Next, StrictestSoFar)>
+ {
+ typedef typename remove_reference<Next>::type next_value;
+ typedef typename remove_reference<StrictestSoFar>::type strictest_so_far;
+
+ typedef strictest_so_far tag1;
+ typedef typename traits::category_of<next_value>::type tag2;
+
+ typedef typename stricter_traversal<tag1,tag2>::type type;
+ };
+ };
+
+ template<typename Sequence>
+ struct strictest_traversal
+ : result_of::fold<
+ Sequence, fusion::random_access_traversal_tag,
+ strictest_traversal_impl>
+ {};
+
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Eric Niebler
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef FUSION_MULTIPLE_VIEW_05052005_0335
+#define FUSION_MULTIPLE_VIEW_05052005_0335
+
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/support/detail/as_fusion_element.hpp>
+
+namespace boost { namespace fusion
+{
+ struct multiple_view_tag;
+ struct forward_traversal_tag;
+ struct fusion_sequence_tag;
+
+ template<typename Size, typename T>
+ struct multiple_view
+ : sequence_base<multiple_view<Size, T> >
+ {
+ typedef multiple_view_tag fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef forward_traversal_tag category;
+ typedef mpl::true_ is_view;
+ typedef mpl::int_<Size::value> size;
+ typedef T value_type;
+
+ multiple_view()
+ : val()
+ {}
+
+ explicit multiple_view(typename detail::call_param<T>::type val)
+ : val(val)
+ {}
+
+ value_type val;
+ };
+
+ template<typename Size, typename T>
+ inline multiple_view<Size, typename detail::as_fusion_element<T>::type>
+ make_multiple_view(T const& v)
+ {
+ return multiple_view<Size, typename detail::as_fusion_element<T>::type>(v);
+ }
+
+ struct multiple_view_iterator_tag;
+ struct forward_traversal_tag;
+
+ template<typename Index, typename MultipleView>
+ struct multiple_view_iterator
+ : iterator_base<multiple_view_iterator<Index, MultipleView> >
+ {
+ typedef multiple_view_iterator_tag fusion_tag;
+ typedef forward_traversal_tag category;
+ typedef typename MultipleView::value_type value_type;
+ typedef MultipleView multiple_view_type;
+ typedef Index index;
+
+ explicit multiple_view_iterator(multiple_view_type const &view_)
+ : view(view_)
+ {}
+
+ multiple_view_type view;
+ };
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct next_impl;
+
+ template <>
+ struct next_impl<multiple_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef multiple_view_iterator<
+ typename mpl::next<typename Iterator::index>::type
+ , typename Iterator::multiple_view_type
+ > type;
+
+ static type
+ call(Iterator const &where)
+ {
+ return type(where.view);
+ }
+ };
+ };
+
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<multiple_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef multiple_view_iterator<
+ typename Sequence::size
+ , Sequence
+ > type;
+
+ static type
+ call(Sequence &seq)
+ {
+ return type(seq);
+ }
+ };
+ };
+
+ template <typename Tag>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<multiple_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::value_type type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return i.view.val;
+ }
+ };
+ };
+
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<multiple_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef multiple_view_iterator<
+ mpl::int_<0>
+ , Sequence
+ > type;
+
+ static type
+ call(Sequence &seq)
+ {
+ return type(seq);
+ }
+ };
+ };
+
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<multiple_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::multiple_view_type multiple_view_type;
+ typedef typename multiple_view_type::value_type type;
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006 Eric Niebler
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef FUSION_SEGMENTED_ITERATOR_EAN_05032006_1027
+#define FUSION_SEGMENTED_ITERATOR_EAN_05032006_1027
+
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/placeholders.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/fusion/view/filter_view.hpp>
+#include <boost/fusion/container/list/cons.hpp> // for nil
+#include <boost/fusion/container/generation/make_cons.hpp>
+#include <boost/fusion/iterator/distance.hpp>
+#include <boost/fusion/sequence/intrinsic/ext_/segments.hpp>
+#include <boost/fusion/support/ext_/is_segmented.hpp>
+
+namespace boost { namespace fusion
+{
+ struct fusion_sequence_tag;
+
+ namespace detail
+ {
+ using mpl::_;
+ using mpl::not_;
+
+ ////////////////////////////////////////////////////////////////////////////
+ template<typename Sequence>
+ struct is_empty
+ : result_of::equal_to<
+ typename result_of::begin<Sequence>::type
+ , typename result_of::end<Sequence>::type
+ >
+ {};
+
+ template<typename Sequence>
+ struct is_empty<Sequence &>
+ : is_empty<Sequence>
+ {};
+
+ ////////////////////////////////////////////////////////////////////////////
+ struct not_is_empty_pred
+ {
+ template<typename Sequence>
+ struct apply
+ : not_<is_empty<Sequence> >
+ {};
+ };
+
+ struct segmented_range_tag;
+
+ ////////////////////////////////////////////////////////////////////////////
+ template<typename Sequence, typename Iterator, bool IsSegmented>
+ struct segmented_range
+ : sequence_base<segmented_range<Sequence, Iterator, IsSegmented> >
+ {
+ BOOST_MPL_ASSERT_NOT((is_reference<Sequence>));
+ typedef mpl::bool_<IsSegmented> is_segmented;
+ typedef segmented_range_tag fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef mpl::true_ is_view;
+ typedef Iterator iterator_type;
+
+ // If this is a range of segments, skip over the empty ones
+ typedef typename mpl::if_<
+ is_segmented
+ , filter_view<Sequence, not_is_empty_pred>
+ , Sequence
+ >::type sequence_non_ref_type;
+
+ typedef typename mpl::if_<
+ traits::is_view<sequence_non_ref_type>
+ , sequence_non_ref_type
+ , sequence_non_ref_type &
+ >::type sequence_type;
+
+ typedef typename traits::category_of<sequence_non_ref_type>::type category;
+
+ explicit segmented_range(Sequence &sequence_)
+ : sequence(sequence_type(sequence_))
+ , where_(fusion::begin(sequence))
+ {}
+
+ segmented_range(sequence_type sequence_, iterator_type const &wh)
+ : sequence(sequence_)
+ , where_(wh)
+ {}
+
+ sequence_type sequence;
+ iterator_type where_;
+ };
+ }
+
+ namespace extension
+ {
+ template<>
+ struct is_segmented_impl<detail::segmented_range_tag>
+ {
+ template<typename Sequence>
+ struct apply
+ : Sequence::is_segmented
+ {};
+ };
+
+ template<>
+ struct size_impl<detail::segmented_range_tag>
+ {
+ template<typename Sequence>
+ struct apply
+ : mpl::int_<
+ result_of::distance<
+ typename Sequence::iterator_type
+ , typename result_of::end<typename Sequence::sequence_non_ref_type>::type
+ >::value
+ >
+ {};
+ };
+
+ template<>
+ struct segments_impl<detail::segmented_range_tag>
+ {
+ template<typename Sequence>
+ struct apply
+ {
+ typedef Sequence &type;
+ static type call(Sequence &seq)
+ {
+ return seq;
+ }
+ };
+ };
+
+ template<>
+ struct begin_impl<detail::segmented_range_tag>
+ {
+ template<typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::iterator_type type;
+ static type call(Sequence &seq)
+ {
+ return seq.where_;
+ }
+ };
+ };
+
+ template<>
+ struct end_impl<detail::segmented_range_tag>
+ {
+ template<typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::sequence_non_ref_type sequence;
+ typedef typename result_of::end<sequence>::type type;
+
+ static type call(Sequence &seq)
+ {
+ return fusion::end(seq.sequence);
+ }
+ };
+ };
+ }
+
+ namespace detail
+ {
+ ///////////////////////////////////////////////////////////////////////
+ template<typename Range>
+ struct range_next;
+
+ template<typename Sequence, typename Iterator, bool IsSegmented>
+ struct range_next<segmented_range<Sequence, Iterator, IsSegmented> >
+ {
+ typedef typename result_of::next<Iterator>::type iterator_type;
+ typedef segmented_range<Sequence, iterator_type, IsSegmented> type;
+
+ static type call(segmented_range<Sequence, Iterator, IsSegmented> const &rng)
+ {
+ return type(rng.sequence, fusion::next(rng.where_));
+ }
+ };
+
+ ///////////////////////////////////////////////////////////////////////
+ template<typename Cons>
+ struct is_range_next_empty
+ : is_empty<typename range_next<typename Cons::car_type>::type>
+ {};
+
+ template<>
+ struct is_range_next_empty<nil>
+ : mpl::true_
+ {};
+
+ ///////////////////////////////////////////////////////////////////////
+ template<typename Sequence, bool IsSegmented = traits::is_segmented<Sequence>::value>
+ struct as_segmented_range
+ {
+ typedef typename result_of::segments<Sequence>::type segments;
+ typedef typename remove_reference<segments>::type sequence;
+ typedef typename result_of::begin<filter_view<sequence, not_is_empty_pred> >::type begin;
+ typedef segmented_range<sequence, begin, true> type;
+
+ static type call(Sequence &seq)
+ {
+ segments segs(fusion::segments(seq));
+ return type(segs);
+ }
+ };
+
+ template<typename Sequence>
+ struct as_segmented_range<Sequence, false>
+ {
+ typedef typename remove_reference<Sequence>::type sequence;
+ typedef typename result_of::begin<sequence>::type begin;
+ typedef segmented_range<sequence, begin, false> type;
+
+ static type call(Sequence &seq)
+ {
+ return type(seq);
+ }
+ };
+
+ template<typename Sequence, typename Iterator, bool IsSegmented>
+ struct as_segmented_range<segmented_range<Sequence, Iterator, IsSegmented>, IsSegmented>
+ {
+ typedef segmented_range<Sequence, Iterator, IsSegmented> type;
+ static type &call(type &seq)
+ {
+ return seq;
+ }
+ };
+
+ ///////////////////////////////////////////////////////////////////////
+ template<
+ typename Sequence
+ , typename State = nil
+ , bool IsSegmented = traits::is_segmented<Sequence>::value
+ >
+ struct push_segments
+ {
+ typedef typename as_segmented_range<Sequence>::type range;
+ typedef typename result_of::begin<range>::type begin;
+ typedef typename result_of::deref<begin>::type next_ref;
+ typedef typename remove_reference<next_ref>::type next;
+ typedef push_segments<next, cons<range, State> > push;
+ typedef typename push::type type;
+
+ static type call(Sequence &seq, State const &state)
+ {
+ range rng(as_segmented_range<Sequence>::call(seq));
+ next_ref nxt(*fusion::begin(rng));
+ return push::call(nxt, fusion::make_cons(rng, state));
+ }
+ };
+
+ template<typename Sequence, typename State>
+ struct push_segments<Sequence, State, false>
+ {
+ typedef typename as_segmented_range<Sequence>::type range;
+ typedef cons<range, State> type;
+
+ static type call(Sequence &seq, State const &state)
+ {
+ range rng(as_segmented_range<Sequence>::call(seq));
+ return fusion::make_cons(rng, state);
+ }
+ };
+
+ ///////////////////////////////////////////////////////////////////////
+ template<typename State, bool IsEmpty = is_range_next_empty<State>::value>
+ struct pop_segments
+ {
+ typedef range_next<typename State::car_type> next;
+ typedef push_segments<typename next::type, typename State::cdr_type> push;
+ typedef typename push::type type;
+
+ static type call(State const &state)
+ {
+ typename next::type rng(next::call(state.car));
+ return push::call(rng, state.cdr);
+ }
+ };
+
+ template<typename State>
+ struct pop_segments<State, true>
+ {
+ typedef pop_segments<typename State::cdr_type> pop;
+ typedef typename pop::type type;
+
+ static type call(State const &state)
+ {
+ return pop::call(state.cdr);
+ }
+ };
+
+ template<>
+ struct pop_segments<nil, true>
+ {
+ typedef nil type;
+
+ static type call(nil const &)
+ {
+ return nil();
+ }
+ };
+ } // namespace detail
+
+ struct segmented_iterator_tag;
+
+ ////////////////////////////////////////////////////////////////////////////
+ template<typename Cons>
+ struct segmented_iterator
+ : fusion::iterator_base<segmented_iterator<Cons> >
+ {
+ typedef segmented_iterator_tag fusion_tag;
+ typedef fusion::forward_traversal_tag category;
+
+ typedef Cons cons_type;
+ typedef typename Cons::car_type car_type;
+ typedef typename Cons::cdr_type cdr_type;
+
+ explicit segmented_iterator(Cons const &cons)
+ : cons_(cons)
+ {}
+
+ cons_type const &cons() const { return this->cons_; };
+ car_type const &car() const { return this->cons_.car; };
+ cdr_type const &cdr() const { return this->cons_.cdr; };
+
+ private:
+ Cons cons_;
+ };
+
+ ///////////////////////////////////////////////////////////////////////////
+ template<typename Sequence>
+ struct segmented_begin
+ {
+ typedef typename detail::push_segments<Sequence> push;
+ typedef segmented_iterator<typename push::type> type;
+
+ static type call(Sequence &seq)
+ {
+ return type(push::call(seq, nil()));
+ }
+ };
+
+ ///////////////////////////////////////////////////////////////////////////
+ template<typename Sequence>
+ struct segmented_end
+ {
+ typedef segmented_iterator<nil> type;
+
+ static type call(Sequence &)
+ {
+ return type(nil());
+ }
+ };
+
+ namespace extension
+ {
+ template<>
+ struct value_of_impl<segmented_iterator_tag>
+ {
+ template<typename Iterator>
+ struct apply
+ {
+ typedef typename result_of::begin<typename Iterator::car_type>::type begin;
+ typedef typename result_of::value_of<begin>::type type;
+ };
+ };
+
+ template<>
+ struct deref_impl<segmented_iterator_tag>
+ {
+ template<typename Iterator>
+ struct apply
+ {
+ typedef typename result_of::begin<typename Iterator::car_type>::type begin;
+ typedef typename result_of::deref<begin>::type type;
+
+ static type call(Iterator const &it)
+ {
+ return *fusion::begin(it.car());
+ }
+ };
+ };
+
+ // discards the old head, expands the right child of the new head
+ // and pushes the result to the head of the list.
+
+ template<>
+ struct next_impl<segmented_iterator_tag>
+ {
+ template<
+ typename Iterator
+ , bool IsSegmentDone = detail::is_range_next_empty<Iterator>::value
+ >
+ struct apply
+ {
+ typedef typename Iterator::cdr_type cdr_type;
+ typedef detail::range_next<typename Iterator::car_type> next;
+ typedef segmented_iterator<cons<typename next::type, cdr_type> > type;
+
+ static type call(Iterator const &it)
+ {
+ return type(fusion::make_cons(next::call(it.car()), it.cdr()));
+ }
+ };
+
+ template<typename Iterator>
+ struct apply<Iterator, true> // segment done, move to next segment
+ {
+ typedef typename Iterator::cdr_type cdr_type;
+ typedef typename detail::pop_segments<cdr_type> pop;
+ typedef segmented_iterator<typename pop::type> type;
+
+ static type call(Iterator const &it)
+ {
+ return type(pop::call(it.cdr()));
+ }
+ };
+ };
+ }
+}} // namespace boost::fusion
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2006 Eric Niebler
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef FUSION_SEGMENTED_ITERATOR_RANGE_EAN_05032006_1027
+#define FUSION_SEGMENTED_ITERATOR_RANGE_EAN_05032006_1027
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/minus.hpp>
+#include <boost/mpl/next_prior.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/fusion/iterator/mpl/convert_iterator.hpp>
+#include <boost/fusion/container/list/cons.hpp>
+#include <boost/fusion/view/joint_view.hpp>
+#include <boost/fusion/view/single_view.hpp>
+#include <boost/fusion/view/transform_view.hpp>
+#include <boost/fusion/view/iterator_range.hpp>
+#include <boost/fusion/view/ext_/multiple_view.hpp>
+#include <boost/fusion/view/ext_/segmented_iterator.hpp>
+#include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ ////////////////////////////////////////////////////////////////////////////
+ template<typename Cons, typename State = nil>
+ struct reverse_cons;
+
+ template<typename Car, typename Cdr, typename State>
+ struct reverse_cons<cons<Car, Cdr>, State>
+ {
+ typedef reverse_cons<Cdr, cons<Car, State> > reverse;
+ typedef typename reverse::type type;
+
+ static type call(cons<Car, Cdr> const &cons, State const &state = State())
+ {
+ return reverse::call(cons.cdr, fusion::make_cons(cons.car, state));
+ }
+ };
+
+ template<typename State>
+ struct reverse_cons<nil, State>
+ {
+ typedef State type;
+
+ static State const &call(nil const &, State const &state = State())
+ {
+ return state;
+ }
+ };
+
+ ////////////////////////////////////////////////////////////////////////////
+ // tags
+ struct full_view {};
+ struct left_view {};
+ struct right_view {};
+ struct center_view {};
+
+ template<typename Tag>
+ struct segmented_view_tag;
+
+ ////////////////////////////////////////////////////////////////////////////
+ // a segmented view of that includes all elements either to the
+ // right or the left of a segmented iterator.
+ template<typename Tag, typename Cons1, typename Cons2 = void_>
+ struct segmented_view
+ : sequence_base<segmented_view<Tag, Cons1, Cons2> >
+ {
+ typedef segmented_view_tag<Tag> fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef mpl::true_ is_view;
+ typedef forward_traversal_tag category;
+
+ explicit segmented_view(Cons1 const &cons)
+ : cons(cons)
+ {}
+
+ typedef Cons1 cons_type;
+ cons_type const &cons;
+ };
+
+ // a segmented view that contains all the elements in between
+ // two segmented iterators
+ template<typename Cons1, typename Cons2>
+ struct segmented_view<center_view, Cons1, Cons2>
+ : sequence_base<segmented_view<center_view, Cons1, Cons2> >
+ {
+ typedef segmented_view_tag<center_view> fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef mpl::true_ is_view;
+ typedef forward_traversal_tag category;
+
+ segmented_view(Cons1 const &lcons, Cons2 const &rcons)
+ : left_cons(lcons)
+ , right_cons(rcons)
+ {}
+
+ typedef Cons1 left_cons_type;
+ typedef Cons2 right_cons_type;
+
+ left_cons_type const &left_cons;
+ right_cons_type const &right_cons;
+ };
+
+ ////////////////////////////////////////////////////////////////////////////
+ // Used to transform a sequence of segments. The first segment is
+ // bounded by RightCons, and the last segment is bounded by LeftCons
+ // and all the others are passed through unchanged.
+ template<typename RightCons, typename LeftCons = RightCons>
+ struct segments_transform
+ {
+ explicit segments_transform(RightCons const &cons_)
+ : right_cons(cons_)
+ , left_cons(cons_)
+ {}
+
+ segments_transform(RightCons const &right_cons_, LeftCons const &left_cons_)
+ : right_cons(right_cons_)
+ , left_cons(left_cons_)
+ {}
+
+ template<typename First, typename Second>
+ struct result_;
+
+ template<typename Second>
+ struct result_<right_view, Second>
+ {
+ typedef segmented_view<right_view, RightCons> type;
+ };
+
+ template<typename Second>
+ struct result_<left_view, Second>
+ {
+ typedef segmented_view<left_view, LeftCons> type;
+ };
+
+ template<typename Second>
+ struct result_<full_view, Second>
+ {
+ typedef Second type;
+ };
+
+ template<typename Sig>
+ struct result;
+
+ template<typename This, typename First, typename Second>
+ struct result<This(First, Second)>
+ : result_<
+ typename remove_cv<typename remove_reference<First>::type>::type
+ , typename remove_cv<typename remove_reference<Second>::type>::type
+ >
+ {};
+
+ template<typename Second>
+ segmented_view<right_view, RightCons> operator ()(right_view, Second &second) const
+ {
+ return segmented_view<right_view, RightCons>(this->right_cons);
+ }
+
+ template<typename Second>
+ segmented_view<left_view, LeftCons> operator ()(left_view, Second &second) const
+ {
+ return segmented_view<left_view, LeftCons>(this->left_cons);
+ }
+
+ template<typename Second>
+ Second &operator ()(full_view, Second &second) const
+ {
+ return second;
+ }
+
+ private:
+ RightCons const &right_cons;
+ LeftCons const &left_cons;
+ };
+
+ } // namespace detail
+
+ namespace extension
+ {
+ ////////////////////////////////////////////////////////////////////////////
+ template<typename Tag>
+ struct is_segmented_impl<detail::segmented_view_tag<Tag> >
+ {
+ template<typename Sequence>
+ struct apply
+ : mpl::true_
+ {};
+ };
+
+ ////////////////////////////////////////////////////////////////////////////
+ template<>
+ struct segments_impl<detail::segmented_view_tag<detail::right_view> >
+ {
+ template<
+ typename Sequence
+ , typename Cdr = typename Sequence::cons_type::cdr_type
+ >
+ struct apply
+ {
+ typedef typename Sequence::cons_type::car_type segmented_range;
+ typedef typename result_of::size<segmented_range>::type size;
+ typedef typename mpl::prior<size>::type size_minus_1;
+ typedef detail::segments_transform<Cdr> tfx;
+ typedef joint_view<
+ single_view<detail::right_view> const
+ , multiple_view<size_minus_1, detail::full_view> const
+ > mask;
+ typedef transform_view<mask const, segmented_range const, tfx> type;
+
+ static type call(Sequence &seq)
+ {
+ return type(
+ mask(
+ make_single_view(detail::right_view())
+ , make_multiple_view<size_minus_1>(detail::full_view())
+ )
+ , seq.cons.car
+ , tfx(seq.cons.cdr)
+ );
+ }
+ };
+
+ template<typename Sequence>
+ struct apply<Sequence, nil>
+ {
+ typedef typename Sequence::cons_type::car_type segmented_range;
+ typedef typename segmented_range::iterator_type begin;
+ typedef typename segmented_range::sequence_non_ref_type sequence_type;
+ typedef typename result_of::end<sequence_type>::type end;
+ typedef iterator_range<begin, end> range;
+ typedef single_view<range> type;
+
+ static type call(Sequence &seq)
+ {
+ return type(range(seq.cons.car.where_, fusion::end(seq.cons.car.sequence)));
+ }
+ };
+ };
+
+ ////////////////////////////////////////////////////////////////////////////
+ template<>
+ struct segments_impl<detail::segmented_view_tag<detail::left_view> >
+ {
+ template<
+ typename Sequence
+ , typename Cdr = typename Sequence::cons_type::cdr_type
+ >
+ struct apply
+ {
+ typedef typename Sequence::cons_type::car_type right_segmented_range;
+ typedef typename right_segmented_range::sequence_type sequence_type;
+ typedef typename right_segmented_range::iterator_type iterator_type;
+
+ typedef iterator_range<
+ typename result_of::begin<sequence_type>::type
+ , typename result_of::next<iterator_type>::type
+ > segmented_range;
+
+ typedef detail::segments_transform<Cdr> tfx;
+ typedef typename result_of::size<segmented_range>::type size;
+ typedef typename mpl::prior<size>::type size_minus_1;
+ typedef joint_view<
+ multiple_view<size_minus_1, detail::full_view> const
+ , single_view<detail::left_view> const
+ > mask;
+ typedef transform_view<mask const, segmented_range const, tfx> type;
+
+ static type call(Sequence &seq)
+ {
+ return type(
+ mask(
+ make_multiple_view<size_minus_1>(detail::full_view())
+ , make_single_view(detail::left_view())
+ )
+ , segmented_range(fusion::begin(seq.cons.car.sequence), fusion::next(seq.cons.car.where_))
+ , tfx(seq.cons.cdr)
+ );
+ }
+ };
+
+ template<typename Sequence>
+ struct apply<Sequence, nil>
+ {
+ typedef typename Sequence::cons_type::car_type segmented_range;
+ typedef typename segmented_range::sequence_non_ref_type sequence_type;
+ typedef typename result_of::begin<sequence_type>::type begin;
+ typedef typename segmented_range::iterator_type end;
+ typedef iterator_range<begin, end> range;
+ typedef single_view<range> type;
+
+ static type call(Sequence &seq)
+ {
+ return type(range(fusion::begin(seq.cons.car.sequence), seq.cons.car.where_));
+ }
+ };
+ };
+
+ ////////////////////////////////////////////////////////////////////////////
+ template<>
+ struct segments_impl<detail::segmented_view_tag<detail::center_view> >
+ {
+ template<typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::right_cons_type right_cons_type;
+ typedef typename Sequence::left_cons_type left_cons_type;
+ typedef typename right_cons_type::car_type right_segmented_range;
+ typedef typename left_cons_type::car_type left_segmented_range;
+
+ typedef iterator_range<
+ typename result_of::begin<left_segmented_range>::type
+ , typename result_of::next<typename result_of::begin<right_segmented_range>::type>::type
+ > segmented_range;
+
+ typedef typename mpl::minus<
+ typename result_of::size<segmented_range>::type
+ , mpl::int_<2>
+ >::type size_minus_2;
+
+ BOOST_MPL_ASSERT_RELATION(0, <=, size_minus_2::value);
+
+ typedef detail::segments_transform<
+ typename left_cons_type::cdr_type
+ , typename right_cons_type::cdr_type
+ > tfx;
+
+ typedef joint_view<
+ multiple_view<size_minus_2, detail::full_view> const
+ , single_view<detail::left_view> const
+ > left_mask;
+
+ typedef joint_view<
+ single_view<detail::right_view> const
+ , left_mask const
+ > mask;
+
+ typedef transform_view<mask const, segmented_range const, tfx> type;
+
+ static type call(Sequence &seq)
+ {
+ left_mask lmask(
+ make_multiple_view<size_minus_2>(detail::full_view())
+ , make_single_view(detail::left_view())
+ );
+ return type(
+ mask(make_single_view(detail::right_view()), lmask)
+ , segmented_range(fusion::begin(seq.left_cons.car), fusion::next(fusion::begin(seq.right_cons.car)))
+ , tfx(seq.left_cons.cdr, seq.right_cons.cdr)
+ );
+ }
+ };
+ };
+ }
+
+ // specialize iterator_range for use with segmented iterators, so that
+ // it presents a segmented view of the range.
+ template<typename First, typename Last>
+ struct iterator_range;
+
+ template<typename First, typename Last>
+ struct iterator_range<segmented_iterator<First>, segmented_iterator<Last> >
+ : sequence_base<iterator_range<segmented_iterator<First>, segmented_iterator<Last> > >
+ {
+ typedef typename convert_iterator<segmented_iterator<First> >::type begin_type;
+ typedef typename convert_iterator<segmented_iterator<Last> >::type end_type;
+ typedef typename detail::reverse_cons<First>::type begin_cons_type;
+ typedef typename detail::reverse_cons<Last>::type end_cons_type;
+ typedef iterator_range_tag fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef typename traits::category_of<begin_type>::type category;
+ typedef typename result_of::distance<begin_type, end_type>::type size;
+ typedef mpl::true_ is_view;
+
+ iterator_range(segmented_iterator<First> const& first_, segmented_iterator<Last> const& last_)
+ : first(convert_iterator<segmented_iterator<First> >::call(first_))
+ , last(convert_iterator<segmented_iterator<Last> >::call(last_))
+ , first_cons(detail::reverse_cons<First>::call(first_.cons()))
+ , last_cons(detail::reverse_cons<Last>::call(last_.cons()))
+ {}
+
+ begin_type first;
+ end_type last;
+
+ begin_cons_type first_cons;
+ end_cons_type last_cons;
+ };
+
+ namespace detail
+ {
+
+ template<typename Cons1, typename Cons2>
+ struct same_segment
+ : mpl::false_
+ {};
+
+ template<typename Car1, typename Cdr1, typename Car2, typename Cdr2>
+ struct same_segment<cons<Car1, Cdr1>, cons<Car2, Cdr2> >
+ : mpl::and_<
+ traits::is_segmented<Car1>
+ , is_same<Car1, Car2>
+ >
+ {};
+
+ ////////////////////////////////////////////////////////////////////////////
+ template<typename Cons1, typename Cons2>
+ struct segments_gen;
+
+ ////////////////////////////////////////////////////////////////////////////
+ template<typename Cons1, typename Cons2, bool SameSegment>
+ struct segments_gen2
+ {
+ typedef segments_gen<typename Cons1::cdr_type, typename Cons2::cdr_type> gen;
+ typedef typename gen::type type;
+
+ static type call(Cons1 const &cons1, Cons2 const &cons2)
+ {
+ return gen::call(cons1.cdr, cons2.cdr);
+ }
+ };
+
+ template<typename Cons1, typename Cons2>
+ struct segments_gen2<Cons1, Cons2, false>
+ {
+ typedef segmented_view<center_view, Cons1, Cons2> view;
+ typedef typename result_of::segments<view>::type type;
+
+ static type call(Cons1 const &cons1, Cons2 const &cons2)
+ {
+ view v(cons1, cons2);
+ return fusion::segments(v);
+ }
+ };
+
+ template<typename Car1, typename Car2>
+ struct segments_gen2<cons<Car1>, cons<Car2>, false>
+ {
+ typedef iterator_range<
+ typename Car1::iterator_type
+ , typename Car2::iterator_type
+ > range;
+
+ typedef single_view<range> type;
+
+ static type call(cons<Car1> const &cons1, cons<Car2> const &cons2)
+ {
+ return type(range(cons1.car.where_, cons2.car.where_));
+ }
+ };
+
+ ////////////////////////////////////////////////////////////////////////////
+ template<typename Cons1, typename Cons2>
+ struct segments_gen
+ : segments_gen2<Cons1, Cons2, same_segment<Cons1, Cons2>::value>
+ {};
+
+ template<typename Car, typename Cdr>
+ struct segments_gen<cons<Car, Cdr>, nil>
+ {
+ typedef segmented_view<right_view, cons<Car, Cdr> > view;
+ typedef typename result_of::segments<view>::type type;
+
+ static type call(cons<Car, Cdr> const &cons, nil const &)
+ {
+ view v(cons);
+ return fusion::segments(v);
+ }
+ };
+
+ template<>
+ struct segments_gen<nil, nil>
+ {
+ typedef nil type;
+
+ static type call(nil const &, nil const &)
+ {
+ return nil();
+ }
+ };
+ } // namespace detail
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_segmented_impl;
+
+ // An iterator_range of segmented_iterators is segmented
+ template<>
+ struct is_segmented_impl<iterator_range_tag>
+ {
+ template<typename Iterator>
+ struct is_segmented_iterator : mpl::false_ {};
+
+ template<typename Cons>
+ struct is_segmented_iterator<segmented_iterator<Cons> > : mpl::true_ {};
+
+ template<typename Sequence>
+ struct apply
+ : mpl::and_<
+ is_segmented_iterator<typename Sequence::begin_type>
+ , is_segmented_iterator<typename Sequence::end_type>
+ >
+ {};
+ };
+
+ template<typename Sequence>
+ struct segments_impl;
+
+ template<>
+ struct segments_impl<iterator_range_tag>
+ {
+ template<typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::begin_cons_type begin_cons;
+ typedef typename Sequence::end_cons_type end_cons;
+
+ typedef detail::segments_gen<begin_cons, end_cons> gen;
+ typedef typename gen::type type;
+
+ static type call(Sequence &sequence)
+ {
+ return gen::call(sequence.first_cons, sequence.last_cons);
+ }
+ };
+ };
+ }
+
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SEQUENCE_VIEW_FILTER_VIEW_10022005_0608)
+#define FUSION_SEQUENCE_VIEW_FILTER_VIEW_10022005_0608
+
+#include <boost/fusion/view/filter_view/filter_view.hpp>
+#include <boost/fusion/view/filter_view/filter_view_iterator.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_BEGIN_IMPL_05062005_0903)
+#define FUSION_BEGIN_IMPL_05062005_0903
+
+namespace boost { namespace fusion
+{
+ struct filter_view_tag;
+
+ template <typename First, typename Last, typename Pred>
+ struct filter_iterator;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<filter_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::first_type first_type;
+ typedef typename Sequence::last_type last_type;
+ typedef typename Sequence::pred_type pred_type;
+ typedef filter_iterator<first_type, last_type, pred_type> type;
+
+ static type
+ call(Sequence& s)
+ {
+ return type(s.first());
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_DEREF_IMPL_05062005_0905)
+#define FUSION_DEREF_IMPL_05062005_0905
+
+#include <boost/fusion/iterator/detail/adapt_deref_traits.hpp>
+
+namespace boost { namespace fusion
+{
+ struct filter_view_iterator_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<filter_view_iterator_tag>
+ : detail::adapt_deref_traits {};
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_END_IMPL_05062005_0906)
+#define FUSION_END_IMPL_05062005_0906
+
+namespace boost { namespace fusion
+{
+ struct filter_view_tag;
+
+ template <typename First, typename Last, typename Pred>
+ struct filter_iterator;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<filter_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::last_type last_type;
+ typedef typename Sequence::pred_type pred_type;
+ typedef filter_iterator<last_type, last_type, pred_type> type;
+
+ static type
+ call(Sequence& s)
+ {
+ return type(s.last());
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_EQUAL_TO_IMPL_02012005_2133)
+#define BOOST_FUSION_EQUAL_TO_IMPL_02012005_2133
+
+namespace boost { namespace fusion
+{
+ struct filter_view_iterator_tag;
+
+ namespace extension
+ {
+ template<typename I1, typename I2>
+ struct equal_to;
+
+ template<typename Tag>
+ struct equal_to_impl;
+
+ template<>
+ struct equal_to_impl<filter_view_iterator_tag>
+ {
+ template<typename I1, typename I2>
+ struct apply
+ : result_of::equal_to<typename I1::first_type, typename I2::first_type>
+ {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_NEXT_IMPL_06052005_0900)
+#define FUSION_NEXT_IMPL_06052005_0900
+
+#include <boost/fusion/algorithm/query/detail/find_if.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+
+namespace boost { namespace fusion
+{
+ struct filter_view_iterator_tag;
+
+ template <typename First, typename Last, typename Pred>
+ struct filter_iterator;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct next_impl;
+
+ template <>
+ struct next_impl<filter_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::first_type first_type;
+ typedef typename Iterator::last_type last_type;
+ typedef typename Iterator::pred_type pred_type;
+
+ typedef typename
+ mpl::eval_if<
+ result_of::equal_to<first_type, last_type>
+ , mpl::identity<last_type>
+ , result_of::next<first_type>
+ >::type
+ next_type;
+
+ typedef typename detail::static_find_if<
+ next_type, last_type, pred_type>
+ filter;
+
+ typedef filter_iterator<
+ typename filter::type, last_type, pred_type>
+ type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return type(filter::call(i.first));
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SIZE_IMPL_09232005_1058)
+#define FUSION_SIZE_IMPL_09232005_1058
+
+#include <boost/fusion/iterator/distance.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+
+namespace boost { namespace fusion
+{
+ struct filter_view_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct size_impl;
+
+ template <>
+ struct size_impl<filter_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ : result_of::distance<
+ typename result_of::begin<Sequence>::type
+ , typename result_of::end<Sequence>::type>
+ {};
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_VALUE_OF_IMPL_05062005_0857)
+#define FUSION_VALUE_OF_IMPL_05062005_0857
+
+#include <boost/fusion/iterator/detail/adapt_value_traits.hpp>
+
+namespace boost { namespace fusion
+{
+ struct filter_view_iterator_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<filter_view_iterator_tag>
+ : detail::adapt_value_traits {};
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SEQUENCE_FILTER_VIEW_HPP)
+#define FUSION_SEQUENCE_FILTER_VIEW_HPP
+
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/is_view.hpp>
+#include <boost/fusion/view/filter_view/filter_view_iterator.hpp>
+#include <boost/fusion/view/filter_view/detail/begin_impl.hpp>
+#include <boost/fusion/view/filter_view/detail/end_impl.hpp>
+#include <boost/fusion/view/filter_view/detail/size_impl.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct filter_view_tag;
+ struct forward_traversal_tag;
+ struct fusion_sequence_tag;
+
+ template <typename Sequence, typename Pred>
+ struct filter_view : sequence_base<filter_view<Sequence, Pred> >
+ {
+ typedef filter_view_tag fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef forward_traversal_tag category;
+ typedef mpl::true_ is_view;
+
+ typedef typename result_of::begin<Sequence>::type first_type;
+ typedef typename result_of::end<Sequence>::type last_type;
+ typedef Pred pred_type;
+
+ filter_view(Sequence& seq)
+ : seq(seq)
+ {}
+
+ first_type first() const { return fusion::begin(seq); }
+ last_type last() const { return fusion::end(seq); }
+ typename mpl::if_<traits::is_view<Sequence>, Sequence, Sequence&>::type seq;
+ };
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_FILTER_VIEW_ITERATOR_05062005_0849)
+#define FUSION_FILTER_VIEW_ITERATOR_05062005_0849
+
+#include <boost/fusion/iterator/mpl/convert_iterator.hpp>
+#include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
+#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/view/filter_view/detail/deref_impl.hpp>
+#include <boost/fusion/view/filter_view/detail/next_impl.hpp>
+#include <boost/fusion/view/filter_view/detail/value_of_impl.hpp>
+#include <boost/fusion/view/filter_view/detail/equal_to_impl.hpp>
+#include <boost/fusion/algorithm/query/detail/find_if.hpp>
+
+namespace boost { namespace fusion
+{
+ struct filter_view_iterator_tag;
+ struct forward_traversal_tag;
+
+ template <typename First, typename Last, typename Pred>
+ struct filter_iterator : iterator_base<filter_iterator<First, Last, Pred> >
+ {
+ typedef convert_iterator<First> first_converter;
+ typedef typename first_converter::type first_iter;
+ typedef convert_iterator<Last> last_converter;
+ typedef typename last_converter::type last_iter;
+
+ typedef filter_view_iterator_tag fusion_tag;
+ typedef forward_traversal_tag category;
+ typedef detail::static_find_if<first_iter, last_iter, Pred> filter;
+ typedef typename filter::type first_type;
+ typedef last_iter last_type;
+ typedef Pred pred_type;
+
+ filter_iterator(First const& first)
+ : first(filter::call(first_converter::call(first))) {}
+
+ first_type first;
+ };
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SEQUENCE_VIEW_ITERATOR_RANGE_10022005_0610)
+#define FUSION_SEQUENCE_VIEW_ITERATOR_RANGE_10022005_0610
+
+#include <boost/fusion/view/iterator_range/iterator_range.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ Distributed under the 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_FUSION_ITERATOR_RANGE_AT_IMPL_HPP_INCLUDED)
+#define BOOST_FUSION_ITERATOR_RANGE_AT_IMPL_HPP_INCLUDED
+
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+
+namespace boost { namespace fusion
+{
+ struct iterator_range_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct at_impl;
+
+ template <>
+ struct at_impl<iterator_range_tag>
+ {
+ template <typename Seq, typename N>
+ struct apply
+ {
+ typedef typename Seq::begin_type begin_type;
+ typedef typename result_of::advance<begin_type,N>::type pos;
+ typedef typename result_of::deref<pos>::type type;
+
+ static type
+ call(Seq& s)
+ {
+ return * advance<N>(s.first);
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_BEGIN_IMPL_05062005_1226)
+#define FUSION_BEGIN_IMPL_05062005_1226
+
+namespace boost { namespace fusion
+{
+ struct iterator_range_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<iterator_range_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::begin_type type;
+
+ static type
+ call(Sequence& s)
+ {
+ return s.first;
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_END_IMPL_05062005_1226)
+#define FUSION_END_IMPL_05062005_1226
+
+namespace boost { namespace fusion
+{
+ struct iterator_range_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<iterator_range_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::end_type type;
+
+ static type
+ call(Sequence& s)
+ {
+ return s.last;
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ Distributed under the 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_FUSION_ITERATOR_RANGE_VALUE_AT_IMPL_HPP_INCLUDED)
+#define BOOST_FUSION_ITERATOR_RANGE_VALUE_AT_IMPL_HPP_INCLUDED
+
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+
+namespace boost { namespace fusion
+{
+ struct iterator_range_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_at_impl;
+
+ template <>
+ struct value_at_impl<iterator_range_tag>
+ {
+ template <typename Seq, typename N>
+ struct apply
+ {
+ typedef typename Seq::begin_type begin_type;
+ typedef typename result_of::advance<begin_type,N>::type pos;
+ typedef typename result_of::value_of<pos>::type type;
+ };
+ };
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_ITERATOR_RANGE_05062005_1224)
+#define FUSION_ITERATOR_RANGE_05062005_1224
+
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/iterator/distance.hpp>
+#include <boost/fusion/iterator/mpl/convert_iterator.hpp>
+#include <boost/fusion/view/iterator_range/detail/begin_impl.hpp>
+#include <boost/fusion/view/iterator_range/detail/end_impl.hpp>
+#include <boost/fusion/view/iterator_range/detail/at_impl.hpp>
+#include <boost/fusion/view/iterator_range/detail/value_at_impl.hpp>
+#include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct iterator_range_tag;
+ struct fusion_sequence_tag;
+
+ template <typename First, typename Last>
+ struct iterator_range : sequence_base<iterator_range<First, Last> >
+ {
+ typedef typename convert_iterator<First>::type begin_type;
+ typedef typename convert_iterator<Last>::type end_type;
+ typedef iterator_range_tag fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef typename result_of::distance<begin_type, end_type>::type size;
+ typedef mpl::true_ is_view;
+
+ typedef typename traits::category_of<begin_type>::type category;
+
+ iterator_range(First const& first, Last const& last)
+ : first(convert_iterator<First>::call(first))
+ , last(convert_iterator<Last>::call(last)) {}
+
+ begin_type first;
+ end_type last;
+ };
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SEQUENCE_VIEW_JOINT_VIEW_10022005_0610)
+#define FUSION_SEQUENCE_VIEW_JOINT_VIEW_10022005_0610
+
+#include <boost/fusion/view/joint_view/joint_view.hpp>
+#include <boost/fusion/view/joint_view/joint_view_iterator.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_BEGIN_IMPL_07162005_0115)
+#define FUSION_BEGIN_IMPL_07162005_0115
+
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/mpl/if.hpp>
+
+namespace boost { namespace fusion
+{
+ struct joint_view_tag;
+
+ template <typename First, typename Last, typename Concat>
+ struct joint_view_iterator;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<joint_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::first_type first_type;
+ typedef typename Sequence::last_type last_type;
+ typedef typename Sequence::concat_type concat_type;
+ typedef result_of::equal_to<first_type, last_type> equal_to;
+
+ typedef typename
+ mpl::if_<
+ equal_to
+ , concat_type
+ , joint_view_iterator<first_type, last_type, concat_type>
+ >::type
+ type;
+
+ static type
+ call(Sequence& s, mpl::true_)
+ {
+ return s.concat();
+ }
+
+ static type
+ call(Sequence& s, mpl::false_)
+ {
+ return type(s.first(), s.concat());
+ }
+
+ static type
+ call(Sequence& s)
+ {
+ return call(s, equal_to());
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_DEREF_IMPL_07162005_0137)
+#define FUSION_DEREF_IMPL_07162005_0137
+
+#include <boost/fusion/iterator/detail/adapt_deref_traits.hpp>
+
+namespace boost { namespace fusion
+{
+ struct joint_view_iterator_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<joint_view_iterator_tag>
+ : detail::adapt_deref_traits {};
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_END_IMPL_07162005_0128)
+#define FUSION_END_IMPL_07162005_0128
+
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/mpl/if.hpp>
+
+namespace boost { namespace fusion
+{
+ struct joint_view_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<joint_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::concat_last_type type;
+
+ static type
+ call(Sequence& s)
+ {
+ return s.concat_last();
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_NEXT_IMPL_07162005_0136)
+#define FUSION_NEXT_IMPL_07162005_0136
+
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/mpl/if.hpp>
+
+namespace boost { namespace fusion
+{
+ struct joint_view_iterator_tag;
+
+ template <typename First, typename Last, typename Concat>
+ struct joint_view_iterator;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct next_impl;
+
+ template <>
+ struct next_impl<joint_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::first_type first_type;
+ typedef typename Iterator::last_type last_type;
+ typedef typename Iterator::concat_type concat_type;
+ typedef typename result_of::next<first_type>::type next_type;
+ typedef result_of::equal_to<next_type, last_type> equal_to;
+
+ typedef typename
+ mpl::if_<
+ equal_to
+ , concat_type
+ , joint_view_iterator<next_type, last_type, concat_type>
+ >::type
+ type;
+
+ static type
+ call(Iterator const& i, mpl::true_)
+ {
+ return i.concat;
+ }
+
+ static type
+ call(Iterator const& i, mpl::false_)
+ {
+ return type(fusion::next(i.first), i.concat);
+ }
+
+ static type
+ call(Iterator const& i)
+ {
+ return call(i, equal_to());
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_VALUE_IMPL_07162005_0132)
+#define FUSION_VALUE_IMPL_07162005_0132
+
+#include <boost/fusion/iterator/detail/adapt_value_traits.hpp>
+
+namespace boost { namespace fusion
+{
+ struct joint_view_iterator_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<joint_view_iterator_tag>
+ : detail::adapt_value_traits {};
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_JOINT_VIEW_07162005_0140)
+#define FUSION_JOINT_VIEW_07162005_0140
+
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/fusion/support/is_view.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/view/joint_view/joint_view_iterator.hpp>
+#include <boost/fusion/view/joint_view/detail/begin_impl.hpp>
+#include <boost/fusion/view/joint_view/detail/end_impl.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/plus.hpp>
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct joint_view_tag;
+ struct forward_traversal_tag;
+ struct fusion_sequence_tag;
+
+ template <typename Sequence1, typename Sequence2>
+ struct joint_view : sequence_base<joint_view<Sequence1, Sequence2> >
+ {
+ typedef joint_view_tag fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef forward_traversal_tag category;
+ typedef mpl::true_ is_view;
+
+ typedef typename result_of::begin<Sequence1>::type first_type;
+ typedef typename result_of::end<Sequence1>::type last_type;
+ typedef typename result_of::begin<Sequence2>::type concat_type;
+ typedef typename result_of::end<Sequence2>::type concat_last_type;
+ typedef typename mpl::plus<result_of::size<Sequence1>, result_of::size<Sequence2> >::type size;
+
+ joint_view(Sequence1& seq1, Sequence2& seq2)
+ : seq1(seq1)
+ , seq2(seq2)
+ {}
+
+ first_type first() const { return fusion::begin(seq1); }
+ concat_type concat() const { return fusion::begin(seq2); }
+ concat_last_type concat_last() const { return fusion::end(seq2); }
+
+ private:
+
+ typename mpl::if_<traits::is_view<Sequence1>, Sequence1, Sequence1&>::type seq1;
+ typename mpl::if_<traits::is_view<Sequence2>, Sequence2, Sequence2&>::type seq2;
+ };
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_JOINT_VIEW_ITERATOR_07162005_0140)
+#define FUSION_JOINT_VIEW_ITERATOR_07162005_0140
+
+#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/iterator/mpl/convert_iterator.hpp>
+#include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
+#include <boost/fusion/view/joint_view/detail/deref_impl.hpp>
+#include <boost/fusion/view/joint_view/detail/next_impl.hpp>
+#include <boost/fusion/view/joint_view/detail/value_of_impl.hpp>
+#include <boost/static_assert.hpp>
+
+namespace boost { namespace fusion
+{
+ struct joint_view_iterator_tag;
+ struct forward_traversal_tag;
+
+ template <typename First, typename Last, typename Concat>
+ struct joint_view_iterator
+ : iterator_base<joint_view_iterator<First, Last, Concat> >
+ {
+ typedef convert_iterator<First> first_converter;
+ typedef convert_iterator<Last> last_converter;
+ typedef convert_iterator<Concat> concat_converter;
+
+ typedef typename first_converter::type first_type;
+ typedef typename last_converter::type last_type;
+ typedef typename concat_converter::type concat_type;
+
+ typedef joint_view_iterator_tag fusion_tag;
+ typedef forward_traversal_tag category;
+ BOOST_STATIC_ASSERT((!result_of::equal_to<first_type, last_type>::value));
+
+ joint_view_iterator(First const& first, Concat const& concat)
+ : first(first_converter::call(first))
+ , concat(concat_converter::call(concat))
+ {}
+
+ first_type first;
+ concat_type concat;
+ };
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ Distributed under the 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_FUSION_REPETITIVE_VIEW_HPP_INCLUDED)
+#define BOOST_FUSION_REPETITIVE_VIEW_HPP_INCLUDED
+
+#include <boost/fusion/view/repetitive_view/repetitive_view.hpp>
+#include <boost/fusion/view/repetitive_view/repetitive_view_iterator.hpp>
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ Distributed under the 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_FUSION_REPETITIVE_VIEW_BEGIN_IMPL_HPP_INCLUDED)
+#define BOOST_FUSION_REPETITIVE_VIEW_BEGIN_IMPL_HPP_INCLUDED
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/view/repetitive_view/repetitive_view_fwd.hpp>
+
+namespace boost { namespace fusion
+{
+ struct repetitive_view_tag;
+
+ template <typename Sequence, typename Pos>
+ struct repetitive_view_iterator;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct begin_impl;
+
+ template<>
+ struct begin_impl<repetitive_view_tag>
+ {
+ template<typename View>
+ struct apply
+ {
+ typedef typename View::sequence_type sequence_type;
+
+ typedef repetitive_view_iterator<sequence_type,
+ typename result_of::begin<sequence_type>::type > type;
+
+ static type call(View const& v)
+ {
+ return type(v.seq);
+ }
+ };
+ };
+
+ }
+
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ Distributed under the 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_FUSION_REPETITIVE_VIEW_DEREF_IMPL_HPP_INCLUDED)
+#define BOOST_FUSION_REPETITIVE_VIEW_DEREF_IMPL_HPP_INCLUDED
+
+#include <boost/fusion/iterator/deref.hpp>
+
+namespace boost { namespace fusion
+{
+ struct repetitive_view_iterator_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct deref_impl;
+
+ template<>
+ struct deref_impl<repetitive_view_iterator_tag>
+ {
+ template<typename Iterator>
+ struct apply
+ {
+ typedef typename
+ result_of::deref<typename Iterator::pos_type>::type
+ type;
+
+ static type call(Iterator const& i)
+ {
+ return *i.pos;
+ }
+ };
+ };
+
+ }
+
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ Distributed under the 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_FUSION_REPETITIVE_VIEW_END_IMPL_HPP_INCLUDED)
+#define BOOST_FUSION_REPETITIVE_VIEW_END_IMPL_HPP_INCLUDED
+
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/view/repetitive_view/repetitive_view_fwd.hpp>
+
+namespace boost { namespace fusion
+{
+ struct repetitive_view_tag;
+
+ template <typename Sequence, typename Pos>
+ struct repetitive_view_iterator;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct end_impl;
+
+ template<>
+ struct end_impl<repetitive_view_tag>
+ {
+ template<typename View>
+ struct apply
+ {
+ typedef typename View::sequence_type sequence_type;
+
+ typedef repetitive_view_iterator<sequence_type,
+ typename result_of::end<sequence_type>::type > type;
+
+ static type call(View const& v)
+ {
+ return type(v.seq,end(v.seq));
+ }
+ };
+ };
+
+ }
+
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ Distributed under the 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_FUSION_REPETITIVE_VIEW_NEXT_IMPL_HPP_INCLUDED)
+#define BOOST_FUSION_REPETITIVE_VIEW_NEXT_IMPL_HPP_INCLUDED
+
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+
+namespace boost { namespace fusion
+{
+ struct repetitive_view_iterator_tag;
+
+ template <typename Sequence, typename Pos>
+ struct repetitive_view_iterator;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct next_impl;
+
+ template <>
+ struct next_impl<repetitive_view_iterator_tag>
+ {
+ template<typename Iterator,
+ bool Last = result_of::equal_to<typename Iterator::end_type,
+ typename result_of::next<
+ typename Iterator::pos_type
+ >::type>::value >
+ struct apply_nonempty // <Iterator,false>
+ {
+ // advanvce to next position
+
+ typedef repetitive_view_iterator<
+ typename Iterator::sequence_type,
+ typename result_of::next<typename Iterator::pos_type>::type
+ >
+ type;
+
+ static type call(Iterator const& i)
+ {
+ return type(i.seq, next(i.pos));
+ }
+ };
+ template <typename Iterator>
+ struct apply_nonempty<Iterator,true>
+ {
+ // reset to beginning
+
+ typedef repetitive_view_iterator<
+ typename Iterator::sequence_type,
+ typename Iterator::first_type
+ >
+ type;
+
+ static type call(Iterator const& i)
+ {
+ return type(i.seq);
+ }
+ };
+
+ template <typename Iterator,
+ bool Empty = result_of::equal_to<typename Iterator::end_type,
+ typename Iterator::pos_type>::value >
+ struct apply // <Iterator,false>
+ : apply_nonempty<Iterator>
+ { };
+
+ template <typename Iterator>
+ struct apply<Iterator,true>
+ {
+ // eps^n = eps
+
+ typedef Iterator type;
+
+ static type call(Iterator const& i)
+ {
+ return type(i);
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ Distributed under the 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_FUSION_REPETITIVE_VIEW_VALUE_OF_IMPL_HPP_INCLUDED)
+#define BOOST_FUSION_REPETITIVE_VIEW_VALUE_OF_IMPL_HPP_INCLUDED
+
+#include <boost/fusion/iterator/value_of.hpp>
+
+namespace boost { namespace fusion
+{
+ struct repetitive_view_iterator_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct value_of_impl;
+
+ template<>
+ struct value_of_impl<repetitive_view_iterator_tag>
+ {
+ template<typename Iterator>
+ struct apply
+ : result_of::value_of<typename Iterator::pos_type>
+ { };
+ };
+ }
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ Distributed under the 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_FUSION_REPETITIVE_REPETITIVE_VIEW_VIEW_HPP_INCLUDED)
+#define BOOST_FUSION_REPETITIVE_VIEW_REPETITIVE_VIEW_HPP_INCLUDED
+
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/mpl/if.hpp>
+
+#include <boost/fusion/support/is_view.hpp>
+#include <boost/fusion/support/category_of.hpp>
+
+#include <boost/fusion/view/repetitive_view/detail/begin_impl.hpp>
+#include <boost/fusion/view/repetitive_view/detail/end_impl.hpp>
+
+
+namespace boost { namespace fusion
+{
+ struct repetitive_view_tag;
+ struct fusion_sequence_tag;
+
+ template<typename Sequence> struct repetitive_view
+ : sequence_base< repetitive_view<Sequence> >
+ {
+ typedef repetitive_view_tag fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef mpl::true_ is_view;
+
+ typedef single_pass_traversal_tag category;
+
+ typedef typename boost::remove_reference<Sequence>::type sequence_type;
+ typedef typename
+ mpl::if_<traits::is_view<Sequence>, Sequence, sequence_type&>::type
+ stored_seq_type;
+
+ repetitive_view(Sequence& seq)
+ : seq(seq) {}
+
+ stored_seq_type seq;
+ };
+
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ Distributed under the 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_FUSION_REPETITIVE_VIEW_FWD_HPP_INCLUDED)
+#define BOOST_FUSION_REPETITIVE_VIEW_FWD_HPP_INCLUDED
+
+namespace boost { namespace fusion
+{
+ struct repetitive_view_tag;
+
+ template<typename Sequence> struct repetitive_view;
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ Distributed under the 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_FUSION_REPETITIVE_VIEW_ITERATOR_HPP_INCLUDED)
+#define BOOST_FUSION_REPETITIVE_VIEW_HPP_ITERATOR_INCLUDED
+
+#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/iterator/mpl/convert_iterator.hpp>
+#include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/view/repetitive_view/detail/deref_impl.hpp>
+#include <boost/fusion/view/repetitive_view/detail/next_impl.hpp>
+#include <boost/fusion/view/repetitive_view/detail/value_of_impl.hpp>
+
+namespace boost { namespace fusion
+{
+ struct repetitive_view_iterator_tag;
+
+ template<typename Sequence, typename Pos =
+ typename result_of::begin<Sequence>::type>
+ struct repetitive_view_iterator
+ : iterator_base< repetitive_view_iterator<Sequence,Pos> >
+ {
+ typedef repetitive_view_iterator_tag fusion_tag;
+
+ typedef Sequence sequence_type;
+ typedef typename convert_iterator<Pos>::type pos_type;
+ typedef typename convert_iterator<typename result_of::begin<Sequence>::type>::type first_type;
+ typedef typename convert_iterator<typename result_of::end<Sequence>::type>::type end_type;
+ typedef single_pass_traversal_tag category;
+
+ explicit repetitive_view_iterator(Sequence& seq)
+ : seq(seq), pos(begin(seq)) {}
+
+ repetitive_view_iterator(Sequence& seq, pos_type const& pos)
+ : seq(seq), pos(pos) {}
+
+ Sequence& seq;
+ pos_type pos;
+
+ };
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SEQUENCE_VIEW_REVERSE_VIEW_10022005_0612)
+#define FUSION_SEQUENCE_VIEW_REVERSE_VIEW_10022005_0612
+
+#include <boost/fusion/view/reverse_view/reverse_view.hpp>
+#include <boost/fusion/view/reverse_view/reverse_view_iterator.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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(FUSION_ADVANCE_IMPL_14122005_2015)
+#define FUSION_ADVANCE_IMPL_14122005_2015
+
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/mpl/negate.hpp>
+
+namespace boost { namespace fusion {
+
+ struct reverse_view_iterator_tag;
+
+ template <typename Iterator>
+ struct reverse_view_iterator;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct advance_impl;
+
+ template<>
+ struct advance_impl<reverse_view_iterator_tag>
+ {
+ template<typename Iterator, typename Dist>
+ struct apply
+ {
+ typedef typename Iterator::first_type first_type;
+ typedef typename mpl::negate<Dist>::type negative_dist;
+ typedef typename result_of::advance<first_type, negative_dist>::type advanced_type;
+ typedef reverse_view_iterator<advanced_type> type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return type(boost::fusion::advance<negative_dist>(i.first));
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_BEGIN_IMPL_07202005_0849)
+#define FUSION_BEGIN_IMPL_07202005_0849
+
+namespace boost { namespace fusion
+{
+ struct reverse_view_tag;
+
+ template <typename Iterator>
+ struct reverse_view_iterator;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<reverse_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef reverse_view_iterator<typename Sequence::last_type> type;
+
+ static type
+ call(Sequence const& s)
+ {
+ return type(s.last());
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_DEREF_IMPL_07202005_0851)
+#define FUSION_DEREF_IMPL_07202005_0851
+
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+
+namespace boost { namespace fusion
+{
+ struct reverse_view_iterator_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<reverse_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename
+ result_of::deref<
+ typename result_of::prior<
+ typename Iterator::first_type
+ >::type
+ >::type
+ type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return *fusion::prior(i.first);
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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(FUSION_DISTANCE_IMPL_14122005_2104)
+#define FUSION_DISTANCE_IMPL_14122005_2104
+
+#include <boost/fusion/iterator/distance.hpp>
+
+namespace boost { namespace fusion {
+
+ struct reverse_view_iterator_tag;
+
+ template <typename Iterator>
+ struct reverse_view_iterator;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct distance_impl;
+
+ template<>
+ struct distance_impl<reverse_view_iterator_tag>
+ {
+ template<typename First, typename Last>
+ struct apply
+ {
+ typedef typename First::first_type first_type;
+ typedef typename Last::first_type last_type;
+ typedef typename result_of::distance<last_type, first_type>::type type;
+
+ static type
+ call(First const& first, Last const& last)
+ {
+ return boost::fusion::distance(last.first, first.first);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_END_IMPL_07202005_0851)
+#define FUSION_END_IMPL_07202005_0851
+
+namespace boost { namespace fusion
+{
+ struct reverse_view_tag;
+
+ template <typename Iterator>
+ struct reverse_view_iterator;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<reverse_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef reverse_view_iterator<typename Sequence::first_type> type;
+
+ static type
+ call(Sequence const& s)
+ {
+ return type(s.first());
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_NEXT_IMPL_07202005_0856)
+#define FUSION_NEXT_IMPL_07202005_0856
+
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+
+namespace boost { namespace fusion
+{
+ struct reverse_view_iterator_tag;
+
+ template <typename Iterator>
+ struct reverse_view_iterator;
+
+ namespace extension
+ {
+ template <>
+ struct next_impl<reverse_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::first_type first_type;
+ typedef typename prior_impl<typename first_type::fusion_tag>::
+ template apply<first_type>
+ wrapped;
+
+ typedef reverse_view_iterator<typename wrapped::type> type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return type(wrapped::call(i.first));
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_PRIOR_IMPL_07202005_0857)
+#define FUSION_PRIOR_IMPL_07202005_0857
+
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+
+namespace boost { namespace fusion
+{
+ struct reverse_view_iterator_tag;
+
+ template <typename Iterator>
+ struct reverse_view_iterator;
+
+ namespace extension
+ {
+ template <>
+ struct prior_impl<reverse_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::first_type first_type;
+ typedef typename next_impl<typename first_type::fusion_tag>::
+ template apply<first_type>
+ wrapped;
+
+ typedef reverse_view_iterator<typename wrapped::type> type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return type(wrapped::call(i.first));
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_VALUE_OF_IMPL_07202005_0900)
+#define FUSION_VALUE_OF_IMPL_07202005_0900
+
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+
+namespace boost { namespace fusion
+{
+ struct reverse_view_iterator_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<reverse_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename
+ result_of::value_of<
+ typename result_of::prior<
+ typename Iterator::first_type
+ >::type
+ >::type
+ type;
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_REVERSE_VIEW_07202005_0836)
+#define FUSION_REVERSE_VIEW_07202005_0836
+
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/fusion/support/is_view.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/view/reverse_view/reverse_view_iterator.hpp>
+#include <boost/fusion/view/reverse_view/detail/begin_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/end_impl.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct reverse_view_tag;
+ struct fusion_sequence_tag;
+
+ template <typename Sequence>
+ struct reverse_view : sequence_base<reverse_view<Sequence> >
+ {
+ typedef reverse_view_tag fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef mpl::true_ is_view;
+
+ typedef typename traits::category_of<Sequence>::type category;
+ typedef typename result_of::begin<Sequence>::type first_type;
+ typedef typename result_of::end<Sequence>::type last_type;
+ typedef typename result_of::size<Sequence>::type size;
+
+ BOOST_STATIC_ASSERT((
+ is_base_of<
+ bidirectional_traversal_tag
+ , typename traits::category_of<first_type>::type>::value));
+
+ reverse_view(Sequence& seq)
+ : seq(seq)
+ {}
+
+ first_type first() const { return fusion::begin(seq); }
+ last_type last() const { return fusion::end(seq); }
+ typename mpl::if_<traits::is_view<Sequence>, Sequence, Sequence&>::type seq;
+ };
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_REVERSE_VIEW_ITERATOR_07202005_0835)
+#define FUSION_REVERSE_VIEW_ITERATOR_07202005_0835
+
+#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/iterator/mpl/convert_iterator.hpp>
+#include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
+#include <boost/fusion/view/reverse_view/detail/deref_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/next_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/prior_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/advance_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/distance_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/value_of_impl.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+#include <boost/static_assert.hpp>
+
+namespace boost { namespace fusion
+{
+ struct reverse_view_iterator_tag;
+
+ template <typename First>
+ struct reverse_view_iterator
+ : iterator_base<reverse_view_iterator<First> >
+ {
+ typedef convert_iterator<First> converter;
+ typedef typename converter::type first_type;
+ typedef reverse_view_iterator_tag fusion_tag;
+ typedef typename traits::category_of<first_type>::type category;
+
+ BOOST_STATIC_ASSERT((
+ is_base_of<
+ bidirectional_traversal_tag
+ , category>::value));
+
+ reverse_view_iterator(First const& first)
+ : first(converter::call(first)) {}
+
+ first_type first;
+ };
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SINGLE_VIEW_03192006_2216)
+#define FUSION_SINGLE_VIEW_03192006_2216
+
+#include <boost/fusion/view/single_view/single_view.hpp>
+#include <boost/fusion/view/single_view/single_view_iterator.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_BEGIN_IMPL_05052005_0305)
+#define FUSION_BEGIN_IMPL_05052005_0305
+
+namespace boost { namespace fusion
+{
+ struct single_view_tag;
+
+ template <typename T>
+ struct single_view_iterator;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<single_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef single_view_iterator<Sequence> type;
+
+ static type
+ call(Sequence& s)
+ {
+ return type(s);
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_DEREF_IMPL_05052005_0258)
+#define FUSION_DEREF_IMPL_05052005_0258
+
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_const.hpp>
+
+namespace boost { namespace fusion
+{
+ struct single_view_iterator_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<single_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::value_type type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return i.val;
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_END_IMPL_05052005_0332)
+#define FUSION_END_IMPL_05052005_0332
+
+namespace boost { namespace fusion
+{
+ struct single_view_tag;
+
+ template <typename T>
+ struct single_view_iterator_end;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<single_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef single_view_iterator_end<Sequence> type;
+
+ static type
+ call(Sequence&)
+ {
+ return type();
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_NEXT_IMPL_05052005_0331)
+#define FUSION_NEXT_IMPL_05052005_0331
+
+namespace boost { namespace fusion
+{
+ struct single_view_iterator_tag;
+
+ template <typename SingleView>
+ struct single_view_iterator_end;
+
+ template <typename SingleView>
+ struct single_view_iterator;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct next_impl;
+
+ template <>
+ struct next_impl<single_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef single_view_iterator_end<
+ typename Iterator::single_view_type>
+ type;
+
+ static type
+ call(Iterator)
+ {
+ return type();
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_VALUE_IMPL_05052005_0324)
+#define FUSION_VALUE_IMPL_05052005_0324
+
+namespace boost { namespace fusion
+{
+ struct single_view_iterator_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<single_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::single_view_type single_view_type;
+ typedef typename single_view_type::value_type type;
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SINGLE_VIEW_05052005_0335)
+#define FUSION_SINGLE_VIEW_05052005_0335
+
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/fusion/support/detail/as_fusion_element.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/view/single_view/single_view_iterator.hpp>
+#include <boost/fusion/view/single_view/detail/begin_impl.hpp>
+#include <boost/fusion/view/single_view/detail/end_impl.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace fusion
+{
+ struct single_view_tag;
+ struct forward_traversal_tag;
+ struct fusion_sequence_tag;
+
+ template <typename T>
+ struct single_view : sequence_base<single_view<T> >
+ {
+ typedef single_view_tag fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef forward_traversal_tag category;
+ typedef mpl::true_ is_view;
+ typedef mpl::int_<1> size;
+ typedef T value_type;
+
+ single_view()
+ : val() {}
+
+ explicit single_view(typename detail::call_param<T>::type val)
+ : val(val) {}
+
+ value_type val;
+ };
+
+ template <typename T>
+ inline single_view<typename detail::as_fusion_element<T>::type>
+ make_single_view(T const& v)
+ {
+ return single_view<typename detail::as_fusion_element<T>::type>(v);
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SINGLE_VIEW_ITERATOR_05052005_0340)
+#define FUSION_SINGLE_VIEW_ITERATOR_05052005_0340
+
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/view/single_view/detail/deref_impl.hpp>
+#include <boost/fusion/view/single_view/detail/next_impl.hpp>
+#include <boost/fusion/view/single_view/detail/value_of_impl.hpp>
+
+namespace boost { namespace fusion
+{
+ struct single_view_iterator_tag;
+ struct forward_traversal_tag;
+
+ template <typename SingleView>
+ struct single_view_iterator_end
+ : iterator_base<single_view_iterator_end<SingleView> >
+ {
+ typedef single_view_iterator_tag fusion_tag;
+ typedef forward_traversal_tag category;
+ };
+
+ template <typename SingleView>
+ struct single_view_iterator
+ : iterator_base<single_view_iterator<SingleView> >
+ {
+ typedef single_view_iterator_tag fusion_tag;
+ typedef forward_traversal_tag category;
+ typedef typename SingleView::value_type value_type;
+ typedef SingleView single_view_type;
+
+ explicit single_view_iterator(single_view_type const& view)
+ : val(view.val) {}
+
+ value_type val;
+ };
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_SEQUENCE_VIEW_TRANSFORM_VIEW_10022005_0612)
+#define FUSION_SEQUENCE_VIEW_TRANSFORM_VIEW_10022005_0612
+
+#include <boost/fusion/view/transform_view/transform_view.hpp>
+#include <boost/fusion/view/transform_view/transform_view_iterator.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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(FUSION_ADVANCE_IMPL_13122005_1906)
+#define FUSION_ADVANCE_IMPL_13122005_1906
+
+#include <boost/fusion/iterator/advance.hpp>
+
+namespace boost { namespace fusion
+{
+ struct transform_view_iterator_tag;
+ struct transform_view_iterator2_tag;
+
+ template<typename First, typename F>
+ struct transform_view_iterator;
+
+ template <typename First1, typename First2, typename F>
+ struct transform_view_iterator2;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct advance_impl;
+
+ // Unary Version
+ template<>
+ struct advance_impl<transform_view_iterator_tag>
+ {
+ template<typename Iterator, typename Dist>
+ struct apply
+ {
+ typedef typename Iterator::first_type first_type;
+ typedef typename result_of::advance<first_type, Dist>::type advanced_type;
+ typedef typename Iterator::transform_type transform_type;
+ typedef transform_view_iterator<advanced_type, transform_type> type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return type(boost::fusion::advance<Dist>(i.first), i.f);
+ }
+ };
+ };
+
+ // Binary Version
+ template<>
+ struct advance_impl<transform_view_iterator2_tag>
+ {
+ template<typename Iterator, typename Dist>
+ struct apply
+ {
+ typedef typename Iterator::first1_type first1_type;
+ typedef typename Iterator::first2_type first2_type;
+ typedef typename result_of::advance<first1_type, Dist>::type advanced1_type;
+ typedef typename result_of::advance<first2_type, Dist>::type advanced2_type;
+ typedef typename Iterator::transform_type transform_type;
+ typedef transform_view_iterator2<advanced1_type, advanced2_type, transform_type> type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return type(
+ boost::fusion::advance<Dist>(i.first1)
+ , boost::fusion::advance<Dist>(i.first2), i.f);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ Distributed under the 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_FUSION_APPLY_TRANSFORM_RESULT_02092006_1936)
+#define BOOST_FUSION_APPLY_TRANSFORM_RESULT_02092006_1936
+
+#include <boost/utility/result_of.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+
+ namespace detail
+ {
+ template <typename F>
+ struct apply_transform_result
+ {
+ template <typename T0, typename T1 = void_>
+ struct apply
+ : boost::result_of<F(T0, T1)>
+ {};
+
+ template <typename T0>
+ struct apply<T0, void_>
+ : boost::result_of<F(T0)>
+ {};
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_AT_IMPL_20061029_1946)
+#define BOOST_FUSION_AT_IMPL_20061029_1946
+
+#include <boost/mpl/apply.hpp>
+#include <boost/fusion/view/transform_view/detail/apply_transform_result.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+
+namespace boost { namespace fusion {
+ struct transform_view_tag;
+ struct transform_view2_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct at_impl;
+
+ template<>
+ struct at_impl<transform_view_tag>
+ {
+ template<typename Seq, typename N>
+ struct apply
+ {
+ typedef typename Seq::transform_type F;
+ typedef detail::apply_transform_result<F> transform_type;
+ typedef typename boost::fusion::result_of::at<typename Seq::sequence_type, N>::type value_type;
+ typedef typename mpl::apply<transform_type, value_type>::type type;
+
+ static type call(Seq& seq)
+ {
+ return seq.f(boost::fusion::at<N>(seq.seq));
+ }
+ };
+ };
+
+ template<>
+ struct at_impl<transform_view2_tag>
+ {
+ template<typename Seq, typename N>
+ struct apply
+ {
+ typedef typename Seq::transform_type F;
+ typedef detail::apply_transform_result<F> transform_type;
+ typedef typename boost::fusion::result_of::at<typename Seq::sequence1_type, N>::type value1_type;
+ typedef typename boost::fusion::result_of::at<typename Seq::sequence2_type, N>::type value2_type;
+ typedef typename mpl::apply<transform_type, value1_type, value2_type>::type type;
+
+ static type call(Seq& seq)
+ {
+ return seq.f(boost::fusion::at<N>(seq.seq1), boost::fusion::at<N>(seq.seq2));
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_BEGIN_IMPL_07162005_1031)
+#define FUSION_BEGIN_IMPL_07162005_1031
+
+#include <boost/fusion/view/transform_view/transform_view_fwd.hpp>
+
+namespace boost { namespace fusion
+{
+ template <typename First, typename F>
+ struct transform_view_iterator;
+
+ template <typename First1, typename First2, typename F>
+ struct transform_view_iterator2;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl;
+
+ // Unary Version
+ template <>
+ struct begin_impl<transform_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::first_type first_type;
+ typedef typename Sequence::transform_type transform_type;
+ typedef transform_view_iterator<first_type, transform_type> type;
+
+ static type
+ call(Sequence& s)
+ {
+ return type(s.first(), s.f);
+ }
+ };
+ };
+
+ // Binary Version
+ template <>
+ struct begin_impl<transform_view2_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::first1_type first1_type;
+ typedef typename Sequence::first2_type first2_type;
+ typedef typename Sequence::transform_type transform_type;
+ typedef transform_view_iterator2<first1_type, first2_type, transform_type> type;
+
+ static type
+ call(Sequence& s)
+ {
+ return type(s.first1(), s.first2(), s.f);
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_DEREF_IMPL_07162005_1026)
+#define FUSION_DEREF_IMPL_07162005_1026
+
+#include <boost/mpl/apply.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/view/transform_view/detail/apply_transform_result.hpp>
+
+namespace boost { namespace fusion
+{
+ struct transform_view_iterator_tag;
+ struct transform_view_iterator2_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct deref_impl;
+
+ // Unary Version
+ template <>
+ struct deref_impl<transform_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename
+ result_of::deref<typename Iterator::first_type>::type
+ value_type;
+
+ typedef detail::apply_transform_result<typename Iterator::transform_type> transform_type;
+ typedef typename mpl::apply<transform_type, value_type>::type type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return i.f(*i.first);
+ }
+ };
+ };
+
+ // Binary Version
+ template <>
+ struct deref_impl<transform_view_iterator2_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename
+ result_of::deref<typename Iterator::first1_type>::type
+ value1_type;
+ typedef typename
+ result_of::deref<typename Iterator::first2_type>::type
+ value2_type;
+
+ typedef detail::apply_transform_result<typename Iterator::transform_type> transform_type;
+ typedef typename mpl::apply<transform_type, value1_type, value2_type>::type type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return i.f(*i.first1, *i.first2);
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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(FUSION_DISTANCE_IMPL_13122005_2139)
+#define FUSION_DISTANCE_IMPL_13122005_2139
+
+#include <boost/fusion/iterator/distance.hpp>
+
+namespace boost { namespace fusion {
+
+ struct transform_view_iterator_tag;
+ struct transform_view_iterator2_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct distance_impl;
+
+ // Unary Version
+ template<>
+ struct distance_impl<transform_view_iterator_tag>
+ {
+ template<typename First, typename Last>
+ struct apply
+ : result_of::distance<typename First::first_type, typename Last::first_type>
+ {
+ static
+ typename result_of::distance<typename First::first_type, typename Last::first_type>::type
+ call(First const& first, Last const& last)
+ {
+ return boost::fusion::distance(first.first, last.first);
+ }
+ };
+ };
+
+ // Binary Version
+ template<>
+ struct distance_impl<transform_view_iterator2_tag>
+ {
+ template<typename First, typename Last>
+ struct apply
+ : result_of::distance<typename First::first1_type, typename Last::first1_type>
+ {
+ static
+ typename result_of::distance<typename First::first1_type, typename Last::first1_type>::type
+ call(First const& first, Last const& last)
+ {
+ return boost::fusion::distance(first.first1, last.first1);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_END_IMPL_07162005_1028)
+#define FUSION_END_IMPL_07162005_1028
+
+#include <boost/fusion/view/transform_view/transform_view_fwd.hpp>
+
+namespace boost { namespace fusion
+{
+ template <typename First, typename F>
+ struct transform_view_iterator;
+
+ template <typename First1, typename First2, typename F>
+ struct transform_view_iterator2;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+
+ // Unary Version
+ template <>
+ struct end_impl<transform_view_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::last_type last_type;
+ typedef typename Sequence::transform_type transform_type;
+ typedef transform_view_iterator<last_type, transform_type> type;
+
+ static type
+ call(Sequence& s)
+ {
+ return type(s.last(), s.f);
+ }
+ };
+ };
+
+ // Binary Version
+ template <>
+ struct end_impl<transform_view2_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::last1_type last1_type;
+ typedef typename Sequence::last2_type last2_type;
+ typedef typename Sequence::transform_type transform_type;
+ typedef transform_view_iterator2<last1_type, last2_type, transform_type> type;
+
+ static type
+ call(Sequence& s)
+ {
+ return type(s.last1(), s.last2(), s.f);
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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_FUSION_TRANSFORM_VIEW_ITERATOR_20070127_0957)
+#define BOOST_FUSION_TRANSFORM_VIEW_ITERATOR_20070127_0957
+
+#include <boost/fusion/iterator/equal_to.hpp>
+
+namespace boost { namespace fusion {
+
+ struct transform_view_iterator_tag;
+ struct transform_view_iterator2_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct equal_to_impl;
+
+ template<>
+ struct equal_to_impl<transform_view_iterator_tag>
+ {
+ template<typename It1, typename It2>
+ struct apply
+ : result_of::equal_to<typename It1::first_type, typename It2::first_type>
+ {};
+ };
+
+ template<>
+ struct equal_to_impl<transform_view_iterator2_tag>
+ {
+ template<typename It1, typename It2>
+ struct apply
+ : result_of::equal_to<typename It1::first1_type, typename It2::first1_type>
+ {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_NEXT_IMPL_07162005_1029)
+#define FUSION_NEXT_IMPL_07162005_1029
+
+#include <boost/fusion/iterator/next.hpp>
+
+namespace boost { namespace fusion
+{
+ struct transform_view_iterator_tag;
+ struct transform_view_iterator2_tag;
+
+ template<typename First, typename F>
+ struct transform_view_iterator;
+
+ template <typename First1, typename First2, typename F>
+ struct transform_view_iterator2;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct next_impl;
+
+ // Unary Version
+ template <>
+ struct next_impl<transform_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::first_type first_type;
+ typedef typename result_of::next<first_type>::type next_type;
+ typedef typename Iterator::transform_type transform_type;
+ typedef transform_view_iterator<next_type, transform_type> type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return type(fusion::next(i.first), i.f);
+ }
+ };
+ };
+
+ // Binary Version
+ template <>
+ struct next_impl<transform_view_iterator2_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::first1_type first1_type;
+ typedef typename Iterator::first2_type first2_type;
+ typedef typename result_of::next<first1_type>::type next1_type;
+ typedef typename result_of::next<first2_type>::type next2_type;
+ typedef typename Iterator::transform_type transform_type;
+ typedef transform_view_iterator2<next1_type, next2_type, transform_type> type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return type(fusion::next(i.first1), fusion::next(i.first2), i.f);
+ }
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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(FUSION_PREV_IMPL_13122005_2110)
+#define FUSION_PREV_IMPL_13122005_2110
+
+#include <boost/fusion/iterator/prior.hpp>
+
+namespace boost { namespace fusion
+{
+ struct transform_view_iterator_tag;
+ struct transform_view_iterator2_tag;
+
+ template<typename First, typename F>
+ struct transform_view_iterator;
+
+ template <typename First1, typename First2, typename F>
+ struct transform_view_iterator2;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct prior_impl;
+
+ // Unary Version
+ template<>
+ struct prior_impl<transform_view_iterator_tag>
+ {
+ template<typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::first_type first_type;
+ typedef typename result_of::prior<first_type>::type prior_type;
+ typedef typename Iterator::transform_type transform_type;
+ typedef transform_view_iterator<prior_type, transform_type> type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return type(fusion::prior(i.first), i.f);
+ }
+ };
+ };
+
+ // Binary Version
+ template<>
+ struct prior_impl<transform_view_iterator2_tag>
+ {
+ template<typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::first1_type first1_type;
+ typedef typename Iterator::first2_type first2_type;
+ typedef typename result_of::prior<first1_type>::type prior1_type;
+ typedef typename result_of::prior<first2_type>::type prior2_type;
+ typedef typename Iterator::transform_type transform_type;
+ typedef transform_view_iterator2<prior1_type, prior2_type, transform_type> type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return type(fusion::prior(i.first1), fusion::prior(i.first2), i.f);
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the 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_FUSION_VALUE_AT_IMPL_20061101_0745)
+#define BOOST_FUSION_VALUE_AT_IMPL_20061101_0745
+
+#include <boost/mpl/apply.hpp>
+#include <boost/fusion/view/transform_view/detail/apply_transform_result.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+
+namespace boost { namespace fusion {
+ struct transform_view_tag;
+ struct transform_view2_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct value_at_impl;
+
+ template<>
+ struct value_at_impl<transform_view_tag>
+ {
+ template<typename Seq, typename N>
+ struct apply
+ {
+ typedef typename Seq::transform_type F;
+ typedef detail::apply_transform_result<F> transform_type;
+ typedef typename boost::fusion::result_of::value_at<typename Seq::sequence_type, N>::type value_type;
+ typedef typename mpl::apply<transform_type, value_type>::type type;
+ };
+ };
+
+ template<>
+ struct value_at_impl<transform_view2_tag>
+ {
+ template<typename Seq, typename N>
+ struct apply
+ {
+ typedef typename Seq::transform_type F;
+ typedef detail::apply_transform_result<F> transform_type;
+ typedef typename boost::fusion::result_of::value_at<typename Seq::sequence1_type, N>::type value1_type;
+ typedef typename boost::fusion::result_of::value_at<typename Seq::sequence2_type, N>::type value2_type;
+ typedef typename mpl::apply<transform_type, value1_type, value2_type>::type type;
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_VALUE_OF_IMPL_07162005_1030)
+#define FUSION_VALUE_OF_IMPL_07162005_1030
+
+#include <boost/mpl/apply.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/view/transform_view/detail/apply_transform_result.hpp>
+
+namespace boost { namespace fusion
+{
+ struct transform_view_iterator_tag;
+ struct transform_view_iterator2_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_of_impl;
+
+ // Unary Version
+ template <>
+ struct value_of_impl<transform_view_iterator_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename
+ result_of::value_of<typename Iterator::first_type>::type
+ value_type;
+
+ typedef detail::apply_transform_result<typename Iterator::transform_type> transform_type;
+ typedef typename mpl::apply<transform_type, value_type>::type type;
+ };
+ };
+
+ // Binary Version
+ template <>
+ struct value_of_impl<transform_view_iterator2_tag>
+ {
+ template <typename Iterator>
+ struct apply
+ {
+ typedef typename
+ result_of::value_of<typename Iterator::first1_type>::type
+ value1_type;
+ typedef typename
+ result_of::value_of<typename Iterator::first2_type>::type
+ value2_type;
+
+ typedef detail::apply_transform_result<typename Iterator::transform_type> transform_type;
+ typedef typename mpl::apply<transform_type, value1_type, value2_type>::type type;
+ };
+ };
+ }
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_TRANSFORM_VIEW_07162005_1037)
+#define FUSION_TRANSFORM_VIEW_07162005_1037
+
+#include <boost/static_assert.hpp>
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/fusion/support/is_view.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/view/transform_view/transform_view_iterator.hpp>
+#include <boost/fusion/view/transform_view/transform_view_fwd.hpp>
+#include <boost/fusion/view/transform_view/detail/begin_impl.hpp>
+#include <boost/fusion/view/transform_view/detail/end_impl.hpp>
+#include <boost/fusion/view/transform_view/detail/at_impl.hpp>
+#include <boost/fusion/view/transform_view/detail/value_at_impl.hpp>
+#include <boost/fusion/view/detail/strictest_traversal.hpp>
+#include <boost/fusion/container/vector/vector10.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+ struct transform_view_tag;
+ struct transform_view2_tag;
+ struct fusion_sequence_tag;
+
+ // Binary Version
+ template <typename Sequence1, typename Sequence2, typename F>
+ struct transform_view : sequence_base<transform_view<Sequence1, Sequence2, F> >
+ {
+ BOOST_STATIC_ASSERT(result_of::size<Sequence1>::value == result_of::size<Sequence2>::value);
+ typedef transform_view2_tag fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef mpl::true_ is_view;
+
+ typedef typename traits::category_of<Sequence1>::type category1;
+ typedef typename traits::category_of<Sequence2>::type category2;
+ typedef typename detail::strictest_traversal<
+ fusion::vector2<Sequence1, Sequence2> >::type category;
+ typedef typename result_of::begin<Sequence1>::type first1_type;
+ typedef typename result_of::begin<Sequence2>::type first2_type;
+ typedef typename result_of::end<Sequence1>::type last1_type;
+ typedef typename result_of::end<Sequence2>::type last2_type;
+ typedef typename result_of::size<Sequence1>::type size;
+ typedef Sequence1 sequence1_type;
+ typedef Sequence2 sequence2_type;
+ typedef F transform_type;
+
+ transform_view(Sequence1& seq1, Sequence2& seq2, F const& binop)
+ : f(binop)
+ , seq1(seq1)
+ , seq2(seq2)
+ {}
+
+ first1_type first1() const { return fusion::begin(seq1); }
+ first2_type first2() const { return fusion::begin(seq2); }
+ last1_type last1() const { return fusion::end(seq1); }
+ last2_type last2() const { return fusion::end(seq2); }
+
+ transform_type f;
+ typename mpl::if_<traits::is_view<Sequence1>, Sequence1, Sequence1&>::type seq1;
+ typename mpl::if_<traits::is_view<Sequence2>, Sequence2, Sequence2&>::type seq2;
+ };
+
+ // Unary Version
+ template <typename Sequence, typename F>
+#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
+ struct transform_view<Sequence, F, void_> : sequence_base<transform_view<Sequence, F, void_> >
+#else
+ struct transform_view<Sequence, F> : sequence_base<transform_view<Sequence, F> >
+#endif
+ {
+ typedef transform_view_tag fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef mpl::true_ is_view;
+
+ typedef typename traits::category_of<Sequence>::type category;
+ typedef typename result_of::begin<Sequence>::type first_type;
+ typedef typename result_of::end<Sequence>::type last_type;
+ typedef typename result_of::size<Sequence>::type size;
+ typedef Sequence sequence_type;
+ typedef F transform_type;
+
+ transform_view(Sequence& seq, F const& f)
+ : seq(seq)
+ , f(f)
+ {}
+
+ first_type first() const { return fusion::begin(seq); }
+ last_type last() const { return fusion::end(seq); }
+ typename mpl::if_<traits::is_view<Sequence>, Sequence, Sequence&>::type seq;
+ transform_type f;
+ };
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_TRANSFORM_VIEW_FORWARD_01052006_1839)
+#define FUSION_TRANSFORM_VIEW_FORWARD_01052006_1839
+
+namespace boost { namespace fusion
+{
+ struct void_;
+ struct transform_view_tag;
+ struct transform_view2_tag;
+
+ template <typename A, typename B, typename C = void_>
+ struct transform_view;
+}}
+
+#endif
+
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the 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(FUSION_TRANSFORM_VIEW_ITERATOR_07162005_1033)
+#define FUSION_TRANSFORM_VIEW_ITERATOR_07162005_1033
+
+#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/iterator/mpl/convert_iterator.hpp>
+#include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
+#include <boost/fusion/view/transform_view/detail/deref_impl.hpp>
+#include <boost/fusion/view/transform_view/detail/next_impl.hpp>
+#include <boost/fusion/view/transform_view/detail/prior_impl.hpp>
+#include <boost/fusion/view/transform_view/detail/value_of_impl.hpp>
+#include <boost/fusion/view/transform_view/detail/advance_impl.hpp>
+#include <boost/fusion/view/transform_view/detail/distance_impl.hpp>
+#include <boost/fusion/view/transform_view/detail/equal_to_impl.hpp>
+
+namespace boost { namespace fusion
+{
+ // Unary Version
+ struct transform_view_iterator_tag;
+
+ template <typename First, typename F>
+ struct transform_view_iterator
+ : iterator_base<transform_view_iterator<First, F> >
+ {
+ typedef transform_view_iterator_tag fusion_tag;
+ typedef convert_iterator<First> converter;
+ typedef typename converter::type first_type;
+ typedef typename traits::category_of<first_type>::type category;
+ typedef F transform_type;
+
+ transform_view_iterator(First const& first, F const& f)
+ : first(converter::call(first)), f(f) {}
+
+ first_type first;
+ transform_type f;
+ };
+
+ // Binary Version
+ struct transform_view_iterator2_tag;
+
+ template <typename First1, typename First2, typename F>
+ struct transform_view_iterator2
+ : iterator_base<transform_view_iterator2<First1, First2, F> >
+ {
+ typedef transform_view_iterator2_tag fusion_tag;
+ typedef convert_iterator<First1> converter1;
+ typedef convert_iterator<First2> converter2;
+ typedef typename converter1::type first1_type;
+ typedef typename converter2::type first2_type;
+ typedef typename traits::category_of<first1_type>::type category;
+ typedef F transform_type;
+
+ transform_view_iterator2(First1 const& first1, First2 const& first2, F const& f)
+ : first1(converter1::call(first1)), first2(converter2::call(first2)), f(f) {}
+
+ first1_type first1;
+ first2_type first2;
+ transform_type f;
+ };
+}}
+
+#endif
+
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_ZIP_VIEW_23012006_0811)
+#define FUSION_ZIP_VIEW_23012006_0811
+
+#include <boost/fusion/view/zip_view/zip_view.hpp>
+#include <boost/fusion/view/zip_view/zip_view_iterator.hpp>
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_ADVANCE_IMPL_20061024_2021)
+#define FUSION_ADVANCE_IMPL_20061024_2021
+
+#include <boost/fusion/view/zip_view/zip_view_iterator_fwd.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+
+namespace boost { namespace fusion {
+
+ struct zip_view_iterator_tag;
+
+ namespace detail
+ {
+ template<typename N>
+ struct poly_advance
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename N1, typename It>
+ struct result<poly_advance<N1>(It)>
+ {
+ typedef typename remove_reference<It>::type it;
+ typedef typename result_of::advance<it,N>::type type;
+ };
+
+ template<typename It>
+ typename result<poly_advance(It)>::type
+ operator()(const It& it) const
+ {
+ return fusion::advance<N>(it);
+ }
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct advance_impl;
+
+ template<>
+ struct advance_impl<zip_view_iterator_tag>
+ {
+ template<typename It, typename N>
+ struct apply
+ {
+ typedef zip_view_iterator<
+ typename result_of::transform<typename It::iterators, detail::poly_advance<N> >::type> type;
+
+ static type
+ call(It const& it)
+ {
+ return type(
+ fusion::transform(it.iterators_, detail::poly_advance<N>()));
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_AT_IMPL_20060124_1933)
+#define FUSION_AT_IMPL_20060124_1933
+
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/fusion/support/unused.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+
+namespace boost { namespace fusion
+{
+ struct zip_view_tag;
+
+ namespace detail
+ {
+ template<typename N>
+ struct poly_at
+ {
+ template<typename T>
+ struct result;
+
+ template<typename N1, typename SeqRef>
+ struct result<poly_at<N1>(SeqRef)>
+ : mpl::eval_if<is_same<SeqRef, unused_type const&>,
+ mpl::identity<unused_type>,
+ result_of::at<typename remove_reference<SeqRef>::type, N> >
+ {
+ BOOST_MPL_ASSERT((is_reference<SeqRef>));
+ };
+
+ template<typename Seq>
+ typename result<poly_at(Seq&)>::type
+ operator()(Seq& seq) const
+ {
+ return fusion::at<N>(seq);
+ }
+
+ template<typename Seq>
+ typename result<poly_at(Seq const&)>::type
+ operator()(Seq const& seq) const
+ {
+ return fusion::at<N>(seq);
+ }
+
+ unused_type operator()(unused_type const&) const
+ {
+ return unused_type();
+ }
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct at_impl;
+
+ template<>
+ struct at_impl<zip_view_tag>
+ {
+ template<typename Seq, typename N>
+ struct apply
+ {
+ typedef typename result_of::as_vector<
+ typename result_of::transform<
+ typename Seq::sequences, detail::poly_at<N> >::type>::type type;
+
+ static type
+ call(Seq& seq)
+ {
+ return type(
+ fusion::transform(seq.sequences_, detail::poly_at<N>()));
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_BEGIN_IMPL_20060123_2147)
+#define FUSION_BEGIN_IMPL_20060123_2147
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/view/zip_view/zip_view_iterator_fwd.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/fusion/support/unused.hpp>
+
+namespace boost { namespace fusion {
+
+ struct zip_view_tag;
+
+ namespace detail
+ {
+ struct poly_begin
+ {
+ template<typename T>
+ struct result;
+
+ template<typename SeqRef>
+ struct result<poly_begin(SeqRef)>
+ : mpl::eval_if<is_same<SeqRef, unused_type const&>,
+ mpl::identity<unused_type>,
+ result_of::begin<typename remove_reference<SeqRef>::type> >
+ {
+ BOOST_MPL_ASSERT((is_reference<SeqRef>));
+ };
+
+ template<typename Seq>
+ typename result<poly_begin(Seq&)>::type
+ operator()(Seq& seq) const
+ {
+ return fusion::begin(seq);
+ }
+
+ template<typename Seq>
+ typename result<poly_begin(Seq const&)>::type
+ operator()(Seq const& seq) const
+ {
+ return fusion::begin(seq);
+ }
+
+ unused_type operator()(unused_type const&) const
+ {
+ return unused_type();
+ }
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct begin_impl;
+
+ template<>
+ struct begin_impl<zip_view_tag>
+ {
+ template<typename Sequence>
+ struct apply
+ {
+ typedef zip_view_iterator<
+ typename result_of::transform<typename Sequence::sequences, detail::poly_begin>::type,
+ typename Sequence::category> type;
+
+ static type
+ call(Sequence& sequence)
+ {
+ return type(
+ fusion::transform(sequence.sequences_, detail::poly_begin()));
+ }
+ };
+
+
+
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_DEREF_IMPL_20061024_1959)
+#define FUSION_DEREF_IMPL_20061024_1959
+
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/support/unused.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/remove_const.hpp>
+
+namespace boost { namespace fusion {
+
+ struct zip_view_iterator_tag;
+
+ namespace detail
+ {
+ struct poly_deref
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename It>
+ struct result<poly_deref(It)>
+ {
+ typedef typename remove_const<
+ typename remove_reference<It>::type>::type it;
+
+ typedef typename mpl::eval_if<is_same<it, unused_type>,
+ mpl::identity<unused_type>,
+ result_of::deref<it> >::type type;
+ };
+
+ template<typename It>
+ typename result<poly_deref(It)>::type
+ operator()(const It& it) const
+ {
+ return fusion::deref(it);
+ }
+
+ unused_type operator()(unused_type const&) const
+ {
+ return unused_type();
+ }
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct deref_impl;
+
+ template<>
+ struct deref_impl<zip_view_iterator_tag>
+ {
+ template<typename It>
+ struct apply
+ {
+ typedef typename result_of::as_vector<
+ typename result_of::transform<typename It::iterators, detail::poly_deref>::type>::type type;
+
+ static type
+ call(It const& it)
+ {
+ return type(
+ fusion::transform(it.iterators_, detail::poly_deref()));
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_DISTANCE_IMPL_20060124_2033)
+#define FUSION_DISTANCE_IMPL_20060124_2033
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/placeholders.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/fusion/iterator/distance.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/algorithm/query/find_if.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion {
+
+ struct zip_view_iterator_tag;
+
+ struct random_access_iterator_tag;
+
+ namespace detail
+ {
+ template<typename FoundIt, typename SearchIt>
+ struct best_distance
+ {
+ typedef typename result_of::find_if<
+ typename SearchIt::iterators, is_same<traits::category_of<mpl::_>, random_access_iterator_tag> > finder;
+
+ BOOST_MPL_ASSERT_NOT((is_same<typename finder::type, result_of::end<typename SearchIt::iterators> >));
+
+ typedef typename result_of::distance<FoundIt, typename finder::type>::type type;
+ };
+
+ template<typename It1, typename It2>
+ struct default_distance
+ : result_of::distance<
+ typename result_of::value_at_c<typename It1::iterators, 0>::type,
+ typename result_of::value_at_c<typename It2::iterators, 0>::type>
+ {};
+
+ template<typename It1, typename It2>
+ struct zip_view_iterator_distance
+ {
+ typedef typename result_of::find_if<
+ typename It1::iterators, is_same<traits::category_of<mpl::_>, random_access_iterator_tag> > finder;
+
+ typedef typename mpl::eval_if<
+ is_same<typename finder::type, typename result_of::end<typename It1::iterators>::type>,
+ detail::default_distance<It1, It2> ,
+ detail::best_distance<typename finder::type, It2> >::type type;
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct distance_impl;
+
+ template<>
+ struct distance_impl<zip_view_iterator_tag>
+ {
+ template<typename It1, typename It2>
+ struct apply
+ : detail::zip_view_iterator_distance<It1, It2>::type
+ {
+ static typename detail::zip_view_iterator_distance<It1, It2>::type
+ call(It1 const& it1, It2 const& it2)
+ {
+ return typename detail::zip_view_iterator_distance<It1, It2>::type();
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_END_IMPL_20060123_2208)
+#define FUSION_END_IMPL_20060123_2208
+
+#include <boost/fusion/view/zip_view/zip_view_iterator_fwd.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/min.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion {
+
+ struct zip_view_tag;
+
+ namespace detail
+ {
+ template<typename SeqRef, typename M>
+ struct get_endpoint
+ {
+ typedef typename remove_reference<SeqRef>::type Seq;
+ typedef typename result_of::begin<Seq>::type begin;
+ typedef typename result_of::advance<begin, M>::type type;
+ };
+
+ template<typename M>
+ struct endpoints
+ {
+ template<typename T>
+ struct result;
+
+ template<typename M1, typename SeqRef>
+ struct result<endpoints<M1>(SeqRef)>
+ : mpl::eval_if<is_same<SeqRef, unused_type const&>,
+ mpl::identity<unused_type>,
+ get_endpoint<SeqRef, M> >
+ {
+ BOOST_MPL_ASSERT((is_reference<SeqRef>));
+ };
+
+ template<typename Seq>
+ typename result<endpoints(Seq&)>::type
+ operator()(Seq& seq) const
+ {
+ return fusion::advance<M>(fusion::begin(seq));
+ }
+
+ template<typename Seq>
+ typename result<endpoints(Seq const&)>::type
+ operator()(Seq const& seq)
+ {
+ return fusion::advance<M>(fusion::begin(seq));
+ }
+
+ unused_type operator()(unused_type const&) const
+ {
+ return unused_type();
+ }
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct end_impl;
+
+ template<>
+ struct end_impl<zip_view_tag>
+ {
+ template<typename Sequence>
+ struct apply
+ {
+ typedef zip_view_iterator<
+ typename result_of::transform<typename Sequence::sequences, detail::endpoints<typename Sequence::size> >::type,
+ typename Sequence::category> type;
+
+ static type
+ call(Sequence& sequence)
+ {
+ return type(
+ fusion::transform(sequence.sequences_, detail::endpoints<typename Sequence::size>()));
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_EQUAL_TO_IMPL_20060128_1423)
+#define FUSION_EQUAL_TO_IMPL_20060128_1423
+
+#include <boost/fusion/mpl.hpp>
+
+#include <boost/mpl/lambda.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/transform_view.hpp>
+#include <boost/mpl/zip_view.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/mpl/unpack_args.hpp>
+#include <boost/mpl/find_if.hpp>
+#include <boost/mpl/end.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/equal_to.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/fusion/iterator/equal_to.hpp>
+
+namespace boost { namespace fusion {
+
+ struct zip_view_iterator_tag;
+
+ namespace detail
+ {
+ template<typename It1, typename It2>
+ struct zip_iterators_equal
+ {
+ typedef mpl::zip_view<mpl::vector2<typename It1::iterators, typename It2::iterators> > zipped;
+ typedef mpl::transform_view<zipped, mpl::unpack_args<result_of::equal_to<mpl::_,mpl::_> > > transformed;
+
+ typedef typename mpl::find_if<transformed, mpl::equal_to<mpl::_, mpl::false_> >::type found;
+
+ typedef typename is_same<typename mpl::end<transformed>::type, found>::type type;
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct equal_to_impl;
+
+ template<>
+ struct equal_to_impl<zip_view_iterator_tag>
+ {
+ template<typename It1, typename It2>
+ struct apply
+ : detail::zip_iterators_equal<It1, It2>::type
+ {};
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_NEXT_IMPL_20060124_2006)
+#define FUSION_NEXT_IMPL_20060124_2006
+
+#include <boost/fusion/view/zip_view/zip_view_iterator_fwd.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/fusion/support/unused.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/remove_const.hpp>
+
+namespace boost { namespace fusion {
+
+ struct zip_view_iterator_tag;
+
+ namespace detail
+ {
+ struct poly_next
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename It>
+ struct result<poly_next(It)>
+ {
+ typedef typename remove_const<
+ typename remove_reference<It>::type>::type it;
+
+ typedef typename mpl::eval_if<is_same<it, unused_type>,
+ mpl::identity<unused_type>,
+ result_of::next<it> >::type type;
+ };
+
+ template<typename It>
+ typename result<poly_next(It)>::type
+ operator()(const It& it) const
+ {
+ return fusion::next(it);
+ }
+
+ unused_type operator()(unused_type const&) const
+ {
+ return unused_type();
+ }
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct next_impl;
+
+ template<>
+ struct next_impl<zip_view_iterator_tag>
+ {
+ template<typename Iterator>
+ struct apply
+ {
+ typedef fusion::zip_view_iterator<
+ typename result_of::transform<typename Iterator::iterators, detail::poly_next>::type,
+ typename Iterator::category> type;
+
+ static type
+ call(Iterator const& it)
+ {
+ return type(
+ fusion::transform(it.iterators_, detail::poly_next()));
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_PRIOR_IMPL_20060124_2006)
+#define FUSION_PRIOR_IMPL_20060124_2006
+
+#include <boost/fusion/view/zip_view/zip_view_iterator_fwd.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/fusion/support/unused.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/remove_const.hpp>
+
+namespace boost { namespace fusion {
+
+ struct zip_view_iterator_tag;
+
+ namespace detail
+ {
+ struct poly_prior
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename It>
+ struct result<poly_prior(It)>
+ {
+ typedef typename remove_const<
+ typename remove_reference<It>::type>::type it;
+ typedef typename mpl::eval_if<is_same<it, unused_type>,
+ mpl::identity<unused_type>,
+ result_of::prior<it> >::type type;
+ };
+
+ template<typename It>
+ typename result<poly_prior(It)>::type
+ operator()(const It& it) const
+ {
+ return fusion::prior(it);
+ }
+
+ unused_type operator()(unused_type const&) const
+ {
+ return unused_type();
+ }
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct prior_impl;
+
+ template<>
+ struct prior_impl<zip_view_iterator_tag>
+ {
+ template<typename Iterator>
+ struct apply
+ {
+ typedef zip_view_iterator<
+ typename result_of::transform<typename Iterator::iterators, detail::poly_prior>::type,
+ typename Iterator::category> type;
+
+ static type
+ call(Iterator const& it)
+
+ {
+ return type(
+ fusion::transform(it.iterators_, detail::poly_prior()));
+ }
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_SIZE_IMPL_20060124_0800)
+#define FUSION_SIZE_IMPL_20060124_0800
+
+namespace boost { namespace fusion {
+
+ struct zip_view_tag;
+
+ namespace extension
+ {
+ template<typename Sequence>
+ struct size;
+
+ template<typename Tag>
+ struct size_impl;
+
+ template<>
+ struct size_impl<zip_view_tag>
+ {
+ template<typename Sequence>
+ struct apply
+ {
+ typedef typename Sequence::size type;
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_VALUE_AT_IMPL_20060124_2129)
+#define FUSION_VALUE_AT_IMPL_20060124_2129
+
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/fusion/support/unused.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion {
+
+ struct zip_view_tag;
+
+ namespace detail
+ {
+ template<typename N>
+ struct poly_value_at
+ {
+ template<typename T>
+ struct result;
+
+ template<typename N1, typename Seq>
+ struct result<poly_value_at<N1>(Seq)>
+ : mpl::eval_if<is_same<Seq, unused_type const&>,
+ mpl::identity<unused_type>,
+ result_of::value_at<typename remove_reference<Seq>::type, N> >
+ {};
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct value_at_impl;
+
+ template<>
+ struct value_at_impl<zip_view_tag>
+ {
+ template<typename Sequence, typename N>
+ struct apply
+ {
+ typedef typename result_of::transform<
+ typename Sequence::sequences,
+ detail::poly_value_at<N> >::type values;
+ typedef typename result_of::as_vector<values>::type type;
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_VALUE_OF_IMPL_20060124_2147)
+#define FUSION_VALUE_OF_IMPL_20060124_2147
+
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/mpl/placeholders.hpp>
+#include <boost/fusion/support/unused.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion
+{
+ struct zip_view_iterator_tag;
+
+ namespace detail
+ {
+ struct poly_value_of
+ {
+ template<typename T>
+ struct result;
+
+ template<typename It>
+ struct result<poly_value_of(It)>
+ : mpl::eval_if<is_same<It, unused_type>,
+ mpl::identity<unused_type>,
+ result_of::value_of<It> >
+ {};
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct value_of_impl;
+
+ template<>
+ struct value_of_impl<zip_view_iterator_tag>
+ {
+ template<typename Iterator>
+ struct apply
+ {
+ typedef typename result_of::transform<
+ typename Iterator::iterators,
+ detail::poly_value_of>::type values;
+
+ typedef typename result_of::as_vector<values>::type type;
+ };
+ };
+ }
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_ZIP_VIEW_23012006_0813)
+#define FUSION_ZIP_VIEW_23012006_0813
+
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/unused.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/view/detail/strictest_traversal.hpp>
+#include <boost/fusion/view/zip_view/detail/begin_impl.hpp>
+#include <boost/fusion/view/zip_view/detail/end_impl.hpp>
+#include <boost/fusion/view/zip_view/detail/size_impl.hpp>
+#include <boost/fusion/view/zip_view/detail/at_impl.hpp>
+#include <boost/fusion/view/zip_view/detail/value_at_impl.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/algorithm/query/find_if.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/mpl.hpp>
+#include <boost/fusion/algorithm/transformation/remove.hpp>
+
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/placeholders.hpp>
+#include <boost/mpl/transform_view.hpp>
+#include <boost/mpl/at.hpp>
+#include <boost/mpl/find_if.hpp>
+#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/eval_if.hpp>
+
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/is_reference.hpp>
+
+namespace boost { namespace fusion {
+
+ namespace detail
+ {
+ template<typename Sequences>
+ struct all_references
+ : fusion::result_of::equal_to<typename fusion::result_of::find_if<Sequences, mpl::not_<is_reference<mpl::_> > >::type, typename fusion::result_of::end<Sequences>::type>
+ {};
+
+ struct seq_ref_size
+ {
+ template<typename Params>
+ struct result;
+
+ template<typename Seq>
+ struct result<seq_ref_size(Seq)>
+ {
+ static int const high_int = static_cast<int>(
+ (static_cast<unsigned>(~0) >> 1) - 1);
+
+ typedef typename remove_reference<Seq>::type SeqClass;
+
+ typedef typename mpl::eval_if<
+ traits::is_forward<SeqClass>,
+ result_of::size<SeqClass>,
+ mpl::int_<high_int> >::type type;
+ };
+ };
+
+ struct poly_min
+ {
+ template<typename T>
+ struct result;
+
+ template<typename Lhs, typename Rhs>
+ struct result<poly_min(Lhs, Rhs)>
+ {
+ typedef typename remove_reference<Lhs>::type lhs;
+ typedef typename remove_reference<Rhs>::type rhs;
+ typedef typename mpl::min<lhs, rhs>::type type;
+ };
+ };
+
+ template<typename Sequences>
+ struct min_size
+ {
+ typedef typename result_of::transform<Sequences, detail::seq_ref_size>::type sizes;
+ typedef typename result_of::fold<sizes, typename result_of::front<sizes>::type, detail::poly_min>::type type;
+ };
+ }
+
+ struct zip_view_tag;
+ struct fusion_sequence_tag;
+
+ template<typename Sequences>
+ struct zip_view : sequence_base< zip_view<Sequences> >
+ {
+ typedef typename result_of::remove<Sequences, unused_type const&>::type real_sequences;
+ BOOST_MPL_ASSERT((detail::all_references<Sequences>));
+ typedef typename detail::strictest_traversal<real_sequences>::type category;
+ typedef zip_view_tag fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef mpl::true_ is_view;
+ typedef typename fusion::result_of::as_vector<Sequences>::type sequences;
+ typedef typename detail::min_size<real_sequences>::type size;
+
+ zip_view(
+ const Sequences& seqs)
+ : sequences_(seqs)
+ {};
+
+ sequences sequences_;
+ };
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_ZIP_VIEW_ITERATOR_23012006_0814)
+#define FUSION_ZIP_VIEW_ITERATOR_23012006_0814
+
+#include <boost/fusion/view/zip_view/zip_view_iterator_fwd.hpp>
+#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/view/zip_view/detail/deref_impl.hpp>
+#include <boost/fusion/view/zip_view/detail/next_impl.hpp>
+#include <boost/fusion/view/zip_view/detail/prior_impl.hpp>
+#include <boost/fusion/view/zip_view/detail/advance_impl.hpp>
+#include <boost/fusion/view/zip_view/detail/distance_impl.hpp>
+#include <boost/fusion/view/zip_view/detail/value_of_impl.hpp>
+#include <boost/fusion/view/zip_view/detail/equal_to_impl.hpp>
+
+#include <boost/fusion/container/vector/convert.hpp>
+
+namespace boost { namespace fusion {
+
+ struct zip_view_iterator_tag;
+
+ template<
+ typename IteratorSequence,
+ typename Traversal>
+ struct zip_view_iterator
+ : iterator_base<zip_view_iterator<IteratorSequence, Traversal> >
+ {
+ typedef zip_view_iterator_tag fusion_tag;
+ typedef Traversal category;
+
+ template<typename InitSeq>
+ zip_view_iterator(
+ const InitSeq& iterator_seq)
+ : iterators_(iterator_seq)
+ {}
+
+ typedef typename result_of::as_vector<IteratorSequence>::type iterators;
+ iterators iterators_;
+ };
+}}
+
+#endif
--- /dev/null
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ Distributed under the 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(FUSION_ZIP_VIEW_ITERATOR_FWD)
+#define FUSION_ZIP_VIEW_ITERATOR_FWD
+
+#include <boost/fusion/view/detail/strictest_traversal.hpp>
+
+namespace boost { namespace fusion {
+
+ template<
+ typename IteratorSequence,
+ typename Traversal = typename detail::strictest_traversal<IteratorSequence>::type>
+ struct zip_view_iterator;
+
+}}
+
+#endif
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+#ifndef BOOST_TR1_ARRAY_HPP_INCLUDED
+# define BOOST_TR1_ARRAY_HPP_INCLUDED
+# include <boost/tr1/detail/config.hpp>
+
+#ifdef BOOST_HAS_TR1_ARRAY
+
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next BOOST_TR1_HEADER(array)
+# else
+# include <boost/tr1/detail/config_all.hpp>
+# include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(array))
+# endif
+
+#else
+
+#include <boost/array.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/detail/workaround.hpp>
+
+namespace std{ namespace tr1{
+
+using ::boost::array;
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
+// [6.1.3.2] Tuple creation functions
+using ::boost::swap;
+#endif
+
+#if !defined(BOOST_TR1_USE_OLD_TUPLE)
+}} namespace boost{ namespace fusion{
+#endif
+
+// [6.2.2.5] Tuple interface to class template array
+template <class T> struct tuple_size; // forward declaration
+template <int I, class T> struct tuple_element; // forward declaration
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+template <class T, size_t N>
+struct tuple_size< ::boost::array<T, N> >
+ : public ::boost::integral_constant< ::std::size_t, N>{};
+
+
+template <int I, class T, size_t N>
+struct tuple_element<I, ::boost::array<T, N> >
+{
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570))
+ BOOST_STATIC_ASSERT(I < (int)N);
+ BOOST_STATIC_ASSERT(I >= 0);
+#endif
+ typedef T type;
+};
+#endif
+template <int I, class T, size_t N>
+T& get( ::boost::array<T, N>& a)
+{
+ BOOST_STATIC_ASSERT(I < N);
+ BOOST_STATIC_ASSERT(I >= 0);
+ return a[I];
+}
+
+template <int I, class T, size_t N>
+const T& get(const array<T, N>& a)
+{
+ BOOST_STATIC_ASSERT(I < N);
+ BOOST_STATIC_ASSERT(I >= 0);
+ return a[I];
+}
+
+#if !defined(BOOST_TR1_USE_OLD_TUPLE)
+}} namespace std{ namespace tr1{
+
+ using ::boost::fusion::tuple_size;
+ using ::boost::fusion::tuple_element;
+ using ::boost::fusion::get;
+
+#endif
+
+
+} } // namespaces
+
+#endif
+
+#endif
--- /dev/null
+// (C) Copyright John Maddock 2008.
+// 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)
+
+#ifndef BOOST_TR1_CMATH_HPP_INCLUDED
+# define BOOST_TR1_CMATH_HPP_INCLUDED
+# include <boost/tr1/detail/config.hpp>
+
+#ifdef BOOST_HAS_TR1_CMATH
+
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next BOOST_TR1_HEADER(cmath)
+# else
+# include <boost/tr1/detail/config_all.hpp>
+# include BOOST_TR1_HEADER(cmath)
+# endif
+
+#else
+
+#include <boost/math/tr1.hpp>
+
+namespace std{ namespace tr1{
+
+using boost::math::tr1::assoc_laguerre;
+using boost::math::tr1::assoc_laguerref;
+using boost::math::tr1::assoc_laguerrel;
+// [5.2.1.2] associated Legendre functions:
+using boost::math::tr1::assoc_legendre;
+using boost::math::tr1::assoc_legendref;
+using boost::math::tr1::assoc_legendrel;
+// [5.2.1.3] beta function:
+using boost::math::tr1::beta;
+using boost::math::tr1::betaf;
+using boost::math::tr1::betal;
+// [5.2.1.4] (complete) elliptic integral of the first kind:
+using boost::math::tr1::comp_ellint_1;
+using boost::math::tr1::comp_ellint_1f;
+using boost::math::tr1::comp_ellint_1l;
+// [5.2.1.5] (complete) elliptic integral of the second kind:
+using boost::math::tr1::comp_ellint_2;
+using boost::math::tr1::comp_ellint_2f;
+using boost::math::tr1::comp_ellint_2l;
+// [5.2.1.6] (complete) elliptic integral of the third kind:
+using boost::math::tr1::comp_ellint_3;
+using boost::math::tr1::comp_ellint_3f;
+using boost::math::tr1::comp_ellint_3l;
+#if 0
+// [5.2.1.7] confluent hypergeometric functions:
+using boost::math::tr1::conf_hyperg;
+using boost::math::tr1::conf_hypergf;
+using boost::math::tr1::conf_hypergl;
+#endif
+// [5.2.1.8] regular modified cylindrical Bessel functions:
+using boost::math::tr1::cyl_bessel_i;
+using boost::math::tr1::cyl_bessel_if;
+using boost::math::tr1::cyl_bessel_il;
+// [5.2.1.9] cylindrical Bessel functions (of the first kind):
+using boost::math::tr1::cyl_bessel_j;
+using boost::math::tr1::cyl_bessel_jf;
+using boost::math::tr1::cyl_bessel_jl;
+// [5.2.1.10] irregular modified cylindrical Bessel functions:
+using boost::math::tr1::cyl_bessel_k;
+using boost::math::tr1::cyl_bessel_kf;
+using boost::math::tr1::cyl_bessel_kl;
+// [5.2.1.11] cylindrical Neumann functions;
+// cylindrical Bessel functions (of the second kind):
+using boost::math::tr1::cyl_neumann;
+using boost::math::tr1::cyl_neumannf;
+using boost::math::tr1::cyl_neumannl;
+// [5.2.1.12] (incomplete) elliptic integral of the first kind:
+using boost::math::tr1::ellint_1;
+using boost::math::tr1::ellint_1f;
+using boost::math::tr1::ellint_1l;
+// [5.2.1.13] (incomplete) elliptic integral of the second kind:
+using boost::math::tr1::ellint_2;
+using boost::math::tr1::ellint_2f;
+using boost::math::tr1::ellint_2l;
+// [5.2.1.14] (incomplete) elliptic integral of the third kind:
+using boost::math::tr1::ellint_3;
+using boost::math::tr1::ellint_3f;
+using boost::math::tr1::ellint_3l;
+// [5.2.1.15] exponential integral:
+using boost::math::tr1::expint;
+using boost::math::tr1::expintf;
+using boost::math::tr1::expintl;
+// [5.2.1.16] Hermite polynomials:
+using boost::math::tr1::hermite;
+using boost::math::tr1::hermitef;
+using boost::math::tr1::hermitel;
+#if 0
+// [5.2.1.17] hypergeometric functions:
+using boost::math::tr1::hyperg;
+using boost::math::tr1::hypergf;
+using boost::math::tr1::hypergl;
+#endif
+// [5.2.1.18] Laguerre polynomials:
+using boost::math::tr1::laguerre;
+using boost::math::tr1::laguerref;
+using boost::math::tr1::laguerrel;
+// [5.2.1.19] Legendre polynomials:
+using boost::math::tr1::legendre;
+using boost::math::tr1::legendref;
+using boost::math::tr1::legendrel;
+// [5.2.1.20] Riemann zeta function:
+using boost::math::tr1::riemann_zeta;
+using boost::math::tr1::riemann_zetaf;
+using boost::math::tr1::riemann_zetal;
+// [5.2.1.21] spherical Bessel functions (of the first kind):
+using boost::math::tr1::sph_bessel;
+using boost::math::tr1::sph_besself;
+using boost::math::tr1::sph_bessell;
+// [5.2.1.22] spherical associated Legendre functions:
+using boost::math::tr1::sph_legendre;
+using boost::math::tr1::sph_legendref;
+using boost::math::tr1::sph_legendrel;
+// [5.2.1.23] spherical Neumann functions;
+// spherical Bessel functions (of the second kind):
+using boost::math::tr1::sph_neumann;
+using boost::math::tr1::sph_neumannf;
+using boost::math::tr1::sph_neumannl;
+
+// types
+using boost::math::tr1::double_t;
+using boost::math::tr1::float_t;
+// functions
+using boost::math::tr1::acosh;
+using boost::math::tr1::acoshf;
+using boost::math::tr1::acoshl;
+using boost::math::tr1::asinh;
+using boost::math::tr1::asinhf;
+using boost::math::tr1::asinhl;
+using boost::math::tr1::atanh;
+using boost::math::tr1::atanhf;
+using boost::math::tr1::atanhl;
+using boost::math::tr1::cbrt;
+using boost::math::tr1::cbrtf;
+using boost::math::tr1::cbrtl;
+using boost::math::tr1::copysign;
+using boost::math::tr1::copysignf;
+using boost::math::tr1::copysignl;
+using boost::math::tr1::erf;
+using boost::math::tr1::erff;
+using boost::math::tr1::erfl;
+using boost::math::tr1::erfc;
+using boost::math::tr1::erfcf;
+using boost::math::tr1::erfcl;
+#if 0
+using boost::math::tr1::exp2;
+using boost::math::tr1::exp2f;
+using boost::math::tr1::exp2l;
+#endif
+using boost::math::tr1::expm1;
+using boost::math::tr1::expm1f;
+using boost::math::tr1::expm1l;
+#if 0
+using boost::math::tr1::fdim;
+using boost::math::tr1::fdimf;
+using boost::math::tr1::fdiml;
+using boost::math::tr1::fma;
+using boost::math::tr1::fmaf;
+using boost::math::tr1::fmal;
+#endif
+using boost::math::tr1::fmax;
+using boost::math::tr1::fmaxf;
+using boost::math::tr1::fmaxl;
+using boost::math::tr1::fmin;
+using boost::math::tr1::fminf;
+using boost::math::tr1::fminl;
+using boost::math::tr1::hypot;
+using boost::math::tr1::hypotf;
+using boost::math::tr1::hypotl;
+#if 0
+using boost::math::tr1::ilogb;
+using boost::math::tr1::ilogbf;
+using boost::math::tr1::ilogbl;
+#endif
+using boost::math::tr1::lgamma;
+using boost::math::tr1::lgammaf;
+using boost::math::tr1::lgammal;
+#if 0
+using boost::math::tr1::llrint;
+using boost::math::tr1::llrintf;
+using boost::math::tr1::llrintl;
+#endif
+using boost::math::tr1::llround;
+using boost::math::tr1::llroundf;
+using boost::math::tr1::llroundl;
+using boost::math::tr1::log1p;
+using boost::math::tr1::log1pf;
+using boost::math::tr1::log1pl;
+#if 0
+using boost::math::tr1::log2;
+using boost::math::tr1::log2f;
+using boost::math::tr1::log2l;
+using boost::math::tr1::logb;
+using boost::math::tr1::logbf;
+using boost::math::tr1::logbl;
+using boost::math::tr1::lrint;
+using boost::math::tr1::lrintf;
+using boost::math::tr1::lrintl;
+#endif
+using boost::math::tr1::lround;
+using boost::math::tr1::lroundf;
+using boost::math::tr1::lroundl;
+#if 0
+using boost::math::tr1::nan;
+using boost::math::tr1::nanf;
+using boost::math::tr1::nanl;
+using boost::math::tr1::nearbyint;
+using boost::math::tr1::nearbyintf;
+using boost::math::tr1::nearbyintl;
+#endif
+using boost::math::tr1::nextafter;
+using boost::math::tr1::nextafterf;
+using boost::math::tr1::nextafterl;
+using boost::math::tr1::nexttoward;
+using boost::math::tr1::nexttowardf;
+using boost::math::tr1::nexttowardl;
+#if 0
+using boost::math::tr1::remainder;
+using boost::math::tr1::remainderf;
+using boost::math::tr1::remainderl;
+using boost::math::tr1::remquo;
+using boost::math::tr1::remquof;
+using boost::math::tr1::remquol;
+using boost::math::tr1::rint;
+using boost::math::tr1::rintf;
+using boost::math::tr1::rintl;
+#endif
+using boost::math::tr1::round;
+using boost::math::tr1::roundf;
+using boost::math::tr1::roundl;
+#if 0
+using boost::math::tr1::scalbln;
+using boost::math::tr1::scalblnf;
+using boost::math::tr1::scalblnl;
+using boost::math::tr1::scalbn;
+using boost::math::tr1::scalbnf;
+using boost::math::tr1::scalbnl;
+#endif
+using boost::math::tr1::tgamma;
+using boost::math::tr1::tgammaf;
+using boost::math::tr1::tgammal;
+using boost::math::tr1::trunc;
+using boost::math::tr1::truncf;
+using boost::math::tr1::truncl;
+// C99 macros defined as C++ templates
+using boost::math::tr1::signbit;
+using boost::math::tr1::fpclassify;
+using boost::math::tr1::isfinite;
+using boost::math::tr1::isinf;
+using boost::math::tr1::isnan;
+using boost::math::tr1::isnormal;
+#if 0
+using boost::math::tr1::isgreater;
+using boost::math::tr1::isgreaterequal;
+using boost::math::tr1::isless;
+using boost::math::tr1::islessequal;
+using boost::math::tr1::islessgreater;
+using boost::math::tr1::isunordered;
+#endif
+} } // namespaces
+
+#endif // BOOST_HAS_TR1_CMATH
+
+#endif // BOOST_TR1_CMATH_HPP_INCLUDED
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+#ifndef BOOST_TR1_COMPLEX_HPP_INCLUDED
+# define BOOST_TR1_COMPLEX_HPP_INCLUDED
+# include <boost/tr1/detail/config.hpp>
+# include <complex>
+
+#ifndef BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG
+
+#include <boost/math/complex.hpp>
+
+namespace std {
+namespace tr1 {
+
+using boost::math::acos;
+using boost::math::asin;
+using boost::math::atan;
+using boost::math::acosh;
+using boost::math::asinh;
+using boost::math::atanh;
+using boost::math::fabs;
+
+} }
+
+#else
+
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next BOOST_TR1_HEADER(complex)
+# else
+# include <boost/tr1/detail/config_all.hpp>
+# include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(complex))
+# endif
+
+#endif
+
+#ifndef BOOST_HAS_TR1_COMPLEX_OVERLOADS
+
+#include <boost/tr1/detail/math_overloads.hpp>
+#include <boost/assert.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/config/no_tr1/cmath.hpp>
+
+namespace std{
+
+#ifdef BOOST_NO_STDC_NAMESPACE
+ using :: atan2;
+#endif
+
+#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+template <class T>
+inline BOOST_TR1_MATH_RETURN(double) arg(const T& t)
+{
+ return ::std::atan2(0.0, static_cast<double>(t));
+}
+#else
+inline double arg(const double& t)
+{
+ return ::std::atan2(0.0, t);
+}
+#endif
+inline long double arg(const long double& t)
+{
+ return ::std::atan2(0.0L, static_cast<long double>(t));
+}
+inline float arg(const float& t)
+{
+ return ::std::atan2(0.0F, static_cast<float>(t));
+}
+
+#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+template <class T>
+inline BOOST_TR1_MATH_RETURN(double) norm(const T& t)
+{
+ double r = static_cast<double>(t);
+ return r*r;
+}
+#else
+inline double norm(const double& t)
+{
+ return t*t;
+}
+#endif
+inline long double norm(const long double& t)
+{
+ long double l = t;
+ return l*l;
+}
+inline float norm(const float& t)
+{
+ float f = t;
+ return f*f;
+}
+
+#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+template <class T>
+inline BOOST_TR1_MATH_RETURN(std::complex<double>) conj(const T& t)
+{
+ return ::std::conj(std::complex<double>(static_cast<double>(t)));
+}
+#else
+inline std::complex<double> conj(const double& t)
+{
+ return ::std::conj(std::complex<double>(t));
+}
+#endif
+inline std::complex<long double> conj(const long double& t)
+{
+ return ::std::conj(std::complex<long double>(t));
+}
+inline std::complex<float> conj(const float& t)
+{
+ std::complex<float> ct(t);
+ ct = ::std::conj(ct);
+ return ct;
+}
+
+#if !BOOST_WORKAROUND(__BORLANDC__, <=0x570) && !BOOST_WORKAROUND(BOOST_MSVC, < 1310)
+inline complex<double> polar(const char& rho, const char& theta = 0)
+{ return ::std::polar(static_cast<double>(rho), static_cast<double>(theta)); }
+inline complex<double> polar(const unsigned char& rho, const unsigned char& theta = 0)
+{ return ::std::polar(static_cast<double>(rho), static_cast<double>(theta)); }
+inline complex<double> polar(const signed char& rho, const signed char& theta = 0)
+{ return ::std::polar(static_cast<double>(rho), static_cast<double>(theta)); }
+inline complex<double> polar(const short& rho, const short& theta = 0)
+{ return ::std::polar(static_cast<double>(rho), static_cast<double>(theta)); }
+inline complex<double> polar(const unsigned short& rho, const unsigned short& theta = 0)
+{ return ::std::polar(static_cast<double>(rho), static_cast<double>(theta)); }
+inline complex<double> polar(const int& rho, const int& theta = 0)
+{ return ::std::polar(static_cast<double>(rho), static_cast<double>(theta)); }
+inline complex<double> polar(const unsigned int& rho, const unsigned int& theta = 0)
+{ return ::std::polar(static_cast<double>(rho), static_cast<double>(theta)); }
+inline complex<double> polar(const long& rho, const long& theta = 0)
+{ return ::std::polar(static_cast<double>(rho), static_cast<double>(theta)); }
+inline complex<double> polar(const unsigned long& rho, const unsigned long& theta = 0)
+{ return ::std::polar(static_cast<double>(rho), static_cast<double>(theta)); }
+#ifdef BOOST_HAS_LONG_LONG
+inline complex<double> polar(const long long& rho, const long long& theta = 0)
+{ return ::std::polar(static_cast<double>(rho), static_cast<double>(theta)); }
+inline complex<double> polar(const unsigned long long& rho, const unsigned long long& theta = 0)
+{ return ::std::polar(static_cast<double>(rho), static_cast<double>(theta)); }
+#elif defined(BOOST_HAS_MS_INT64)
+inline complex<double> polar(const __int64& rho, const __int64& theta = 0)
+{ return ::std::polar(static_cast<double>(rho), static_cast<double>(theta)); }
+inline complex<double> polar(const unsigned __int64& rho, const unsigned __int64& theta = 0)
+{ return ::std::polar(static_cast<double>(rho), static_cast<double>(theta)); }
+#endif
+
+template<class T, class U>
+inline complex<typename boost::tr1_detail::promote_to_real<T, U>::type>
+ polar(const T& rho, const U& theta)
+{
+ typedef typename boost::tr1_detail::promote_to_real<T, U>::type real_type;
+ return std::polar(static_cast<real_type>(rho), static_cast<real_type>(theta));
+}
+#endif
+
+#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+template <class T>
+inline BOOST_TR1_MATH_RETURN(double) imag(const T& )
+{
+ return 0;
+}
+#else
+inline double imag(const double& )
+{
+ return 0;
+}
+#endif
+inline long double imag(const long double& )
+{
+ return 0;
+}
+inline float imag(const float& )
+{
+ return 0;
+}
+
+#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+template <class T>
+inline BOOST_TR1_MATH_RETURN(double) real(const T& t)
+{
+ return static_cast<double>(t);
+}
+#else
+inline double real(const double& t)
+{
+ return t;
+}
+#endif
+inline long double real(const long double& t)
+{
+ return t;
+}
+inline float real(const float& t)
+{
+ return t;
+}
+
+template<class T, class U>
+inline complex<typename boost::tr1_detail::largest_real<T, U>::type>
+ pow(const complex<T>& x, const complex<U>& y)
+{
+ typedef complex<typename boost::tr1_detail::largest_real<T, U>::type> result_type;
+ typedef typename boost::mpl::if_<boost::is_same<result_type, complex<T> >, result_type const&, result_type>::type cast1_type;
+ typedef typename boost::mpl::if_<boost::is_same<result_type, complex<U> >, result_type const&, result_type>::type cast2_type;
+ cast1_type x1(x);
+ cast2_type y1(y);
+ return std::pow(x1, y1);
+}
+template<class T, class U>
+inline complex<typename boost::tr1_detail::promote_to_real<T, U>::type>
+ pow (const complex<T>& x, const U& y)
+{
+ typedef typename boost::tr1_detail::promote_to_real<T, U>::type real_type;
+ typedef complex<typename boost::tr1_detail::promote_to_real<T, U>::type> result_type;
+ typedef typename boost::mpl::if_<boost::is_same<result_type, complex<T> >, result_type const&, result_type>::type cast1_type;
+ real_type r = y;
+ cast1_type x1(x);
+ std::complex<real_type> y1(r);
+ return std::pow(x1, y1);
+}
+
+template<class T, class U>
+inline complex<typename boost::tr1_detail::promote_to_real<T, U>::type>
+ pow (const T& x, const complex<U>& y)
+{
+ typedef typename boost::tr1_detail::promote_to_real<T, U>::type real_type;
+ typedef complex<typename boost::tr1_detail::promote_to_real<T, U>::type> result_type;
+ typedef typename boost::mpl::if_<boost::is_same<result_type, complex<U> >, result_type const&, result_type>::type cast_type;
+ real_type r = x;
+ std::complex<real_type> x1(r);
+ cast_type y1(y);
+ return std::pow(x1, y1);
+}
+
+}
+
+#endif
+
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005-7.
+// 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)
+
+#ifndef BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED
+# define BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED
+
+#include <cstddef>
+
+#if defined(__GNUC__) || (!defined(_AIX) && defined(__IBMCPP__) && (__IBMCPP__ >= 800))
+#if !defined(BOOST_HAS_INCLUDE_NEXT)
+# define BOOST_HAS_INCLUDE_NEXT
+#endif
+// Need to find out if we're using GLIBC:
+#ifdef BOOST_TR1_UTILITY_INCLUDED
+// Oops we're in a recursive include path!!
+// Need to include utility, or some std lib header,
+// but *not* via <utility> or <boost/config/no_tr1/utility.hpp>
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_CONFIG_RECURSION
+# endif
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <utility>
+# else
+# include BOOST_TR1_STD_HEADER(utility)
+# endif
+# ifdef BOOST_TR1_NO_CONFIG_RECURSION
+# undef BOOST_TR1_NO_CONFIG_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#else
+#include <boost/config/no_tr1/utility.hpp>
+#endif
+#endif
+
+#if defined(__GLIBCXX__) && !defined(BOOST_TR1_PATH)
+# define BOOST_TR1_PATH(name) tr1/name
+#endif
+#if !defined(BOOST_TR1_PATH)
+# define BOOST_TR1_PATH(name) name
+#endif
+
+#define BOOST_TR1_HEADER(name) <BOOST_TR1_PATH(name)>
+
+// Can't use BOOST_WORKAROUND here, it leads to recursive includes:
+#if (defined(__BORLANDC__) && (__BORLANDC__ <= 0x600)) || (defined(_MSC_VER) && (_MSC_VER < 1310))
+# define BOOST_TR1_USE_OLD_TUPLE
+#endif
+
+#ifdef __IBMCPP_TR1__
+ // turn on support for everything:
+# define BOOST_HAS_TR1
+#endif
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# define BOOST_HAS_TR1_COMPLEX_OVERLOADS
+# define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG
+#endif
+
+#ifdef BOOST_HAS_TR1
+ // turn on support for everything:
+# define BOOST_HAS_TR1_ARRAY
+# define BOOST_HAS_TR1_COMPLEX_OVERLOADS
+# define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG
+# define BOOST_HAS_TR1_REFERENCE_WRAPPER
+# define BOOST_HAS_TR1_RESULT_OF
+# define BOOST_HAS_TR1_MEM_FN
+# define BOOST_HAS_TR1_BIND
+# define BOOST_HAS_TR1_FUNCTION
+# define BOOST_HAS_TR1_HASH
+# define BOOST_HAS_TR1_SHARED_PTR
+# define BOOST_HAS_TR1_RANDOM
+# define BOOST_HAS_TR1_REGEX
+# define BOOST_HAS_TR1_TUPLE
+# define BOOST_HAS_TR1_TYPE_TRAITS
+# define BOOST_HAS_TR1_UTILITY
+# define BOOST_HAS_TR1_UNORDERED_MAP
+# define BOOST_HAS_TR1_UNORDERED_SET
+# define BOOST_HAS_TR1_CMATH
+
+#endif
+
+#if defined(__MWERKS__) && (__MWERKS__ >= 0x3205)
+//
+// Very preliminary MWCW support, may not be right:
+//
+# define BOOST_HAS_TR1_SHARED_PTR
+# define BOOST_HAS_TR1_REFERENCE_WRAPPER
+# define BOOST_HAS_TR1_FUNCTION
+# define BOOST_HAS_TR1_TUPLE
+# define BOOST_HAS_TR1_RESULT_OF
+#endif
+
+#ifdef BOOST_HAS_GCC_TR1
+ // turn on support for everything in gcc 4.0.x:
+# define BOOST_HAS_TR1_ARRAY
+#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403
+//# define BOOST_HAS_TR1_COMPLEX_OVERLOADS
+# define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG
+#endif
+# define BOOST_HAS_TR1_REFERENCE_WRAPPER
+# define BOOST_HAS_TR1_RESULT_OF
+# define BOOST_HAS_TR1_MEM_FN
+# define BOOST_HAS_TR1_BIND
+# define BOOST_HAS_TR1_FUNCTION
+# define BOOST_HAS_TR1_HASH
+# define BOOST_HAS_TR1_SHARED_PTR
+#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403
+# define BOOST_HAS_TR1_RANDOM
+//# define BOOST_HAS_TR1_REGEX
+#ifdef _GLIBCXX_USE_C99_MATH_TR1
+# define BOOST_HAS_TR1_CMATH
+#endif
+#endif
+# define BOOST_HAS_TR1_TUPLE
+# define BOOST_HAS_TR1_TYPE_TRAITS
+# define BOOST_HAS_TR1_UTILITY
+# define BOOST_HAS_TR1_UNORDERED_MAP
+# define BOOST_HAS_TR1_UNORDERED_SET
+
+#endif
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1500) \
+ && defined(_MSC_FULL_VER) && \
+ !defined(__SGI_STL_PORT) && \
+ !defined(_STLPORT_VERSION) && \
+ !defined(_RWSTD_VER_STR) && \
+ !defined(_RWSTD_VER)
+//
+// MSVC-9.0 defines a not-quite TR1 conforming hash
+// function object in <functional>, so we must define
+// this here, in addition the feature pack for VC9
+// provides a more or less full TR1 implementation:
+//
+#if defined(_HAS_TR1) && (_HAS_TR1 + 0)
+# define BOOST_HAS_TR1_ARRAY
+# define BOOST_HAS_TR1_REFERENCE_WRAPPER
+# define BOOST_HAS_TR1_RESULT_OF
+# define BOOST_HAS_TR1_MEM_FN
+# define BOOST_HAS_TR1_BIND
+# define BOOST_HAS_TR1_FUNCTION
+# define BOOST_HAS_TR1_HASH
+# define BOOST_HAS_TR1_SHARED_PTR
+# define BOOST_HAS_TR1_RANDOM
+# define BOOST_HAS_TR1_REGEX
+# define BOOST_HAS_TR1_TUPLE
+# define BOOST_HAS_TR1_TYPE_TRAITS
+# define BOOST_HAS_TR1_UTILITY
+# define BOOST_HAS_TR1_UNORDERED_MAP
+# define BOOST_HAS_TR1_UNORDERED_SET
+#else
+# define BOOST_HAS_TR1_HASH
+#endif
+#endif
+
+#include <boost/config.hpp>
+
+#endif
+
+
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+/*
+ * The gcc include path logic is derived from STLport:
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996-1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999-2003
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ *
+ */
+
+#ifndef BOOST_TR1_DETAIL_CONFIG_ALL_HPP_INCLUDED
+# define BOOST_TR1_DETAIL_CONFIG_ALL_HPP_INCLUDED
+
+//
+// IMPORTANT: we must figure out the basics, such as how to
+// forward to the real std lib headers *without* including
+// boost/config.hpp or any of the std lib headers. A classic
+// chicken and the egg problem....
+//
+// Including <cstddef> at least lets us detect STLport:
+//
+#include <cstddef>
+
+# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && !defined(__BORLANDC__)
+# ifdef __SUNPRO_CC
+ // can't use <../stlport/name> since some compilers put stlport in a different directory:
+# define BOOST_TR1_STD_HEADER(name) <../stlport4/name>
+# elif defined(__PGI)
+# define BOOST_TR1_STD_HEADER(name) <../CC/name>
+# else
+# define BOOST_TR1_STD_HEADER(name) <../stlport/name>
+# endif
+
+# elif defined(__HP_aCC)
+ // HP aCC include path:
+# define BOOST_TR1_STD_HEADER(name) <../include_std/name>
+
+# elif defined(__DECCXX)
+# define BOOST_TR1_STD_HEADER(name) <../cxx/name>
+
+# elif defined(__BORLANDC__) && __BORLANDC__ >= 0x570
+# define BOOST_TR1_STD_HEADER(name) <../include/dinkumware/name>
+
+# elif defined(__GNUC__) && __GNUC__ >= 3
+# if defined(BOOST_TR1_GCC_INCLUDE_PATH)
+# define BOOST_TR1_STD_HEADER(name) <../BOOST_TR1_GCC_INCLUDE_PATH/name>
+# ifndef BOOST_TR1_DISABLE_INCLUDE_NEXT
+# define BOOST_TR1_DISABLE_INCLUDE_NEXT
+# endif
+# elif ( (__GNUC__ == 3 ) && ((__GNUC_MINOR__ == 0) || ((__GNUC_MINOR__ < 3) && defined(__APPLE_CC__))))
+# define BOOST_TR1_STD_HEADER(name) <../g++-v3/name>
+# else
+# if ( ((__GNUC__ == 4 ) || (__GNUC_MINOR__ >= 3)) && defined(__APPLE_CC__))
+# define BOOST_TR1_STD_HEADER(name) <../c++/name>
+ /*
+ * Before version 3.4.0 the 0 patch level was not part of the include path:
+ */
+# elif defined (__GNUC_PATCHLEVEL__) && ((__GNUC_PATCHLEVEL__ > 0) || \
+ (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
+ (__GNUC__ > 3))
+# define BOOST_TR1_STD_HEADER(name) <../__GNUC__.__GNUC_MINOR__.__GNUC_PATCHLEVEL__/name>
+# else
+# define BOOST_TR1_STD_HEADER(name) <../__GNUC__.__GNUC_MINOR__/name>
+# endif
+# endif
+
+# else
+# define BOOST_TR1_STD_HEADER(name) <../include/name>
+# endif
+
+#if defined(__GNUC__) && !defined(BOOST_HAS_INCLUDE_NEXT)
+# define BOOST_HAS_INCLUDE_NEXT
+#endif
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# define BOOST_HAS_CPP_0X
+#endif
+
+//
+// We may be in the middle of parsing boost/config.hpp
+// when this header is included, so don't rely on config
+// stuff in the rest of this header...
+//
+// Find our actual std lib:
+//
+#if defined(BOOST_HAS_INCLUDE_NEXT) && !defined(BOOST_TR1_DISABLE_INCLUDE_NEXT)
+//
+// We don't take this branch if BOOST_TR1_DISABLE_INCLUDE_NEXT
+// is defined as we may be installed in
+// /usr/include, in which case #include_next won't work as our
+// include path will occur AFTER the regular std lib one :-(
+//
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_CONFIG_ALL_RECURSION
+# endif
+# include_next <utility>
+# if (__GNUC__ < 3)
+# include_next <algorithm>
+# include_next <iterator>
+# endif
+# ifdef BOOST_TR1_NO_CONFIG_ALL_RECURSION
+# undef BOOST_TR1_NO_CONFIG_ALL_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#else
+# include BOOST_TR1_STD_HEADER(utility)
+#endif
+
+#include <boost/tr1/detail/config.hpp>
+
+#endif
+
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+#ifndef BOOST_TR1_FUNCTOR_IT_HPP_INCLUDED
+# define BOOST_TR1_FUNCTOR_IT_HPP_INCLUDED
+
+# include <boost/iterator/iterator_facade.hpp>
+
+namespace boost{ namespace tr1_details{
+
+template <class Func, class R>
+struct functor2iterator : boost::iterator_facade<functor2iterator<Func,R>, const R, std::input_iterator_tag>
+{
+ functor2iterator() : m_func(0){}
+ functor2iterator(Func& f)
+ : m_func(&f)
+ {
+ m_val = (*m_func)();
+ }
+ const R& dereference()const
+ { return m_val; }
+ void increment(){ m_val = (*m_func)(); }
+ bool equal(const functor2iterator&)const
+ { return false; }
+private:
+ Func* m_func;
+ R m_val;
+};
+
+} }
+
+#endif
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+#ifndef BOOST_TR1_MATH_OVERLOADS_HPP_INCLUDED
+# define BOOST_TR1_MATH_OVERLOADS_HPP_INCLUDED
+# include <boost/config.hpp>
+
+# ifndef BOOST_NO_SFINAE
+# include <boost/utility/enable_if.hpp>
+# include <boost/type_traits/is_convertible.hpp>
+# define BOOST_TR1_MATH_RETURN(RET) typename ::boost::enable_if< ::boost::is_convertible<T,double>, RET >::type
+# else
+# define BOOST_TR1_MATH_RETURN(RET) RET
+# endif
+
+# include <boost/type_traits/is_floating_point.hpp>
+# include <boost/type_traits/is_same.hpp>
+# include <boost/mpl/if.hpp>
+
+namespace boost{ namespace tr1_detail{
+
+template <class T, class U>
+struct largest_real
+{
+ typedef typename boost::mpl::if_<
+ boost::is_same<long double, T>,
+ long double,
+ typename boost::mpl::if_<
+ boost::is_same<long double, U>,
+ long double,
+ typename boost::mpl::if_<
+ boost::is_same<double, T>,
+ double,
+ typename boost::mpl::if_<
+ boost::is_same<double, U>,
+ double,
+ float
+ >::type
+ >::type
+ >::type
+ >::type type;
+};
+
+template <class T, class U>
+struct promote_to_real
+{
+ typedef typename largest_real<
+ typename boost::mpl::if_< boost::is_floating_point<T>, T, double>::type,
+ typename boost::mpl::if_< boost::is_floating_point<U>, U, double>::type
+ >::type type;
+};
+
+} }
+
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+#ifndef BOOST_TR1_FUNCTIONAL_HPP_INCLUDED
+# define BOOST_TR1_FUNCTIONAL_HPP_INCLUDED
+# include <boost/tr1/detail/config.hpp>
+# include <functional>
+
+#if defined(BOOST_HAS_TR1_REFERENCE_WRAPPER) \
+ || defined(BOOST_HAS_TR1_RESULT_OF)\
+ || defined(BOOST_HAS_TR1_MEM_FN)\
+ || defined(BOOST_HAS_TR1_BIND)\
+ || defined(BOOST_HAS_TR1_FUNCTION)\
+ || defined(BOOST_HAS_TR1_HASH)
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next BOOST_TR1_HEADER(functional)
+# else
+# include <boost/tr1/detail/config_all.hpp>
+# include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(functional))
+# endif
+#endif
+
+#ifndef BOOST_HAS_TR1_REFERENCE_WRAPPER
+
+#include <boost/ref.hpp>
+
+namespace std{ namespace tr1{
+
+ using ::boost::reference_wrapper;
+ using ::boost::ref;
+ using ::boost::cref;
+
+} }
+
+#endif // BOOST_HAS_TR1_REFERENCE_WRAPPER
+
+#if !defined(BOOST_HAS_TR1_RESULT_OF)\
+ && !defined(BOOST_NO_SFINAE) && \
+ !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+//
+// we can only actually include result_of.hpp if the compiler
+// really does support it, otherwise we just get endless errors...
+//
+#include <boost/utility/result_of.hpp>
+
+namespace std{ namespace tr1{
+
+ using ::boost::result_of;
+
+} }
+
+#endif // BOOST_HAS_TR1_RESULT_OF
+
+#ifndef BOOST_HAS_TR1_MEM_FN
+// mem_fn:
+#include <boost/mem_fn.hpp>
+
+namespace std{ namespace tr1{
+
+using boost::mem_fn;
+
+} }
+
+#endif // BOOST_HAS_TR1_MEM_FN
+
+
+#ifndef BOOST_HAS_TR1_BIND
+// Bind:
+#include <boost/bind.hpp>
+
+namespace std{ namespace tr1{
+
+ using ::boost::is_bind_expression;
+ using ::boost::is_placeholder;
+ using ::boost::bind;
+ namespace placeholders {
+#ifndef BOOST_BIND_NO_PLACEHOLDERS
+ using ::_1;
+ using ::_2;
+ using ::_3;
+ using ::_4;
+ using ::_5;
+ using ::_6;
+ using ::_7;
+ using ::_8;
+ using ::_9;
+#endif
+ } // placeholders
+
+} }
+
+#endif
+
+#ifndef BOOST_HAS_TR1_FUNCTION
+// polymorphic function object wrappers:
+#include <boost/function.hpp>
+#include <boost/detail/workaround.hpp>
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x582) \
+ && !BOOST_WORKAROUND(BOOST_MSVC, < 1310) \
+ && !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX)
+namespace std{ namespace tr1{
+
+ using ::boost::bad_function_call;
+ using ::boost::function;
+ using ::boost::swap;
+
+}}
+#endif
+
+#endif // BOOST_HAS_TR1_FUNCTION
+
+#ifndef BOOST_HAS_TR1_HASH
+//
+// This header can get included by boost/hash.hpp
+// leading to cyclic dependencies. As a workaround
+// we forward declare boost::hash and include
+// the actual header later.
+//
+namespace boost{
+template <class T> struct hash;
+}
+
+namespace std{ namespace tr1{
+ using ::boost::hash;
+
+}}
+
+#include <boost/functional/hash.hpp>
+
+#endif
+
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+#ifndef BOOST_TR1_MEMORY_HPP_INCLUDED
+# define BOOST_TR1_MEMORY_HPP_INCLUDED
+# include <boost/tr1/detail/config.hpp>
+# include <boost/detail/workaround.hpp>
+# include <memory>
+
+#ifndef BOOST_HAS_TR1_SHARED_PTR
+
+//
+// This header can get included by boost/shared_ptr.hpp which leads
+// to cyclic dependencies, the workaround is to forward declare all
+// the boost components, and then include the actual headers afterwards.
+// This is fragile, but seems to work, and doesn't require modification
+// of boost/shared_ptr.hpp.
+//
+namespace boost{
+
+class bad_weak_ptr;
+template<class T> class weak_ptr;
+template<class T> class shared_ptr;
+template<class T> void swap(weak_ptr<T> & a, weak_ptr<T> & b);
+template<class T> void swap(shared_ptr<T> & a, shared_ptr<T> & b);
+template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const & r);
+template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const & r);
+template<class T, class U> shared_ptr<T> const_pointer_cast(shared_ptr<U> const & r);
+template<class D, class T> D * get_deleter(shared_ptr<T> const & p);
+template<class T> class enable_shared_from_this;
+
+namespace detail{
+class shared_count;
+class weak_count;
+}
+
+}
+
+namespace std{ namespace tr1{
+
+ using ::boost::bad_weak_ptr;
+ using ::boost::shared_ptr;
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
+ using ::boost::swap;
+#endif
+ using ::boost::static_pointer_cast;
+ using ::boost::dynamic_pointer_cast;
+ using ::boost::const_pointer_cast;
+ using ::boost::get_deleter;
+ using ::boost::weak_ptr;
+ using ::boost::enable_shared_from_this;
+
+} }
+#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
+#include <boost/enable_shared_from_this.hpp>
+
+#else
+
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next BOOST_TR1_HEADER(memory)
+# else
+# include <boost/tr1/detail/config_all.hpp>
+# include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(memory))
+# endif
+
+#endif
+
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// (C) Copyright Henry S. Warren 2005.
+// 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)
+
+#ifndef BOOST_TR1_RANDOM_HPP_INCLUDED
+# define BOOST_TR1_RANDOM_HPP_INCLUDED
+# include <boost/tr1/detail/config.hpp>
+
+#ifdef BOOST_HAS_TR1_RANDOM
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next BOOST_TR1_HEADER(random)
+# else
+# include <boost/tr1/detail/config_all.hpp>
+# include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(random))
+# endif
+#else
+// Boost.Random:
+#include <boost/random.hpp>
+#ifndef __SUNPRO_CC
+ // Sunpros linker complains if we so much as include this...
+# include <boost/nondet_random.hpp>
+#endif
+#include <boost/tr1/detail/functor2iterator.hpp>
+#include <boost/type_traits/is_fundamental.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace std { namespace tr1{
+
+using ::boost::variate_generator;
+
+template<class UIntType, UIntType a, UIntType c, UIntType m>
+class linear_congruential
+{
+private:
+ typedef ::boost::random::linear_congruential<UIntType, a, c, m, 0> impl_type;
+public:
+ // types
+ typedef UIntType result_type;
+ // parameter values
+ BOOST_STATIC_CONSTANT(UIntType, multiplier = a);
+ BOOST_STATIC_CONSTANT(UIntType, increment = c);
+ BOOST_STATIC_CONSTANT(UIntType, modulus = m);
+ // constructors and member function
+ explicit linear_congruential(unsigned long x0 = 1)
+ : m_gen(x0){}
+ linear_congruential(const linear_congruential& that)
+ : m_gen(that.m_gen){}
+ template<class Gen> linear_congruential(Gen& g)
+ {
+ init1(g, ::boost::is_same<Gen,linear_congruential>());
+ }
+ void seed(unsigned long x0 = 1)
+ { m_gen.seed(x0); }
+ template<class Gen> void seed(Gen& g)
+ {
+ init2(g, ::boost::is_fundamental<Gen>());
+ }
+ result_type min BOOST_PREVENT_MACRO_SUBSTITUTION() const
+ { return (m_gen.min)(); }
+ result_type max BOOST_PREVENT_MACRO_SUBSTITUTION() const
+ { return (m_gen.max)(); }
+ result_type operator()()
+ {
+ return m_gen();
+ }
+ bool operator==(const linear_congruential& that)const
+ { return m_gen == that.m_gen; }
+ bool operator!=(const linear_congruential& that)const
+ { return m_gen != that.m_gen; }
+
+#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) && !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
+ template<class CharT, class Traits>
+ friend std::basic_ostream<CharT,Traits>&
+ operator<<(std::basic_ostream<CharT,Traits>& os,
+ const linear_congruential& lcg)
+ {
+ return os << lcg.m_gen;
+ }
+
+ template<class CharT, class Traits>
+ friend std::basic_istream<CharT,Traits>&
+ operator>>(std::basic_istream<CharT,Traits>& is,
+ linear_congruential& lcg)
+ {
+ return is >> lcg.m_gen;
+ }
+#endif
+
+private:
+ template <class Gen>
+ void init1(Gen& g, const ::boost::true_type&)
+ {
+ m_gen = g.m_gen;
+ }
+ template <class Gen>
+ void init1(Gen& g, const ::boost::false_type&)
+ {
+ init2(g, ::boost::is_fundamental<Gen>());
+ }
+ template <class Gen>
+ void init2(Gen& g, const ::boost::true_type&)
+ {
+ m_gen.seed(static_cast<unsigned long>(g));
+ }
+ template <class Gen>
+ void init2(Gen& g, const ::boost::false_type&)
+ {
+ //typedef typename Gen::result_type gen_rt;
+ boost::tr1_details::functor2iterator<Gen, unsigned long> f1(g), f2;
+ m_gen.seed(f1, f2);
+ }
+ impl_type m_gen;
+};
+
+template<class UIntType, int w, int n, int m, int r,
+UIntType a, int u, int s, UIntType b, int t, UIntType c, int l>
+class mersenne_twister
+{
+ typedef ::boost::random::mersenne_twister
+ <UIntType, w, n, m, r, a, u, s, b, t, c, l, 0> imp_type;
+public:
+ // types
+ typedef UIntType result_type;
+ // parameter values
+ BOOST_STATIC_CONSTANT(int, word_size = w);
+ BOOST_STATIC_CONSTANT(int, state_size = n);
+ BOOST_STATIC_CONSTANT(int, shift_size = m);
+ BOOST_STATIC_CONSTANT(int, mask_bits = r);
+ BOOST_STATIC_CONSTANT(UIntType, parameter_a = a);
+ BOOST_STATIC_CONSTANT(int, output_u = u);
+ BOOST_STATIC_CONSTANT(int, output_s = s);
+ BOOST_STATIC_CONSTANT(UIntType, output_b = b);
+ BOOST_STATIC_CONSTANT(int, output_t = t);
+ BOOST_STATIC_CONSTANT(UIntType, output_c = c);
+ BOOST_STATIC_CONSTANT(int, output_l = l);
+ // constructors and member function
+ mersenne_twister(){}
+ explicit mersenne_twister(unsigned long value)
+ : m_gen(value == 0 ? 5489UL : value){}
+ template<class Gen> mersenne_twister(Gen& g)
+ {
+ init1(g, ::boost::is_same<mersenne_twister,Gen>());
+ }
+ void seed()
+ { m_gen.seed(); }
+ void seed(unsigned long value)
+ { m_gen.seed(value == 0 ? 5489UL : value); }
+ template<class Gen> void seed(Gen& g)
+ { init2(g, ::boost::is_fundamental<Gen>()); }
+ result_type min BOOST_PREVENT_MACRO_SUBSTITUTION() const
+ { return (m_gen.min)(); }
+ result_type max BOOST_PREVENT_MACRO_SUBSTITUTION() const
+ { return (m_gen.max)(); }
+ result_type operator()()
+ { return m_gen(); }
+ bool operator==(const mersenne_twister& that)const
+ { return m_gen == that.m_gen; }
+ bool operator!=(const mersenne_twister& that)const
+ { return m_gen != that.m_gen; }
+
+#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) && !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
+ template<class CharT, class Traits>
+ friend std::basic_ostream<CharT,Traits>&
+ operator<<(std::basic_ostream<CharT,Traits>& os,
+ const mersenne_twister& lcg)
+ {
+ return os << lcg.m_gen;
+ }
+
+ template<class CharT, class Traits>
+ friend std::basic_istream<CharT,Traits>&
+ operator>>(std::basic_istream<CharT,Traits>& is,
+ mersenne_twister& lcg)
+ {
+ return is >> lcg.m_gen;
+ }
+#endif
+private:
+ template <class Gen>
+ void init1(Gen& g, const ::boost::true_type&)
+ {
+ m_gen = g.m_gen;
+ }
+ template <class Gen>
+ void init1(Gen& g, const ::boost::false_type&)
+ {
+ init2(g, ::boost::is_fundamental<Gen>());
+ }
+ template <class Gen>
+ void init2(Gen& g, const ::boost::true_type&)
+ {
+ m_gen.seed(static_cast<unsigned long>(g == 0 ? 4357UL : g));
+ }
+ template <class Gen>
+ void init2(Gen& g, const ::boost::false_type&)
+ {
+ m_gen.seed(g);
+ }
+ imp_type m_gen;
+};
+
+template<class IntType, IntType m, int s, int r>
+class subtract_with_carry
+{
+public:
+ // types
+ typedef IntType result_type;
+ // parameter values
+ BOOST_STATIC_CONSTANT(IntType, modulus = m);
+ BOOST_STATIC_CONSTANT(int, long_lag = r);
+ BOOST_STATIC_CONSTANT(int, short_lag = s);
+
+ // constructors and member function
+ subtract_with_carry(){}
+ explicit subtract_with_carry(unsigned long value)
+ : m_gen(value == 0 ? 19780503UL : value){}
+ template<class Gen> subtract_with_carry(Gen& g)
+ { init1(g, ::boost::is_same<Gen, subtract_with_carry<IntType, m, s, r> >()); }
+ void seed(unsigned long value = 19780503ul)
+ { m_gen.seed(value == 0 ? 19780503UL : value); }
+ template<class Gen> void seed(Gen& g)
+ { init2(g, ::boost::is_fundamental<Gen>()); }
+ result_type min BOOST_PREVENT_MACRO_SUBSTITUTION() const
+ { return (m_gen.min)(); }
+ result_type max BOOST_PREVENT_MACRO_SUBSTITUTION() const
+ { return (m_gen.max)(); }
+ result_type operator()()
+ { return m_gen(); }
+ bool operator==(const subtract_with_carry& that)const
+ { return m_gen == that.m_gen; }
+ bool operator!=(const subtract_with_carry& that)const
+ { return m_gen != that.m_gen; }
+
+#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) && !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
+ template<class CharT, class Traits>
+ friend std::basic_ostream<CharT,Traits>&
+ operator<<(std::basic_ostream<CharT,Traits>& os,
+ const subtract_with_carry& lcg)
+ {
+ return os << lcg.m_gen;
+ }
+
+ template<class CharT, class Traits>
+ friend std::basic_istream<CharT,Traits>&
+ operator>>(std::basic_istream<CharT,Traits>& is,
+ subtract_with_carry& lcg)
+ {
+ return is >> lcg.m_gen;
+ }
+#endif
+private:
+ template <class Gen>
+ void init1(Gen& g, const ::boost::true_type&)
+ {
+ m_gen = g.m_gen;
+ }
+ template <class Gen>
+ void init1(Gen& g, const ::boost::false_type&)
+ {
+ init2(g, ::boost::is_fundamental<Gen>());
+ }
+ template <class Gen>
+ void init2(Gen& g, const ::boost::true_type&)
+ {
+ m_gen.seed(static_cast<unsigned long>(g == 0 ? 19780503UL : g));
+ }
+ template <class Gen>
+ void init2(Gen& g, const ::boost::false_type&)
+ {
+ m_gen.seed(g);
+ }
+ ::boost::random::subtract_with_carry<IntType, m, s, r, 0> m_gen;
+};
+
+template<class RealType, int w, int s, int r>
+class subtract_with_carry_01
+{
+public:
+ // types
+ typedef RealType result_type;
+ // parameter values
+ BOOST_STATIC_CONSTANT(int, word_size = w);
+ BOOST_STATIC_CONSTANT(int, long_lag = r);
+ BOOST_STATIC_CONSTANT(int, short_lag = s);
+
+ // constructors and member function
+ subtract_with_carry_01(){}
+ explicit subtract_with_carry_01(unsigned long value)
+ : m_gen(value == 0 ? 19780503UL : value){}
+ template<class Gen> subtract_with_carry_01(Gen& g)
+ { init1(g, ::boost::is_same<Gen, subtract_with_carry_01<RealType, w, s, r> >()); }
+ void seed(unsigned long value = 19780503UL)
+ { m_gen.seed(value == 0 ? 19780503UL : value); }
+ template<class Gen> void seed(Gen& g)
+ { init2(g, ::boost::is_fundamental<Gen>()); }
+ result_type min BOOST_PREVENT_MACRO_SUBSTITUTION() const
+ { return (m_gen.min)(); }
+ result_type max BOOST_PREVENT_MACRO_SUBSTITUTION() const
+ { return (m_gen.max)(); }
+ result_type operator()()
+ { return m_gen(); }
+ bool operator==(const subtract_with_carry_01& that)const
+ { return m_gen == that.m_gen; }
+ bool operator!=(const subtract_with_carry_01& that)const
+ { return m_gen != that.m_gen; }
+
+#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) && !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
+ template<class CharT, class Traits>
+ friend std::basic_ostream<CharT,Traits>&
+ operator<<(std::basic_ostream<CharT,Traits>& os,
+ const subtract_with_carry_01& lcg)
+ {
+ return os << lcg.m_gen;
+ }
+
+ template<class CharT, class Traits>
+ friend std::basic_istream<CharT,Traits>&
+ operator>>(std::basic_istream<CharT,Traits>& is,
+ subtract_with_carry_01& lcg)
+ {
+ return is >> lcg.m_gen;
+ }
+#endif
+private:
+ template <class Gen>
+ void init1(Gen& g, const ::boost::true_type&)
+ {
+ m_gen = g.m_gen;
+ }
+ template <class Gen>
+ void init1(Gen& g, const ::boost::false_type&)
+ {
+ init2(g, ::boost::is_fundamental<Gen>());
+ }
+ template <class Gen>
+ void init2(Gen& g, const ::boost::true_type&)
+ {
+ m_gen.seed(static_cast<unsigned long>(g == 0 ? 19780503UL : g));
+ }
+ template <class Gen>
+ void init2(Gen& g, const ::boost::false_type&)
+ {
+ //typedef typename Gen::result_type gen_rt;
+ boost::tr1_details::functor2iterator<Gen, unsigned long> f1(g), f2;
+ m_gen.seed(f1, f2);
+ }
+ ::boost::random::subtract_with_carry_01<RealType, w, s, r, 0> m_gen;
+};
+
+using ::boost::random::discard_block;
+
+template<class UniformRandomNumberGenerator1, int s1, class UniformRandomNumberGenerator2, int s2>
+class xor_combine
+{
+public:
+ // types
+ typedef UniformRandomNumberGenerator1 base1_type;
+ typedef UniformRandomNumberGenerator2 base2_type;
+ typedef unsigned long result_type;
+ // parameter values
+ BOOST_STATIC_CONSTANT(int, shift1 = s1);
+ BOOST_STATIC_CONSTANT(int, shift2 = s2);
+ // constructors and member function
+ xor_combine(){ init_minmax(); }
+ xor_combine(const base1_type & rng1, const base2_type & rng2)
+ : m_b1(rng1), m_b2(rng2) { init_minmax(); }
+ xor_combine(unsigned long s)
+ : m_b1(s), m_b2(s+1) { init_minmax(); }
+ template<class Gen> xor_combine(Gen& g)
+ {
+ init_minmax();
+ init1(g, ::boost::is_same<Gen, xor_combine<UniformRandomNumberGenerator1, s1, UniformRandomNumberGenerator2, s2> >());
+ }
+ void seed()
+ {
+ m_b1.seed();
+ m_b2.seed();
+ }
+ void seed(unsigned long s)
+ {
+ m_b1.seed(s);
+ m_b2.seed(s+1);
+ }
+ template<class Gen> void seed(Gen& g)
+ {
+ init2(g, ::boost::is_fundamental<Gen>());
+ }
+
+ const base1_type& base1() const
+ { return m_b1; }
+ const base2_type& base2() const
+ { return m_b2; }
+ result_type min BOOST_PREVENT_MACRO_SUBSTITUTION() const
+ { return m_min; }
+ result_type max BOOST_PREVENT_MACRO_SUBSTITUTION() const
+ { return m_max; }
+ result_type operator()()
+ { return (m_b1() << s1) ^ (m_b2() << s2); }
+
+ bool operator == (const xor_combine& that)const
+ { return (m_b1 == that.m_b1) && (m_b2 == that.m_b2); }
+ bool operator != (const xor_combine& that)const
+ { return !(*this == that); }
+
+#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) && !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
+ template<class CharT, class Traits>
+ friend std::basic_ostream<CharT,Traits>&
+ operator<<(std::basic_ostream<CharT,Traits>& os,
+ const xor_combine& lcg)
+ {
+ return os << lcg.m_b1 << " " << lcg.m_b2;
+ }
+
+ template<class CharT, class Traits>
+ friend std::basic_istream<CharT,Traits>&
+ operator>>(std::basic_istream<CharT,Traits>& is,
+ xor_combine& lcg)
+ {
+ return is >> lcg.m_b1 >> lcg.m_b2;
+ }
+#endif
+
+private:
+ void init_minmax();
+ base1_type m_b1;
+ base2_type m_b2;
+ result_type m_min;
+ result_type m_max;
+
+ template <class Gen>
+ void init1(Gen& g, const ::boost::true_type&)
+ {
+ m_b1 = g.m_b1;
+ m_b2 = g.m_b2;
+ }
+ template <class Gen>
+ void init1(Gen& g, const ::boost::false_type&)
+ {
+ init2(g, ::boost::is_fundamental<Gen>());
+ }
+ template <class Gen>
+ void init2(Gen& g, const ::boost::true_type&)
+ {
+ m_b1.seed(static_cast<unsigned long>(g));
+ m_b2.seed(static_cast<unsigned long>(g));
+ }
+ template <class Gen>
+ void init2(Gen& g, const ::boost::false_type&)
+ {
+ m_b1.seed(g);
+ m_b2.seed(g);
+ }
+};
+
+template<class UniformRandomNumberGenerator1, int s1, class UniformRandomNumberGenerator2, int s2>
+void xor_combine<UniformRandomNumberGenerator1, s1, UniformRandomNumberGenerator2, s2>::init_minmax()
+{
+ //
+ // The following code is based on that given in "Hacker's Delight"
+ // by Henry S. Warren, (Addison-Wesley, 2003), and at
+ // http://www.hackersdelight.org/index.htm.
+ // Used here by permission.
+ //
+ // calculation of minimum value:
+ //
+ result_type a = (m_b1.min)() << s1;
+ result_type b = (m_b1.max)() << s1;
+ result_type c = (m_b2.min)() << s2;
+ result_type d = (m_b2.max)() << s2;
+ result_type m, temp;
+
+ m = 0x1uL << ((sizeof(result_type) * CHAR_BIT) - 1);
+ while (m != 0) {
+ if (~a & c & m) {
+ temp = (a | m) & (static_cast<result_type>(0u) - m);
+ if (temp <= b) a = temp;
+ }
+ else if (a & ~c & m) {
+ temp = (c | m) & (static_cast<result_type>(0u) - m);
+ if (temp <= d) c = temp;
+ }
+ m >>= 1;
+ }
+ m_min = a ^ c;
+
+ //
+ // calculation of maximum value:
+ //
+ if((((std::numeric_limits<result_type>::max)() >> s1) < (m_b1.max)())
+ || ((((std::numeric_limits<result_type>::max)()) >> s2) < (m_b2.max)()))
+ {
+ m_max = (std::numeric_limits<result_type>::max)();
+ return;
+ }
+ a = (m_b1.min)() << s1;
+ b = (m_b1.max)() << s1;
+ c = (m_b2.min)() << s2;
+ d = (m_b2.max)() << s2;
+
+ m = 0x1uL << ((sizeof(result_type) * CHAR_BIT) - 1);
+
+ while (m != 0) {
+ if (b & d & m) {
+ temp = (b - m) | (m - 1);
+ if (temp >= a) b = temp;
+ else {
+ temp = (d - m) | (m - 1);
+ if (temp >= c) d = temp;
+ }
+ }
+ m = m >> 1;
+ }
+ m_max = b ^ d;
+}
+
+typedef linear_congruential< ::boost::int32_t, 16807, 0, 2147483647> minstd_rand0;
+typedef linear_congruential< ::boost::int32_t, 48271, 0, 2147483647> minstd_rand;
+typedef mersenne_twister< ::boost::uint32_t, 32,624,397,31,0x9908b0df,11,7,0x9d2c5680,15,0xefc60000,18> mt19937;
+typedef subtract_with_carry_01<float, 24, 10, 24> ranlux_base_01;
+typedef subtract_with_carry_01<double, 48, 10, 24> ranlux64_base_01;
+typedef discard_block<subtract_with_carry< ::boost::int32_t, (1<<24), 10, 24>, 223, 24> ranlux3;
+typedef discard_block<subtract_with_carry< ::boost::int32_t, (1<<24), 10, 24>, 389, 24> ranlux4;
+typedef discard_block<subtract_with_carry_01<float, 24, 10, 24>, 223, 24> ranlux3_01;
+typedef discard_block<subtract_with_carry_01<float, 24, 10, 24>, 389, 24> ranlux4_01;
+
+#ifndef __SUNPRO_CC
+using ::boost::random_device;
+#endif
+using ::boost::uniform_int;
+
+class bernoulli_distribution
+{
+public:
+ // types
+ typedef int input_type;
+ typedef bool result_type;
+ // constructors and member function
+ explicit bernoulli_distribution(double p = 0.5)
+ : m_dist(p){}
+ double p() const
+ { return m_dist.p(); }
+ void reset()
+ { m_dist.reset(); }
+ template<class UniformRandomNumberGenerator>
+ result_type operator()(UniformRandomNumberGenerator& urng)
+ {
+ return m_dist(urng);
+ }
+#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) && !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
+ template<class CharT, class Traits>
+ friend std::basic_ostream<CharT,Traits>&
+ operator<<(std::basic_ostream<CharT,Traits>& os,
+ const bernoulli_distribution& lcg)
+ {
+ return os << lcg.m_dist;
+ }
+
+ template<class CharT, class Traits>
+ friend std::basic_istream<CharT,Traits>&
+ operator>>(std::basic_istream<CharT,Traits>& is,
+ bernoulli_distribution& lcg)
+ {
+ return is >> lcg.m_dist;
+ }
+#endif
+
+private:
+ ::boost::bernoulli_distribution<double> m_dist;
+};
+//using ::boost::bernoulli_distribution;
+using ::boost::geometric_distribution;
+using ::boost::poisson_distribution;
+using ::boost::binomial_distribution;
+using ::boost::uniform_real;
+using ::boost::exponential_distribution;
+using ::boost::normal_distribution;
+using ::boost::gamma_distribution;
+
+} }
+
+#endif
+
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+#ifndef BOOST_TR1_REGEX_HPP_INCLUDED
+# define BOOST_TR1_REGEX_HPP_INCLUDED
+# include <boost/tr1/detail/config.hpp>
+
+#ifdef BOOST_HAS_TR1_REGEX
+
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next BOOST_TR1_HEADER(regex)
+# else
+# include <boost/tr1/detail/config_all.hpp>
+# include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(regex))
+# endif
+
+#else
+
+#include <boost/regex.hpp>
+
+namespace std{ namespace tr1{
+
+// [7.5] Regex constants
+namespace regex_constants {
+
+using ::boost::regex_constants::syntax_option_type;
+using ::boost::regex_constants::icase;
+using ::boost::regex_constants::nosubs;
+using ::boost::regex_constants::optimize;
+using ::boost::regex_constants::collate;
+using ::boost::regex_constants::ECMAScript;
+using ::boost::regex_constants::basic;
+using ::boost::regex_constants::extended;
+using ::boost::regex_constants::awk;
+using ::boost::regex_constants::grep;
+using ::boost::regex_constants::egrep;
+
+using ::boost::regex_constants::match_flag_type;
+using ::boost::regex_constants::match_default;
+using ::boost::regex_constants::match_not_bol;
+using ::boost::regex_constants::match_not_eol;
+using ::boost::regex_constants::match_not_bow;
+using ::boost::regex_constants::match_not_eow;
+using ::boost::regex_constants::match_any;
+using ::boost::regex_constants::match_not_null;
+using ::boost::regex_constants::match_continuous;
+using ::boost::regex_constants::match_prev_avail;
+using ::boost::regex_constants::format_default;
+using ::boost::regex_constants::format_sed;
+using ::boost::regex_constants::format_no_copy;
+using ::boost::regex_constants::format_first_only;
+
+using ::boost::regex_constants::error_type;
+using ::boost::regex_constants::error_collate;
+using ::boost::regex_constants::error_ctype;
+using ::boost::regex_constants::error_escape;
+using ::boost::regex_constants::error_backref;
+using ::boost::regex_constants::error_brack;
+using ::boost::regex_constants::error_paren;
+using ::boost::regex_constants::error_brace;
+using ::boost::regex_constants::error_badbrace;
+using ::boost::regex_constants::error_range;
+using ::boost::regex_constants::error_space;
+using ::boost::regex_constants::error_badrepeat;
+using ::boost::regex_constants::error_complexity;
+using ::boost::regex_constants::error_stack;
+
+} // namespace regex_constants
+
+// [7.6] Class regex_error
+using ::boost::regex_error;
+
+// [7.7] Class template regex_traits
+using ::boost::regex_traits;
+
+// [7.8] Class template basic_regex
+using ::boost::basic_regex;
+using ::boost::regex;
+#ifndef BOOST_NO_WREGEX
+using ::boost::wregex;
+#endif
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
+// [7.8.6] basic_regex swap
+using ::boost::swap;
+#endif
+
+// [7.9] Class template sub_match
+using ::boost::sub_match;
+
+using ::boost::csub_match;
+#ifndef BOOST_NO_WREGEX
+using ::boost::wcsub_match;
+#endif
+using ::boost::ssub_match;
+#ifndef BOOST_NO_WREGEX
+using ::boost::wssub_match;
+#endif
+
+// [7.10] Class template match_results
+using ::boost::match_results;
+using ::boost::cmatch;
+#ifndef BOOST_NO_WREGEX
+using ::boost::wcmatch;
+#endif
+using ::boost::smatch;
+#ifndef BOOST_NO_WREGEX
+using ::boost::wsmatch;
+#endif
+
+using ::boost::regex_match;
+
+// [7.11.3] Function template regex_search
+using ::boost::regex_search;
+
+// [7.11.4] Function template regex_replace
+using ::boost::regex_replace;
+
+// [7.12.1] Class template regex_iterator
+using ::boost::regex_iterator;
+using ::boost::cregex_iterator;
+#ifndef BOOST_NO_WREGEX
+using ::boost::wcregex_iterator;
+#endif
+using ::boost::sregex_iterator;
+#ifndef BOOST_NO_WREGEX
+using ::boost::wsregex_iterator;
+#endif
+
+// [7.12.2] Class template regex_token_iterator
+using ::boost::regex_token_iterator;
+using ::boost::cregex_token_iterator;
+#ifndef BOOST_NO_WREGEX
+using ::boost::wcregex_token_iterator;
+#endif
+using ::boost::sregex_token_iterator;
+#ifndef BOOST_NO_WREGEX
+using ::boost::wsregex_token_iterator;
+#endif
+
+} } // namespaces
+
+#endif
+
+#endif
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_algorithm_INCLUDED
+# define BOOST_TR1_algorithm_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_algorithm_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <algorithm>
+# else
+# include BOOST_TR1_STD_HEADER(algorithm)
+# endif
+# ifdef BOOST_TR1_NO_algorithm_RECURSION
+# undef BOOST_TR1_NO_algorithm_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.\r
+// Use, modification and distribution are subject to the\r
+// Boost Software License, Version 1.0. (See accompanying file\r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+\r
+#if !defined(BOOST_TR1_ARRAY_INCLUDED)\r
+# define BOOST_TR1_ARRAY_INCLUDED\r
+# include <boost/tr1/detail/config_all.hpp>\r
+\r
+# ifdef BOOST_HAS_CPP_0X\r
+# ifdef BOOST_HAS_INCLUDE_NEXT\r
+# include_next <array>\r
+# else\r
+# include BOOST_TR1_STD_HEADER(array)\r
+# endif\r
+# endif\r
+\r
+# if !defined(BOOST_TR1_NO_RECURSION)\r
+# define BOOST_TR1_NO_RECURSION\r
+# ifdef BOOST_HAS_TR1_ARRAY\r
+# ifdef BOOST_HAS_INCLUDE_NEXT\r
+# include_next BOOST_TR1_HEADER(array)\r
+# else\r
+# include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(array))\r
+# endif\r
+# else\r
+# include <boost/tr1/array.hpp>\r
+# endif\r
+# undef BOOST_TR1_NO_RECURSION\r
+#endif\r
+#endif\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+//
+// Forwarding header for Borland C++:
+//
+#if !defined(BOOST_TR1_ARRAY_H_INCLUDED)
+# define BOOST_TR1_ARRAY_H_INCLUDED
+# include <array.>
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+//
+// Forwarding header for Borland C++:
+//
+#if !defined(BOOST_TR1_RANDOM_H_INCLUDED)
+# define BOOST_TR1_RANDOM_H_INCLUDED
+# include <random.>
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+//
+// Forwarding header for Borland C++:
+//
+#if !defined(BOOST_TR1_REGEX_H_INCLUDED)
+# define BOOST_TR1_REGEX_H_INCLUDED
+# include <regex.>
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+//
+// Forwarding header for Borland C++:
+//
+#if !defined(BOOST_TR1_TUPLE_H_INCLUDED)
+# define BOOST_TR1_TUPLE_H_INCLUDED
+# include <tuple.>
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+//
+// Forwarding header for Borland C++:
+//
+#if !defined(BOOST_TR1_TYPE_TRAITS_H_INCLUDED)
+# define BOOST_TR1_TYPE_TRAITS_H_INCLUDED
+# include <type_traits.>
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2008.
+// 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)
+
+//
+// Forwarding header for Borland C++:
+//
+#if !defined(BOOST_TR1_UNORDERED_H_INCLUDED)
+# define BOOST_TR1_UNORDERED_H_INCLUDED
+# include <unordered_set.>
+# include <unordered_map.>
+#endif
+
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_bitset_INCLUDED
+# define BOOST_TR1_bitset_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_bitset_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <bitset>
+# else
+# include BOOST_TR1_STD_HEADER(bitset)
+# endif
+# ifdef BOOST_TR1_NO_bitset_RECURSION
+# undef BOOST_TR1_NO_bitset_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2008.
+// 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)
+
+
+#if !defined(BOOST_TR1_CMATH_INCLUDED) || defined(BOOST_TR1_NO_RECURSION)
+#ifndef BOOST_TR1_CMATH_INCLUDED
+# define BOOST_TR1_CMATH_INCLUDED
+#endif
+# ifdef BOOST_TR1_NO_CMATH_RECURSION2
+# define BOOST_TR1_NO_CMATH_RECURSION3
+# elif defined(BOOST_TR1_NO_CMATH_RECURSION)
+# define BOOST_TR1_NO_CMATH_RECURSION2
+# elif !defined(BOOST_TR1_NO_RECURSION)
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_CMATH_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <cmath>
+# else
+# include BOOST_TR1_STD_HEADER(cmath)
+# endif
+#ifdef BOOST_TR1_NO_CMATH_RECURSION3
+# undef BOOST_TR1_NO_CMATH_RECURSION3
+#elif defined(BOOST_TR1_NO_CMATH_RECURSION2)
+# undef BOOST_TR1_NO_CMATH_RECURSION2
+#elif defined(BOOST_TR1_NO_CMATH_RECURSION)
+# undef BOOST_TR1_NO_RECURSION
+# undef BOOST_TR1_NO_CMATH_RECURSION
+# endif
+#endif
+
+#if !defined(BOOST_TR1_FULL_CMATH_INCLUDED) && !defined(BOOST_TR1_NO_RECURSION)
+# define BOOST_TR1_FULL_CMATH_INCLUDED
+# define BOOST_TR1_NO_RECURSION
+# include <boost/tr1/cmath.hpp>
+# undef BOOST_TR1_NO_RECURSION
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+
+#ifndef BOOST_TR1_COMPLEX_INCLUDED
+# define BOOST_TR1_COMPLEX_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_COMPLEX_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <complex>
+# else
+# include BOOST_TR1_STD_HEADER(complex)
+# endif
+# ifdef BOOST_TR1_NO_COMPLEX_RECURSION
+# undef BOOST_TR1_NO_COMPLEX_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
+#if !defined(BOOST_TR1_FULL_COMPLEX_INCLUDED) && !defined(BOOST_TR1_NO_RECURSION)
+# define BOOST_TR1_FULL_COMPLEX_INCLUDED
+# define BOOST_TR1_NO_RECURSION
+# include <boost/tr1/complex.hpp>
+# undef BOOST_TR1_NO_RECURSION
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_deque_INCLUDED
+# define BOOST_TR1_deque_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_deque_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <deque>
+# else
+# include BOOST_TR1_STD_HEADER(deque)
+# endif
+# ifdef BOOST_TR1_NO_deque_RECURSION
+# undef BOOST_TR1_NO_deque_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+// Important: there are no include guards on this header for Borland C++
+// The Borland version of <exception> has some peculiar circular dependencies
+// that requires multiple inclusion. Likewise for gcc (gcc-2.95.3 fix).
+//
+#ifdef BOOST_TR1_NO_exception_RECURSION2
+# define BOOST_TR1_NO_exception_RECURSION3
+#elif defined(BOOST_TR1_NO_exception_RECURSION)
+# define BOOST_TR1_NO_exception_RECURSION2
+#elif !defined(BOOST_TR1_NO_RECURSION)
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_exception_RECURSION
+#endif
+
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <exception>
+# else
+# include BOOST_TR1_STD_HEADER(exception)
+# endif
+
+#ifdef BOOST_TR1_NO_exception_RECURSION3
+# undef BOOST_TR1_NO_exception_RECURSION3
+#elif defined(BOOST_TR1_NO_exception_RECURSION2)
+# undef BOOST_TR1_NO_exception_RECURSION2
+#elif defined(BOOST_TR1_NO_exception_RECURSION)
+# undef BOOST_TR1_NO_exception_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+#endif
+
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_fstream_INCLUDED
+# define BOOST_TR1_fstream_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_fstream_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <fstream>
+# else
+# include BOOST_TR1_STD_HEADER(fstream)
+# endif
+# ifdef BOOST_TR1_NO_fstream_RECURSION
+# undef BOOST_TR1_NO_fstream_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+#if !defined(BOOST_TR1_FUNCTIONAL_INCLUDED)
+# define BOOST_TR1_FUNCTIONAL_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_FUNCTIONAL_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <functional>
+# else
+# include BOOST_TR1_STD_HEADER(functional)
+# endif
+# ifdef BOOST_TR1_NO_FUNCTIONAL_RECURSION
+# undef BOOST_TR1_NO_FUNCTIONAL_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
+#if !defined(BOOST_TR1_FULL_FUNCTIONAL_INCLUDED) && !defined(BOOST_TR1_NO_RECURSION)
+# define BOOST_TR1_FULL_FUNCTIONAL_INCLUDED
+# define BOOST_TR1_NO_RECURSION
+# include <boost/tr1/functional.hpp>
+# undef BOOST_TR1_NO_RECURSION
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_iomanip_INCLUDED
+# define BOOST_TR1_iomanip_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_iomanip_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <iomanip>
+# else
+# include BOOST_TR1_STD_HEADER(iomanip)
+# endif
+# ifdef BOOST_TR1_NO_iomanip_RECURSION
+# undef BOOST_TR1_NO_iomanip_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_ios_INCLUDED
+# define BOOST_TR1_ios_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_ios_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <ios>
+# else
+# include BOOST_TR1_STD_HEADER(ios)
+# endif
+# ifdef BOOST_TR1_NO_ios_RECURSION
+# undef BOOST_TR1_NO_ios_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_iostream_INCLUDED
+# define BOOST_TR1_iostream_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_iostream_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <iostream>
+# else
+# include BOOST_TR1_STD_HEADER(iostream)
+# endif
+# ifdef BOOST_TR1_NO_iostream_RECURSION
+# undef BOOST_TR1_NO_iostream_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_istream_INCLUDED
+# define BOOST_TR1_istream_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_istream_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <istream>
+# else
+# include BOOST_TR1_STD_HEADER(istream)
+# endif
+# ifdef BOOST_TR1_NO_istream_RECURSION
+# undef BOOST_TR1_NO_istream_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_iterator_INCLUDED
+# define BOOST_TR1_iterator_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_iterator_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <iterator>
+# else
+# include BOOST_TR1_STD_HEADER(iterator)
+# endif
+# ifdef BOOST_TR1_NO_iterator_RECURSION
+# undef BOOST_TR1_NO_iterator_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_limits_INCLUDED
+# define BOOST_TR1_limits_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_limits_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <limits>
+# else
+# include BOOST_TR1_STD_HEADER(limits)
+# endif
+# ifdef BOOST_TR1_NO_limits_RECURSION
+# undef BOOST_TR1_NO_limits_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_list_INCLUDED
+# define BOOST_TR1_list_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_list_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <list>
+# else
+# include BOOST_TR1_STD_HEADER(list)
+# endif
+# ifdef BOOST_TR1_NO_list_RECURSION
+# undef BOOST_TR1_NO_list_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_locale_INCLUDED
+# define BOOST_TR1_locale_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_locale_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <locale>
+# else
+# include BOOST_TR1_STD_HEADER(locale)
+# endif
+# ifdef BOOST_TR1_NO_locale_RECURSION
+# undef BOOST_TR1_NO_locale_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_map_INCLUDED
+# define BOOST_TR1_map_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_map_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <map>
+# else
+# include BOOST_TR1_STD_HEADER(map)
+# endif
+# ifdef BOOST_TR1_NO_map_RECURSION
+# undef BOOST_TR1_NO_map_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+
+#ifndef BOOST_TR1_MEMORY_INCLUDED
+# define BOOST_TR1_MEMORY_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_MEMORY_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <memory>
+# else
+# include BOOST_TR1_STD_HEADER(memory)
+# endif
+# ifdef BOOST_TR1_NO_MEMORY_RECURSION
+# undef BOOST_TR1_NO_MEMORY_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
+#if !defined(BOOST_TR1_FULL_MEMORY_INCLUDED) && !defined(BOOST_TR1_NO_RECURSION)
+# define BOOST_TR1_FULL_MEMORY_INCLUDED
+# define BOOST_TR1_NO_RECURSION
+# include <boost/tr1/memory.hpp>
+# undef BOOST_TR1_NO_RECURSION
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifdef BOOST_TR1_NO_new_RECURSION2
+# define BOOST_TR1_NO_new_RECURSION3
+#elif defined(BOOST_TR1_NO_new_RECURSION)
+# define BOOST_TR1_NO_new_RECURSION2
+#elif !defined(BOOST_TR1_NO_RECURSION)
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_new_RECURSION
+#endif
+
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <new>
+# else
+# include BOOST_TR1_STD_HEADER(new)
+# endif
+
+#ifdef BOOST_TR1_NO_new_RECURSION3
+# undef BOOST_TR1_NO_new_RECURSION3
+#elif defined(BOOST_TR1_NO_new_RECURSION2)
+# undef BOOST_TR1_NO_new_RECURSION2
+#elif defined(BOOST_TR1_NO_new_RECURSION)
+# undef BOOST_TR1_NO_new_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+#endif
+
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_numeric_INCLUDED
+# define BOOST_TR1_numeric_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_numeric_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <numeric>
+# else
+# include BOOST_TR1_STD_HEADER(numeric)
+# endif
+# ifdef BOOST_TR1_NO_numeric_RECURSION
+# undef BOOST_TR1_NO_numeric_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_ostream_INCLUDED
+# define BOOST_TR1_ostream_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_ostream_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <ostream>
+# else
+# include BOOST_TR1_STD_HEADER(ostream)
+# endif
+# ifdef BOOST_TR1_NO_ostream_RECURSION
+# undef BOOST_TR1_NO_ostream_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_queue_INCLUDED
+# define BOOST_TR1_queue_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_queue_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <queue>
+# else
+# include BOOST_TR1_STD_HEADER(queue)
+# endif
+# ifdef BOOST_TR1_NO_queue_RECURSION
+# undef BOOST_TR1_NO_queue_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+
+#ifndef BOOST_TR1_RANDOM_INCLUDED
+# define BOOST_TR1_RANDOM_INCLUDED
+# include <boost/tr1/detail/config_all.hpp>
+
+# ifdef BOOST_HAS_CPP_0X
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <random>
+# else
+# include BOOST_TR1_STD_HEADER(random)
+# endif
+# endif
+
+# if !defined(BOOST_TR1_NO_RECURSION)
+# define BOOST_TR1_NO_RECURSION
+# ifdef BOOST_HAS_TR1_RANDOM
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next BOOST_TR1_HEADER(random)
+# else
+# include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(random))
+# endif
+# else
+# include <boost/tr1/random.hpp>
+# endif
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+
+#ifndef BOOST_TR1_REGEX_INCLUDED
+# define BOOST_TR1_REGEX_INCLUDED
+# define BOOST_TR1_NO_RECURSION
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_TR1_REGEX
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next BOOST_TR1_HEADER(regex)
+# else
+# include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(regex))
+# endif
+# else
+# include <boost/tr1/regex.hpp>
+# endif
+# undef BOOST_TR1_NO_RECURSION
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_set_INCLUDED
+# define BOOST_TR1_set_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_set_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <set>
+# else
+# include BOOST_TR1_STD_HEADER(set)
+# endif
+# ifdef BOOST_TR1_NO_set_RECURSION
+# undef BOOST_TR1_NO_set_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_sstream_INCLUDED
+# define BOOST_TR1_sstream_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_sstream_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <sstream>
+# else
+# include BOOST_TR1_STD_HEADER(sstream)
+# endif
+# ifdef BOOST_TR1_NO_sstream_RECURSION
+# undef BOOST_TR1_NO_sstream_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_stack_INCLUDED
+# define BOOST_TR1_stack_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_stack_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <stack>
+# else
+# include BOOST_TR1_STD_HEADER(stack)
+# endif
+# ifdef BOOST_TR1_NO_stack_RECURSION
+# undef BOOST_TR1_NO_stack_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifdef BOOST_TR1_NO_stdexcept_RECURSION2
+# define BOOST_TR1_NO_stdexcept_RECURSION3
+#elif defined(BOOST_TR1_NO_stdexcept_RECURSION)
+# define BOOST_TR1_NO_stdexcept_RECURSION2
+#elif !defined(BOOST_TR1_NO_RECURSION)
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_stdexcept_RECURSION
+#endif
+
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <stdexcept>
+# else
+# include BOOST_TR1_STD_HEADER(stdexcept)
+# endif
+
+#ifdef BOOST_TR1_NO_stdexcept_RECURSION3
+# undef BOOST_TR1_NO_stdexcept_RECURSION3
+#elif defined(BOOST_TR1_NO_stdexcept_RECURSION2)
+# undef BOOST_TR1_NO_stdexcept_RECURSION2
+#elif defined(BOOST_TR1_NO_stdexcept_RECURSION)
+# undef BOOST_TR1_NO_stdexcept_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_streambuf_INCLUDED
+# define BOOST_TR1_streambuf_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_streambuf_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <streambuf>
+# else
+# include BOOST_TR1_STD_HEADER(streambuf)
+# endif
+# ifdef BOOST_TR1_NO_streambuf_RECURSION
+# undef BOOST_TR1_NO_streambuf_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_string_INCLUDED
+# define BOOST_TR1_string_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_string_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <string>
+# else
+# include BOOST_TR1_STD_HEADER(string)
+# endif
+# ifdef BOOST_TR1_NO_string_RECURSION
+# undef BOOST_TR1_NO_string_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_strstream_INCLUDED
+# define BOOST_TR1_strstream_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_strstream_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <strstream>
+# else
+# include BOOST_TR1_STD_HEADER(strstream)
+# endif
+# ifdef BOOST_TR1_NO_strstream_RECURSION
+# undef BOOST_TR1_NO_strstream_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../algorithm"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../array"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../bcc32"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../bitset"
+
--- /dev/null
+// (C) Copyright John Maddock 2008.
+// 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)
+#include "../cmath"
+
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../complex"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../deque"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../exception"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../fstream"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../functional"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../iomanip"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../ios"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../iostream"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../istream"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../iterator"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../limits"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../list"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../locale"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../map"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../memory"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../new"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../numeric"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../ostream"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../queue"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../random"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../regex"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../set"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../sstream"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../stack"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../stdexcept"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../streambuf"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../string"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../strstream"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../sun"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../tuple"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../type_traits"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../typeinfo"
+
--- /dev/null
+// (C) Copyright John Maddock 2008.
+// 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)
+#include "../unordered_map"
+
+
--- /dev/null
+// (C) Copyright John Maddock 2008.
+// 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)
+#include "../unordered_set"
+
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../utility"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../valarray"
+
--- /dev/null
+// (C) Copyright John Maddock 2006.
+// 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)
+#include "../vector"
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+
+#ifndef BOOST_TR1_TUPLE_INCLUDED
+# define BOOST_TR1_TUPLE_INCLUDED
+# include <boost/tr1/detail/config_all.hpp>
+
+# ifdef BOOST_HAS_CPP_0X
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <tuple>
+# else
+# include BOOST_TR1_STD_HEADER(tuple)
+# endif
+# endif
+
+# if !defined(BOOST_TR1_NO_RECURSION)
+# define BOOST_TR1_NO_RECURSION
+# ifdef BOOST_HAS_TR1_TUPLE
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next BOOST_TR1_HEADER(tuple)
+# else
+# include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(tuple))
+# endif
+# else
+# include <boost/tr1/tuple.hpp>
+# endif
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+
+#include <boost/tr1/detail/config_all.hpp>
+
+#if (!defined(BOOST_TR1_TYPE_TRAITS_INCLUDED) || defined(BOOST_TR1_NO_RECURSION)) && defined(BOOST_HAS_CPP_0X)
+#ifndef BOOST_TR1_TYPE_TRAITS_INCLUDED
+# define BOOST_TR1_TYPE_TRAITS_INCLUDED
+#endif
+# ifdef BOOST_TR1_NO_TYPE_TRAITS_RECURSION2
+# define BOOST_TR1_NO_TYPE_TRAITS_RECURSION3
+# elif defined(BOOST_TR1_NO_TYPE_TRAITS_RECURSION)
+# define BOOST_TR1_NO_TYPE_TRAITS_RECURSION2
+# elif !defined(BOOST_TR1_NO_RECURSION)
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_TYPE_TRAITS_RECURSION
+# endif
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <type_traits>
+# else
+# include BOOST_TR1_STD_HEADER(type_traits)
+# endif
+#ifdef BOOST_TR1_NO_TYPE_TRAITS_RECURSION3
+# undef BOOST_TR1_NO_TYPE_TRAITS_RECURSION3
+#elif defined(BOOST_TR1_NO_TYPE_TRAITS_RECURSION2)
+# undef BOOST_TR1_NO_TYPE_TRAITS_RECURSION2
+#elif defined(BOOST_TR1_NO_TYPE_TRAITS_RECURSION)
+# undef BOOST_TR1_NO_RECURSION
+# undef BOOST_TR1_NO_TYPE_TRAITS_RECURSION
+# endif
+#endif
+
+#if !defined(BOOST_TR1_FULL_TYPE_TRAITS_INCLUDED) && !defined(BOOST_TR1_NO_RECURSION)
+# define BOOST_TR1_FULL_TYPE_TRAITS_INCLUDED
+# define BOOST_TR1_NO_RECURSION
+# include <boost/tr1/type_traits.hpp>
+# undef BOOST_TR1_NO_RECURSION
+#endif
+
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_typeinfo_INCLUDED
+# define BOOST_TR1_typeinfo_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_typeinfo_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <typeinfo>
+# else
+# include BOOST_TR1_STD_HEADER(typeinfo)
+# endif
+# ifdef BOOST_TR1_NO_typeinfo_RECURSION
+# undef BOOST_TR1_NO_typeinfo_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2008.
+// 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)
+
+
+#ifndef BOOST_TR1_UNORDERED_MAP_INCLUDED
+# define BOOST_TR1_UNORDERED_MAP_INCLUDED
+# include <boost/tr1/detail/config_all.hpp>
+
+# ifdef BOOST_HAS_CPP_0X
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <unordered_map>
+# else
+# include BOOST_TR1_STD_HEADER(unordered_map)
+# endif
+# endif
+
+# if !defined(BOOST_TR1_NO_RECURSION)
+# define BOOST_TR1_NO_RECURSION
+# ifdef BOOST_HAS_TR1_UNORDERED_MAP
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next BOOST_TR1_HEADER(unordered_map)
+# else
+# include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(unordered_map))
+# endif
+# else
+# include <boost/tr1/unordered_map.hpp>
+# endif
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
+
--- /dev/null
+// (C) Copyright John Maddock 2008.
+// 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)
+
+
+#ifndef BOOST_TR1_UNORDERED_SET_INCLUDED
+# define BOOST_TR1_UNORDERED_SET_INCLUDED
+# include <boost/tr1/detail/config_all.hpp>
+
+# ifdef BOOST_HAS_CPP_0X
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <unordered_map>
+# else
+# include BOOST_TR1_STD_HEADER(unordered_map)
+# endif
+# endif
+
+# if !defined(BOOST_TR1_NO_RECURSION)
+# define BOOST_TR1_NO_RECURSION
+# ifdef BOOST_HAS_TR1_UNORDERED_SET
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next BOOST_TR1_HEADER(unordered_set)
+# else
+# include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(unordered_set))
+# endif
+# else
+# include <boost/tr1/unordered_set.hpp>
+# endif
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+
+#if !defined(BOOST_TR1_UTILITY_INCLUDED) || defined(BOOST_TR1_NO_RECURSION)
+#ifndef BOOST_TR1_UTILITY_INCLUDED
+# define BOOST_TR1_UTILITY_INCLUDED
+#endif
+# ifdef BOOST_TR1_NO_UTILITY_RECURSION2
+# define BOOST_TR1_NO_UTILITY_RECURSION3
+# elif defined(BOOST_TR1_NO_UTILITY_RECURSION)
+# define BOOST_TR1_NO_UTILITY_RECURSION2
+# elif !defined(BOOST_TR1_NO_RECURSION)
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_UTILITY_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <utility>
+# else
+# include BOOST_TR1_STD_HEADER(utility)
+# endif
+#ifdef BOOST_TR1_NO_UTILITY_RECURSION3
+# undef BOOST_TR1_NO_UTILITY_RECURSION3
+#elif defined(BOOST_TR1_NO_UTILITY_RECURSION2)
+# undef BOOST_TR1_NO_UTILITY_RECURSION2
+#elif defined(BOOST_TR1_NO_UTILITY_RECURSION)
+# undef BOOST_TR1_NO_RECURSION
+# undef BOOST_TR1_NO_UTILITY_RECURSION
+# endif
+#endif
+
+#if !defined(BOOST_TR1_FULL_UTILITY_INCLUDED) && !defined(BOOST_TR1_NO_RECURSION)
+# define BOOST_TR1_FULL_UTILITY_INCLUDED
+# define BOOST_TR1_NO_RECURSION
+# include <boost/tr1/utility.hpp>
+# undef BOOST_TR1_NO_RECURSION
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_valarray_INCLUDED
+# define BOOST_TR1_valarray_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_valarray_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <valarray>
+# else
+# include BOOST_TR1_STD_HEADER(valarray)
+# endif
+# ifdef BOOST_TR1_NO_valarray_RECURSION
+# undef BOOST_TR1_NO_valarray_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+//
+// This file exists to prevent std lib headers from accidentally
+// including a TR1 extention header; we must suppress this otherwise
+// we can end up with cyclic dependencies with some std lib implementations.
+//
+#ifndef BOOST_TR1_vector_INCLUDED
+# define BOOST_TR1_vector_INCLUDED
+# ifndef BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_RECURSION
+# define BOOST_TR1_NO_vector_RECURSION
+# endif
+# include <boost/tr1/detail/config_all.hpp>
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next <vector>
+# else
+# include BOOST_TR1_STD_HEADER(vector)
+# endif
+# ifdef BOOST_TR1_NO_vector_RECURSION
+# undef BOOST_TR1_NO_vector_RECURSION
+# undef BOOST_TR1_NO_RECURSION
+# endif
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+#ifndef BOOST_TR1_TUPLE_HPP_INCLUDED
+# define BOOST_TR1_TUPLE_HPP_INCLUDED
+# include <boost/tr1/detail/config.hpp>
+
+#ifdef BOOST_HAS_TR1_TUPLE
+
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next BOOST_TR1_HEADER(tuple)
+# else
+# include <boost/tr1/detail/config_all.hpp>
+# include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(tuple))
+# endif
+
+#else
+
+#if defined(BOOST_TR1_USE_OLD_TUPLE)
+
+#include <boost/tuple/tuple.hpp>
+#include <boost/tuple/tuple_comparison.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+
+namespace std{ namespace tr1{
+
+using ::boost::tuple;
+
+// [6.1.3.2] Tuple creation functions
+using ::boost::tuples::ignore;
+using ::boost::make_tuple;
+using ::boost::tie;
+
+// [6.1.3.3] Tuple helper classes
+template <class T>
+struct tuple_size
+ : public ::boost::integral_constant
+ < ::std::size_t, ::boost::tuples::length<T>::value>
+{};
+
+template < int I, class T>
+struct tuple_element
+{
+ typedef typename boost::tuples::element<I,T>::type type;
+};
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
+// [6.1.3.4] Element access
+using ::boost::get;
+#endif
+
+} } // namespaces
+
+#else
+
+#include <boost/fusion/include/tuple.hpp>
+#include <boost/fusion/include/std_pair.hpp>
+
+namespace std{ namespace tr1{
+
+using ::boost::fusion::tuple;
+
+// [6.1.3.2] Tuple creation functions
+using ::boost::fusion::ignore;
+using ::boost::fusion::make_tuple;
+using ::boost::fusion::tie;
+using ::boost::fusion::get;
+
+// [6.1.3.3] Tuple helper classes
+using ::boost::fusion::tuple_size;
+using ::boost::fusion::tuple_element;
+
+}}
+
+#endif
+
+#endif
+
+#endif
+
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+#ifndef BOOST_TR1_TYPE_TRAITS_HPP_INCLUDED
+# define BOOST_TR1_TYPE_TRAITS_HPP_INCLUDED
+# include <boost/tr1/detail/config.hpp>
+
+#ifdef BOOST_HAS_TR1_TYPE_TRAITS
+
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next BOOST_TR1_HEADER(type_traits)
+# else
+# include <boost/tr1/detail/config_all.hpp>
+# include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(type_traits))
+# endif
+
+#else
+// Boost Type Traits:
+#include <boost/type_traits.hpp>
+
+namespace std { namespace tr1{
+
+ using ::boost::integral_constant;
+ using ::boost::true_type;
+ using ::boost::false_type;
+ using ::boost::is_void;
+ using ::boost::is_integral;
+ using ::boost::is_floating_point;
+ using ::boost::is_array;
+ using ::boost::is_pointer;
+ using ::boost::is_reference;
+ using ::boost::is_member_object_pointer;
+ using ::boost::is_member_function_pointer;
+ using ::boost::is_enum;
+ using ::boost::is_union;
+ using ::boost::is_class;
+ using ::boost::is_function;
+ using ::boost::is_arithmetic;
+ using ::boost::is_fundamental;
+ using ::boost::is_object;
+ using ::boost::is_scalar;
+ using ::boost::is_compound;
+ using ::boost::is_member_pointer;
+ using ::boost::is_const;
+ using ::boost::is_volatile;
+ using ::boost::is_pod;
+ using ::boost::is_empty;
+ using ::boost::is_polymorphic;
+ using ::boost::is_abstract;
+ using ::boost::has_trivial_constructor;
+ using ::boost::has_trivial_copy;
+ using ::boost::has_trivial_assign;
+ using ::boost::has_trivial_destructor;
+ using ::boost::has_nothrow_constructor;
+ using ::boost::has_nothrow_copy;
+ using ::boost::has_nothrow_assign;
+ using ::boost::has_virtual_destructor;
+ using ::boost::is_signed;
+ using ::boost::is_unsigned;
+ using ::boost::alignment_of;
+ using ::boost::rank;
+ using ::boost::extent;
+ using ::boost::is_same;
+ using ::boost::is_base_of;
+ using ::boost::is_convertible;
+ using ::boost::remove_const;
+ using ::boost::remove_volatile;
+ using ::boost::remove_cv;
+ using ::boost::add_const;
+ using ::boost::add_volatile;
+ using ::boost::add_cv;
+ using ::boost::remove_reference;
+ using ::boost::add_reference;
+ using ::boost::remove_extent;
+ using ::boost::remove_all_extents;
+ using ::boost::remove_pointer;
+ using ::boost::add_pointer;
+ using ::boost::aligned_storage;
+
+} }
+
+#endif
+
+#endif
--- /dev/null
+// (C) Copyright John Maddock 2008.
+// 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)
+
+#ifndef BOOST_TR1_UNORDERED_MAP_HPP_INCLUDED
+# define BOOST_TR1_UNORDERED_MAP_HPP_INCLUDED
+# include <boost/tr1/detail/config.hpp>
+
+#ifdef BOOST_HAS_TR1_UNORDERED_MAP
+
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next BOOST_TR1_HEADER(unordered_map)
+# else
+# include <boost/tr1/detail/config_all.hpp>
+# include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(unordered_map))
+# endif
+
+#else
+
+#include <boost/unordered_map.hpp>
+
+namespace std{ namespace tr1{
+
+ using ::boost::unordered_map;
+ using ::boost::unordered_multimap;
+ using ::boost::swap;
+
+} } // namespaces
+
+#endif
+
+#endif
--- /dev/null
+// (C) Copyright John Maddock 2008.
+// 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)
+
+#ifndef BOOST_TR1_UNORDERED_SET_HPP_INCLUDED
+# define BOOST_TR1_UNORDERED_SET_HPP_INCLUDED
+# include <boost/tr1/detail/config.hpp>
+
+#ifdef BOOST_HAS_TR1_UNORDERED_SET
+
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next BOOST_TR1_HEADER(unordered_set)
+# else
+# include <boost/tr1/detail/config_all.hpp>
+# include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(unordered_set))
+# endif
+
+#else
+
+#include <boost/unordered_set.hpp>
+
+namespace std{ namespace tr1{
+
+ using ::boost::unordered_set;
+ using ::boost::unordered_multiset;
+ using ::boost::swap;
+
+} } // namespaces
+
+#endif
+
+#endif
--- /dev/null
+// (C) Copyright John Maddock 2005.
+// 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)
+
+#ifndef BOOST_TR1_UTILITY_HPP_INCLUDED
+# define BOOST_TR1_UTILITY_HPP_INCLUDED
+# include <boost/tr1/detail/config.hpp>
+
+#ifdef BOOST_HAS_TR1_UTILITY
+
+# ifdef BOOST_HAS_INCLUDE_NEXT
+# include_next BOOST_TR1_HEADER(utility)
+# else
+# include <boost/tr1/detail/config_all.hpp>
+# include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(utility))
+# endif
+
+#else
+
+#if defined(BOOST_TR1_USE_OLD_TUPLE)
+
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/mpl/if.hpp>
+
+
+namespace std{ namespace tr1{
+
+template <class T> struct tuple_size; // forward declaration
+template < int I, class T> struct tuple_element; // forward declaration
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+template <class T1, class T2>
+struct tuple_size< ::std::pair<T1, T2> >
+ : public ::boost::integral_constant< ::std::size_t, 2>
+{
+};
+
+template <class T1, class T2>
+struct tuple_element<0, ::std::pair<T1, T2> >
+{
+ typedef typename std::pair<T1, T2>::first_type type;
+};
+
+template <class T1, class T2>
+struct tuple_element<1, std::pair<T1, T2> >
+{
+ typedef typename std::pair<T1, T2>::second_type type;
+};
+#endif
+
+namespace tuple_detail{
+ template <int I, class T1, class T2>
+ struct tuple_get_result
+ {
+ typedef typename boost::mpl::if_c<I==0, T1, T2>::type t1;
+ typedef typename boost::add_reference<t1>::type type;
+ };
+ template <int I, class T1, class T2>
+ struct const_tuple_get_result
+ {
+ typedef typename boost::mpl::if_c<I==0, T1, T2>::type t1;
+# if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x582))
+ // I have absolutely no idea why add_const is not working here for Borland!
+ // It passes all other free-standing tests, some strange interaction going on
+ typedef typename boost::add_reference< const t1 >::type type;
+# else
+ typedef typename boost::add_const<t1>::type t2;
+ typedef typename boost::add_reference<t2>::type type;
+# endif
+ };
+
+template<int I, class T1, class T2>
+inline typename tuple_detail::tuple_get_result<I,T1,T2>::type get(std::pair<T1, T2>& p, const ::boost::true_type&)
+{
+ return p.first;
+}
+
+template<int I, class T1, class T2>
+inline typename tuple_detail::const_tuple_get_result<I,T1,T2>::type get(const std::pair<T1, T2>& p, const ::boost::true_type&)
+{
+ return p.first;
+}
+
+template<int I, class T1, class T2>
+inline typename tuple_detail::tuple_get_result<I,T1,T2>::type get(std::pair<T1, T2>& p, const ::boost::false_type&)
+{
+ return p.second;
+}
+
+template<int I, class T1, class T2>
+inline typename tuple_detail::const_tuple_get_result<I,T1,T2>::type get(const std::pair<T1, T2>& p, const ::boost::false_type&)
+{
+ return p.second;
+}
+
+}
+
+template<int I, class T1, class T2>
+inline typename tuple_detail::tuple_get_result<I,T1,T2>::type get(std::pair<T1, T2>& p)
+{
+ return tuple_detail::get<I>(p, boost::integral_constant<bool, I==0>());
+}
+
+template<int I, class T1, class T2>
+inline typename tuple_detail::const_tuple_get_result<I,T1,T2>::type get(const std::pair<T1, T2>& p)
+{
+ return tuple_detail::get<I>(p, boost::integral_constant<bool, I==0>());
+}
+
+} } // namespaces
+
+#else
+
+#include <boost/tr1/tuple.hpp>
+
+#endif
+
+#endif
+
+#endif