Remove BOOST_NO_STD_DISTANCE workaround.

This commit is contained in:
Daniel James
2016-05-26 09:23:01 +01:00
parent cc2b1a1ef1
commit 144a0c1791
3 changed files with 2 additions and 16 deletions

View File

@ -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]

View File

@ -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);

View File

@ -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 <class ForwardIterator>
inline std::size_t distance(ForwardIterator i, ForwardIterator j) {
std::size_t x;
std::distance(i, j, x);
return x;
}
#endif
template <class I>
inline typename
boost::unordered::detail::enable_if_forward<I, std::size_t>::type