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_09232005_1340)
|
||||
#define FUSION_CONVERT_09232005_1340
|
||||
|
||||
#include <boost/fusion/container/map/detail/as_map.hpp>
|
||||
#include <boost/fusion/container/map/detail/convert_impl.hpp>
|
||||
#include <boost/fusion/container/map/map.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct as_map
|
||||
{
|
||||
typedef typename detail::as_map<result_of::size<Sequence>::value> gen;
|
||||
typedef typename gen::
|
||||
template apply<typename result_of::begin<Sequence>::type>::type
|
||||
type;
|
||||
};
|
||||
}
|
||||
|
||||
template <typename Sequence>
|
||||
inline typename result_of::as_map<Sequence>::type
|
||||
as_map(Sequence& seq)
|
||||
{
|
||||
typedef typename result_of::as_map<Sequence>::gen gen;
|
||||
return gen::call(fusion::begin(seq));
|
||||
}
|
||||
|
||||
template <typename Sequence>
|
||||
inline typename result_of::as_map<Sequence const>::type
|
||||
as_map(Sequence const& seq)
|
||||
{
|
||||
typedef typename result_of::as_map<Sequence const>::gen gen;
|
||||
return gen::call(fusion::begin(seq));
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -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_MAP_0932005_1339)
|
||||
#define FUSION_AS_MAP_0932005_1339
|
||||
|
||||
#include <boost/preprocessor/iterate.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/inc.hpp>
|
||||
#include <boost/preprocessor/dec.hpp>
|
||||
#include <boost/fusion/container/map/map.hpp>
|
||||
#include <boost/fusion/iterator/value_of.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
template <int size>
|
||||
struct as_map;
|
||||
|
||||
template <>
|
||||
struct as_map<0>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef map<> type;
|
||||
};
|
||||
|
||||
template <typename Iterator>
|
||||
static typename apply<Iterator>::type
|
||||
call(Iterator)
|
||||
{
|
||||
return map<>();
|
||||
}
|
||||
};
|
||||
|
||||
#define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \
|
||||
typedef typename fusion::result_of::next<BOOST_PP_CAT(I, n)>::type \
|
||||
BOOST_PP_CAT(I, BOOST_PP_INC(n));
|
||||
|
||||
#define BOOST_FUSION_NEXT_CALL_ITERATOR(z, n, data) \
|
||||
typename gen::BOOST_PP_CAT(I, BOOST_PP_INC(n)) \
|
||||
BOOST_PP_CAT(i, BOOST_PP_INC(n)) = fusion::next(BOOST_PP_CAT(i, n));
|
||||
|
||||
#define BOOST_FUSION_VALUE_OF_ITERATOR(z, n, data) \
|
||||
typedef typename fusion::result_of::value_of<BOOST_PP_CAT(I, n)>::type \
|
||||
BOOST_PP_CAT(T, n);
|
||||
|
||||
#define BOOST_PP_FILENAME_1 <boost/fusion/container/map/detail/as_map.hpp>
|
||||
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE)
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#undef BOOST_FUSION_NEXT_ITERATOR
|
||||
#undef BOOST_FUSION_NEXT_CALL_ITERATOR
|
||||
#undef BOOST_FUSION_VALUE_OF_ITERATOR
|
||||
|
||||
}}}
|
||||
|
||||
#endif
|
||||
#else // defined(BOOST_PP_IS_ITERATING)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Preprocessor vertical repetition code
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define N BOOST_PP_ITERATION()
|
||||
|
||||
template <>
|
||||
struct as_map<N>
|
||||
{
|
||||
template <typename I0>
|
||||
struct apply
|
||||
{
|
||||
BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _)
|
||||
BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _)
|
||||
typedef map<BOOST_PP_ENUM_PARAMS(N, T)> type;
|
||||
};
|
||||
|
||||
template <typename Iterator>
|
||||
static typename apply<Iterator>::type
|
||||
call(Iterator const& i0)
|
||||
{
|
||||
typedef apply<Iterator> gen;
|
||||
typedef typename gen::type result;
|
||||
BOOST_PP_REPEAT(BOOST_PP_DEC(N), BOOST_FUSION_NEXT_CALL_ITERATOR, _)
|
||||
return result(BOOST_PP_ENUM_PARAMS(N, *i));
|
||||
}
|
||||
};
|
||||
|
||||
#undef N
|
||||
#endif // defined(BOOST_PP_IS_ITERATING)
|
||||
|
@ -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_KEY_IMPL_05222005_0254)
|
||||
#define FUSION_AT_KEY_IMPL_05222005_0254
|
||||
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct map_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct at_key_impl;
|
||||
|
||||
template <>
|
||||
struct at_key_impl<map_tag>
|
||||
{
|
||||
template <typename Sequence, typename Key>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Sequence::template meta_at_impl<Key> element;
|
||||
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
is_const<Sequence>
|
||||
, detail::cref_result<element>
|
||||
, detail::ref_result<element>
|
||||
>::type
|
||||
type;
|
||||
|
||||
static type
|
||||
call(Sequence& m)
|
||||
{
|
||||
return m.at_impl(mpl::identity<Key>());
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,56 +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_05222005_1108)
|
||||
#define FUSION_BEGIN_IMPL_05222005_1108
|
||||
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct map_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct begin_impl;
|
||||
|
||||
template <>
|
||||
struct begin_impl<map_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
result_of::begin<typename Sequence::storage_type>::type
|
||||
iterator_type;
|
||||
|
||||
typedef typename
|
||||
result_of::begin<typename Sequence::storage_type const>::type
|
||||
const_iterator_type;
|
||||
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
is_const<Sequence>
|
||||
, mpl::identity<const_iterator_type>
|
||||
, mpl::identity<iterator_type>
|
||||
>::type
|
||||
type;
|
||||
|
||||
static type
|
||||
call(Sequence& m)
|
||||
{
|
||||
return fusion::begin(m.get_data());
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -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_09232005_1340)
|
||||
#define FUSION_CONVERT_IMPL_09232005_1340
|
||||
|
||||
#include <boost/fusion/container/map/detail/as_map.hpp>
|
||||
#include <boost/fusion/container/map/map.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct map_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename T>
|
||||
struct convert_impl;
|
||||
|
||||
template <>
|
||||
struct convert_impl<map_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef typename detail::as_map<result_of::size<Sequence>::value> gen;
|
||||
typedef typename gen::
|
||||
template apply<typename result_of::begin<Sequence>::type>::type
|
||||
type;
|
||||
|
||||
static type call(Sequence& seq)
|
||||
{
|
||||
return gen::call(fusion::begin(seq));
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -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_END_IMPL_05222005_1108)
|
||||
#define FUSION_END_IMPL_05222005_1108
|
||||
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct map_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct end_impl;
|
||||
|
||||
template <>
|
||||
struct end_impl<map_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
result_of::end<typename Sequence::storage_type>::type
|
||||
iterator_type;
|
||||
|
||||
typedef typename
|
||||
result_of::end<typename Sequence::storage_type const>::type
|
||||
const_iterator_type;
|
||||
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
is_const<Sequence>
|
||||
, mpl::identity<const_iterator_type>
|
||||
, mpl::identity<iterator_type>
|
||||
>::type
|
||||
type;
|
||||
|
||||
static type
|
||||
call(Sequence& m)
|
||||
{
|
||||
return fusion::end(m.get_data());
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -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)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_LOOKUP_KEY_07222005_1248)
|
||||
#define FUSION_LOOKUP_KEY_07222005_1248
|
||||
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
#include <boost/fusion/support/detail/unknown_key.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct void_;
|
||||
}}
|
||||
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
template <typename T>
|
||||
struct map_data_type
|
||||
{
|
||||
typedef typename
|
||||
add_reference<
|
||||
typename T::second_type
|
||||
>::type
|
||||
type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct map_data_type<void_>
|
||||
{
|
||||
typedef void_& type;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct map_const_data_type
|
||||
{
|
||||
typedef typename
|
||||
add_reference<
|
||||
typename add_const<
|
||||
typename T::second_type
|
||||
>::type
|
||||
>::type
|
||||
type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct map_const_data_type<void_>
|
||||
{
|
||||
typedef void_ const& type;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct map_value_type
|
||||
{
|
||||
typedef typename T::second_type type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct map_value_type<void_>
|
||||
{
|
||||
typedef void_ type;
|
||||
};
|
||||
|
||||
template <typename T, int index>
|
||||
struct map_key_type
|
||||
{
|
||||
typedef typename T::first_type type;
|
||||
};
|
||||
|
||||
template <int index>
|
||||
struct map_key_type<void_, index>
|
||||
{
|
||||
typedef unknown_key<index> type;
|
||||
};
|
||||
|
||||
template <int index, typename RT, typename Key, typename Vector>
|
||||
struct map_lookup_key
|
||||
{
|
||||
static RT
|
||||
call(Vector& vec)
|
||||
{
|
||||
return vec.at_impl(mpl::int_<index>()).second;
|
||||
}
|
||||
};
|
||||
|
||||
template <int index, typename Vector>
|
||||
struct map_lookup_key<index, void_&, unknown_key<index>, Vector>
|
||||
{
|
||||
static void_&
|
||||
call(Vector& vec); // intentionally undefined
|
||||
};
|
||||
}}}
|
||||
|
||||
#endif
|
||||
|
@ -1,38 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#ifndef BOOST_PP_IS_ITERATING
|
||||
#if !defined(FUSION_MAP_FORWARD_CTOR_07222005_0106)
|
||||
#define FUSION_MAP_FORWARD_CTOR_07222005_0106
|
||||
|
||||
#include <boost/preprocessor/iterate.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||
|
||||
#define BOOST_PP_FILENAME_1 \
|
||||
<boost/fusion/container/map/detail/map_forward_ctor.hpp>
|
||||
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE)
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#endif
|
||||
#else // defined(BOOST_PP_IS_ITERATING)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Preprocessor vertical repetition code
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define N BOOST_PP_ITERATION()
|
||||
|
||||
#if N == 1
|
||||
explicit
|
||||
#endif
|
||||
map(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _))
|
||||
: data(BOOST_PP_ENUM_PARAMS(N, _)) {}
|
||||
|
||||
#undef N
|
||||
#endif // defined(BOOST_PP_IS_ITERATING)
|
||||
|
@ -1,128 +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_MAP_LOOKUP_07212005_1118)
|
||||
#define FUSION_MAP_LOOKUP_07212005_1118
|
||||
|
||||
#include <boost/preprocessor/iterate.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/arithmetic/dec.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||
|
||||
#if defined(BOOST_MSVC) && (BOOST_MSVC == 1310)
|
||||
#pragma warning (push)
|
||||
#pragma warning(disable: 4348) // redefinition of default parameter
|
||||
#endif
|
||||
|
||||
template <typename Key, typename dummy = int>
|
||||
struct meta_at_impl
|
||||
{
|
||||
typedef void_ type;
|
||||
};
|
||||
|
||||
template <typename Key, typename dummy = int>
|
||||
struct meta_find_impl
|
||||
{
|
||||
typedef vector_iterator<storage_type, storage_type::size::value> type;
|
||||
};
|
||||
|
||||
template <typename Key, typename dummy = int>
|
||||
struct meta_find_impl_const
|
||||
{
|
||||
typedef vector_iterator<storage_type const, storage_type::size::value> type;
|
||||
};
|
||||
|
||||
template <typename Key>
|
||||
vector_iterator<storage_type const, storage_type::size::value>
|
||||
find_impl(mpl::identity<Key>) const
|
||||
{
|
||||
return vector_iterator<storage_type const, storage_type::size::value>(data);
|
||||
}
|
||||
|
||||
template <typename Key>
|
||||
vector_iterator<storage_type, storage_type::size::value>
|
||||
find_impl(mpl::identity<Key>)
|
||||
{
|
||||
return vector_iterator<storage_type, storage_type::size::value>(data);
|
||||
}
|
||||
|
||||
#define BOOST_PP_FILENAME_1 \
|
||||
<boost/fusion/container/map/detail/map_lookup.hpp>
|
||||
#define BOOST_PP_ITERATION_LIMITS (0, BOOST_PP_DEC(FUSION_MAX_MAP_SIZE))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#if defined(BOOST_MSVC) && (BOOST_MSVC == 1310)
|
||||
#pragma warning (pop)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#else // defined(BOOST_PP_IS_ITERATING)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Preprocessor vertical repetition code
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define N BOOST_PP_ITERATION()
|
||||
|
||||
template <typename dummy>
|
||||
struct meta_at_impl<
|
||||
typename detail::map_key_type<BOOST_PP_CAT(T, N), N>::type, dummy>
|
||||
{
|
||||
typedef typename detail::map_value_type<BOOST_PP_CAT(T, N)>::type type;
|
||||
};
|
||||
|
||||
typename detail::map_data_type<BOOST_PP_CAT(T, N)>::type
|
||||
at_impl(mpl::identity<typename detail::map_key_type<BOOST_PP_CAT(T, N), N>::type>)
|
||||
{
|
||||
return detail::map_lookup_key<
|
||||
N
|
||||
, typename detail::map_data_type<BOOST_PP_CAT(T, N)>::type
|
||||
, typename detail::map_key_type<BOOST_PP_CAT(T, N), N>::type
|
||||
, storage_type>::call(data);
|
||||
}
|
||||
|
||||
typename detail::map_const_data_type<BOOST_PP_CAT(T, N)>::type
|
||||
at_impl(mpl::identity<typename detail::map_key_type<BOOST_PP_CAT(T, N), N>::type>) const
|
||||
{
|
||||
return detail::map_lookup_key<
|
||||
N
|
||||
, typename detail::map_const_data_type<BOOST_PP_CAT(T, N)>::type
|
||||
, typename detail::map_key_type<BOOST_PP_CAT(T, N), N>::type
|
||||
, storage_type const>::call(data);
|
||||
}
|
||||
|
||||
template <typename dummy>
|
||||
struct meta_find_impl<
|
||||
typename detail::map_key_type<BOOST_PP_CAT(T, N), N>::type, dummy>
|
||||
{
|
||||
typedef vector_iterator<storage_type, N> type;
|
||||
};
|
||||
|
||||
template <typename dummy>
|
||||
struct meta_find_impl_const<
|
||||
typename detail::map_key_type<BOOST_PP_CAT(T, N), N>::type, dummy>
|
||||
{
|
||||
typedef vector_iterator<storage_type const, N> type;
|
||||
};
|
||||
|
||||
vector_iterator<storage_type, N>
|
||||
find_impl(mpl::identity<typename detail::map_key_type<BOOST_PP_CAT(T, N), N>::type>)
|
||||
{
|
||||
return vector_iterator<storage_type, N>(data);
|
||||
}
|
||||
|
||||
vector_iterator<storage_type const, N>
|
||||
find_impl(mpl::identity<typename detail::map_key_type<BOOST_PP_CAT(T, N), N>::type>) const
|
||||
{
|
||||
return vector_iterator<storage_type const, N>(data);
|
||||
}
|
||||
|
||||
#undef N
|
||||
#endif // defined(BOOST_PP_IS_ITERATING)
|
||||
|
@ -1,33 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_VALUE_AT_KEY_IMPL_05222005_0325)
|
||||
#define FUSION_VALUE_AT_KEY_IMPL_05222005_0325
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct map_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct value_at_key_impl;
|
||||
|
||||
template <>
|
||||
struct value_at_key_impl<map_tag>
|
||||
{
|
||||
template <typename Sequence, typename Key>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Sequence::
|
||||
template meta_at_impl<Key>::type type;
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,25 +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_MAP_LIMITS_07212005_1104)
|
||||
#define FUSION_MAP_LIMITS_07212005_1104
|
||||
|
||||
#include <boost/fusion/container/vector/limits.hpp>
|
||||
|
||||
#if !defined(FUSION_MAX_MAP_SIZE)
|
||||
# define FUSION_MAX_MAP_SIZE FUSION_MAX_VECTOR_SIZE
|
||||
#else
|
||||
# if FUSION_MAX_MAP_SIZE < 3
|
||||
# undef FUSION_MAX_MAP_SIZE
|
||||
# if (FUSION_MAX_VECTOR_SIZE > 10)
|
||||
# define FUSION_MAX_MAP_SIZE 10
|
||||
# else
|
||||
# define FUSION_MAX_MAP_SIZE FUSION_MAX_VECTOR_SIZE
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,71 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2005 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_MAP_07212005_1106)
|
||||
#define FUSION_MAP_07212005_1106
|
||||
|
||||
#include <boost/fusion/support/pair.hpp>
|
||||
#include <boost/fusion/support/category_of.hpp>
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/fusion/container/map/map_fwd.hpp>
|
||||
#include <boost/fusion/container/map/detail/lookup_key.hpp>
|
||||
#include <boost/fusion/container/map/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/container/map/detail/end_impl.hpp>
|
||||
#include <boost/fusion/container/map/detail/at_key_impl.hpp>
|
||||
#include <boost/fusion/container/map/detail/value_at_key_impl.hpp>
|
||||
#include <boost/fusion/container/vector/vector.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct void_;
|
||||
struct map_tag;
|
||||
struct fusion_sequence_tag;
|
||||
|
||||
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, typename T)>
|
||||
struct map : sequence_base<map<BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, T)> >
|
||||
{
|
||||
struct category : forward_traversal_tag, associative_sequence_tag {};
|
||||
|
||||
typedef map_tag fusion_tag;
|
||||
typedef fusion_sequence_tag tag; // this gets picked up by MPL
|
||||
typedef mpl::false_ is_view;
|
||||
|
||||
typedef vector<
|
||||
BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, T)>
|
||||
storage_type;
|
||||
|
||||
typedef typename storage_type::size size;
|
||||
|
||||
map()
|
||||
: data() {}
|
||||
|
||||
template <typename Sequence>
|
||||
map(Sequence const& rhs)
|
||||
: data(rhs) {}
|
||||
|
||||
#include <boost/fusion/container/map/detail/map_forward_ctor.hpp>
|
||||
#include <boost/fusion/container/map/detail/map_lookup.hpp>
|
||||
|
||||
template <typename T>
|
||||
map&
|
||||
operator=(T const& rhs)
|
||||
{
|
||||
data = rhs;
|
||||
return *this;
|
||||
}
|
||||
|
||||
storage_type& get_data() { return data; }
|
||||
storage_type const& get_data() const { return data; }
|
||||
|
||||
private:
|
||||
|
||||
storage_type data;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
@ -1,24 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2005 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_MAP_FORWARD_07212005_1105)
|
||||
#define FUSION_MAP_FORWARD_07212005_1105
|
||||
|
||||
#include <boost/fusion/container/map/limits.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct void_;
|
||||
|
||||
template <
|
||||
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
|
||||
FUSION_MAX_MAP_SIZE, typename T, void_)
|
||||
>
|
||||
struct map;
|
||||
}}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user