forked from boostorg/fusion
Initial move from Spirit CVS
[SVN r34896]
This commit is contained in:
81
include/boost/fusion/sequence/intrinsic/at.hpp
Normal file
81
include/boost/fusion/sequence/intrinsic/at.hpp
Normal file
@ -0,0 +1,81 @@
|
||||
/*=============================================================================
|
||||
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_05042005_0722)
|
||||
#define FUSION_AT_05042005_0722
|
||||
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/fusion/support/tag_of.hpp>
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct at_impl
|
||||
{
|
||||
template <typename Sequence, typename N>
|
||||
struct apply;
|
||||
};
|
||||
}
|
||||
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence, typename N>
|
||||
struct at
|
||||
: extension::at_impl<typename detail::tag_of<Sequence>::type>::
|
||||
template apply<Sequence, N>
|
||||
{};
|
||||
|
||||
template <typename Sequence, int N>
|
||||
struct at_c
|
||||
: at<Sequence, mpl::int_<N> >
|
||||
{};
|
||||
}
|
||||
|
||||
|
||||
template <typename N, typename Sequence>
|
||||
inline typename
|
||||
lazy_disable_if<
|
||||
is_const<Sequence>
|
||||
, result_of::at<Sequence, N>
|
||||
>::type
|
||||
at(Sequence& seq)
|
||||
{
|
||||
return result_of::at<Sequence, N>::call(seq);
|
||||
}
|
||||
|
||||
template <typename N, typename Sequence>
|
||||
inline typename result_of::at<Sequence const, N>::type
|
||||
at(Sequence const& seq)
|
||||
{
|
||||
return result_of::at<Sequence const, N>::call(seq);
|
||||
}
|
||||
|
||||
template <int N, typename Sequence>
|
||||
inline typename
|
||||
lazy_disable_if<
|
||||
is_const<Sequence>
|
||||
, result_of::at_c<Sequence, N>
|
||||
>::type
|
||||
at_c(Sequence& seq)
|
||||
{
|
||||
return at<mpl::int_<N> >(seq);
|
||||
}
|
||||
|
||||
template <int N, typename Sequence>
|
||||
inline typename result_of::at_c<Sequence const, N>::type
|
||||
at_c(Sequence const& seq)
|
||||
{
|
||||
return at<mpl::int_<N> >(seq);
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
56
include/boost/fusion/sequence/intrinsic/at_key.hpp
Normal file
56
include/boost/fusion/sequence/intrinsic/at_key.hpp
Normal file
@ -0,0 +1,56 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 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_KEY_20060304_1755)
|
||||
#define BOOST_FUSION_AT_KEY_20060304_1755
|
||||
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/fusion/support/tag_of.hpp>
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct at_key_impl
|
||||
{
|
||||
template <typename Sequence, typename Key>
|
||||
struct apply;
|
||||
};
|
||||
}
|
||||
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence, typename Key>
|
||||
struct at_key
|
||||
: extension::at_key_impl<typename detail::tag_of<Sequence>::type>::
|
||||
template apply<Sequence, Key>
|
||||
{};
|
||||
}
|
||||
|
||||
template <typename Key, typename Sequence>
|
||||
inline typename
|
||||
lazy_disable_if<
|
||||
is_const<Sequence>
|
||||
, result_of::at_key<Sequence, Key>
|
||||
>::type
|
||||
at_key(Sequence& seq)
|
||||
{
|
||||
return result_of::at_key<Sequence, Key>::call(seq);
|
||||
}
|
||||
|
||||
template <typename Key, typename Sequence>
|
||||
inline typename result_of::at_key<Sequence const, Key>::type
|
||||
at_key(Sequence const& seq)
|
||||
{
|
||||
return result_of::at_key<Sequence const, Key>::call(seq);
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
43
include/boost/fusion/sequence/intrinsic/back.hpp
Normal file
43
include/boost/fusion/sequence/intrinsic/back.hpp
Normal file
@ -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_BACK_09162005_0350)
|
||||
#define FUSION_BACK_09162005_0350
|
||||
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
#include <boost/fusion/iterator/prior.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct fusion_sequence_tag;
|
||||
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct back
|
||||
: result_of::deref<typename result_of::prior<typename result_of::end<Sequence>::type>::type>
|
||||
{};
|
||||
}
|
||||
|
||||
template <typename Sequence>
|
||||
inline typename result_of::back<Sequence>::type
|
||||
back(Sequence& seq)
|
||||
{
|
||||
return *fusion::prior(fusion::end(seq));
|
||||
}
|
||||
|
||||
template <typename Sequence>
|
||||
inline typename result_of::back<Sequence const>::type
|
||||
back(Sequence const& seq)
|
||||
{
|
||||
return *fusion::prior(fusion::end(seq));
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
51
include/boost/fusion/sequence/intrinsic/begin.hpp
Normal file
51
include/boost/fusion/sequence/intrinsic/begin.hpp
Normal file
@ -0,0 +1,51 @@
|
||||
/*=============================================================================
|
||||
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_BEGIN_04052005_1132)
|
||||
#define FUSION_BEGIN_04052005_1132
|
||||
|
||||
#include <boost/fusion/support/tag_of.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct fusion_sequence_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct begin_impl
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply;
|
||||
};
|
||||
}
|
||||
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct begin
|
||||
: extension::begin_impl<typename detail::tag_of<Sequence>::type>::
|
||||
template apply<Sequence>
|
||||
{};
|
||||
}
|
||||
|
||||
template <typename Sequence>
|
||||
inline typename result_of::begin<Sequence>::type
|
||||
begin(Sequence& seq)
|
||||
{
|
||||
return result_of::begin<Sequence>::call(seq);
|
||||
}
|
||||
|
||||
template <typename Sequence>
|
||||
inline typename result_of::begin<Sequence const>::type
|
||||
begin(Sequence const& seq)
|
||||
{
|
||||
return result_of::begin<Sequence const>::call(seq);
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
49
include/boost/fusion/sequence/intrinsic/empty.hpp
Normal file
49
include/boost/fusion/sequence/intrinsic/empty.hpp
Normal file
@ -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_EMPTY_09162005_0335)
|
||||
#define FUSION_EMPTY_09162005_0335
|
||||
|
||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/fusion/support/tag_of.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct fusion_sequence_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct empty_impl
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
: mpl::bool_<(result_of::size<Sequence>::value == 0)>
|
||||
{};
|
||||
};
|
||||
}
|
||||
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct empty
|
||||
: extension::empty_impl<typename detail::tag_of<Sequence>::type>::
|
||||
template apply<Sequence>
|
||||
{};
|
||||
}
|
||||
|
||||
template <typename Sequence>
|
||||
inline typename result_of::empty<Sequence>::type
|
||||
empty(Sequence const&)
|
||||
{
|
||||
static typename result_of::empty<Sequence>::type result;
|
||||
return result;
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
51
include/boost/fusion/sequence/intrinsic/end.hpp
Normal file
51
include/boost/fusion/sequence/intrinsic/end.hpp
Normal file
@ -0,0 +1,51 @@
|
||||
/*=============================================================================
|
||||
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_END_04052005_1141)
|
||||
#define FUSION_END_04052005_1141
|
||||
|
||||
#include <boost/fusion/support/tag_of.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct fusion_sequence_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct end_impl
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply;
|
||||
};
|
||||
}
|
||||
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct end
|
||||
: extension::end_impl<typename detail::tag_of<Sequence>::type>::
|
||||
template apply<Sequence>
|
||||
{};
|
||||
}
|
||||
|
||||
template <typename Sequence>
|
||||
inline typename result_of::end<Sequence>::type
|
||||
end(Sequence& seq)
|
||||
{
|
||||
return result_of::end<Sequence>::call(seq);
|
||||
}
|
||||
|
||||
template <typename Sequence>
|
||||
inline typename result_of::end<Sequence const>::type
|
||||
end(Sequence const& seq)
|
||||
{
|
||||
return result_of::end<Sequence const>::call(seq);
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
42
include/boost/fusion/sequence/intrinsic/front.hpp
Normal file
42
include/boost/fusion/sequence/intrinsic/front.hpp
Normal file
@ -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_FRONT_09162005_0343)
|
||||
#define FUSION_FRONT_09162005_0343
|
||||
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct fusion_sequence_tag;
|
||||
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct front
|
||||
: result_of::deref<typename result_of::begin<Sequence>::type>
|
||||
{};
|
||||
}
|
||||
|
||||
template <typename Sequence>
|
||||
inline typename result_of::front<Sequence>::type
|
||||
front(Sequence& seq)
|
||||
{
|
||||
return *fusion::begin(seq);
|
||||
}
|
||||
|
||||
template <typename Sequence>
|
||||
inline typename result_of::front<Sequence const>::type
|
||||
front(Sequence const& seq)
|
||||
{
|
||||
return *fusion::begin(seq);
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
52
include/boost/fusion/sequence/intrinsic/has_key.hpp
Normal file
52
include/boost/fusion/sequence/intrinsic/has_key.hpp
Normal file
@ -0,0 +1,52 @@
|
||||
/*=============================================================================
|
||||
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_HAS_KEY_09232005_1454)
|
||||
#define FUSION_HAS_KEY_09232005_1454
|
||||
|
||||
#include <boost/mpl/not.hpp>
|
||||
#include <boost/fusion/support/tag_of.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct void_;
|
||||
struct fusion_sequence_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct has_key_impl
|
||||
{
|
||||
template <typename Sequence, typename Key>
|
||||
struct apply
|
||||
: mpl::not_<is_same<typename Sequence::
|
||||
template meta_at_impl<Key>::type, void_> >
|
||||
{};
|
||||
};
|
||||
}
|
||||
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence, typename Key>
|
||||
struct has_key
|
||||
: extension::has_key_impl<typename detail::tag_of<Sequence>::type>::
|
||||
template apply<Sequence, Key>
|
||||
{};
|
||||
}
|
||||
|
||||
template <typename Key, typename Sequence>
|
||||
inline typename result_of::has_key<Sequence, Key>::type
|
||||
has_key(Sequence const& seq)
|
||||
{
|
||||
static typename result_of::has_key<Sequence, Key>::type result;
|
||||
return result;
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
29
include/boost/fusion/sequence/intrinsic/mpl.hpp
Normal file
29
include/boost/fusion/sequence/intrinsic/mpl.hpp
Normal file
@ -0,0 +1,29 @@
|
||||
/*=============================================================================
|
||||
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_INTRINSIC_MPL_10022005_1641)
|
||||
#define FUSION_SEQUENCE_INTRINSIC_MPL_10022005_1641
|
||||
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/at.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/back.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/clear.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/empty.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/end.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/erase.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/erase_key.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/front.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/has_key.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/insert.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/insert_range.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/pop_back.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/pop_front.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/push_back.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/push_front.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/size.hpp>
|
||||
|
||||
#endif
|
34
include/boost/fusion/sequence/intrinsic/mpl/at.hpp
Normal file
34
include/boost/fusion/sequence/intrinsic/mpl/at.hpp
Normal file
@ -0,0 +1,34 @@
|
||||
/*=============================================================================
|
||||
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_10022005_1616)
|
||||
#define FUSION_AT_10022005_1616
|
||||
|
||||
#include <boost/mpl/at.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/value_at.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace fusion
|
||||
{
|
||||
struct fusion_sequence_tag;
|
||||
}
|
||||
|
||||
namespace mpl
|
||||
{
|
||||
template <typename Tag>
|
||||
struct at_impl;
|
||||
|
||||
template <>
|
||||
struct at_impl<fusion::fusion_sequence_tag>
|
||||
{
|
||||
template <typename Sequence, typename N>
|
||||
struct apply : fusion::result_of::value_at<Sequence, N> {};
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
33
include/boost/fusion/sequence/intrinsic/mpl/back.hpp
Normal file
33
include/boost/fusion/sequence/intrinsic/mpl/back.hpp
Normal file
@ -0,0 +1,33 @@
|
||||
/*=============================================================================
|
||||
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_BACK_10022005_1620)
|
||||
#define FUSION_BACK_10022005_1620
|
||||
|
||||
#include <boost/mpl/back.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
#include <boost/fusion/iterator/prior.hpp>
|
||||
#include <boost/fusion/iterator/value_of.hpp>
|
||||
|
||||
namespace boost { namespace mpl
|
||||
{
|
||||
template <typename Tag>
|
||||
struct back_impl;
|
||||
|
||||
template <>
|
||||
struct back_impl<fusion::fusion_sequence_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply :
|
||||
fusion::result_of::value_of<
|
||||
typename fusion::result_of::prior<
|
||||
typename fusion::result_of::end<Sequence>::type
|
||||
>::type> {};
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
32
include/boost/fusion/sequence/intrinsic/mpl/begin.hpp
Normal file
32
include/boost/fusion/sequence/intrinsic/mpl/begin.hpp
Normal file
@ -0,0 +1,32 @@
|
||||
/*=============================================================================
|
||||
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_BEGIN_10022005_1620)
|
||||
#define FUSION_BEGIN_10022005_1620
|
||||
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/adapted/mpl/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/iterator/mpl/fusion_iterator.hpp>
|
||||
|
||||
namespace boost { namespace mpl
|
||||
{
|
||||
template <typename Tag>
|
||||
struct begin_impl;
|
||||
|
||||
template <>
|
||||
struct begin_impl<fusion::fusion_sequence_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef fusion_iterator<typename fusion::result_of::begin<Sequence>::type> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
34
include/boost/fusion/sequence/intrinsic/mpl/clear.hpp
Normal file
34
include/boost/fusion/sequence/intrinsic/mpl/clear.hpp
Normal file
@ -0,0 +1,34 @@
|
||||
/*=============================================================================
|
||||
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_CLEAR_10022005_1817)
|
||||
#define FUSION_CLEAR_10022005_1817
|
||||
|
||||
#include <boost/mpl/clear.hpp>
|
||||
#include <boost/fusion/support/tag_of.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/detail/clear.hpp>
|
||||
|
||||
namespace boost { namespace mpl
|
||||
{
|
||||
template <typename Tag>
|
||||
struct clear_impl;
|
||||
|
||||
template <>
|
||||
struct clear_impl<fusion::fusion_sequence_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
fusion::detail::clear<typename fusion::detail::tag_of<Sequence>::type>::type
|
||||
type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
56
include/boost/fusion/sequence/intrinsic/mpl/detail/as.hpp
Normal file
56
include/boost/fusion/sequence/intrinsic/mpl/detail/as.hpp
Normal file
@ -0,0 +1,56 @@
|
||||
/*=============================================================================
|
||||
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_AS_10022005_1442)
|
||||
#define FUSION_AS_10022005_1442
|
||||
|
||||
#include <boost/fusion/sequence/conversion.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
template <typename Tag>
|
||||
struct as_impl;
|
||||
|
||||
template <>
|
||||
struct as_impl<cons_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply : result_of::as_list<Sequence> {};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct as_impl<map_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply : result_of::as_map<Sequence> {};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct as_impl<set_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply : result_of::as_set<Sequence> {};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct as_impl<vector_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply : result_of::as_vector<Sequence> {};
|
||||
};
|
||||
|
||||
template <typename Tag, typename Sequence>
|
||||
struct as
|
||||
{
|
||||
typedef typename
|
||||
as_impl<Tag>::template apply<Sequence>::type
|
||||
type;
|
||||
};
|
||||
|
||||
}}}
|
||||
|
||||
#endif
|
32
include/boost/fusion/sequence/intrinsic/mpl/detail/clear.hpp
Normal file
32
include/boost/fusion/sequence/intrinsic/mpl/detail/clear.hpp
Normal file
@ -0,0 +1,32 @@
|
||||
/*=============================================================================
|
||||
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_CLEAR_10022005_1442)
|
||||
#define FUSION_CLEAR_10022005_1442
|
||||
|
||||
#include <boost/fusion/sequence/container.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
template <typename Tag>
|
||||
struct clear;
|
||||
|
||||
template <>
|
||||
struct clear<cons_tag> : mpl::identity<list<> > {};
|
||||
|
||||
template <>
|
||||
struct clear<map_tag> : mpl::identity<map<> > {};
|
||||
|
||||
template <>
|
||||
struct clear<set_tag> : mpl::identity<set<> > {};
|
||||
|
||||
template <>
|
||||
struct clear<vector_tag> : mpl::identity<vector<> > {};
|
||||
|
||||
}}}
|
||||
|
||||
#endif
|
27
include/boost/fusion/sequence/intrinsic/mpl/empty.hpp
Normal file
27
include/boost/fusion/sequence/intrinsic/mpl/empty.hpp
Normal file
@ -0,0 +1,27 @@
|
||||
/*=============================================================================
|
||||
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_EMPTY_10022005_1619)
|
||||
#define FUSION_EMPTY_10022005_1619
|
||||
|
||||
#include <boost/mpl/empty.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/empty.hpp>
|
||||
|
||||
namespace boost { namespace mpl
|
||||
{
|
||||
template <typename Tag>
|
||||
struct empty_impl;
|
||||
|
||||
template <>
|
||||
struct empty_impl<fusion::fusion_sequence_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply : fusion::result_of::empty<Sequence> {};
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
32
include/boost/fusion/sequence/intrinsic/mpl/end.hpp
Normal file
32
include/boost/fusion/sequence/intrinsic/mpl/end.hpp
Normal file
@ -0,0 +1,32 @@
|
||||
/*=============================================================================
|
||||
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_END_10022005_1619)
|
||||
#define FUSION_END_10022005_1619
|
||||
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
#include <boost/fusion/sequence/adapted/mpl/detail/end_impl.hpp>
|
||||
#include <boost/fusion/iterator/mpl/fusion_iterator.hpp>
|
||||
|
||||
namespace boost { namespace mpl
|
||||
{
|
||||
template <typename Tag>
|
||||
struct end_impl;
|
||||
|
||||
template <>
|
||||
struct end_impl<fusion::fusion_sequence_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef fusion_iterator<typename fusion::result_of::end<Sequence>::type> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
39
include/boost/fusion/sequence/intrinsic/mpl/erase.hpp
Normal file
39
include/boost/fusion/sequence/intrinsic/mpl/erase.hpp
Normal file
@ -0,0 +1,39 @@
|
||||
/*=============================================================================
|
||||
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_ERASE_10022005_1835)
|
||||
#define FUSION_ERASE_10022005_1835
|
||||
|
||||
#include <boost/mpl/erase.hpp>
|
||||
#include <boost/fusion/support/tag_of.hpp>
|
||||
#include <boost/fusion/algorithm/transformation/erase.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/detail/as.hpp>
|
||||
|
||||
namespace boost { namespace mpl
|
||||
{
|
||||
template <typename Tag>
|
||||
struct erase_impl;
|
||||
|
||||
template <>
|
||||
struct erase_impl<fusion::fusion_sequence_tag>
|
||||
{
|
||||
template <typename Sequence, typename First, typename Last>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
fusion::result_of::erase<Sequence, First, Last>::type
|
||||
result;
|
||||
|
||||
typedef typename
|
||||
fusion::detail::as<typename fusion::detail::tag_of<Sequence>::type, result>::type
|
||||
type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
39
include/boost/fusion/sequence/intrinsic/mpl/erase_key.hpp
Normal file
39
include/boost/fusion/sequence/intrinsic/mpl/erase_key.hpp
Normal file
@ -0,0 +1,39 @@
|
||||
/*=============================================================================
|
||||
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_ERASE_KEY_10022005_1907)
|
||||
#define FUSION_ERASE_KEY_10022005_1907
|
||||
|
||||
#include <boost/mpl/erase_key.hpp>
|
||||
#include <boost/fusion/support/tag_of.hpp>
|
||||
#include <boost/fusion/algorithm/transformation/erase_key.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/detail/as.hpp>
|
||||
|
||||
namespace boost { namespace mpl
|
||||
{
|
||||
template <typename Tag>
|
||||
struct erase_key_impl;
|
||||
|
||||
template <>
|
||||
struct erase_key_impl<fusion::fusion_sequence_tag>
|
||||
{
|
||||
template <typename Sequence, typename Key>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
fusion::result_of::erase_key<Sequence, Key>::type
|
||||
result;
|
||||
|
||||
typedef typename
|
||||
fusion::detail::as<typename fusion::detail::tag_of<Sequence>::type, result>::type
|
||||
type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
29
include/boost/fusion/sequence/intrinsic/mpl/front.hpp
Normal file
29
include/boost/fusion/sequence/intrinsic/mpl/front.hpp
Normal file
@ -0,0 +1,29 @@
|
||||
/*=============================================================================
|
||||
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_FRONT_10022005_1618)
|
||||
#define FUSION_FRONT_10022005_1618
|
||||
|
||||
#include <boost/mpl/front.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/iterator/value_of.hpp>
|
||||
|
||||
namespace boost { namespace mpl
|
||||
{
|
||||
template <typename Tag>
|
||||
struct front_impl;
|
||||
|
||||
template <>
|
||||
struct front_impl<fusion::fusion_sequence_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply :
|
||||
fusion::result_of::value_of<typename fusion::result_of::begin<Sequence>::type> {};
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
28
include/boost/fusion/sequence/intrinsic/mpl/has_key.hpp
Normal file
28
include/boost/fusion/sequence/intrinsic/mpl/has_key.hpp
Normal file
@ -0,0 +1,28 @@
|
||||
/*=============================================================================
|
||||
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_HAS_KEY_10022005_1617)
|
||||
#define FUSION_HAS_KEY_10022005_1617
|
||||
|
||||
#include <boost/mpl/has_key.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/has_key.hpp>
|
||||
|
||||
namespace boost { namespace mpl
|
||||
{
|
||||
template <typename Tag>
|
||||
struct has_key_impl;
|
||||
|
||||
template <>
|
||||
struct has_key_impl<fusion::fusion_sequence_tag>
|
||||
{
|
||||
template <typename Sequence, typename Key>
|
||||
struct apply : fusion::result_of::has_key<Sequence, Key> {};
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
39
include/boost/fusion/sequence/intrinsic/mpl/insert.hpp
Normal file
39
include/boost/fusion/sequence/intrinsic/mpl/insert.hpp
Normal file
@ -0,0 +1,39 @@
|
||||
/*=============================================================================
|
||||
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_INSERT_10022005_1837)
|
||||
#define FUSION_INSERT_10022005_1837
|
||||
|
||||
#include <boost/mpl/insert.hpp>
|
||||
#include <boost/fusion/support/tag_of.hpp>
|
||||
#include <boost/fusion/algorithm/transformation/insert.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/detail/as.hpp>
|
||||
|
||||
namespace boost { namespace mpl
|
||||
{
|
||||
template <typename Tag>
|
||||
struct insert_impl;
|
||||
|
||||
template <>
|
||||
struct insert_impl<fusion::fusion_sequence_tag>
|
||||
{
|
||||
template <typename Sequence, typename Pos, typename T>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
fusion::result_of::insert<Sequence, Pos, T>::type
|
||||
result;
|
||||
|
||||
typedef typename
|
||||
fusion::detail::as<typename fusion::detail::tag_of<Sequence>::type, result>::type
|
||||
type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
39
include/boost/fusion/sequence/intrinsic/mpl/insert_range.hpp
Normal file
39
include/boost/fusion/sequence/intrinsic/mpl/insert_range.hpp
Normal file
@ -0,0 +1,39 @@
|
||||
/*=============================================================================
|
||||
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_INSERT_RANGE_10022005_1838)
|
||||
#define FUSION_INSERT_RANGE_10022005_1838
|
||||
|
||||
#include <boost/mpl/insert_range.hpp>
|
||||
#include <boost/fusion/support/tag_of.hpp>
|
||||
#include <boost/fusion/algorithm/transformation/insert_range.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/detail/as.hpp>
|
||||
|
||||
namespace boost { namespace mpl
|
||||
{
|
||||
template <typename Tag>
|
||||
struct insert_range_impl;
|
||||
|
||||
template <>
|
||||
struct insert_range_impl<fusion::fusion_sequence_tag>
|
||||
{
|
||||
template <typename Sequence, typename Pos, typename Range>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
fusion::result_of::insert_range<Sequence, Pos, Range>::type
|
||||
result;
|
||||
|
||||
typedef typename
|
||||
fusion::detail::as<typename fusion::detail::tag_of<Sequence>::type, result>::type
|
||||
type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
39
include/boost/fusion/sequence/intrinsic/mpl/pop_back.hpp
Normal file
39
include/boost/fusion/sequence/intrinsic/mpl/pop_back.hpp
Normal file
@ -0,0 +1,39 @@
|
||||
/*=============================================================================
|
||||
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_POP_BACK_10022005_1801)
|
||||
#define FUSION_POP_BACK_10022005_1801
|
||||
|
||||
#include <boost/mpl/pop_back.hpp>
|
||||
#include <boost/fusion/support/tag_of.hpp>
|
||||
#include <boost/fusion/algorithm/transformation/pop_back.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/detail/as.hpp>
|
||||
|
||||
namespace boost { namespace mpl
|
||||
{
|
||||
template <typename Tag>
|
||||
struct pop_back_impl;
|
||||
|
||||
template <>
|
||||
struct pop_back_impl<fusion::fusion_sequence_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
fusion::result_of::pop_back<Sequence>::type
|
||||
result;
|
||||
|
||||
typedef typename
|
||||
fusion::detail::as<typename fusion::detail::tag_of<Sequence>::type, result>::type
|
||||
type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
39
include/boost/fusion/sequence/intrinsic/mpl/pop_front.hpp
Normal file
39
include/boost/fusion/sequence/intrinsic/mpl/pop_front.hpp
Normal file
@ -0,0 +1,39 @@
|
||||
/*=============================================================================
|
||||
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_POP_FRONT_10022005_1800)
|
||||
#define FUSION_POP_FRONT_10022005_1800
|
||||
|
||||
#include <boost/mpl/pop_front.hpp>
|
||||
#include <boost/fusion/support/tag_of.hpp>
|
||||
#include <boost/fusion/algorithm/transformation/pop_front.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/detail/as.hpp>
|
||||
|
||||
namespace boost { namespace mpl
|
||||
{
|
||||
template <typename Tag>
|
||||
struct pop_front_impl;
|
||||
|
||||
template <>
|
||||
struct pop_front_impl<fusion::fusion_sequence_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
fusion::result_of::pop_front<Sequence>::type
|
||||
result;
|
||||
|
||||
typedef typename
|
||||
fusion::detail::as<typename fusion::detail::tag_of<Sequence>::type, result>::type
|
||||
type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
39
include/boost/fusion/sequence/intrinsic/mpl/push_back.hpp
Normal file
39
include/boost/fusion/sequence/intrinsic/mpl/push_back.hpp
Normal file
@ -0,0 +1,39 @@
|
||||
/*=============================================================================
|
||||
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_PUSH_BACK_10022005_1647)
|
||||
#define FUSION_PUSH_BACK_10022005_1647
|
||||
|
||||
#include <boost/mpl/push_back.hpp>
|
||||
#include <boost/fusion/support/tag_of.hpp>
|
||||
#include <boost/fusion/algorithm/transformation/push_back.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/detail/as.hpp>
|
||||
|
||||
namespace boost { namespace mpl
|
||||
{
|
||||
template <typename Tag>
|
||||
struct push_back_impl;
|
||||
|
||||
template <>
|
||||
struct push_back_impl<fusion::fusion_sequence_tag>
|
||||
{
|
||||
template <typename Sequence, typename T>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
fusion::result_of::push_back<Sequence, T>::type
|
||||
result;
|
||||
|
||||
typedef typename
|
||||
fusion::detail::as<typename fusion::detail::tag_of<Sequence>::type, result>::type
|
||||
type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
39
include/boost/fusion/sequence/intrinsic/mpl/push_front.hpp
Normal file
39
include/boost/fusion/sequence/intrinsic/mpl/push_front.hpp
Normal file
@ -0,0 +1,39 @@
|
||||
/*=============================================================================
|
||||
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_PUSH_FRONT_10022005_1720)
|
||||
#define FUSION_PUSH_FRONT_10022005_1720
|
||||
|
||||
#include <boost/mpl/push_front.hpp>
|
||||
#include <boost/fusion/support/tag_of.hpp>
|
||||
#include <boost/fusion/algorithm/transformation/push_front.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/mpl/detail/as.hpp>
|
||||
|
||||
namespace boost { namespace mpl
|
||||
{
|
||||
template <typename Tag>
|
||||
struct push_front_impl;
|
||||
|
||||
template <>
|
||||
struct push_front_impl<fusion::fusion_sequence_tag>
|
||||
{
|
||||
template <typename Sequence, typename T>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
fusion::result_of::push_front<Sequence, T>::type
|
||||
result;
|
||||
|
||||
typedef typename
|
||||
fusion::detail::as<typename fusion::detail::tag_of<Sequence>::type, result>::type
|
||||
type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
27
include/boost/fusion/sequence/intrinsic/mpl/size.hpp
Normal file
27
include/boost/fusion/sequence/intrinsic/mpl/size.hpp
Normal file
@ -0,0 +1,27 @@
|
||||
/*=============================================================================
|
||||
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_SIZE_10022005_1617)
|
||||
#define FUSION_SIZE_10022005_1617
|
||||
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||
|
||||
namespace boost { namespace mpl
|
||||
{
|
||||
template <typename Tag>
|
||||
struct size_impl;
|
||||
|
||||
template <>
|
||||
struct size_impl<fusion::fusion_sequence_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply : fusion::result_of::size<Sequence> {};
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
46
include/boost/fusion/sequence/intrinsic/size.hpp
Normal file
46
include/boost/fusion/sequence/intrinsic/size.hpp
Normal file
@ -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_SIZE_05052005_0214)
|
||||
#define FUSION_SIZE_05052005_0214
|
||||
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/fusion/support/tag_of.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct fusion_sequence_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct size_impl
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply : Sequence::size {};
|
||||
};
|
||||
}
|
||||
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct size
|
||||
: extension::size_impl<typename detail::tag_of<Sequence>::type>::
|
||||
template apply<Sequence>
|
||||
{};
|
||||
}
|
||||
|
||||
template <typename Sequence>
|
||||
inline typename result_of::size<Sequence>::type
|
||||
size(Sequence const&)
|
||||
{
|
||||
static typename result_of::size<Sequence>::type result;
|
||||
return result;
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
42
include/boost/fusion/sequence/intrinsic/value_at.hpp
Normal file
42
include/boost/fusion/sequence/intrinsic/value_at.hpp
Normal file
@ -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_VALUE_AT_05052005_0229)
|
||||
#define FUSION_VALUE_AT_05052005_0229
|
||||
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/fusion/support/tag_of.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct value_at_impl
|
||||
{
|
||||
template <typename Sequence, typename N>
|
||||
struct apply;
|
||||
};
|
||||
}
|
||||
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence, typename N>
|
||||
struct value_at
|
||||
: extension::value_at_impl<typename detail::tag_of<Sequence>::type>::
|
||||
template apply<Sequence, N>
|
||||
{};
|
||||
|
||||
template <typename Sequence, int N>
|
||||
struct value_at_c
|
||||
: fusion::result_of::value_at<Sequence, mpl::int_<N> >
|
||||
{};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
38
include/boost/fusion/sequence/intrinsic/value_at_key.hpp
Normal file
38
include/boost/fusion/sequence/intrinsic/value_at_key.hpp
Normal file
@ -0,0 +1,38 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 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_VALUE_AT_KEY_05052005_0229)
|
||||
#define FUSION_VALUE_AT_KEY_05052005_0229
|
||||
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/fusion/support/tag_of.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct value_at_key_impl
|
||||
{
|
||||
template <typename Sequence, typename N>
|
||||
struct apply;
|
||||
};
|
||||
}
|
||||
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence, typename N>
|
||||
struct value_at_key
|
||||
: extension::value_at_key_impl<typename detail::tag_of<Sequence>::type>::
|
||||
template apply<Sequence, N>
|
||||
{};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user