prelude to iterator_facade and sequence_facade

[SVN r35316]
This commit is contained in:
Joel de Guzman
2006-09-25 08:37:16 +00:00
parent a37b435ce6
commit 654fd0918e
33 changed files with 160 additions and 128 deletions

View File

@ -15,6 +15,8 @@
namespace boost { namespace fusion
{
// Special tags:
struct sequence_facade_tag;
struct array_tag; // boost::array tag
struct mpl_sequence_tag; // mpl sequence tag
struct std_pair_tag; // std::pair tag
@ -28,6 +30,13 @@ namespace boost { namespace fusion
struct apply;
};
template <>
struct at_impl<sequence_facade_tag>
{
template <typename Sequence, typename N>
struct apply : Sequence::template at<Sequence, N> {};
};
template <>
struct at_impl<array_tag>;

View File

@ -15,6 +15,8 @@
namespace boost { namespace fusion
{
// Special tags:
struct sequence_facade_tag;
struct array_tag; // boost::array tag
struct mpl_sequence_tag; // mpl sequence tag
struct std_pair_tag; // std::pair tag
@ -28,6 +30,13 @@ namespace boost { namespace fusion
struct apply;
};
template <>
struct at_key_impl<sequence_facade_tag>
{
template <typename Sequence, typename Key>
struct apply : Sequence::template at_key<Sequence, Key> {};
};
template <>
struct at_key_impl<array_tag>;

View File

@ -12,7 +12,8 @@
namespace boost { namespace fusion
{
struct fusion_sequence_tag;
// Special tags:
struct sequence_facade_tag; // iterator facade tag
struct array_tag; // boost::array tag
struct mpl_sequence_tag; // mpl sequence tag
struct std_pair_tag; // std::pair tag
@ -26,6 +27,13 @@ namespace boost { namespace fusion
struct apply;
};
template <>
struct begin_impl<sequence_facade_tag>
{
template <typename Sequence>
struct apply : Sequence::template begin<Sequence> {};
};
template <>
struct begin_impl<array_tag>;

View File

@ -14,7 +14,8 @@
namespace boost { namespace fusion
{
struct fusion_sequence_tag;
// Special tags:
struct sequence_facade_tag;
struct mpl_sequence_tag; // mpl sequence tag
namespace extension
@ -28,6 +29,13 @@ namespace boost { namespace fusion
{};
};
template <>
struct empty_impl<sequence_facade_tag>
{
template <typename Sequence>
struct apply : Sequence::template empty<Sequence> {};
};
template <>
struct empty_impl<mpl_sequence_tag>;
}

View File

@ -12,7 +12,8 @@
namespace boost { namespace fusion
{
struct fusion_sequence_tag;
// Special tags:
struct sequence_facade_tag;
struct array_tag; // boost::array tag
struct mpl_sequence_tag; // mpl sequence tag
struct std_pair_tag; // std::pair tag
@ -26,6 +27,13 @@ namespace boost { namespace fusion
struct apply;
};
template <>
struct end_impl<sequence_facade_tag>
{
template <typename Sequence>
struct apply : Sequence::template end<Sequence> {};
};
template <>
struct end_impl<array_tag>;

View File

@ -15,7 +15,9 @@
namespace boost { namespace fusion
{
struct void_;
struct fusion_sequence_tag;
// Special tags:
struct sequence_facade_tag;
struct array_tag; // boost::array tag
struct mpl_sequence_tag; // mpl sequence tag
struct std_pair_tag; // std::pair tag
@ -32,6 +34,13 @@ namespace boost { namespace fusion
{};
};
template <>
struct has_key_impl<sequence_facade_tag>
{
template <typename Sequence, typename Key>
struct apply : Sequence::template has_key<Sequence, Key> {};
};
template <>
struct has_key_impl<array_tag>;

View File

@ -13,7 +13,11 @@
namespace boost { namespace fusion
{
struct fusion_sequence_tag;
// Special tags:
struct sequence_facade_tag;
struct array_tag; // boost::array tag
struct mpl_sequence_tag; // mpl sequence tag
struct std_pair_tag; // std::pair tag
namespace extension
{
@ -24,6 +28,13 @@ namespace boost { namespace fusion
struct apply : Sequence::size {};
};
template <>
struct size_impl<sequence_facade_tag>
{
template <typename Sequence>
struct apply : Sequence::template size<Sequence> {};
};
template <>
struct size_impl<array_tag>;

View File

@ -13,6 +13,8 @@
namespace boost { namespace fusion
{
// Special tags:
struct sequence_facade_tag;
struct array_tag; // boost::array tag
struct mpl_sequence_tag; // mpl sequence tag
struct std_pair_tag; // std::pair tag
@ -26,6 +28,13 @@ namespace boost { namespace fusion
struct apply;
};
template <>
struct value_at_impl<sequence_facade_tag>
{
template <typename Sequence, typename N>
struct apply : Sequence::template value_at<Sequence, N> {};
};
template <>
struct value_at_impl<array_tag>;

View File

@ -14,6 +14,8 @@
namespace boost { namespace fusion
{
// Special tags:
struct sequence_facade_tag;
struct array_tag; // boost::array tag
struct mpl_sequence_tag; // mpl sequence tag
struct std_pair_tag; // std::pair tag
@ -23,10 +25,17 @@ namespace boost { namespace fusion
template <typename Tag>
struct value_at_key_impl
{
template <typename Sequence, typename N>
template <typename Sequence, typename Key>
struct apply;
};
template <>
struct value_at_key_impl<sequence_facade_tag>
{
template <typename Sequence, typename Key>
struct apply : Sequence::template value_at_key<Sequence, Key> {};
};
template <>
struct value_at_key_impl<array_tag>;