From 144a0c1791abad25b74fecafbf14f411a6743777 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Thu, 26 May 2016 09:23:01 +0100 Subject: [PATCH] Remove BOOST_NO_STD_DISTANCE workaround. --- doc/changes.qbk | 1 + include/boost/unordered/detail/equivalent.hpp | 2 +- include/boost/unordered/detail/util.hpp | 15 --------------- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/doc/changes.qbk b/doc/changes.qbk index ecabe158..a884b2bc 100644 --- a/doc/changes.qbk +++ b/doc/changes.qbk @@ -272,5 +272,6 @@ C++11 support has resulted in some breaking changes: [h2 Boost 1.62.0] * Remove use of deprecated `boost::iterator`. +* Remove `BOOST_NO_STD_DISTANCE` workaround. [endsect] diff --git a/include/boost/unordered/detail/equivalent.hpp b/include/boost/unordered/detail/equivalent.hpp index 58478f99..a62a3571 100644 --- a/include/boost/unordered/detail/equivalent.hpp +++ b/include/boost/unordered/detail/equivalent.hpp @@ -482,7 +482,7 @@ namespace boost { namespace unordered { namespace detail { { if(i == j) return; - std::size_t distance = boost::unordered::detail::distance(i, j); + std::size_t distance = std::distance(i, j); if(distance == 1) { node_constructor a(this->node_alloc()); a.construct_with_value2(*i); diff --git a/include/boost/unordered/detail/util.hpp b/include/boost/unordered/detail/util.hpp index 3428ed7a..14dcfd84 100644 --- a/include/boost/unordered/detail/util.hpp +++ b/include/boost/unordered/detail/util.hpp @@ -124,21 +124,6 @@ namespace boost { namespace unordered { namespace detail { //////////////////////////////////////////////////////////////////////////// // insert_size/initial_size -#if !defined(BOOST_NO_STD_DISTANCE) - - using ::std::distance; - -#else - - template - inline std::size_t distance(ForwardIterator i, ForwardIterator j) { - std::size_t x; - std::distance(i, j, x); - return x; - } - -#endif - template inline typename boost::unordered::detail::enable_if_forward::type