diff --git a/include/boost/container/stable_vector.hpp b/include/boost/container/stable_vector.hpp index 4449b1f..92ef0f6 100644 --- a/include/boost/container/stable_vector.hpp +++ b/include/boost/container/stable_vector.hpp @@ -297,12 +297,7 @@ class stable_vector_iterator >::type pointer; typedef boost::intrusive::pointer_traits ptr_traits; typedef typename ptr_traits::reference reference; - class nat; - typedef typename dtl::if_c< IsConst - , stable_vector_iterator - , nat>::type nonconst_iterator; - private: typedef typename non_const_ptr_traits::template rebind_pointer::type void_ptr; typedef stable_vector_detail::node node_type; @@ -316,6 +311,16 @@ class stable_vector_iterator typedef typename non_const_ptr_traits::template rebind_pointer::type node_base_ptr_ptr; + class nat + { + public: + node_base_ptr node_pointer() const + { return node_base_ptr(); } + }; + typedef typename dtl::if_c< IsConst + , stable_vector_iterator + , nat>::type nonconst_iterator; + node_base_ptr m_pn; public: diff --git a/include/boost/container/vector.hpp b/include/boost/container/vector.hpp index 214f560..010b599 100644 --- a/include/boost/container/vector.hpp +++ b/include/boost/container/vector.hpp @@ -96,7 +96,13 @@ class vec_iterator #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED private: Pointer m_ptr; - class nat; + + class nat + { + public: + Pointer get_ptr() const + { return Pointer(); } + }; typedef typename dtl::if_c< IsConst , vec_iterator , nat>::type nonconst_iterator;