From 46a136479d3b48268a8cd4faab0647f0a4fc9c1b Mon Sep 17 00:00:00 2001 From: Tobias Reh Date: Thu, 5 Jan 2017 14:50:17 +0100 Subject: [PATCH] Conform to std::pointer_traits requirements offset_ptr::rebind must be offset_ptr directly to avoid breaking older pointer_traits implementations (like in Visual Studio 2015), 'other' is added as typedef so offset_ptr::rebind::other still works --- include/boost/interprocess/offset_ptr.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/boost/interprocess/offset_ptr.hpp b/include/boost/interprocess/offset_ptr.hpp index fca444ea..1b57bb4f 100644 --- a/include/boost/interprocess/offset_ptr.hpp +++ b/include/boost/interprocess/offset_ptr.hpp @@ -444,9 +444,17 @@ class offset_ptr //!Compatibility with pointer_traits //! + #if defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) template struct rebind { typedef offset_ptr other; }; + #else + template + using rebind = offset_ptr; + #ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED + typedef offset_ptr other; + #endif //BOOST_INTERPROCESS_DOXYGEN_INVOKED + #endif //!Compatibility with pointer_traits //!