Added missing "element_type" to the pseudo-pointer operator_arrow_proxy to be compatible with pointer_traits

This commit is contained in:
Ion Gaztañaga
2014-06-12 10:01:38 +02:00
parent 9ec026937b
commit bf5c140180

View File

@@ -34,10 +34,10 @@ struct operator_arrow_proxy
: m_value(px) : m_value(px)
{} {}
typedef PseudoReference element_type;
PseudoReference* operator->() const { return &m_value; } 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; mutable PseudoReference m_value;
}; };
@@ -48,10 +48,10 @@ struct operator_arrow_proxy<T&>
: m_value(px) : m_value(px)
{} {}
typedef T element_type;
T* operator->() const { return const_cast<T*>(&m_value); } T* operator->() const { return const_cast<T*>(&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; T &m_value;
}; };