boostorg / range

Boost.org range module
http://boost.org/libs/range
42 stars 101 forks source link

Add ADL guard namespace for boost::distance(rng) #75

Closed morinmorin closed 6 years ago

morinmorin commented 6 years ago

Move distance function template into the ADL barrier namespace and pull the name by a using-directive. This fix should be OK, since Boost.Range documentation explicitly forbids unqualified call to distance.

morinmorin commented 6 years ago

Testing on Travis CI fails, because

Oh, cyclic dependencies of PR's...

Lastique commented 6 years ago

The change to Boost.Iterator is reapplied now.

morinmorin commented 6 years ago

The change to Boost.Iterator is reapplied now.

Thanks! I just reran the Travis testing of this PR (by force-pushing).

pdimov commented 6 years ago

I had already re-run it. It passed except for the last job, which fails because libc++ wants random engines to have constexpr min/max, and the one in random_shuffle.cpp appears not to.

pdimov commented 6 years ago

OK, I'm going to merge this and see how it goes.

pdimov commented 6 years ago

Would be nice if we could fix the (unrelated) Travis failure though.

morinmorin commented 6 years ago

Thanks for merging.

Would be nice if we could fix the (unrelated) Travis failure though.

Definitely! (though I don't have any insight into how to fix that...)