summaryrefslogtreecommitdiff
path: root/boost/container/detail/transform_iterator.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/container/detail/transform_iterator.hpp')
-rw-r--r--boost/container/detail/transform_iterator.hpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/boost/container/detail/transform_iterator.hpp b/boost/container/detail/transform_iterator.hpp
index 98f5c04d60..c4e746c389 100644
--- a/boost/container/detail/transform_iterator.hpp
+++ b/boost/container/detail/transform_iterator.hpp
@@ -1,6 +1,6 @@
//////////////////////////////////////////////////////////////////////////////
//
-// (C) Copyright Ion Gaztanaga 2005-2012.
+// (C) Copyright Ion Gaztanaga 2005-2013.
// (C) Copyright Gennaro Prota 2003 - 2004.
//
// Distributed under the Boost Software License, Version 1.0.
@@ -14,12 +14,13 @@
#ifndef BOOST_CONTAINER_DETAIL_TRANSFORM_ITERATORS_HPP
#define BOOST_CONTAINER_DETAIL_TRANSFORM_ITERATORS_HPP
-#if (defined _MSC_VER) && (_MSC_VER >= 1200)
+#if defined(_MSC_VER)
# pragma once
#endif
-#include "config_begin.hpp"
+#include <boost/container/detail/config_begin.hpp>
#include <boost/container/detail/workaround.hpp>
+
#include <boost/container/detail/type_traits.hpp>
#include <iterator>
@@ -33,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;
};
@@ -47,10 +48,10 @@ struct operator_arrow_proxy<T&>
: m_value(px)
{}
+ typedef T element_type;
+
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;
};