From bf5c140180dca78664c190edecd5aab07cb1a73e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Thu, 12 Jun 2014 10:01:38 +0200 Subject: [PATCH] Added missing "element_type" to the pseudo-pointer operator_arrow_proxy to be compatible with pointer_traits --- .../boost/container/detail/transform_iterator.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/boost/container/detail/transform_iterator.hpp b/include/boost/container/detail/transform_iterator.hpp index f10f3fe..c4e746c 100644 --- a/include/boost/container/detail/transform_iterator.hpp +++ b/include/boost/container/detail/transform_iterator.hpp @@ -34,10 +34,10 @@ struct operator_arrow_proxy : m_value(px) {} + typedef PseudoReference element_type; + PseudoReference* operator->() const { return &m_value; } - // This function is needed for MWCW and BCC, which won't call operator-> - // again automatically per 13.3.1.2 para 8 -// operator T*() const { return &m_value; } + mutable PseudoReference m_value; }; @@ -48,10 +48,10 @@ struct operator_arrow_proxy : m_value(px) {} + typedef T element_type; + T* operator->() const { return const_cast(&m_value); } - // This function is needed for MWCW and BCC, which won't call operator-> - // again automatically per 13.3.1.2 para 8 -// operator T*() const { return &m_value; } + T &m_value; };