forked from boostorg/fusion
Removed file/folder
[SVN r40230]
This commit is contained in:
@ -1,17 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/adapted/boost_tuple.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair.hpp>
|
||||
#include <boost/fusion/sequence/adapted/array.hpp>
|
||||
#include <boost/fusion/sequence/adapted/mpl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/variant.hpp>
|
||||
|
||||
#endif
|
@ -1,22 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/adapted/array/array_iterator.hpp>
|
||||
#include <boost/fusion/sequence/adapted/array/tag_of.hpp>
|
||||
#include <boost/fusion/sequence/adapted/array/detail/is_view_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/array/detail/is_sequence_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/array/detail/category_of_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/array/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/array/detail/end_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/array/detail/size_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/array/detail/at_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/array/detail/value_at_impl.hpp>
|
||||
|
||||
#endif
|
@ -1,107 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,45 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,40 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/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
|
@ -1,35 +0,0 @@
|
||||
/*=============================================================================
|
||||
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 <utility>
|
||||
|
||||
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
|
@ -1,40 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/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
|
@ -1,31 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,32 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,29 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,32 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,35 +0,0 @@
|
||||
/*=============================================================================
|
||||
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>
|
||||
struct tag_of<boost::array<T,N> >
|
||||
{
|
||||
typedef array_tag type;
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,20 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/adapted/boost_tuple/tag_of.hpp>
|
||||
#include <boost/fusion/sequence/adapted/boost_tuple/detail/is_view_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/boost_tuple/detail/is_sequence_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/boost_tuple/detail/category_of_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/boost_tuple/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/boost_tuple/detail/end_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/boost_tuple/detail/size_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/boost_tuple/detail/at_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/boost_tuple/detail/value_at_impl.hpp>
|
||||
|
||||
#endif
|
@ -1,149 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
||||
|
||||
|
@ -1,50 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,39 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/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
|
@ -1,32 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,54 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/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
|
@ -1,30 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,30 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,31 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,30 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,55 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
||||
>
|
||||
struct tag_of<tuples::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
|
||||
{
|
||||
typedef boost_tuple_tag type;
|
||||
};
|
||||
|
||||
template <class Head, class Tail>
|
||||
struct tag_of<tuples::cons<Head, Tail> >
|
||||
{
|
||||
typedef boost_tuple_tag type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct tag_of<tuples::null_type>
|
||||
{
|
||||
typedef boost_tuple_tag type;
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,21 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/adapted/mpl/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/mpl/detail/end_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/mpl/detail/is_sequence_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/mpl/detail/size_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/mpl/detail/value_at_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/mpl/detail/at_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/mpl/detail/has_key_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/mpl/detail/category_of_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/mpl/detail/is_view_impl.hpp>
|
||||
|
||||
#endif
|
@ -1,40 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,45 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/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
|
@ -1,54 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,28 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,45 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/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
|
@ -1,31 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,31 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,32 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,31 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,31 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,113 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
||||
|
||||
|
@ -1,66 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/adapted/struct.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct struct_tag;
|
||||
|
||||
namespace traits
|
||||
{
|
||||
template <typename T1, typename T2>
|
||||
struct tag_of<std::pair<T1, T2> >
|
||||
{
|
||||
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
|
@ -1,71 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,40 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/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
|
@ -1,35 +0,0 @@
|
||||
/*=============================================================================
|
||||
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 <utility>
|
||||
|
||||
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
|
@ -1,40 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/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
|
@ -1,31 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,32 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,31 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,43 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,127 +0,0 @@
|
||||
/*=============================================================================
|
||||
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 <utility>
|
||||
|
||||
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
|
||||
|
||||
|
@ -1,29 +0,0 @@
|
||||
/*=============================================================================
|
||||
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 <utility>
|
||||
|
||||
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
|
@ -1,23 +0,0 @@
|
||||
/*=============================================================================
|
||||
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_STD_STRUCT_24122005_1744
|
||||
|
||||
#include <boost/fusion/sequence/adapted/struct/extension.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/adapt_struct.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/struct_iterator.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/is_view_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/is_sequence_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/category_of_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/end_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/size_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/at_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/value_at_impl.hpp>
|
||||
|
||||
#endif
|
@ -1,94 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/adapted/struct/extension.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/struct_iterator.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/is_view_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/is_sequence_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/category_of_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/end_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/size_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/at_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/value_at_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/has_key_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/at_key_impl.hpp>
|
||||
#include <boost/fusion/sequence/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 <utility>
|
||||
|
||||
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
|
@ -1,75 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/adapted/struct/extension.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/struct_iterator.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/is_view_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/is_sequence_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/category_of_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/end_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/size_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/struct/detail/at_impl.hpp>
|
||||
#include <boost/fusion/sequence/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 <utility>
|
||||
|
||||
#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
|
@ -1,63 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,54 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,40 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/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
|
@ -1,35 +0,0 @@
|
||||
/*=============================================================================
|
||||
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 <utility>
|
||||
|
||||
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
|
@ -1,40 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/adapted/struct/struct_iterator.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct struct_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct end_impl;
|
||||
|
||||
template <>
|
||||
struct end_impl<struct_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef struct_iterator<Sequence, 2> type;
|
||||
|
||||
static type
|
||||
call(Sequence& v)
|
||||
{
|
||||
return type(v);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,40 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,31 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,32 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,37 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,47 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,39 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,68 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
||||
|
||||
|
@ -1,103 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/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 <utility>
|
||||
|
||||
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
|
||||
|
||||
|
@ -1,20 +0,0 @@
|
||||
/*=============================================================================
|
||||
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_VARIANT_12112006_1614)
|
||||
#define BOOST_FUSION_VARIANT_12112006_1614
|
||||
|
||||
#include <boost/fusion/sequence/adapted/variant/variant_iterator.hpp>
|
||||
#include <boost/fusion/sequence/adapted/variant/detail/is_view_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/variant/detail/is_sequence_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/variant/detail/category_of_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/variant/tag_of.hpp>
|
||||
#include <boost/fusion/sequence/adapted/variant/detail/size_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/variant/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/variant/detail/end_impl.hpp>
|
||||
|
||||
#endif
|
@ -1,45 +0,0 @@
|
||||
/*=============================================================================
|
||||
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_VARIANT_BEGIN_IMPL_12112006_2137)
|
||||
#define BOOST_FUSION_VARIANT_BEGIN_IMPL_12112006_2137
|
||||
|
||||
#include <boost/mpl/begin.hpp>
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
|
||||
struct variant_tag;
|
||||
|
||||
template<typename Seq, typename Iterator>
|
||||
struct variant_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename T>
|
||||
struct begin_impl;
|
||||
|
||||
template <>
|
||||
struct begin_impl<variant_tag>
|
||||
{
|
||||
template <typename Seq>
|
||||
struct apply
|
||||
{
|
||||
typedef variant_iterator<
|
||||
Seq,
|
||||
typename mpl::begin<typename Seq::types>::type> type;
|
||||
|
||||
static type
|
||||
call(Seq& v)
|
||||
{
|
||||
return type(v);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,33 +0,0 @@
|
||||
/*=============================================================================
|
||||
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_VARIANT_CATEGORY_OF_IMPL_13112006_0802)
|
||||
#define BOOST_FUSION_VARIANT_CATEGORY_OF_IMPL_13112006_0802
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
|
||||
struct variant_tag;
|
||||
struct forward_traversal_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename T>
|
||||
struct category_of_impl;
|
||||
|
||||
template<>
|
||||
struct category_of_impl<variant_tag>
|
||||
{
|
||||
template<typename T>
|
||||
struct apply
|
||||
{
|
||||
typedef forward_traversal_tag type;
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,45 +0,0 @@
|
||||
/*=============================================================================
|
||||
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_VARIANT_END_IMPL_12112006_2137)
|
||||
#define BOOST_FUSION_VARIANT_END_IMPL_12112006_2137
|
||||
|
||||
#include <boost/mpl/end.hpp>
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
|
||||
struct variant_tag;
|
||||
|
||||
template<typename Seq, typename Iterator>
|
||||
struct variant_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename T>
|
||||
struct end_impl;
|
||||
|
||||
template <>
|
||||
struct end_impl<variant_tag>
|
||||
{
|
||||
template <typename Seq>
|
||||
struct apply
|
||||
{
|
||||
typedef variant_iterator<
|
||||
Seq,
|
||||
typename mpl::end<typename Seq::types>::type> type;
|
||||
|
||||
static type
|
||||
call(Seq& v)
|
||||
{
|
||||
return type(v);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,31 +0,0 @@
|
||||
/*=============================================================================
|
||||
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_VARIANT_IS_SEQUENCE_IMPL_13112006_0748)
|
||||
#define BOOST_FUSION_VARIANT_IS_SEQUENCE_IMPL_13112006_0748
|
||||
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
|
||||
struct variant_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename Tag>
|
||||
struct is_sequence_impl;
|
||||
|
||||
template<>
|
||||
struct is_sequence_impl<variant_tag>
|
||||
{
|
||||
template<typename Sequence>
|
||||
struct apply : mpl::true_ {};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,31 +0,0 @@
|
||||
/*=============================================================================
|
||||
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_VARIANT_IS_VIEW_IMPL_13112006_0749)
|
||||
#define BOOST_FUSION_VARIANT_IS_VIEW_IMPL_13112006_0749
|
||||
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
|
||||
struct variant_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename Tag>
|
||||
struct is_view_impl;
|
||||
|
||||
template<>
|
||||
struct is_view_impl<variant_tag>
|
||||
{
|
||||
template<typename Sequence>
|
||||
struct apply : mpl::false_ {};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,32 +0,0 @@
|
||||
/*=============================================================================
|
||||
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_VARIANT_SIZE_IMPL_12112006_2115)
|
||||
#define BOOST_FUSION_VARIANT_SIZE_IMPL_12112006_2115
|
||||
|
||||
#include <boost/mpl/size.hpp>
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
|
||||
struct variant_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename T>
|
||||
struct size_impl;
|
||||
|
||||
template<>
|
||||
struct size_impl<variant_tag>
|
||||
{
|
||||
template<typename Sequence>
|
||||
struct apply : mpl::size<typename Sequence::types>
|
||||
{};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,28 +0,0 @@
|
||||
/*=============================================================================
|
||||
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_VARIANT_TAG_OF_12112006_1704)
|
||||
#define BOOST_FUSION_VARIANT_TAG_OF_12112006_1704
|
||||
|
||||
#include <boost/fusion/support/tag_of_fwd.hpp>
|
||||
#include <boost/variant/variant_fwd.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct variant_tag;
|
||||
|
||||
namespace traits
|
||||
{
|
||||
template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
|
||||
struct tag_of<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> >
|
||||
{
|
||||
typedef variant_tag type;
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,117 +0,0 @@
|
||||
/*=============================================================================
|
||||
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_VARIANT_ITERATOR_12112006_1617)
|
||||
#define BOOST_FUSION_VARIANT_ITERATOR_12112006_1617
|
||||
|
||||
#include <boost/fusion/iterator/iterator_facade.hpp>
|
||||
|
||||
#include <boost/mpl/next.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/distance.hpp>
|
||||
#include <boost/mpl/deref.hpp>
|
||||
#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>
|
||||
#include <boost/variant/get.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct forward_traversal_tag;
|
||||
|
||||
template<typename Variant, typename MPLIterator>
|
||||
struct variant_iterator
|
||||
: iterator_facade<variant_iterator<Variant, MPLIterator>, forward_traversal_tag>
|
||||
{
|
||||
typedef Variant variant_type;
|
||||
typedef MPLIterator iterator;
|
||||
|
||||
variant_iterator(Variant& var)
|
||||
: var_(var) {}
|
||||
Variant& var_;
|
||||
|
||||
template<typename Iterator>
|
||||
struct next
|
||||
{
|
||||
typedef variant_iterator<
|
||||
typename Iterator::variant_type,
|
||||
typename mpl::next<typename Iterator::iterator>::type> type;
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return type(i.var_);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename I1, typename I2>
|
||||
struct distance
|
||||
: mpl::distance<
|
||||
typename I1::iterator,
|
||||
typename I2::iterator>
|
||||
{
|
||||
typedef typename mpl::distance<
|
||||
typename I1::iterator,
|
||||
typename I2::iterator>::type type;
|
||||
|
||||
static type call(I1 const& i1, I2 const& i2)
|
||||
{
|
||||
return type();
|
||||
}
|
||||
};
|
||||
|
||||
template<typename Iterator>
|
||||
struct value_of
|
||||
: mpl::deref<typename Iterator::iterator>
|
||||
{};
|
||||
|
||||
template <typename Iterator>
|
||||
struct deref
|
||||
{
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
is_const<typename Iterator::variant_type>
|
||||
, add_const<typename mpl::deref<typename Iterator::iterator>::type>
|
||||
, mpl::deref<typename Iterator::iterator>
|
||||
>::type
|
||||
value_type;
|
||||
|
||||
typedef typename
|
||||
add_reference<value_type>::type
|
||||
type;
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
|
||||
// for some unknown reason (compiler bug) VC7.1 gets confused with
|
||||
// variant and optional get functions.
|
||||
static type
|
||||
call(Iterator const & it)
|
||||
{
|
||||
boost::detail::variant::get_visitor<type> v;
|
||||
typedef typename mpl::deref<typename Iterator::iterator>::type type;
|
||||
if (type* result = it.var_.apply_visitor(v))
|
||||
return *result;
|
||||
it.var_ = type(); // prime the variant
|
||||
return *it.var_.apply_visitor(v); // no-throw!
|
||||
}
|
||||
#else
|
||||
static type
|
||||
call(Iterator const & it)
|
||||
{
|
||||
typedef typename mpl::deref<typename Iterator::iterator>::type type;
|
||||
if (type* result = boost::get<type>(&it.var_))
|
||||
return *result;
|
||||
it.var_ = type(); // prime the variant
|
||||
return *boost::get<type>(&it.var_); // no-throw!
|
||||
}
|
||||
#endif
|
||||
};
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,17 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,38 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,60 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
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
|
@ -1,50 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
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
|
@ -1,49 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
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
|
@ -1,50 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
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
|
@ -1,49 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
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
|
@ -1,60 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
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
|
@ -1,46 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
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
|
@ -1,52 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
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
|
@ -1,52 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
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
|
@ -1,43 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
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
|
@ -1,80 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
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
|
@ -1,55 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
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
|
@ -1,16 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/container/vector.hpp>
|
||||
#include <boost/fusion/sequence/container/list.hpp>
|
||||
#include <boost/fusion/sequence/container/map.hpp>
|
||||
#include <boost/fusion/sequence/container/set.hpp>
|
||||
#include <boost/fusion/sequence/container/deque.hpp>
|
||||
|
||||
#endif
|
@ -1,14 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/container/deque/deque.hpp>
|
||||
|
||||
#endif
|
||||
|
@ -1,37 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/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
|
@ -1,93 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/container/deque/limits.hpp>
|
||||
#include <boost/fusion/sequence/container/deque/front_extended_deque.hpp>
|
||||
#include <boost/fusion/sequence/container/deque/back_extended_deque.hpp>
|
||||
#include <boost/fusion/sequence/container/deque/detail/deque_keyed_values.hpp>
|
||||
#include <boost/fusion/sequence/container/deque/detail/deque_initial_size.hpp>
|
||||
#include <boost/fusion/support/sequence_base.hpp>
|
||||
#include <boost/fusion/sequence/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/sequence/container/deque/deque_fwd.hpp>
|
||||
#include <boost/fusion/sequence/container/deque/detail/value_at_impl.hpp>
|
||||
#include <boost/fusion/sequence/container/deque/detail/at_impl.hpp>
|
||||
#include <boost/fusion/sequence/container/deque/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/sequence/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/sequence/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
|
@ -1,24 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/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
|
@ -1,106 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/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
|
@ -1,59 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/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
|
@ -1,46 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/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
|
@ -1,31 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/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
|
@ -1,33 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,75 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/container/deque/limits.hpp>
|
||||
#include <boost/fusion/sequence/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/sequence/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
|
@ -1,38 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/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
|
@ -1,46 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/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
|
@ -1,111 +0,0 @@
|
||||
/*=============================================================================
|
||||
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
|
@ -1,43 +0,0 @@
|
||||
/*=============================================================================
|
||||
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/sequence/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
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user