aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcxx/include/__iterator/advance.h3
-rw-r--r--libcxx/include/__iterator/next.h3
-rw-r--r--libcxx/include/__iterator/prev.h3
-rw-r--r--libcxx/test/support/test_standard_function.h2
4 files changed, 10 insertions, 1 deletions
diff --git a/libcxx/include/__iterator/advance.h b/libcxx/include/__iterator/advance.h
index 4971beb..a903e45 100644
--- a/libcxx/include/__iterator/advance.h
+++ b/libcxx/include/__iterator/advance.h
@@ -178,6 +178,9 @@ public:
_LIBCPP_UNREACHABLE();
}
+
+ // TODO: Remove this workaround for broken Clang modules.
+ using __function_like::operator&;
};
inline constexpr auto advance = __advance_fn(__function_like::__tag());
diff --git a/libcxx/include/__iterator/next.h b/libcxx/include/__iterator/next.h
index af719e3..5db5b2f 100644
--- a/libcxx/include/__iterator/next.h
+++ b/libcxx/include/__iterator/next.h
@@ -68,6 +68,9 @@ struct __next_fn final : private __function_like {
ranges::advance(__x, __n, __bound);
return __x;
}
+
+ // TODO: Remove this workaround for broken Clang modules.
+ using __function_like::operator&;
};
inline constexpr auto next = __next_fn(__function_like::__tag());
diff --git a/libcxx/include/__iterator/prev.h b/libcxx/include/__iterator/prev.h
index f1ba2be..1fc2b9c 100644
--- a/libcxx/include/__iterator/prev.h
+++ b/libcxx/include/__iterator/prev.h
@@ -61,6 +61,9 @@ struct __prev_fn final : private __function_like {
ranges::advance(__x, -__n, __bound);
return __x;
}
+
+ // TODO: Remove this workaround for broken Clang modules.
+ using __function_like::operator&;
};
inline constexpr auto prev = __prev_fn(__function_like::__tag());
diff --git a/libcxx/test/support/test_standard_function.h b/libcxx/test/support/test_standard_function.h
index f24d2ac..1e207cf 100644
--- a/libcxx/test/support/test_standard_function.h
+++ b/libcxx/test/support/test_standard_function.h
@@ -17,7 +17,7 @@ constexpr bool is_addressable = requires(T t) {
};
template <class T>
-[[nodiscard]] constexpr bool is_function_like() {
+constexpr bool is_function_like() {
using X = std::remove_cvref_t<T>;
static_assert(!is_addressable<X>);
static_assert(!is_addressable<X const>);