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; };