From abf83900200904edcb119dcbfb7807348f2207f5 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sun, 14 Sep 2003 01:53:59 +0000 Subject: [PATCH] Fix the implementation of operator_arrow_result so that it checks the reference type instead of the category. [SVN r20046] --- include/boost/iterator/iterator_facade.hpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/include/boost/iterator/iterator_facade.hpp b/include/boost/iterator/iterator_facade.hpp index 3bdb040..79795ad 100644 --- a/include/boost/iterator/iterator_facade.hpp +++ b/include/boost/iterator/iterator_facade.hpp @@ -166,17 +166,14 @@ namespace boost // A metafunction that gets the result type for operator->. Also // has a static function make() which builds the result from a // Reference - template + template struct operator_arrow_result { // CWPro8.3 won't accept "operator_arrow_result::type", and we // need that type below, so metafunction forwarding would be a // losing proposition here. typedef typename mpl::if_< - is_tag< - readable_lvalue_iterator_tag - , typename access_category_tag::type - > + is_reference , Pointer , operator_arrow_proxy >::type type; @@ -190,16 +187,15 @@ namespace boost # if BOOST_WORKAROUND(BOOST_MSVC, <= 1200) // Deal with ETI template<> - struct operator_arrow_result + struct operator_arrow_result { typedef int type; }; # endif // - // Facade is actually an iterator. We require Facade here - // so that we do not have to go through iterator_traits - // to access the traits + // Iterator is actually an iterator_facade, so we do not have to + // go through iterator_traits to access the traits. // template class operator_brackets_proxy @@ -422,7 +418,6 @@ namespace boost typename detail::operator_arrow_result< value_type - , iterator_category , reference , pointer >::type @@ -430,7 +425,6 @@ namespace boost { return detail::operator_arrow_result< value_type - , iterator_category , reference , pointer >::make(*this->derived());