Made map random access. Thanks to Brandon Kohn!

[SVN r74881]
This commit is contained in:
Joel de Guzman
2011-10-10 09:55:41 +00:00
parent 4be9e08af7
commit b6df98e86c
8 changed files with 99 additions and 6 deletions

View File

@ -11,6 +11,8 @@
#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/at_impl.hpp>
#include <boost/fusion/container/map/detail/value_at_impl.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/value_of_impl.hpp>
@ -50,7 +52,7 @@ namespace boost { namespace fusion
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_tag {};
struct category : random_access_traversal_tag, associative_tag {};
typedef map_tag fusion_tag;
typedef fusion_sequence_tag tag; // this gets picked up by MPL