[libcxx-commits] [PATCH] D116293: [libc++] [test] Remove IFNDR uses of std::invocable.
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jan 4 11:14:23 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5a3c27636569: [libc++] [test] Remove IFNDR uses of std::invocable. (authored by arthur.j.odwyer).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116293/new/
https://reviews.llvm.org/D116293
Files:
libcxx/test/std/concepts/concepts.callable/concept.invocable/invocable.compile.pass.cpp
libcxx/test/std/concepts/concepts.callable/concept.regularinvocable/regular_invocable.compile.pass.cpp
libcxx/test/std/ranges/range.access/data.pass.cpp
Index: libcxx/test/std/ranges/range.access/data.pass.cpp
===================================================================
--- libcxx/test/std/ranges/range.access/data.pass.cpp
+++ libcxx/test/std/ranges/range.access/data.pass.cpp
@@ -25,8 +25,8 @@
struct Incomplete;
static_assert(!std::is_invocable_v<RangeDataT, Incomplete[]>);
-static_assert(!std::is_invocable_v<RangeDataT, Incomplete[2]>);
-static_assert(!std::is_invocable_v<RangeDataT, Incomplete[2][2]>);
+static_assert(!std::is_invocable_v<RangeDataT, Incomplete(&&)[2]>);
+static_assert(!std::is_invocable_v<RangeDataT, Incomplete(&&)[2][2]>);
static_assert(!std::is_invocable_v<RangeDataT, int [1]>);
static_assert(!std::is_invocable_v<RangeDataT, int (&&)[1]>);
static_assert( std::is_invocable_v<RangeDataT, int (&)[1]>);
Index: libcxx/test/std/concepts/concepts.callable/concept.regularinvocable/regular_invocable.compile.pass.cpp
===================================================================
--- libcxx/test/std/concepts/concepts.callable/concept.regularinvocable/regular_invocable.compile.pass.cpp
+++ libcxx/test/std/concepts/concepts.callable/concept.regularinvocable/regular_invocable.compile.pass.cpp
@@ -263,11 +263,10 @@
} // namespace function_objects
namespace pointer_to_member_functions {
-// clang-format off
template<class Member, class T, class... Args>
constexpr bool check_member_is_invocable()
{
- constexpr bool result = std::regular_invocable<Member, T, Args...>;
+ constexpr bool result = std::regular_invocable<Member, T&&, Args...>;
using uncv_t = std::remove_cvref_t<T>;
static_assert(std::regular_invocable<Member, uncv_t*, Args...> == result);
static_assert(std::regular_invocable<Member, std::unique_ptr<uncv_t>, Args...> == result);
@@ -280,7 +279,6 @@
static_assert(!std::regular_invocable<Member, S2*, Args...>);
return result;
}
-// clang-format on
static_assert(check_member_is_invocable<int S::*, S>());
static_assert(std::regular_invocable<int S::*, S&>);
Index: libcxx/test/std/concepts/concepts.callable/concept.invocable/invocable.compile.pass.cpp
===================================================================
--- libcxx/test/std/concepts/concepts.callable/concept.invocable/invocable.compile.pass.cpp
+++ libcxx/test/std/concepts/concepts.callable/concept.invocable/invocable.compile.pass.cpp
@@ -237,11 +237,10 @@
} // namespace function_objects
namespace pointer_to_member_functions {
-// clang-format off
template<class Member, class T, class... Args>
constexpr bool check_member_is_invocable()
{
- constexpr bool result = std::invocable<Member, T, Args...>;
+ constexpr bool result = std::invocable<Member, T&&, Args...>;
using uncv_t = std::remove_cvref_t<T>;
static_assert(std::invocable<Member, uncv_t*, Args...> == result);
static_assert(std::invocable<Member, std::unique_ptr<uncv_t>, Args...> == result);
@@ -254,7 +253,6 @@
static_assert(!std::invocable<Member, S2*, Args...>);
return result;
}
-// clang-format on
static_assert(check_member_is_invocable<int S::*, S>());
static_assert(std::invocable<int S::*, S&>);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116293.397350.patch
Type: text/x-patch
Size: 3154 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220104/72986a86/attachment.bin>
More information about the libcxx-commits
mailing list