mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-22 09:02:07 +02:00
Fix the implementation of operator_arrow_result so that it checks the
reference type instead of the category. [SVN r20046]
This commit is contained in:
@ -166,17 +166,14 @@ namespace boost
|
|||||||
// A metafunction that gets the result type for operator->. Also
|
// A metafunction that gets the result type for operator->. Also
|
||||||
// has a static function make() which builds the result from a
|
// has a static function make() which builds the result from a
|
||||||
// Reference
|
// Reference
|
||||||
template <class Value, class Category, class Reference, class Pointer>
|
template <class Value, class Reference, class Pointer>
|
||||||
struct operator_arrow_result
|
struct operator_arrow_result
|
||||||
{
|
{
|
||||||
// CWPro8.3 won't accept "operator_arrow_result::type", and we
|
// CWPro8.3 won't accept "operator_arrow_result::type", and we
|
||||||
// need that type below, so metafunction forwarding would be a
|
// need that type below, so metafunction forwarding would be a
|
||||||
// losing proposition here.
|
// losing proposition here.
|
||||||
typedef typename mpl::if_<
|
typedef typename mpl::if_<
|
||||||
is_tag<
|
is_reference<Reference>
|
||||||
readable_lvalue_iterator_tag
|
|
||||||
, typename access_category_tag<Category,Reference>::type
|
|
||||||
>
|
|
||||||
, Pointer
|
, Pointer
|
||||||
, operator_arrow_proxy<Value>
|
, operator_arrow_proxy<Value>
|
||||||
>::type type;
|
>::type type;
|
||||||
@ -190,16 +187,15 @@ namespace boost
|
|||||||
# if BOOST_WORKAROUND(BOOST_MSVC, <= 1200)
|
# if BOOST_WORKAROUND(BOOST_MSVC, <= 1200)
|
||||||
// Deal with ETI
|
// Deal with ETI
|
||||||
template<>
|
template<>
|
||||||
struct operator_arrow_result<int, int, int, int>
|
struct operator_arrow_result<int, int, int>
|
||||||
{
|
{
|
||||||
typedef int type;
|
typedef int type;
|
||||||
};
|
};
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Facade is actually an iterator. We require Facade here
|
// Iterator is actually an iterator_facade, so we do not have to
|
||||||
// so that we do not have to go through iterator_traits
|
// go through iterator_traits to access the traits.
|
||||||
// to access the traits
|
|
||||||
//
|
//
|
||||||
template <class Iterator>
|
template <class Iterator>
|
||||||
class operator_brackets_proxy
|
class operator_brackets_proxy
|
||||||
@ -422,7 +418,6 @@ namespace boost
|
|||||||
|
|
||||||
typename detail::operator_arrow_result<
|
typename detail::operator_arrow_result<
|
||||||
value_type
|
value_type
|
||||||
, iterator_category
|
|
||||||
, reference
|
, reference
|
||||||
, pointer
|
, pointer
|
||||||
>::type
|
>::type
|
||||||
@ -430,7 +425,6 @@ namespace boost
|
|||||||
{
|
{
|
||||||
return detail::operator_arrow_result<
|
return detail::operator_arrow_result<
|
||||||
value_type
|
value_type
|
||||||
, iterator_category
|
|
||||||
, reference
|
, reference
|
||||||
, pointer
|
, pointer
|
||||||
>::make(*this->derived());
|
>::make(*this->derived());
|
||||||
|
Reference in New Issue
Block a user