associative iterators & views

[SVN r57156]
This commit is contained in:
Christopher Schmidt
2009-10-25 22:59:54 +00:00
parent 35e469e2d5
commit 9b26b4a0f7
69 changed files with 1331 additions and 942 deletions

View File

@ -9,6 +9,8 @@
#define BOOST_FUSION_AT_KEY_20060304_1755
#include <boost/type_traits/is_const.hpp>
#include <boost/fusion/algorithm/query/find.hpp>
#include <boost/fusion/iterator/deref_data.hpp>
#include <boost/fusion/support/tag_of.hpp>
#include <boost/fusion/support/detail/access.hpp>
@ -25,15 +27,28 @@ namespace boost { namespace fusion
template <typename Tag>
struct at_key_impl
{
template <typename Sequence, typename Key>
struct apply;
template <typename Seq, typename Key>
struct apply
{
typedef typename
result_of::deref_data<
typename result_of::find<Seq, Key>::type
>::type
type;
static type
call(Seq& seq)
{
return fusion::deref_data(fusion::find<Key>(seq));
}
};
};
template <>
struct at_key_impl<sequence_facade_tag>
{
template <typename Sequence, typename Key>
struct apply : Sequence::template at_key<Sequence, Key> {};
struct apply : Sequence::template at_key_impl<Sequence, Key> {};
};
template <>