forked from boostorg/fusion
Removed file/folder
[SVN r40234]
This commit is contained in:
@ -1,47 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_CONVERT_09222005_1104)
|
||||
#define FUSION_CONVERT_09222005_1104
|
||||
|
||||
#include <boost/fusion/container/vector/detail/as_vector.hpp>
|
||||
#include <boost/fusion/container/vector/detail/convert_impl.hpp>
|
||||
#include <boost/fusion/container/vector/vector.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct as_vector
|
||||
{
|
||||
typedef typename detail::as_vector<result_of::size<Sequence>::value> gen;
|
||||
typedef typename gen::
|
||||
template apply<typename result_of::begin<Sequence>::type>::type
|
||||
type;
|
||||
};
|
||||
}
|
||||
|
||||
template <typename Sequence>
|
||||
inline typename result_of::as_vector<Sequence>::type
|
||||
as_vector(Sequence& seq)
|
||||
{
|
||||
typedef typename result_of::as_vector<Sequence>::gen gen;
|
||||
return gen::call(fusion::begin(seq));
|
||||
}
|
||||
|
||||
template <typename Sequence>
|
||||
inline typename result_of::as_vector<Sequence const>::type
|
||||
as_vector(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::as_vector<Sequence const>::gen gen;
|
||||
return gen::call(fusion::begin(seq));
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,42 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_ADVANCE_IMPL_09172005_1156)
|
||||
#define FUSION_ADVANCE_IMPL_09172005_1156
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct vector_iterator_tag;
|
||||
|
||||
template <typename Vector, int N>
|
||||
struct vector_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct advance_impl;
|
||||
|
||||
template <>
|
||||
struct advance_impl<vector_iterator_tag>
|
||||
{
|
||||
template <typename Iterator, typename N>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::index index;
|
||||
typedef typename Iterator::vector vector;
|
||||
typedef vector_iterator<vector, index::value+N::value> type;
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return type(i.vec);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,101 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#ifndef BOOST_PP_IS_ITERATING
|
||||
#if !defined(FUSION_AS_VECTOR_09222005_0950)
|
||||
#define FUSION_AS_VECTOR_09222005_0950
|
||||
|
||||
#include <boost/preprocessor/iterate.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/inc.hpp>
|
||||
#include <boost/preprocessor/dec.hpp>
|
||||
#include <boost/fusion/container/vector/vector.hpp>
|
||||
#include <boost/fusion/iterator/value_of.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
template <int size>
|
||||
struct as_vector;
|
||||
|
||||
template <>
|
||||
struct as_vector<0>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef vector<> type;
|
||||
};
|
||||
|
||||
template <typename Iterator>
|
||||
static typename apply<Iterator>::type
|
||||
call(Iterator)
|
||||
{
|
||||
return vector<>();
|
||||
}
|
||||
};
|
||||
|
||||
#define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \
|
||||
typedef typename fusion::result_of::next<BOOST_PP_CAT(I, n)>::type \
|
||||
BOOST_PP_CAT(I, BOOST_PP_INC(n));
|
||||
|
||||
#define BOOST_FUSION_NEXT_CALL_ITERATOR(z, n, data) \
|
||||
typename gen::BOOST_PP_CAT(I, BOOST_PP_INC(n)) \
|
||||
BOOST_PP_CAT(i, BOOST_PP_INC(n)) = fusion::next(BOOST_PP_CAT(i, n));
|
||||
|
||||
#define BOOST_FUSION_VALUE_OF_ITERATOR(z, n, data) \
|
||||
typedef typename fusion::result_of::value_of<BOOST_PP_CAT(I, n)>::type \
|
||||
BOOST_PP_CAT(T, n);
|
||||
|
||||
#define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/as_vector.hpp>
|
||||
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#undef BOOST_FUSION_NEXT_ITERATOR
|
||||
#undef BOOST_FUSION_NEXT_CALL_ITERATOR
|
||||
#undef BOOST_FUSION_VALUE_OF_ITERATOR
|
||||
|
||||
}}}
|
||||
|
||||
#endif
|
||||
#else // defined(BOOST_PP_IS_ITERATING)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Preprocessor vertical repetition code
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define N BOOST_PP_ITERATION()
|
||||
|
||||
template <>
|
||||
struct as_vector<N>
|
||||
{
|
||||
template <typename I0>
|
||||
struct apply
|
||||
{
|
||||
BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _)
|
||||
BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _)
|
||||
typedef vector<BOOST_PP_ENUM_PARAMS(N, T)> type;
|
||||
};
|
||||
|
||||
template <typename Iterator>
|
||||
static typename apply<Iterator>::type
|
||||
call(Iterator const& i0)
|
||||
{
|
||||
typedef apply<Iterator> gen;
|
||||
typedef typename gen::type result;
|
||||
BOOST_PP_REPEAT(BOOST_PP_DEC(N), BOOST_FUSION_NEXT_CALL_ITERATOR, _)
|
||||
return result(BOOST_PP_ENUM_PARAMS(N, *i));
|
||||
}
|
||||
};
|
||||
|
||||
#undef N
|
||||
#endif // defined(BOOST_PP_IS_ITERATING)
|
||||
|
@ -1,49 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_AT_IMPL_05042005_0741)
|
||||
#define FUSION_AT_IMPL_05042005_0741
|
||||
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/mpl/at.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct vector_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct at_impl;
|
||||
|
||||
template <>
|
||||
struct at_impl<vector_tag>
|
||||
{
|
||||
template <typename Sequence, typename N>
|
||||
struct apply
|
||||
{
|
||||
typedef mpl::at<typename Sequence::types, N> element;
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
is_const<Sequence>
|
||||
, detail::cref_result<element>
|
||||
, detail::ref_result<element>
|
||||
>::type
|
||||
type;
|
||||
|
||||
static type
|
||||
call(Sequence& v)
|
||||
{
|
||||
return v.at_impl(N());
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,39 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_BEGIN_IMPL_05042005_1136)
|
||||
#define FUSION_BEGIN_IMPL_05042005_1136
|
||||
|
||||
#include <boost/fusion/container/vector/vector_iterator.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct vector_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct begin_impl;
|
||||
|
||||
template <>
|
||||
struct begin_impl<vector_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef vector_iterator<Sequence, 0> type;
|
||||
|
||||
static type
|
||||
call(Sequence& v)
|
||||
{
|
||||
return type(v);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,45 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_CONVERT_IMPL_09222005_1104)
|
||||
#define FUSION_CONVERT_IMPL_09222005_1104
|
||||
|
||||
#include <boost/fusion/container/vector/detail/as_vector.hpp>
|
||||
#include <boost/fusion/container/vector/vector.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct vector_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename T>
|
||||
struct convert_impl;
|
||||
|
||||
template <>
|
||||
struct convert_impl<vector_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef typename detail::as_vector<result_of::size<Sequence>::value> gen;
|
||||
typedef typename gen::
|
||||
template apply<typename result_of::begin<Sequence>::type>::type
|
||||
type;
|
||||
|
||||
static type call(Sequence& seq)
|
||||
{
|
||||
return gen::call(fusion::begin(seq));
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,53 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_DEREF_IMPL_05042005_1037)
|
||||
#define FUSION_DEREF_IMPL_05042005_1037
|
||||
|
||||
#include <boost/mpl/at.hpp>
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct vector_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct deref_impl;
|
||||
|
||||
template <>
|
||||
struct deref_impl<vector_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::vector vector;
|
||||
typedef typename Iterator::index index;
|
||||
typedef typename mpl::at<
|
||||
typename vector::types, index>
|
||||
element;
|
||||
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
is_const<vector>
|
||||
, fusion::detail::cref_result<element>
|
||||
, fusion::detail::ref_result<element>
|
||||
>::type
|
||||
type;
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return i.vec.at_impl(index());
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,41 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_DISTANCE_IMPL_09172005_0751)
|
||||
#define FUSION_DISTANCE_IMPL_09172005_0751
|
||||
|
||||
#include <boost/mpl/minus.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct vector_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct distance_impl;
|
||||
|
||||
template <>
|
||||
struct distance_impl<vector_iterator_tag>
|
||||
{
|
||||
template <typename First, typename Last>
|
||||
struct apply : mpl::minus<typename Last::index, typename First::index>
|
||||
{
|
||||
static typename mpl::minus<
|
||||
typename Last::index, typename First::index>::type
|
||||
call(First const&, Last const&)
|
||||
{
|
||||
typedef typename mpl::minus<
|
||||
typename Last::index, typename First::index>::type
|
||||
result;
|
||||
return result();
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,40 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_END_IMPL_05042005_1142)
|
||||
#define FUSION_END_IMPL_05042005_1142
|
||||
|
||||
#include <boost/fusion/container/vector/vector_iterator.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct vector_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct end_impl;
|
||||
|
||||
template <>
|
||||
struct end_impl<vector_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Sequence::size size;
|
||||
typedef vector_iterator<Sequence, size::value> type;
|
||||
|
||||
static type
|
||||
call(Sequence& v)
|
||||
{
|
||||
return type(v);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,39 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_EQUAL_TO_IMPL_05052005_1215)
|
||||
#define FUSION_EQUAL_TO_IMPL_05052005_1215
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/mpl/equal_to.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct vector_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct equal_to_impl;
|
||||
|
||||
template <>
|
||||
struct equal_to_impl<vector_iterator_tag>
|
||||
{
|
||||
template <typename I1, typename I2>
|
||||
struct apply
|
||||
: is_same<
|
||||
typename I1::identity
|
||||
, typename I2::identity
|
||||
>
|
||||
{
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
@ -1,43 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_NEXT_IMPL_05042005_1058)
|
||||
#define FUSION_NEXT_IMPL_05042005_1058
|
||||
|
||||
#include <boost/fusion/container/vector/vector_iterator.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct vector_iterator_tag;
|
||||
template <typename Vector, int N>
|
||||
struct vector_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct next_impl;
|
||||
|
||||
template <>
|
||||
struct next_impl<vector_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::vector vector;
|
||||
typedef typename Iterator::index index;
|
||||
typedef vector_iterator<vector, index::value+1> type;
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return type(i.vec);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,43 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_PRIOR_IMPL_05042005_1145)
|
||||
#define FUSION_PRIOR_IMPL_05042005_1145
|
||||
|
||||
#include <boost/fusion/container/vector/vector_iterator.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct vector_iterator_tag;
|
||||
template <typename Vector, int N>
|
||||
struct vector_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct prior_impl;
|
||||
|
||||
template <>
|
||||
struct prior_impl<vector_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::vector vector;
|
||||
typedef typename Iterator::index index;
|
||||
typedef vector_iterator<vector, index::value-1> type;
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return type(i.vec);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,33 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_VALUE_AT_IMPL_05052005_0232)
|
||||
#define FUSION_VALUE_AT_IMPL_05052005_0232
|
||||
|
||||
#include <boost/mpl/at.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct vector_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct value_at_impl;
|
||||
|
||||
template <>
|
||||
struct value_at_impl<vector_tag>
|
||||
{
|
||||
template <typename Sequence, typename N>
|
||||
struct apply
|
||||
{
|
||||
typedef typename mpl::at<typename Sequence::types, N>::type type;
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,37 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_VALUE_OF_IMPL_05052005_1128)
|
||||
#define FUSION_VALUE_OF_IMPL_05052005_1128
|
||||
|
||||
#include <boost/mpl/at.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct vector_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct value_of_impl;
|
||||
|
||||
template <>
|
||||
struct value_of_impl<vector_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::vector vector;
|
||||
typedef typename Iterator::index index;
|
||||
typedef typename mpl::at<
|
||||
typename vector::types, index>::type
|
||||
type;
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,39 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#ifndef BOOST_PP_IS_ITERATING
|
||||
#if !defined(FUSION_VECTOR_FORWARD_CTOR_07122005_1123)
|
||||
#define FUSION_VECTOR_FORWARD_CTOR_07122005_1123
|
||||
|
||||
#include <boost/preprocessor/iterate.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||
|
||||
#define BOOST_PP_FILENAME_1 \
|
||||
<boost/fusion/container/vector/detail/vector_forward_ctor.hpp>
|
||||
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#endif
|
||||
#else // defined(BOOST_PP_IS_ITERATING)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Preprocessor vertical repetition code
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define N BOOST_PP_ITERATION()
|
||||
|
||||
#if N == 1
|
||||
explicit
|
||||
#endif
|
||||
vector(BOOST_PP_ENUM_BINARY_PARAMS(
|
||||
N, typename detail::call_param<T, >::type _))
|
||||
: vec(BOOST_PP_ENUM_PARAMS(N, _)) {}
|
||||
|
||||
#undef N
|
||||
#endif // defined(BOOST_PP_IS_ITERATING)
|
||||
|
@ -1,150 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
// No include guard. This file is meant to be included many times
|
||||
|
||||
#if !defined(FUSION_MACRO_05042005)
|
||||
#define FUSION_MACRO_05042005
|
||||
|
||||
#define FUSION_MEMBER_DEFAULT_INIT(z, n, _) m##n(T##n())
|
||||
#define FUSION_MEMBER_INIT(z, n, _) m##n(_##n)
|
||||
#define FUSION_COPY_INIT(z, n, _) m##n(other.m##n)
|
||||
#define FUSION_MEMBER_DECL(z, n, _) T##n m##n;
|
||||
|
||||
#define FUSION_MEMBER_ASSIGN(z, n, _) \
|
||||
this->BOOST_PP_CAT(m, n) = vec.BOOST_PP_CAT(m, n);
|
||||
|
||||
#define FUSION_DEREF_MEMBER_ASSIGN(z, n, _) \
|
||||
this->BOOST_PP_CAT(m, n) = *BOOST_PP_CAT(i, n);
|
||||
|
||||
#define FUSION_AT_IMPL(z, n, _) \
|
||||
typename add_reference<T##n>::type \
|
||||
at_impl(mpl::int_<n>) { return this->m##n; } \
|
||||
typename add_reference<typename add_const<T##n>::type>::type \
|
||||
at_impl(mpl::int_<n>) const { return this->m##n; }
|
||||
|
||||
#define FUSION_ITER_DECL_VAR(z, n, _) \
|
||||
typedef typename result_of::next< \
|
||||
BOOST_PP_CAT(I, BOOST_PP_DEC(n))>::type BOOST_PP_CAT(I, n); \
|
||||
BOOST_PP_CAT(I, n) BOOST_PP_CAT(i, n) \
|
||||
= fusion::next(BOOST_PP_CAT(i, BOOST_PP_DEC(n)));
|
||||
|
||||
#endif
|
||||
|
||||
#define N BOOST_PP_ITERATION()
|
||||
|
||||
template <typename Derived, BOOST_PP_ENUM_PARAMS(N, typename T)>
|
||||
struct BOOST_PP_CAT(vector_data, N) : sequence_base<Derived>
|
||||
{
|
||||
BOOST_PP_CAT(vector_data, N)()
|
||||
: BOOST_PP_ENUM(N, FUSION_MEMBER_DEFAULT_INIT, _) {}
|
||||
|
||||
BOOST_PP_CAT(vector_data, N)(
|
||||
BOOST_PP_ENUM_BINARY_PARAMS(
|
||||
N, typename detail::call_param<T, >::type _))
|
||||
: BOOST_PP_ENUM(N, FUSION_MEMBER_INIT, _) {}
|
||||
|
||||
BOOST_PP_CAT(vector_data, N)(
|
||||
BOOST_PP_CAT(vector_data, N) const& other)
|
||||
: BOOST_PP_ENUM(N, FUSION_COPY_INIT, _) {}
|
||||
|
||||
BOOST_PP_CAT(vector_data, N)&
|
||||
operator=(BOOST_PP_CAT(vector_data, N) const& vec)
|
||||
{
|
||||
BOOST_PP_REPEAT(N, FUSION_MEMBER_ASSIGN, _)
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename Sequence>
|
||||
static BOOST_PP_CAT(vector_data, N)
|
||||
init_from_sequence(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
I0 i0 = fusion::begin(seq);
|
||||
BOOST_PP_REPEAT_FROM_TO(1, N, FUSION_ITER_DECL_VAR, _)
|
||||
return BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_PARAMS(N, *i));
|
||||
}
|
||||
|
||||
BOOST_PP_REPEAT(N, FUSION_MEMBER_DECL, _)
|
||||
};
|
||||
|
||||
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
|
||||
struct BOOST_PP_CAT(vector, N)
|
||||
: BOOST_PP_CAT(vector_data, N)<
|
||||
BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, T)>
|
||||
, BOOST_PP_ENUM_PARAMS(N, T)>
|
||||
{
|
||||
typedef BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, T)> this_type;
|
||||
typedef BOOST_PP_CAT(vector_data, N)<this_type, BOOST_PP_ENUM_PARAMS(N, T)> base_type;
|
||||
typedef mpl::BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, T)> types;
|
||||
typedef vector_tag fusion_tag;
|
||||
typedef fusion_sequence_tag tag; // this gets picked up by MPL
|
||||
typedef mpl::false_ is_view;
|
||||
typedef random_access_traversal_tag category;
|
||||
typedef mpl::int_<N> size;
|
||||
|
||||
BOOST_PP_CAT(vector, N)() {}
|
||||
|
||||
#if (N == 1)
|
||||
explicit
|
||||
#endif
|
||||
BOOST_PP_CAT(vector, N)(
|
||||
BOOST_PP_ENUM_BINARY_PARAMS(
|
||||
N, typename detail::call_param<T, >::type _))
|
||||
: base_type(BOOST_PP_ENUM_PARAMS(N, _)) {}
|
||||
|
||||
template <BOOST_PP_ENUM_PARAMS(N, typename U)>
|
||||
BOOST_PP_CAT(vector, N)(
|
||||
BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, U)> const& vec)
|
||||
: base_type(BOOST_PP_ENUM_PARAMS(N, vec.m)) {}
|
||||
|
||||
template <typename Sequence>
|
||||
BOOST_PP_CAT(vector, N)(
|
||||
Sequence const& seq
|
||||
#if (N == 1)
|
||||
, typename disable_if<is_convertible<Sequence, T0> >::type* dummy = 0
|
||||
#endif
|
||||
)
|
||||
: base_type(base_type::init_from_sequence(seq)) {}
|
||||
|
||||
template <BOOST_PP_ENUM_PARAMS(N, typename U)>
|
||||
BOOST_PP_CAT(vector, N)&
|
||||
operator=(BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, U)> const& vec)
|
||||
{
|
||||
BOOST_PP_REPEAT(N, FUSION_MEMBER_ASSIGN, _)
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename Sequence>
|
||||
typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
|
||||
operator=(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::begin<Sequence const>::type I0;
|
||||
I0 i0 = fusion::begin(seq);
|
||||
BOOST_PP_REPEAT_FROM_TO(1, N, FUSION_ITER_DECL_VAR, _)
|
||||
BOOST_PP_REPEAT(N, FUSION_DEREF_MEMBER_ASSIGN, _)
|
||||
return *this;
|
||||
}
|
||||
|
||||
BOOST_PP_REPEAT(N, FUSION_AT_IMPL, _)
|
||||
|
||||
template<typename I>
|
||||
typename add_reference<typename mpl::at<types, I>::type>::type
|
||||
at_impl(I i)
|
||||
{
|
||||
return this->at_impl(mpl::int_<I::value>());
|
||||
}
|
||||
|
||||
template<typename I>
|
||||
typename add_reference<typename add_const<typename mpl::at<types, I>::type>::type>::type
|
||||
at_impl(I i) const
|
||||
{
|
||||
return this->at_impl(mpl::int_<I::value>());
|
||||
}
|
||||
};
|
||||
|
||||
#undef N
|
||||
|
@ -1,99 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#ifndef BOOST_PP_IS_ITERATING
|
||||
#if !defined(FUSION_VECTOR_N_CHOOSER_07072005_1248)
|
||||
#define FUSION_VECTOR_N_CHOOSER_07072005_1248
|
||||
|
||||
#include <boost/fusion/container/vector/limits.hpp>
|
||||
|
||||
// include vector0..N where N is FUSION_MAX_VECTOR_SIZE
|
||||
#include <boost/fusion/container/vector/vector10.hpp>
|
||||
#if (FUSION_MAX_VECTOR_SIZE > 10)
|
||||
#include <boost/fusion/container/vector/vector20.hpp>
|
||||
#endif
|
||||
#if (FUSION_MAX_VECTOR_SIZE > 20)
|
||||
#include <boost/fusion/container/vector/vector30.hpp>
|
||||
#endif
|
||||
#if (FUSION_MAX_VECTOR_SIZE > 30)
|
||||
#include <boost/fusion/container/vector/vector40.hpp>
|
||||
#endif
|
||||
#if (FUSION_MAX_VECTOR_SIZE > 40)
|
||||
#include <boost/fusion/container/vector/vector50.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/distance.hpp>
|
||||
#include <boost/mpl/find.hpp>
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct void_;
|
||||
}}
|
||||
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
template <int N>
|
||||
struct get_vector_n;
|
||||
|
||||
template <>
|
||||
struct get_vector_n<0>
|
||||
{
|
||||
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
|
||||
struct call
|
||||
{
|
||||
typedef vector0 type;
|
||||
};
|
||||
};
|
||||
|
||||
#define BOOST_PP_FILENAME_1 \
|
||||
<boost/fusion/container/vector/detail/vector_n_chooser.hpp>
|
||||
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
|
||||
struct vector_n_chooser
|
||||
{
|
||||
typedef
|
||||
mpl::BOOST_PP_CAT(vector, FUSION_MAX_VECTOR_SIZE)
|
||||
<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>
|
||||
input;
|
||||
|
||||
typedef typename mpl::begin<input>::type begin;
|
||||
typedef typename mpl::find<input, void_>::type end;
|
||||
typedef typename mpl::distance<begin, end>::type size;
|
||||
|
||||
typedef typename get_vector_n<size::value>::template
|
||||
call<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>::type
|
||||
type;
|
||||
};
|
||||
}}}
|
||||
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Preprocessor vertical repetition code
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#else // defined(BOOST_PP_IS_ITERATING)
|
||||
|
||||
#define N BOOST_PP_ITERATION()
|
||||
|
||||
template <>
|
||||
struct get_vector_n<N>
|
||||
{
|
||||
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
|
||||
struct call
|
||||
{
|
||||
typedef BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, T)> type;
|
||||
};
|
||||
};
|
||||
|
||||
#undef N
|
||||
#endif // defined(BOOST_PP_IS_ITERATING)
|
@ -1,19 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_VECTOR_LIMITS_07072005_1246)
|
||||
#define FUSION_VECTOR_LIMITS_07072005_1246
|
||||
|
||||
#if !defined(FUSION_MAX_VECTOR_SIZE)
|
||||
# define FUSION_MAX_VECTOR_SIZE 10
|
||||
#else
|
||||
# if FUSION_MAX_VECTOR_SIZE < 3
|
||||
# undef FUSION_MAX_VECTOR_SIZE
|
||||
# define FUSION_MAX_VECTOR_SIZE 10
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,152 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_VECTOR_07072005_1244)
|
||||
#define FUSION_VECTOR_07072005_1244
|
||||
|
||||
#include <boost/fusion/container/vector/vector_fwd.hpp>
|
||||
#include <boost/fusion/container/vector/detail/vector_n_chooser.hpp>
|
||||
#include <boost/fusion/container/vector/detail/as_vector.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/mpl/at.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct void_;
|
||||
struct fusion_sequence_tag;
|
||||
|
||||
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
|
||||
struct vector
|
||||
: sequence_base<vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)> >
|
||||
{
|
||||
private:
|
||||
|
||||
typedef typename detail::vector_n_chooser<
|
||||
BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>::type
|
||||
vector_n;
|
||||
|
||||
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)>
|
||||
friend struct vector;
|
||||
|
||||
public:
|
||||
|
||||
typedef typename vector_n::types types;
|
||||
typedef typename vector_n::fusion_tag fusion_tag;
|
||||
typedef typename vector_n::tag tag;
|
||||
typedef typename vector_n::size size;
|
||||
typedef typename vector_n::category category;
|
||||
typedef typename vector_n::is_view is_view;
|
||||
|
||||
vector()
|
||||
: vec() {}
|
||||
|
||||
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)>
|
||||
vector(vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, U)> const& rhs)
|
||||
: vec(rhs.vec) {}
|
||||
|
||||
vector(vector const& rhs)
|
||||
: vec(rhs.vec) {}
|
||||
|
||||
template <typename Sequence>
|
||||
vector(Sequence const& rhs)
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
|
||||
: vec(ctor_helper(rhs, is_base_of<vector, Sequence>())) {}
|
||||
#else
|
||||
: vec(rhs) {}
|
||||
#endif
|
||||
|
||||
// Expand a couple of forwarding constructors for arguments
|
||||
// of type (T0), (T0, T1), (T0, T1, T2) etc. Example:
|
||||
//
|
||||
// vector(
|
||||
// typename detail::call_param<T0>::type _0
|
||||
// , typename detail::call_param<T1>::type _1)
|
||||
// : vec(_0, _1) {}
|
||||
#include <boost/fusion/container/vector/detail/vector_forward_ctor.hpp>
|
||||
|
||||
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)>
|
||||
vector&
|
||||
operator=(vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, U)> const& rhs)
|
||||
{
|
||||
vec = rhs.vec;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
vector&
|
||||
operator=(T const& rhs)
|
||||
{
|
||||
vec = rhs;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <int N>
|
||||
typename add_reference<
|
||||
typename mpl::at_c<types, N>::type
|
||||
>::type
|
||||
at_impl(mpl::int_<N> index)
|
||||
{
|
||||
return vec.at_impl(index);
|
||||
}
|
||||
|
||||
template <int N>
|
||||
typename add_reference<
|
||||
typename add_const<
|
||||
typename mpl::at_c<types, N>::type
|
||||
>::type
|
||||
>::type
|
||||
at_impl(mpl::int_<N> index) const
|
||||
{
|
||||
return vec.at_impl(index);
|
||||
}
|
||||
|
||||
template <typename I>
|
||||
typename add_reference<
|
||||
typename mpl::at<types, I>::type
|
||||
>::type
|
||||
at_impl(I index)
|
||||
{
|
||||
return vec.at_impl(mpl::int_<I::value>());
|
||||
}
|
||||
|
||||
template<typename I>
|
||||
typename add_reference<
|
||||
typename add_const<
|
||||
typename mpl::at<types, I>::type
|
||||
>::type
|
||||
>::type
|
||||
at_impl(I index) const
|
||||
{
|
||||
return vec.at_impl(mpl::int_<I::value>());
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
|
||||
static vector_n const&
|
||||
ctor_helper(vector const& rhs, mpl::true_)
|
||||
{
|
||||
return rhs.vec;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static T const&
|
||||
ctor_helper(T const& rhs, mpl::false_)
|
||||
{
|
||||
return rhs;
|
||||
}
|
||||
#endif
|
||||
|
||||
vector_n vec;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,66 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_VECTOR10_05042005_0257)
|
||||
#define FUSION_VECTOR10_05042005_0257
|
||||
|
||||
#include <boost/fusion/support/sequence_base.hpp>
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/container/vector/detail/at_impl.hpp>
|
||||
#include <boost/fusion/container/vector/detail/value_at_impl.hpp>
|
||||
#include <boost/fusion/container/vector/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/container/vector/detail/end_impl.hpp>
|
||||
|
||||
#include <boost/mpl/void.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/at.hpp>
|
||||
#include <boost/mpl/vector/vector10.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
#include <boost/preprocessor/dec.hpp>
|
||||
#include <boost/preprocessor/iteration/iterate.hpp>
|
||||
#include <boost/preprocessor/repetition/enum.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_shifted.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct vector_tag;
|
||||
struct fusion_sequence_tag;
|
||||
struct random_access_traversal_tag;
|
||||
|
||||
struct vector0 : sequence_base<vector0>
|
||||
{
|
||||
typedef mpl::vector0<> types;
|
||||
typedef vector_tag fusion_tag;
|
||||
typedef fusion_sequence_tag tag; // this gets picked up by MPL
|
||||
typedef mpl::false_ is_view;
|
||||
typedef random_access_traversal_tag category;
|
||||
typedef mpl::int_<0> size;
|
||||
|
||||
vector0() {}
|
||||
|
||||
template<typename Sequence>
|
||||
vector0(Sequence const& seq)
|
||||
{}
|
||||
};
|
||||
|
||||
// expand vector1 to vector10
|
||||
#define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/vector_n.hpp>
|
||||
#define BOOST_PP_ITERATION_LIMITS (1, 10)
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
@ -1,50 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_VECTOR20_05052005_0205)
|
||||
#define FUSION_VECTOR20_05052005_0205
|
||||
|
||||
#include <boost/fusion/support/sequence_base.hpp>
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/container/vector/detail/at_impl.hpp>
|
||||
#include <boost/fusion/container/vector/detail/value_at_impl.hpp>
|
||||
#include <boost/fusion/container/vector/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/container/vector/detail/end_impl.hpp>
|
||||
|
||||
#include <boost/mpl/void.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/at.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/vector/vector20.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
#include <boost/preprocessor/dec.hpp>
|
||||
#include <boost/preprocessor/iteration/iterate.hpp>
|
||||
#include <boost/preprocessor/repetition/enum.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_shifted.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct vector_tag;
|
||||
struct fusion_sequence_tag;
|
||||
struct random_access_traversal_tag;
|
||||
|
||||
// expand vector11 to vector20
|
||||
#define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/vector_n.hpp>
|
||||
#define BOOST_PP_ITERATION_LIMITS (11, 20)
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
@ -1,50 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_VECTOR30_05052005_0206)
|
||||
#define FUSION_VECTOR30_05052005_0206
|
||||
|
||||
#include <boost/fusion/support/sequence_base.hpp>
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/container/vector/detail/at_impl.hpp>
|
||||
#include <boost/fusion/container/vector/detail/value_at_impl.hpp>
|
||||
#include <boost/fusion/container/vector/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/container/vector/detail/end_impl.hpp>
|
||||
|
||||
#include <boost/mpl/void.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/at.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/vector/vector30.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
#include <boost/preprocessor/dec.hpp>
|
||||
#include <boost/preprocessor/iteration/iterate.hpp>
|
||||
#include <boost/preprocessor/repetition/enum.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_shifted.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct vector_tag;
|
||||
struct fusion_sequence_tag;
|
||||
struct random_access_traversal_tag;
|
||||
|
||||
// expand vector21 to vector30
|
||||
#define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/vector_n.hpp>
|
||||
#define BOOST_PP_ITERATION_LIMITS (21, 30)
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
@ -1,50 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_VECTOR40_05052005_0208)
|
||||
#define FUSION_VECTOR40_05052005_0208
|
||||
|
||||
#include <boost/fusion/support/sequence_base.hpp>
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/container/vector/detail/at_impl.hpp>
|
||||
#include <boost/fusion/container/vector/detail/value_at_impl.hpp>
|
||||
#include <boost/fusion/container/vector/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/container/vector/detail/end_impl.hpp>
|
||||
|
||||
#include <boost/mpl/void.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/at.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/vector/vector40.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
#include <boost/preprocessor/dec.hpp>
|
||||
#include <boost/preprocessor/iteration/iterate.hpp>
|
||||
#include <boost/preprocessor/repetition/enum.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_shifted.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct vector_tag;
|
||||
struct fusion_sequence_tag;
|
||||
struct random_access_traversal_tag;
|
||||
|
||||
// expand vector31 to vector40
|
||||
#define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/vector_n.hpp>
|
||||
#define BOOST_PP_ITERATION_LIMITS (31, 40)
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
@ -1,50 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_VECTOR50_05052005_0207)
|
||||
#define FUSION_VECTOR50_05052005_0207
|
||||
|
||||
#include <boost/fusion/support/sequence_base.hpp>
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/container/vector/detail/at_impl.hpp>
|
||||
#include <boost/fusion/container/vector/detail/value_at_impl.hpp>
|
||||
#include <boost/fusion/container/vector/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/container/vector/detail/end_impl.hpp>
|
||||
|
||||
#include <boost/mpl/void.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/at.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/vector/vector50.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
#include <boost/preprocessor/dec.hpp>
|
||||
#include <boost/preprocessor/iteration/iterate.hpp>
|
||||
#include <boost/preprocessor/repetition/enum.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_shifted.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct vector_tag;
|
||||
struct fusion_sequence_tag;
|
||||
struct random_access_traversal_tag;
|
||||
|
||||
// expand vector41 to vector50
|
||||
#define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/vector_n.hpp>
|
||||
#define BOOST_PP_ITERATION_LIMITS (41, 50)
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
@ -1,25 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1999-2003 Jaakko J<>rvi
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_VECTOR_FORWARD_07072005_0125)
|
||||
#define FUSION_VECTOR_FORWARD_07072005_0125
|
||||
|
||||
#include <boost/fusion/container/vector/limits.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct void_;
|
||||
|
||||
template <
|
||||
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
|
||||
FUSION_MAX_VECTOR_SIZE, typename T, void_)
|
||||
>
|
||||
struct vector;
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,46 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_VECTOR_ITERATOR_05042005_0635)
|
||||
#define FUSION_VECTOR_ITERATOR_05042005_0635
|
||||
|
||||
#include <boost/fusion/support/iterator_base.hpp>
|
||||
#include <boost/fusion/container/vector/detail/deref_impl.hpp>
|
||||
#include <boost/fusion/container/vector/detail/value_of_impl.hpp>
|
||||
#include <boost/fusion/container/vector/detail/next_impl.hpp>
|
||||
#include <boost/fusion/container/vector/detail/prior_impl.hpp>
|
||||
#include <boost/fusion/container/vector/detail/equal_to_impl.hpp>
|
||||
#include <boost/fusion/container/vector/detail/distance_impl.hpp>
|
||||
#include <boost/fusion/container/vector/detail/advance_impl.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct vector_iterator_tag;
|
||||
struct random_access_traversal_tag;
|
||||
|
||||
template <typename Vector, int N>
|
||||
struct vector_iterator_identity;
|
||||
|
||||
template <typename Vector, int N>
|
||||
struct vector_iterator : iterator_base<vector_iterator<Vector, N> >
|
||||
{
|
||||
typedef mpl::int_<N> index;
|
||||
typedef Vector vector;
|
||||
typedef vector_iterator_tag fusion_tag;
|
||||
typedef random_access_traversal_tag category;
|
||||
typedef vector_iterator_identity<
|
||||
typename add_const<Vector>::type, N> identity;
|
||||
|
||||
vector_iterator(Vector& vec)
|
||||
: vec(vec) {}
|
||||
Vector& vec;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user