Unqualified calls to make_move_iterator in the vector::insert overload
for input iterators lead to ADL issues: https://gcc.godbolt.org/z/bmcNbh
Patch by Logan Smith.
Differential Revision: https://reviews.llvm.org/D74290
#endif // _LIBCPP_NO_EXCEPTIONS
}
__p = _VSTD::rotate(__p, __old_last, this->__end_);
- insert(__make_iter(__p), make_move_iterator(__v.begin()),
- make_move_iterator(__v.end()));
+ insert(__make_iter(__p), _VSTD::make_move_iterator(__v.begin()),
+ _VSTD::make_move_iterator(__v.end()));
return begin() + __off;
}
#include "min_allocator.h"
#include "asan_testing.h"
+namespace adl {
+struct S {};
+void make_move_iterator(S*) {}
+}
+
int main(int, char**)
{
{
}
#endif
+ {
+ std::vector<adl::S> s;
+ s.insert(s.end(), input_iterator<adl::S*>(), input_iterator<adl::S*>());
+ }
+
return 0;
}