diff --git a/libcxx/include/__iterator/advance.h b/libcxx/include/__iterator/advance.h --- a/libcxx/include/__iterator/advance.h +++ b/libcxx/include/__iterator/advance.h @@ -16,11 +16,11 @@ #include <__iterator/concepts.h> #include <__iterator/incrementable_traits.h> #include <__iterator/iterator_traits.h> +#include <__utility/move.h> #include #include #include #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header @@ -129,7 +129,7 @@ constexpr void operator()(_Ip& __i, _Sp __bound) const { // If `I` and `S` model `assignable_from`, equivalent to `i = std::move(bound)`. if constexpr (assignable_from<_Ip&, _Sp>) { - __i = std::move(__bound); + __i = _VSTD::move(__bound); } // Otherwise, if `S` and `I` model `sized_sentinel_for`, equivalent to `ranges::advance(i, bound - i)`. else if constexpr (sized_sentinel_for<_Sp, _Ip>) { diff --git a/libcxx/include/module.modulemap b/libcxx/include/module.modulemap --- a/libcxx/include/module.modulemap +++ b/libcxx/include/module.modulemap @@ -478,7 +478,10 @@ module __iterator { module access { private header "__iterator/access.h" } - module advance { private header "__iterator/advance.h" } + module advance { + private header "__iterator/advance.h" + export __function_like + } module back_insert_iterator { private header "__iterator/back_insert_iterator.h" } module common_iterator { private header "__iterator/common_iterator.h" } module concepts { private header "__iterator/concepts.h" } @@ -497,10 +500,16 @@ module iterator { private header "__iterator/iterator.h" } module iterator_traits { private header "__iterator/iterator_traits.h" } module move_iterator { private header "__iterator/move_iterator.h" } - module next { private header "__iterator/next.h" } + module next { + private header "__iterator/next.h" + export __function_like + } module ostream_iterator { private header "__iterator/ostream_iterator.h" } module ostreambuf_iterator { private header "__iterator/ostreambuf_iterator.h" } - module prev { private header "__iterator/prev.h" } + module prev { + private header "__iterator/prev.h" + export __function_like + } module projected { private header "__iterator/projected.h" } module readable_traits { private header "__iterator/readable_traits.h" } module reverse_access { private header "__iterator/reverse_access.h" } diff --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/special_function.compile.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/special_function.compile.pass.cpp --- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/special_function.compile.pass.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/special_function.compile.pass.cpp @@ -10,12 +10,6 @@ // UNSUPPORTED: libcpp-no-concepts // UNSUPPORTED: gcc-10 -// Clang has a bug when modules are enabled that causes `__function_like::operator&` -// not to be picked up by the derived class. -// XFAIL: clang-11 && modules-build -// XFAIL: clang-12 && modules-build -// XFAIL: clang-13 && modules-build - // ranges::advance #include diff --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/special_function.compile.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/special_function.compile.pass.cpp --- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/special_function.compile.pass.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/special_function.compile.pass.cpp @@ -10,12 +10,6 @@ // UNSUPPORTED: libcpp-no-concepts // UNSUPPORTED: gcc-10 -// Clang has a bug when modules are enabled that causes `__function_like::operator&` -// not to be picked up by the derived class. -// XFAIL: clang-11 && modules-build -// XFAIL: clang-12 && modules-build -// XFAIL: clang-13 && modules-build - // ranges::next #include diff --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/special_function.compile.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/special_function.compile.pass.cpp --- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/special_function.compile.pass.cpp +++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/special_function.compile.pass.cpp @@ -10,12 +10,6 @@ // UNSUPPORTED: libcpp-no-concepts // UNSUPPORTED: gcc-10 -// Clang has a bug when modules are enabled that causes `__function_like::operator&` -// not to be picked up by the derived class. -// XFAIL: clang-11 && modules-build -// XFAIL: clang-12 && modules-build -// XFAIL: clang-13 && modules-build - // ranges::prev #include