From e83960d3e9fade196712f68c38c20e94d3c9000e Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 13 May 2013 23:01:05 +0000 Subject: [PATCH] allow map keys to be forward declared only [SVN r84275] --- include/boost/fusion/container/map/detail/map_impl.hpp | 4 ++-- include/boost/fusion/container/map/map_iterator.hpp | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/boost/fusion/container/map/detail/map_impl.hpp b/include/boost/fusion/container/map/detail/map_impl.hpp index cea25496..70491aa5 100644 --- a/include/boost/fusion/container/map/detail/map_impl.hpp +++ b/include/boost/fusion/container/map/detail/map_impl.hpp @@ -113,8 +113,8 @@ namespace boost { namespace fusion { namespace detail value_type get_val(mpl::identity) const; pair_type get_val(mpl::int_) const; - key_type get_key(mpl::int_); - key_type get_key(mpl::int_) const; + mpl::identity get_key(mpl::int_); + mpl::identity get_key(mpl::int_) const; typename cref_result::type get(mpl::identity) const diff --git a/include/boost/fusion/container/map/map_iterator.hpp b/include/boost/fusion/container/map/map_iterator.hpp index a4ad80f0..d6c1b106 100644 --- a/include/boost/fusion/container/map/map_iterator.hpp +++ b/include/boost/fusion/container/map/map_iterator.hpp @@ -54,9 +54,8 @@ namespace boost { namespace fusion { typedef typename Iterator::sequence sequence; typedef typename Iterator::index index; - typedef - decltype(std::declval().get_key(index())) - type; + typedef decltype(std::declval().get_key(index())) key_identity_type; + typedef typename key_identity_type::type type; }; template