Closed dvd0101 closed 5 years ago
I've reduced the code snippet even further to:
#include <boost/iterator/advance.hpp>
#include <vector>
namespace boost {
class test {};
}
void f(std::vector<boost::test>& c) {
using std::advance;
auto it = c.begin();
advance(it, 1);
}
I've opened a new issue to boost::iterator (https://github.com/boostorg/iterator/issues/45) since boost::range is not involved.
This code
fails to compile with boost 1.68 on both GCC and Clang with the same error, the call to advance is ambiguos:
I've reduced the code even further:
even this code fails to compile.
This snippet is live on godbolt: https://godbolt.org/z/fAlTh8
Interesting the error appears for the first time on boost 1.65; thanks to godbolt it's possible to quickly verify (use the "Libraries" combobox on the right pane) that with boost 1.64 the code compiles fine.