forked from boostorg/fusion
support for boost::tuples
[SVN r35350]
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
// Special tags:
|
||||
struct boost_tuple_tag; // boost::tuples::tuple tag
|
||||
struct array_tag; // boost::array tag
|
||||
struct mpl_sequence_tag; // mpl sequence tag
|
||||
struct std_pair_tag; // std::pair tag
|
||||
@@ -44,6 +45,9 @@ namespace boost { namespace fusion
|
||||
struct apply : detail::fusion_category_of<T> {};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct category_of_impl<boost_tuple_tag>;
|
||||
|
||||
template <>
|
||||
struct category_of_impl<array_tag>;
|
||||
|
||||
|
@@ -19,6 +19,7 @@ namespace boost { namespace fusion
|
||||
{
|
||||
// Special tags:
|
||||
struct non_fusion_tag;
|
||||
struct boost_tuple_tag; // boost::tuples::tuple tag
|
||||
struct array_tag; // boost::array tag
|
||||
struct mpl_sequence_tag; // mpl sequence tag
|
||||
struct std_pair_tag; // std::pair tag
|
||||
@@ -39,6 +40,9 @@ namespace boost { namespace fusion
|
||||
struct apply : mpl::false_ {};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct is_sequence_impl<boost_tuple_tag>;
|
||||
|
||||
template <>
|
||||
struct is_sequence_impl<array_tag>;
|
||||
|
||||
|
@@ -15,6 +15,7 @@ namespace boost { namespace fusion
|
||||
{
|
||||
// Special tags:
|
||||
struct sequence_facade_tag;
|
||||
struct boost_tuple_tag; // boost::tuples::tuple tag
|
||||
struct array_tag; // boost::array tag
|
||||
struct mpl_sequence_tag; // mpl sequence tag
|
||||
struct std_pair_tag; // std::pair tag
|
||||
@@ -37,6 +38,9 @@ namespace boost { namespace fusion
|
||||
struct apply : Sequence::is_view {};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct is_view_impl<boost_tuple_tag>;
|
||||
|
||||
template <>
|
||||
struct is_view_impl<array_tag>;
|
||||
|
||||
|
@@ -20,6 +20,20 @@ namespace boost
|
||||
{
|
||||
template <typename T, std::size_t N>
|
||||
class array; // forward
|
||||
|
||||
namespace tuples
|
||||
{
|
||||
struct null_type;
|
||||
|
||||
template <
|
||||
class T0, class T1, class T2, class T3, class T4,
|
||||
class T5, class T6, class T7, class T8, class T9
|
||||
>
|
||||
class tuple;
|
||||
|
||||
template <class Head, class Tail>
|
||||
struct cons;
|
||||
}
|
||||
}
|
||||
|
||||
namespace boost { namespace fusion
|
||||
@@ -45,6 +59,18 @@ namespace boost { namespace fusion
|
||||
typedef typename Sequence::fusion_tag type;
|
||||
};
|
||||
|
||||
template <
|
||||
class T0, class T1, class T2, class T3, class T4,
|
||||
class T5, class T6, class T7, class T8, class T9
|
||||
>
|
||||
struct tag_of<tuples::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >;
|
||||
|
||||
template <class Head, class Tail>
|
||||
struct tag_of<tuples::cons<Head, Tail> >;
|
||||
|
||||
template <>
|
||||
struct tag_of<tuples::null_type>;
|
||||
|
||||
template <typename T, std::size_t N>
|
||||
struct tag_of<boost::array<T, N> >;
|
||||
|
||||
|
Reference in New Issue
Block a user