forked from boostorg/fusion
Initial move from Spirit CVS
[SVN r34896]
This commit is contained in:
16
include/boost/fusion/sequence/adapted.hpp
Normal file
16
include/boost/fusion/sequence/adapted.hpp
Normal file
@ -0,0 +1,16 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_ADAPTED_30122005_1420)
|
||||
#define BOOST_FUSION_ADAPTED_30122005_1420
|
||||
|
||||
#include <boost/fusion/sequence/adapted/std_pair.hpp>
|
||||
#include <boost/fusion/sequence/adapted/array.hpp>
|
||||
#include <boost/fusion/sequence/adapted/mpl.hpp>
|
||||
|
||||
#endif
|
23
include/boost/fusion/sequence/adapted/array.hpp
Normal file
23
include/boost/fusion/sequence/adapted/array.hpp
Normal file
@ -0,0 +1,23 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,56 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_ARRAY_ITERATOR_26122005_2250)
|
||||
#define BOOST_FUSION_ARRAY_ITERATOR_26122005_2250
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/mpl/size_t.hpp>
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
|
||||
#include <boost/fusion/support/iterator_base.hpp>
|
||||
#include <boost/fusion/sequence/adapted/array/detail/next_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/array/detail/prior_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/array/detail/advance_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/array/detail/deref_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/array/detail/value_of_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/array/detail/distance_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/array/detail/equal_to_impl.hpp>
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
|
||||
struct array_iterator_tag;
|
||||
struct random_access_traversal_tag;
|
||||
|
||||
template<typename Array, std::size_t Pos>
|
||||
struct array_iterator
|
||||
: iterator_base<array_iterator<Array, Pos> >
|
||||
{
|
||||
BOOST_MPL_ASSERT_RELATION(Pos,>=,0);
|
||||
BOOST_MPL_ASSERT_RELATION(Pos,<=,std::size_t(Array::static_size));
|
||||
|
||||
typedef mpl::size_t<Pos> index;
|
||||
typedef array_iterator_tag ftag;
|
||||
typedef random_access_traversal_tag category;
|
||||
typedef Array array_type;
|
||||
typedef array_iterator<
|
||||
typename add_const<Array>::type, Pos> identity;
|
||||
|
||||
array_iterator(Array& a)
|
||||
: array(a) {}
|
||||
|
||||
Array& array;
|
||||
private:
|
||||
array_iterator<Array, Pos> operator=(const array_iterator<Array, Pos>&);
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
@ -0,0 +1,44 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_ADVANCE_IMPL_27122005_0938)
|
||||
#define BOOST_FUSION_ADVANCE_IMPL_27122005_0938
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
|
||||
struct array_iterator_tag;
|
||||
|
||||
template<typename Array, std::size_t Pos>
|
||||
struct array_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename Tag>
|
||||
struct advance_impl;
|
||||
|
||||
template<>
|
||||
struct advance_impl<array_iterator_tag>
|
||||
{
|
||||
template<typename Iterator, typename N>
|
||||
struct apply
|
||||
{
|
||||
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);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -0,0 +1,46 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,41 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,36 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,49 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_DEREF_IMPL_27122005_0951)
|
||||
#define BOOST_FUSION_DEREF_IMPL_27122005_0951
|
||||
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
|
||||
struct array_iterator_tag;
|
||||
|
||||
template<typename Array, std::size_t Pos>
|
||||
struct array_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename Tag>
|
||||
struct deref_impl;
|
||||
|
||||
template<>
|
||||
struct deref_impl<array_iterator_tag>
|
||||
{
|
||||
template<typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
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];
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -0,0 +1,44 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_DISTANCE_IMPL_27122005_1016)
|
||||
#define BOOST_FUSION_DISTANCE_IMPL_27122005_1016
|
||||
|
||||
#include <boost/mpl/minus.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct array_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct distance_impl;
|
||||
|
||||
template <>
|
||||
struct distance_impl<array_iterator_tag>
|
||||
{
|
||||
template <typename First, typename Last>
|
||||
struct apply : mpl::minus<typename Last::index, typename First::index>
|
||||
{
|
||||
static typename mpl::minus<
|
||||
typename Last::index, typename First::index>::type
|
||||
|
||||
call(First const&, Last const&)
|
||||
{
|
||||
static typename mpl::minus<
|
||||
typename Last::index, typename First::index>::type
|
||||
result;
|
||||
return result;
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -0,0 +1,41 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,40 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_EQUAL_TO_IMPL_27122005_1020)
|
||||
#define BOOST_FUSION_EQUAL_TO_IMPL_27122005_1020
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/mpl/equal_to.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct array_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct equal_to_impl;
|
||||
|
||||
template <>
|
||||
struct equal_to_impl<array_iterator_tag>
|
||||
{
|
||||
template <typename I1, typename I2>
|
||||
struct apply
|
||||
: is_same<
|
||||
typename I1::identity
|
||||
, typename I2::identity
|
||||
>
|
||||
{};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,32 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,33 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,47 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_NEXT_IMPL_27122005_0927)
|
||||
#define FUSION_NEXT_IMPL_27122005_0927
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
|
||||
struct array_iterator_tag;
|
||||
|
||||
template<typename Array, std::size_t Pos>
|
||||
struct array_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename Tag>
|
||||
struct next_impl;
|
||||
|
||||
template<>
|
||||
struct next_impl<array_iterator_tag>
|
||||
{
|
||||
template<typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::array_type array_type;
|
||||
typedef typename Iterator::index index;
|
||||
static int const index_val = index::value;
|
||||
typedef array_iterator<array_type, index_val + 1> type;
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return type(i.array);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -0,0 +1,45 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_PRIOR_IMPL_27122005_0935)
|
||||
#define FUSION_PRIOR_IMPL_27122005_0935
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
|
||||
struct array_iterator_tag;
|
||||
|
||||
template<typename Array, std::size_t Pos>
|
||||
struct array_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename Tag>
|
||||
struct prior_impl;
|
||||
|
||||
template<>
|
||||
struct prior_impl<array_iterator_tag>
|
||||
{
|
||||
template<typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::array_type array_type;
|
||||
typedef typename Iterator::index index;
|
||||
static int const index_val = index::value;
|
||||
typedef array_iterator<array_type, index_val - 1> type;
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return type(i.array);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -0,0 +1,30 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,33 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,34 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_VALUE_OF_IMPL_27122005_1011)
|
||||
#define BOOST_FUSION_VALUE_OF_IMPL_27122005_1011
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct array_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct value_of_impl;
|
||||
|
||||
template <>
|
||||
struct value_of_impl<array_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::array_type array_type;
|
||||
typedef typename array_type::value_type type;
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
36
include/boost/fusion/sequence/adapted/array/tag_of.hpp
Normal file
36
include/boost/fusion/sequence/adapted/array/tag_of.hpp
Normal file
@ -0,0 +1,36 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
23
include/boost/fusion/sequence/adapted/mpl.hpp
Normal file
23
include/boost/fusion/sequence/adapted/mpl.hpp
Normal file
@ -0,0 +1,23 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_MPL_31122005_1152)
|
||||
#define BOOST_FUSION_MPL_31122005_1152
|
||||
|
||||
#include <boost/fusion/sequence/adapted/mpl/tag_of.hpp>
|
||||
#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
|
@ -0,0 +1,46 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_ADVANCE_IMPL_09232005_2324)
|
||||
#define FUSION_ADVANCE_IMPL_09232005_2324
|
||||
|
||||
#include <boost/mpl/advance.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct mpl_iterator_tag;
|
||||
|
||||
template <typename Iterator>
|
||||
struct mpl_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct advance_impl;
|
||||
|
||||
template <>
|
||||
struct advance_impl<mpl_iterator_tag>
|
||||
{
|
||||
template <typename Iterator, typename N>
|
||||
struct apply
|
||||
{
|
||||
typedef mpl_iterator<
|
||||
typename mpl::advance<typename Iterator::iterator_type, N>::type>
|
||||
type;
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
static type result;
|
||||
return result;
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
41
include/boost/fusion/sequence/adapted/mpl/detail/at_impl.hpp
Normal file
41
include/boost/fusion/sequence/adapted/mpl/detail/at_impl.hpp
Normal file
@ -0,0 +1,41 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,46 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,58 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_CATEGORY_OF_IMPL_20060217_2141)
|
||||
#define BOOST_FUSION_CATEGORY_OF_IMPL_20060217_2141
|
||||
|
||||
#include <boost/fusion/support/detail/iterator_to_sequence_category.hpp>
|
||||
#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
|
||||
iterator_to_sequence_category<
|
||||
typename mpl_iterator_category<
|
||||
typename mpl::begin<T>::type::category
|
||||
>::type
|
||||
>::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
|
@ -0,0 +1,44 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_DEREF_IMPL_05052005_0733)
|
||||
#define FUSION_DEREF_IMPL_05052005_0733
|
||||
|
||||
#include <boost/mpl/deref.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct mpl_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct deref_impl;
|
||||
|
||||
template <>
|
||||
struct deref_impl<mpl_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename mpl::deref<
|
||||
typename Iterator::iterator_type>::type
|
||||
type;
|
||||
|
||||
static type
|
||||
call(Iterator)
|
||||
{
|
||||
return type();
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -0,0 +1,48 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_DISTANCE_IMPL_09232005_2303)
|
||||
#define FUSION_DISTANCE_IMPL_09232005_2303
|
||||
|
||||
#include <boost/mpl/minus.hpp>
|
||||
#include <boost/mpl/distance.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct mpl_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct distance_impl;
|
||||
|
||||
template <>
|
||||
struct distance_impl<mpl_iterator_tag>
|
||||
{
|
||||
template <typename First, typename Last>
|
||||
struct apply
|
||||
: mpl::distance<
|
||||
typename First::iterator_type
|
||||
, typename Last::iterator_type>
|
||||
{
|
||||
static typename mpl::distance<
|
||||
typename First::iterator_type
|
||||
, typename Last::iterator_type>::type
|
||||
call(First const&, Last const&)
|
||||
{
|
||||
static typename mpl::distance<
|
||||
typename First::iterator_type
|
||||
, typename Last::iterator_type>::type
|
||||
result;
|
||||
return result;
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -0,0 +1,29 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,46 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,41 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_EQUAL_TO_IMPL_05232005_0621)
|
||||
#define FUSION_EQUAL_TO_IMPL_05232005_0621
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#include <boost/mpl/equal_to.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct mpl_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct equal_to_impl;
|
||||
|
||||
template <>
|
||||
struct equal_to_impl<mpl_iterator_tag>
|
||||
{
|
||||
template <typename I1, typename I2>
|
||||
struct apply
|
||||
: is_same<
|
||||
typename remove_const<typename I1::iterator_type>::type
|
||||
, typename remove_const<typename I2::iterator_type>::type
|
||||
>
|
||||
{
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,32 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,32 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,33 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,47 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_NEXT_IMPL_05052005_0733)
|
||||
#define FUSION_NEXT_IMPL_05052005_0733
|
||||
|
||||
#include <boost/mpl/next.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct mpl_iterator_tag;
|
||||
|
||||
template <typename Iterator>
|
||||
struct mpl_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct next_impl;
|
||||
|
||||
template <>
|
||||
struct next_impl<mpl_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef mpl_iterator<
|
||||
typename mpl::next<typename Iterator::iterator_type>::type
|
||||
> type;
|
||||
|
||||
static type
|
||||
call(Iterator)
|
||||
{
|
||||
return type();
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -0,0 +1,48 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_PRIOR_IMPL_05202005_0930)
|
||||
#define FUSION_PRIOR_IMPL_05202005_0930
|
||||
|
||||
#include <boost/mpl/next.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct mpl_iterator_tag;
|
||||
|
||||
template <typename Iterator>
|
||||
struct mpl_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct prior_impl;
|
||||
|
||||
template <>
|
||||
struct prior_impl<mpl_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef mpl_iterator<
|
||||
typename mpl::prior<typename Iterator::iterator_type>::type
|
||||
> type;
|
||||
|
||||
static type
|
||||
call(Iterator)
|
||||
{
|
||||
static type result;
|
||||
return result;
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -0,0 +1,32 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,32 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,38 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_VALUE_OF_TRAITS_05052005_0734)
|
||||
#define FUSION_VALUE_OF_TRAITS_05052005_0734
|
||||
|
||||
#include <boost/mpl/deref.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct mpl_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct value_of_impl;
|
||||
|
||||
template <>
|
||||
struct value_of_impl<mpl_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename mpl::deref<
|
||||
typename Iterator::iterator_type>::type
|
||||
type;
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
40
include/boost/fusion/sequence/adapted/mpl/mpl_iterator.hpp
Normal file
40
include/boost/fusion/sequence/adapted/mpl/mpl_iterator.hpp
Normal file
@ -0,0 +1,40 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_MPL_ITERATOR_05052005_0731)
|
||||
#define FUSION_MPL_ITERATOR_05052005_0731
|
||||
|
||||
#include <boost/fusion/support/iterator_base.hpp>
|
||||
#include <boost/fusion/support/detail/mpl_iterator_category.hpp>
|
||||
#include <boost/fusion/sequence/adapted/mpl/detail/deref_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/mpl/detail/next_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/mpl/detail/prior_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/mpl/detail/value_of_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/mpl/detail/equal_to_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/mpl/detail/distance_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/mpl/detail/advance_impl.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct mpl_iterator_tag;
|
||||
|
||||
template <typename Iterator>
|
||||
struct mpl_iterator
|
||||
: iterator_base<mpl_iterator<Iterator> >
|
||||
{
|
||||
typedef mpl_iterator_tag ftag;
|
||||
typedef typename detail::mpl_iterator_category<
|
||||
typename Iterator::category>::type
|
||||
category;
|
||||
typedef typename remove_const<Iterator>::type iterator_type;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
30
include/boost/fusion/sequence/adapted/mpl/tag_of.hpp
Normal file
30
include/boost/fusion/sequence/adapted/mpl/tag_of.hpp
Normal file
@ -0,0 +1,30 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_TAG_OF_31122005_1153)
|
||||
#define BOOST_FUSION_TAG_OF_31122005_1153
|
||||
|
||||
#include <boost/fusion/support/tag_of_fwd.hpp>
|
||||
#include <boost/fusion/support/detail/is_mpl_sequence.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct mpl_sequence_tag;
|
||||
|
||||
namespace traits
|
||||
{
|
||||
template<typename Sequence>
|
||||
struct tag_of<Sequence, typename boost::enable_if<detail::is_mpl_sequence<Sequence> >::type>
|
||||
{
|
||||
typedef mpl_sequence_tag type;
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
22
include/boost/fusion/sequence/adapted/std_pair.hpp
Normal file
22
include/boost/fusion/sequence/adapted/std_pair.hpp
Normal file
@ -0,0 +1,22 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_STD_PAIR_24122005_1744)
|
||||
#define BOOST_FUSION_STD_PAIR_24122005_1744
|
||||
|
||||
#include <boost/fusion/sequence/adapted/std_pair/tag_of.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/is_view_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/is_sequence_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/category_of_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/end_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/size_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/at_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/value_at_impl.hpp>
|
||||
|
||||
#endif
|
@ -0,0 +1,49 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_STD_PAIR_ITERATOR_09262005_0934)
|
||||
#define FUSION_STD_PAIR_ITERATOR_09262005_0934
|
||||
|
||||
#include <boost/fusion/support/iterator_base.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/advance_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/deref_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/distance_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/equal_to_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/next_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/prior_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/value_of_impl.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct std_pair_iterator_tag;
|
||||
struct random_access_traversal_tag;
|
||||
|
||||
template <typename Pair, int N>
|
||||
struct std_pair_iterator_identity;
|
||||
|
||||
template <typename Pair, int N>
|
||||
struct std_pair_iterator
|
||||
: iterator_base<std_pair_iterator<Pair, N> >
|
||||
{
|
||||
typedef mpl::int_<N> index;
|
||||
typedef std_pair_iterator_tag ftag;
|
||||
typedef random_access_traversal_tag category;
|
||||
typedef std_pair_iterator_identity<
|
||||
typename add_const<Pair>::type, N> identity;
|
||||
typedef Pair pair_type;
|
||||
|
||||
std_pair_iterator(Pair& pair)
|
||||
: pair(pair) {}
|
||||
Pair& pair;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -0,0 +1,30 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,71 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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>
|
||||
|
||||
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
|
@ -0,0 +1,41 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,36 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,41 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,32 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,33 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,32 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,44 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,47 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_ADVANCE_IMPL_09302005_1847)
|
||||
#define FUSION_ADVANCE_IMPL_09302005_1847
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct std_pair_iterator_tag;
|
||||
|
||||
template <typename Vector, int N>
|
||||
struct std_pair_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct advance_impl;
|
||||
|
||||
template <>
|
||||
struct advance_impl<std_pair_iterator_tag>
|
||||
{
|
||||
template <typename Iterator, typename N>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::index index;
|
||||
typedef typename Iterator::pair_type pair_type;
|
||||
typedef std_pair_iterator<pair_type, index::value+N::value> type;
|
||||
BOOST_STATIC_ASSERT(
|
||||
(index::value+N::value) >= 0 &&(index::value+N::value) < 2);
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return type(i.vec);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -0,0 +1,71 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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>
|
||||
|
||||
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
|
@ -0,0 +1,41 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,36 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,74 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_DEREF_IMPL_09302005_1846)
|
||||
#define FUSION_DEREF_IMPL_09302005_1846
|
||||
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct std_pair_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct deref_impl;
|
||||
|
||||
template <>
|
||||
struct deref_impl<std_pair_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::pair_type pair_type;
|
||||
typedef typename Iterator::index index;
|
||||
static int const index_val = index::value;
|
||||
|
||||
BOOST_STATIC_ASSERT(index_val >= 0 && index_val <= 2);
|
||||
typedef typename
|
||||
mpl::if_c<
|
||||
(index::value == 0)
|
||||
, typename pair_type::first_type
|
||||
, typename pair_type::second_type
|
||||
>
|
||||
element;
|
||||
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
is_const<pair_type>
|
||||
, fusion::detail::cref_result<element>
|
||||
, fusion::detail::ref_result<element>
|
||||
>::type
|
||||
type;
|
||||
|
||||
template <typename RT>
|
||||
static RT get(pair_type& p, mpl::int_<0>)
|
||||
{
|
||||
return p.first;
|
||||
}
|
||||
|
||||
template <typename RT>
|
||||
static RT get(pair_type& p, mpl::int_<1>)
|
||||
{
|
||||
return p.second;
|
||||
}
|
||||
|
||||
static type
|
||||
call(Iterator const& iter)
|
||||
{
|
||||
return get<type>(iter.pair, index());
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -0,0 +1,42 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_DISTANCE_IMPL_09302005_1846)
|
||||
#define FUSION_DISTANCE_IMPL_09302005_1846
|
||||
|
||||
#include <boost/mpl/minus.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct std_pair_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct distance_impl;
|
||||
|
||||
template <>
|
||||
struct distance_impl<std_pair_iterator_tag>
|
||||
{
|
||||
template <typename First, typename Last>
|
||||
struct apply : mpl::minus<typename Last::index, typename First::index>
|
||||
{
|
||||
static typename mpl::minus<
|
||||
typename Last::index, typename First::index>::type
|
||||
call(First const&, Last const&)
|
||||
{
|
||||
static typename mpl::minus<
|
||||
typename Last::index, typename First::index>::type
|
||||
result;
|
||||
return result;
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -0,0 +1,41 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,40 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_EQUAL_TO_IMPL_09302005_1847)
|
||||
#define FUSION_EQUAL_TO_IMPL_09302005_1847
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/mpl/equal_to.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct std_pair_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct equal_to_impl;
|
||||
|
||||
template <>
|
||||
struct equal_to_impl<std_pair_iterator_tag>
|
||||
{
|
||||
template <typename I1, typename I2>
|
||||
struct apply
|
||||
: is_same<
|
||||
typename I1::identity
|
||||
, typename I2::identity
|
||||
>
|
||||
{
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,32 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,33 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,46 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_NEXT_IMPL_09302005_1847)
|
||||
#define FUSION_NEXT_IMPL_09302005_1847
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct std_pair_iterator_tag;
|
||||
template <typename Vector, int N>
|
||||
struct std_pair_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct next_impl;
|
||||
|
||||
template <>
|
||||
struct next_impl<std_pair_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::pair_type pair_type;
|
||||
typedef typename Iterator::index index;
|
||||
static int const index_val = index::value;
|
||||
typedef std_pair_iterator<pair_type, index_val+1> type;
|
||||
BOOST_STATIC_ASSERT((index_val+1) >= 0 &&(index_val+1) <= 2);
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return type(i.pair);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -0,0 +1,46 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_PRIOR_IMPL_09302005_1847)
|
||||
#define FUSION_PRIOR_IMPL_09302005_1847
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct std_pair_iterator_tag;
|
||||
template <typename Vector, int N>
|
||||
struct std_pair_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct prior_impl;
|
||||
|
||||
template <>
|
||||
struct prior_impl<std_pair_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::pair_type pair_type;
|
||||
typedef typename Iterator::index index;
|
||||
static int const index_val = index::value;
|
||||
typedef std_pair_iterator<pair_type, index_val-1> type;
|
||||
BOOST_STATIC_ASSERT((index_val-1) >= 0 &&(index_val-1) <= 2);
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return type(i.pair);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -0,0 +1,32 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,44 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,46 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_VALUE_OF_IMPL_09302005_1847)
|
||||
#define FUSION_VALUE_OF_IMPL_09302005_1847
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct std_pair_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct value_of_impl;
|
||||
|
||||
template <>
|
||||
struct value_of_impl<std_pair_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::pair_type pair_type;
|
||||
typedef typename Iterator::index index;
|
||||
static int const index_value = index::value;
|
||||
|
||||
BOOST_STATIC_ASSERT(index_value >= 0 && index_value <= 2);
|
||||
typedef typename
|
||||
mpl::if_c<
|
||||
(index_value == 0)
|
||||
, typename pair_type::first_type
|
||||
, typename pair_type::second_type
|
||||
>::type
|
||||
type;
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -0,0 +1,49 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_STD_PAIR_ITERATOR_09262005_0934)
|
||||
#define FUSION_STD_PAIR_ITERATOR_09262005_0934
|
||||
|
||||
#include <boost/fusion/support/iterator_base.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/advance_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/deref_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/distance_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/equal_to_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/next_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/prior_impl.hpp>
|
||||
#include <boost/fusion/sequence/adapted/std_pair/detail/value_of_impl.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct std_pair_iterator_tag;
|
||||
struct random_access_traversal_tag;
|
||||
|
||||
template <typename Pair, int N>
|
||||
struct std_pair_iterator_identity;
|
||||
|
||||
template <typename Pair, int N>
|
||||
struct std_pair_iterator
|
||||
: iterator_base<std_pair_iterator<Pair, N> >
|
||||
{
|
||||
typedef mpl::int_<N> index;
|
||||
typedef std_pair_iterator_tag ftag;
|
||||
typedef random_access_traversal_tag category;
|
||||
typedef std_pair_iterator_identity<
|
||||
typename add_const<Pair>::type, N> identity;
|
||||
typedef Pair pair_type;
|
||||
|
||||
std_pair_iterator(Pair& pair)
|
||||
: pair(pair) {}
|
||||
Pair& pair;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
30
include/boost/fusion/sequence/adapted/std_pair/tag_of.hpp
Normal file
30
include/boost/fusion/sequence/adapted/std_pair/tag_of.hpp
Normal file
@ -0,0 +1,30 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
18
include/boost/fusion/sequence/comparison.hpp
Normal file
18
include/boost/fusion/sequence/comparison.hpp
Normal file
@ -0,0 +1,18 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,35 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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 Seq1, typename Seq2>
|
||||
struct enable_equality
|
||||
: mpl::or_<fusion::traits::is_sequence<Seq1>, fusion::traits::is_sequence<Seq2> >
|
||||
{};
|
||||
|
||||
template <typename Seq1, typename Seq2>
|
||||
struct enable_comparison
|
||||
: mpl::and_<
|
||||
mpl::or_<fusion::traits::is_sequence<Seq1>, fusion::traits::is_sequence<Seq2> >,
|
||||
mpl::equal_to<result_of::size<Seq1>, result_of::size<Seq2> > >
|
||||
{};
|
||||
|
||||
}}}
|
||||
|
||||
#endif
|
61
include/boost/fusion/sequence/comparison/detail/equal_to.hpp
Normal file
61
include/boost/fusion/sequence/comparison/detail/equal_to.hpp
Normal file
@ -0,0 +1,61 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
51
include/boost/fusion/sequence/comparison/detail/greater.hpp
Normal file
51
include/boost/fusion/sequence/comparison/detail/greater.hpp
Normal file
@ -0,0 +1,51 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,50 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
51
include/boost/fusion/sequence/comparison/detail/less.hpp
Normal file
51
include/boost/fusion/sequence/comparison/detail/less.hpp
Normal file
@ -0,0 +1,51 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,50 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
@ -0,0 +1,61 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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
|
41
include/boost/fusion/sequence/comparison/equal_to.hpp
Normal file
41
include/boost/fusion/sequence/comparison/equal_to.hpp
Normal file
@ -0,0 +1,41 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace sequence_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 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));
|
||||
}
|
||||
}
|
||||
using sequence_operators::operator==;
|
||||
}}
|
||||
|
||||
#endif
|
44
include/boost/fusion/sequence/comparison/greater.hpp
Normal file
44
include/boost/fusion/sequence/comparison/greater.hpp
Normal file
@ -0,0 +1,44 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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>
|
||||
|
||||
#if defined(FUSION_DIRECT_OPERATOR_USAGE)
|
||||
#include <boost/fusion/sequence/comparison/detail/greater.hpp>
|
||||
#else
|
||||
#include <boost/fusion/sequence/comparison/less.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/fusion/sequence/comparison/detail/enable_comparison.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
template <typename Seq1, typename Seq2>
|
||||
inline typename
|
||||
enable_if<
|
||||
detail::enable_comparison<Seq1, Seq2>
|
||||
, bool
|
||||
>::type
|
||||
operator>(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
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
44
include/boost/fusion/sequence/comparison/greater_equal.hpp
Normal file
44
include/boost/fusion/sequence/comparison/greater_equal.hpp
Normal file
@ -0,0 +1,44 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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>
|
||||
|
||||
#if defined(FUSION_DIRECT_OPERATOR_USAGE)
|
||||
#include <boost/fusion/sequence/comparison/detail/greater_equal.hpp>
|
||||
#else
|
||||
#include <boost/fusion/sequence/comparison/less.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/fusion/sequence/comparison/detail/enable_comparison.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
template <typename Seq1, typename Seq2>
|
||||
inline typename
|
||||
enable_if<
|
||||
detail::enable_comparison<Seq1, Seq2>
|
||||
, bool
|
||||
>::type
|
||||
operator>=(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
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
34
include/boost/fusion/sequence/comparison/less.hpp
Normal file
34
include/boost/fusion/sequence/comparison/less.hpp
Normal file
@ -0,0 +1,34 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
template <typename Seq1, typename Seq2>
|
||||
inline typename
|
||||
enable_if<
|
||||
detail::enable_comparison<Seq1, Seq2>
|
||||
, bool
|
||||
>::type
|
||||
operator<(Seq1 const& a, Seq2 const& b)
|
||||
{
|
||||
return detail::sequence_less<Seq1 const, Seq2 const>::
|
||||
call(fusion::begin(a), fusion::begin(b));
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
44
include/boost/fusion/sequence/comparison/less_equal.hpp
Normal file
44
include/boost/fusion/sequence/comparison/less_equal.hpp
Normal file
@ -0,0 +1,44 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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>
|
||||
|
||||
#if defined(FUSION_DIRECT_OPERATOR_USAGE)
|
||||
#include <boost/fusion/sequence/comparison/detail/less_equal.hpp>
|
||||
#else
|
||||
#include <boost/fusion/sequence/comparison/less.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/fusion/sequence/comparison/detail/enable_comparison.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
template <typename Seq1, typename Seq2>
|
||||
inline typename
|
||||
enable_if<
|
||||
detail::enable_comparison<Seq1, Seq2>
|
||||
, bool
|
||||
>::type
|
||||
operator<=(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
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
52
include/boost/fusion/sequence/comparison/not_equal_to.hpp
Normal file
52
include/boost/fusion/sequence/comparison/not_equal_to.hpp
Normal file
@ -0,0 +1,52 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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>
|
||||
|
||||
#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
|
||||
|
||||
#include <boost/fusion/sequence/comparison/detail/enable_comparison.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace sequence_operators
|
||||
{
|
||||
template <typename Seq1, typename Seq2>
|
||||
inline typename
|
||||
enable_if<
|
||||
detail::enable_equality<Seq1, Seq2>
|
||||
, bool
|
||||
>::type
|
||||
operator!=(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
|
||||
}
|
||||
}
|
||||
|
||||
using sequence_operators::operator!=;
|
||||
}}
|
||||
|
||||
#endif
|
16
include/boost/fusion/sequence/container.hpp
Normal file
16
include/boost/fusion/sequence/container.hpp
Normal file
@ -0,0 +1,16 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#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>
|
||||
|
||||
#endif
|
17
include/boost/fusion/sequence/container/list.hpp
Normal file
17
include/boost/fusion/sequence/container/list.hpp
Normal file
@ -0,0 +1,17 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_SEQUENCE_CLASS_LIST_10022005_0605)
|
||||
#define FUSION_SEQUENCE_CLASS_LIST_10022005_0605
|
||||
|
||||
#include <boost/fusion/sequence/container/list/cons.hpp>
|
||||
#include <boost/fusion/sequence/container/list/cons_iterator.hpp>
|
||||
#include <boost/fusion/sequence/container/list/limits.hpp>
|
||||
#include <boost/fusion/sequence/container/list/list.hpp>
|
||||
#include <boost/fusion/sequence/container/list/list_fwd.hpp>
|
||||
|
||||
#endif
|
136
include/boost/fusion/sequence/container/list/cons.hpp
Normal file
136
include/boost/fusion/sequence/container/list/cons.hpp
Normal file
@ -0,0 +1,136 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2005 Joel de Guzman
|
||||
Copyright (c) 2005 Eric Niebler
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_CONS_07172005_0843)
|
||||
#define FUSION_CONS_07172005_0843
|
||||
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/sequence/container/list/cons_iterator.hpp>
|
||||
#include <boost/fusion/sequence/container/list/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/sequence/container/list/detail/end_impl.hpp>
|
||||
#include <boost/fusion/sequence/container/list/detail/at_impl.hpp>
|
||||
#include <boost/fusion/sequence/container/list/detail/value_at_impl.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/fusion/support/sequence_base.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct void_;
|
||||
struct cons_tag;
|
||||
struct forward_sequence_tag;
|
||||
struct fusion_sequence_tag;
|
||||
|
||||
struct nil : sequence_base<nil>
|
||||
{
|
||||
typedef mpl::int_<0> size;
|
||||
typedef cons_tag ftag;
|
||||
typedef fusion_sequence_tag tag; // this gets picked up by MPL
|
||||
typedef mpl::false_ is_view;
|
||||
typedef forward_sequence_tag category;
|
||||
typedef void_ car_type;
|
||||
typedef void_ cdr_type;
|
||||
|
||||
nil() {}
|
||||
|
||||
template <typename Iterator>
|
||||
nil(Iterator const& iter, mpl::true_ /*this_is_an_iterator*/)
|
||||
{}
|
||||
|
||||
template <typename Iterator>
|
||||
void assign_from_iter(Iterator const& iter)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Car, typename Cdr = nil>
|
||||
struct cons : sequence_base<cons<Car, Cdr> >
|
||||
{
|
||||
typedef mpl::int_<Cdr::size::value+1> size;
|
||||
typedef cons_tag ftag;
|
||||
typedef fusion_sequence_tag tag; // this gets picked up by MPL
|
||||
typedef mpl::false_ is_view;
|
||||
typedef forward_sequence_tag category;
|
||||
typedef Car car_type;
|
||||
typedef Cdr cdr_type;
|
||||
|
||||
cons()
|
||||
: car(), cdr() {}
|
||||
|
||||
explicit cons(typename detail::call_param<Car>::type car)
|
||||
: car(car), cdr() {}
|
||||
|
||||
cons(
|
||||
typename detail::call_param<Car>::type car
|
||||
, typename detail::call_param<Cdr>::type cdr)
|
||||
: car(car), cdr(cdr) {}
|
||||
|
||||
template <typename Car2, typename Cdr2>
|
||||
cons(cons<Car2, Cdr2> const& rhs)
|
||||
: car(rhs.car), cdr(rhs.cdr) {}
|
||||
|
||||
cons(cons const& rhs)
|
||||
: car(rhs.car), cdr(rhs.cdr) {}
|
||||
|
||||
template <typename Sequence>
|
||||
explicit cons(
|
||||
Sequence const& seq
|
||||
, typename disable_if<is_convertible<Sequence, Car> >::type* dummy = 0)
|
||||
: car(*fusion::begin(seq))
|
||||
, cdr(fusion::next(fusion::begin(seq)), mpl::true_()) {}
|
||||
|
||||
template <typename Iterator>
|
||||
cons(Iterator const& iter, mpl::true_ /*this_is_an_iterator*/)
|
||||
: car(*iter)
|
||||
, cdr(fusion::next(iter), mpl::true_()) {}
|
||||
|
||||
template <typename Car2, typename Cdr2>
|
||||
cons& operator=(cons<Car2, Cdr2> const& rhs)
|
||||
{
|
||||
car = rhs.car;
|
||||
cdr = rhs.cdr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
cons& operator=(cons const& rhs)
|
||||
{
|
||||
car = rhs.car;
|
||||
cdr = rhs.cdr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, Car>, cons&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type Iterator;
|
||||
Iterator iter = fusion::begin(seq);
|
||||
this->assign_from_iter(iter);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename Iterator>
|
||||
void assign_from_iter(Iterator const& iter)
|
||||
{
|
||||
car = *iter;
|
||||
cdr.assign_from_iter(fusion::next(iter));
|
||||
}
|
||||
|
||||
car_type car;
|
||||
cdr_type cdr;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,86 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2005 Joel de Guzman
|
||||
Copyright (c) 2005 Eric Niebler
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_CONS_ITERATOR_07172005_0849)
|
||||
#define FUSION_CONS_ITERATOR_07172005_0849
|
||||
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#include <boost/fusion/support/iterator_base.hpp>
|
||||
#include <boost/fusion/sequence/container/list/detail/deref_impl.hpp>
|
||||
#include <boost/fusion/sequence/container/list/detail/next_impl.hpp>
|
||||
#include <boost/fusion/sequence/container/list/detail/value_of_impl.hpp>
|
||||
#include <boost/fusion/sequence/container/list/detail/equal_to_impl.hpp>
|
||||
#include <boost/fusion/sequence/container/list/list_fwd.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nil;
|
||||
struct cons_iterator_tag;
|
||||
struct forward_traversal_tag;
|
||||
|
||||
template <typename Cons>
|
||||
struct cons_iterator_identity;
|
||||
|
||||
template <typename Cons = nil>
|
||||
struct cons_iterator : iterator_base<cons_iterator<Cons> >
|
||||
{
|
||||
typedef cons_iterator_tag ftag;
|
||||
typedef forward_traversal_tag category;
|
||||
typedef Cons cons_type;
|
||||
typedef cons_iterator_identity<
|
||||
typename add_const<Cons>::type>
|
||||
identity;
|
||||
|
||||
explicit cons_iterator(cons_type& cons)
|
||||
: cons(cons) {}
|
||||
|
||||
cons_type& cons;
|
||||
};
|
||||
|
||||
struct nil_iterator : iterator_base<nil_iterator>
|
||||
{
|
||||
typedef forward_traversal_tag category;
|
||||
typedef cons_iterator_tag ftag;
|
||||
typedef nil cons_type;
|
||||
typedef cons_iterator_identity<
|
||||
add_const<nil>::type>
|
||||
identity;
|
||||
nil_iterator() {}
|
||||
explicit nil_iterator(nil const&) {}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct cons_iterator<nil> : nil_iterator
|
||||
{
|
||||
cons_iterator() {}
|
||||
explicit cons_iterator(nil const&) {}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct cons_iterator<nil const> : nil_iterator
|
||||
{
|
||||
cons_iterator() {}
|
||||
explicit cons_iterator(nil const&) {}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct cons_iterator<list<> > : nil_iterator
|
||||
{
|
||||
cons_iterator() {}
|
||||
explicit cons_iterator(nil const&) {}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct cons_iterator<list<> const> : nil_iterator
|
||||
{
|
||||
cons_iterator() {}
|
||||
explicit cons_iterator(nil const&) {}
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
@ -0,0 +1,80 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_AT_IMPL_07172005_0726)
|
||||
#define FUSION_AT_IMPL_07172005_0726
|
||||
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct cons_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct at_impl;
|
||||
|
||||
template <>
|
||||
struct at_impl<cons_tag>
|
||||
{
|
||||
template <typename Sequence, typename N>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
is_const<Sequence>
|
||||
, add_const<typename Sequence::cdr_type>
|
||||
, mpl::identity<typename Sequence::cdr_type>
|
||||
>::type
|
||||
cdr_type;
|
||||
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
mpl::bool_<N::value == 0>
|
||||
, mpl::identity<typename Sequence::car_type>
|
||||
, apply<cdr_type, mpl::int_<N::value-1> >
|
||||
>
|
||||
element;
|
||||
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
is_const<Sequence>
|
||||
, detail::cref_result<element>
|
||||
, detail::ref_result<element>
|
||||
>::type
|
||||
type;
|
||||
|
||||
template <typename Cons, int N2>
|
||||
static type
|
||||
call(Cons& s, mpl::int_<N2>)
|
||||
{
|
||||
return call(s.cdr, mpl::int_<N2-1>());
|
||||
}
|
||||
|
||||
template <typename Cons>
|
||||
static type
|
||||
call(Cons& s, mpl::int_<0>)
|
||||
{
|
||||
return s.car;
|
||||
}
|
||||
|
||||
static type
|
||||
call(Sequence& s)
|
||||
{
|
||||
return call(s, mpl::int_<N::value>());
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -0,0 +1,50 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2005 Joel de Guzman
|
||||
Copyright (c) 2005 Eric Niebler
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_BEGIN_IMPL_07172005_0824)
|
||||
#define FUSION_BEGIN_IMPL_07172005_0824
|
||||
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nil;
|
||||
|
||||
struct cons_tag;
|
||||
|
||||
template <typename Car, typename Cdr>
|
||||
struct cons;
|
||||
|
||||
template <typename Cons>
|
||||
struct cons_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct begin_impl;
|
||||
|
||||
template <>
|
||||
struct begin_impl<cons_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef cons_iterator<Sequence> type;
|
||||
|
||||
static type
|
||||
call(Sequence& t)
|
||||
{
|
||||
return type(t);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -0,0 +1,53 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2005 Joel de Guzman
|
||||
Copyright (c) 2005 Eric Niebler
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_DEREF_IMPL_07172005_0831)
|
||||
#define FUSION_DEREF_IMPL_07172005_0831
|
||||
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct cons_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct deref_impl;
|
||||
|
||||
template <>
|
||||
struct deref_impl<cons_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::cons_type cons_type;
|
||||
typedef typename cons_type::car_type value_type;
|
||||
|
||||
typedef typename mpl::eval_if<
|
||||
is_const<cons_type>
|
||||
, add_reference<typename add_const<value_type>::type>
|
||||
, add_reference<value_type> >::type
|
||||
type;
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return i.cons.car;
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -0,0 +1,52 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2005 Joel de Guzman
|
||||
Copyright (c) 2005 Eric Niebler
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_END_IMPL_07172005_0828)
|
||||
#define FUSION_END_IMPL_07172005_0828
|
||||
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nil;
|
||||
|
||||
struct cons_tag;
|
||||
|
||||
template <typename Car, typename Cdr>
|
||||
struct cons;
|
||||
|
||||
template <typename Cons>
|
||||
struct cons_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct end_impl;
|
||||
|
||||
template <>
|
||||
struct end_impl<cons_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef cons_iterator<
|
||||
typename mpl::if_<is_const<Sequence>, nil const, nil>::type>
|
||||
type;
|
||||
|
||||
static type
|
||||
call(Sequence& t)
|
||||
{
|
||||
return type();
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -0,0 +1,40 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_EQUAL_TO_IMPL_09172005_1120)
|
||||
#define FUSION_EQUAL_TO_IMPL_09172005_1120
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/mpl/equal_to.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct cons_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct equal_to_impl;
|
||||
|
||||
template <>
|
||||
struct equal_to_impl<cons_iterator_tag>
|
||||
{
|
||||
template <typename I1, typename I2>
|
||||
struct apply
|
||||
: is_same<
|
||||
typename I1::identity
|
||||
, typename I2::identity
|
||||
>
|
||||
{
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,48 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#ifndef BOOST_PP_IS_ITERATING
|
||||
#if !defined(FUSION_LIST_FORWARD_CTOR_07172005_0113)
|
||||
#define FUSION_LIST_FORWARD_CTOR_07172005_0113
|
||||
|
||||
#include <boost/preprocessor/iterate.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_shifted.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat.hpp>
|
||||
|
||||
#define FUSION_LIST_CTOR_MAKE_CONS(z, n, type) tie_cons(BOOST_PP_CAT(_, n)
|
||||
#define FUSION_LIST_CL_PAREN(z, n, type) )
|
||||
|
||||
#define BOOST_PP_FILENAME_1 \
|
||||
<boost/fusion/sequence/container/list/detail/list_forward_ctor.hpp>
|
||||
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE)
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#undef FUSION_LIST_CTOR_MAKE_CONS
|
||||
#undef FUSION_LIST_CL_PAREN
|
||||
|
||||
#endif
|
||||
#else // defined(BOOST_PP_IS_ITERATING)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Preprocessor vertical repetition code
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#define N BOOST_PP_ITERATION()
|
||||
|
||||
#if N == 1
|
||||
explicit
|
||||
#endif
|
||||
list(BOOST_PP_ENUM_BINARY_PARAMS(
|
||||
N, typename detail::call_param<T, >::type _))
|
||||
: inherited_type(list_to_cons::call(BOOST_PP_ENUM_PARAMS(N, _)))
|
||||
{}
|
||||
|
||||
#undef N
|
||||
#endif // defined(BOOST_PP_IS_ITERATING)
|
||||
|
@ -0,0 +1,50 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2005 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_LIST_TO_CONS_07172005_1041)
|
||||
#define FUSION_LIST_TO_CONS_07172005_1041
|
||||
|
||||
#include <boost/fusion/sequence/container/list/cons.hpp>
|
||||
#include <boost/fusion/sequence/container/list/limits.hpp>
|
||||
#include <boost/preprocessor/repetition/enum.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
|
||||
#include <boost/preprocessor/arithmetic/dec.hpp>
|
||||
|
||||
#define FUSION_VOID(z, n, _) void_
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nil;
|
||||
struct void_;
|
||||
}}
|
||||
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename T)>
|
||||
struct list_to_cons
|
||||
{
|
||||
typedef T0 head_type;
|
||||
typedef list_to_cons<
|
||||
BOOST_PP_ENUM_SHIFTED_PARAMS(FUSION_MAX_LIST_SIZE, T), void_>
|
||||
tail_list_to_cons;
|
||||
typedef typename tail_list_to_cons::type tail_type;
|
||||
|
||||
typedef cons<head_type, tail_type> type;
|
||||
|
||||
#include <boost/fusion/sequence/container/list/detail/list_to_cons_call.hpp>
|
||||
};
|
||||
|
||||
template <>
|
||||
struct list_to_cons<BOOST_PP_ENUM(FUSION_MAX_LIST_SIZE, FUSION_VOID, _)>
|
||||
{
|
||||
typedef nil type;
|
||||
};
|
||||
}}}
|
||||
|
||||
#undef FUSION_VOID
|
||||
#endif
|
@ -0,0 +1,44 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#ifndef BOOST_PP_IS_ITERATING
|
||||
#if !defined(FUSION_LIST_TO_CONS_CALL_07192005_0138)
|
||||
#define FUSION_LIST_TO_CONS_CALL_07192005_0138
|
||||
|
||||
#include <boost/preprocessor/iterate.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||
|
||||
#define BOOST_PP_FILENAME_1 \
|
||||
<boost/fusion/sequence/container/list/detail/list_to_cons_call.hpp>
|
||||
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE)
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#endif
|
||||
#else // defined(BOOST_PP_IS_ITERATING)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Preprocessor vertical repetition code
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#define N BOOST_PP_ITERATION()
|
||||
|
||||
static type
|
||||
call(BOOST_PP_ENUM_BINARY_PARAMS(
|
||||
N, typename detail::call_param<T, >::type _))
|
||||
{
|
||||
return type(_0
|
||||
#if N > 1
|
||||
, tail_list_to_cons::call(BOOST_PP_ENUM_SHIFTED_PARAMS(N, _)));
|
||||
#else
|
||||
);
|
||||
#endif
|
||||
}
|
||||
|
||||
#undef N
|
||||
#endif // defined(BOOST_PP_IS_ITERATING)
|
||||
|
@ -0,0 +1,60 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2005 Joel de Guzman
|
||||
Copyright (c) 2005 Eric Niebler
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_NEXT_IMPL_07172005_0836)
|
||||
#define FUSION_NEXT_IMPL_07172005_0836
|
||||
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
#include <boost/fusion/iterator/equal_to.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct cons_iterator_tag;
|
||||
|
||||
template <typename Cons>
|
||||
struct cons_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct next_impl;
|
||||
|
||||
template <>
|
||||
struct next_impl<cons_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::cons_type cons_type;
|
||||
typedef typename cons_type::cdr_type cdr_type;
|
||||
|
||||
typedef cons_iterator<
|
||||
typename mpl::eval_if<
|
||||
is_const<cons_type>
|
||||
, add_const<cdr_type>
|
||||
, mpl::identity<cdr_type>
|
||||
>::type>
|
||||
type;
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return type(i.cons.cdr);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -0,0 +1,43 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_VALUE_AT_IMPL_07172005_0952)
|
||||
#define FUSION_VALUE_AT_IMPL_07172005_0952
|
||||
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct cons_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct value_at_impl;
|
||||
|
||||
template <>
|
||||
struct value_at_impl<cons_tag>
|
||||
{
|
||||
template <typename Sequence, typename N>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
mpl::bool_<N::value == 0>
|
||||
, mpl::identity<typename Sequence::car_type>
|
||||
, apply<typename Sequence::cdr_type, mpl::int_<N::value-1> >
|
||||
>::type
|
||||
type;
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -0,0 +1,37 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2005 Joel de Guzman
|
||||
Copyright (c) 2005 Eric Niebler
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_VALUE_OF_IMPL_07172005_0838)
|
||||
#define FUSION_VALUE_OF_IMPL_07172005_0838
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct cons_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct value_of_impl;
|
||||
|
||||
template <>
|
||||
struct value_of_impl<cons_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::cons_type cons_type;
|
||||
typedef typename cons_type::car_type type;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
20
include/boost/fusion/sequence/container/list/limits.hpp
Normal file
20
include/boost/fusion/sequence/container/list/limits.hpp
Normal file
@ -0,0 +1,20 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_LIST_LIMITS_07172005_0112)
|
||||
#define FUSION_LIST_LIMITS_07172005_0112
|
||||
|
||||
#if !defined(FUSION_MAX_LIST_SIZE)
|
||||
# define FUSION_MAX_LIST_SIZE 10
|
||||
#else
|
||||
# if FUSION_MAX_LIST_SIZE < 3
|
||||
# undef FUSION_MAX_LIST_SIZE
|
||||
# define FUSION_MAX_LIST_SIZE 10
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
69
include/boost/fusion/sequence/container/list/list.hpp
Normal file
69
include/boost/fusion/sequence/container/list/list.hpp
Normal file
@ -0,0 +1,69 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2005 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_LIST_07172005_1153)
|
||||
#define FUSION_LIST_07172005_1153
|
||||
|
||||
#include <boost/fusion/sequence/container/list/list_fwd.hpp>
|
||||
#include <boost/fusion/sequence/container/list/detail/list_to_cons.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nil;
|
||||
struct void_;
|
||||
|
||||
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename T)>
|
||||
struct list
|
||||
: detail::list_to_cons<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, T)>::type
|
||||
{
|
||||
private:
|
||||
typedef
|
||||
detail::list_to_cons<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, T)>
|
||||
list_to_cons;
|
||||
|
||||
public:
|
||||
typedef typename list_to_cons::type inherited_type;
|
||||
|
||||
list()
|
||||
: inherited_type() {}
|
||||
|
||||
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename U)>
|
||||
list(list<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, U)> const& rhs)
|
||||
: inherited_type(rhs) {}
|
||||
|
||||
template <typename T>
|
||||
explicit list(T const& rhs)
|
||||
: inherited_type(rhs) {}
|
||||
|
||||
// Expand a couple of forwarding constructors for arguments
|
||||
// of type (T0), (T0, T1), (T0, T1, T2) etc. Exanple:
|
||||
//
|
||||
// list(
|
||||
// typename detail::call_param<T0>::type _0
|
||||
// , typename detail::call_param<T1>::type _1)
|
||||
// : inherited_type(list_to_cons::call(_0, _1)) {}
|
||||
#include <boost/fusion/sequence/container/list/detail/list_forward_ctor.hpp>
|
||||
|
||||
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename U)>
|
||||
list&
|
||||
operator=(list<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, U)> const& rhs)
|
||||
{
|
||||
inherited_type::operator=(rhs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
list&
|
||||
operator=(T const& rhs)
|
||||
{
|
||||
inherited_type::operator=(rhs);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
25
include/boost/fusion/sequence/container/list/list_fwd.hpp
Normal file
25
include/boost/fusion/sequence/container/list/list_fwd.hpp
Normal file
@ -0,0 +1,25 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2005 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_LIST_FORWARD_07172005_0224)
|
||||
#define FUSION_LIST_FORWARD_07172005_0224
|
||||
|
||||
#include <boost/fusion/sequence/container/list/limits.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct void_;
|
||||
|
||||
template <
|
||||
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
|
||||
FUSION_MAX_LIST_SIZE, typename T, void_)
|
||||
>
|
||||
struct list;
|
||||
}}
|
||||
|
||||
#endif
|
15
include/boost/fusion/sequence/container/map.hpp
Normal file
15
include/boost/fusion/sequence/container/map.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Use, modification and distribution is subject to the Boost Software
|
||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_SEQUENCE_CLASS_MAP_10022005_0606)
|
||||
#define FUSION_SEQUENCE_CLASS_MAP_10022005_0606
|
||||
|
||||
#include <boost/fusion/sequence/container/map/limits.hpp>
|
||||
#include <boost/fusion/sequence/container/map/map.hpp>
|
||||
#include <boost/fusion/sequence/container/map/map_fwd.hpp>
|
||||
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user