[libcxx-commits] [PATCH] D99306: [libcxx] updates regular_invocable test to actually test regular_invocable
Christopher Di Bella via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Mar 24 23:34:46 PDT 2021
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3f143a10cc4f: [libcxx] updates regular_invocable test to actually test regular_invocable (authored by cjdb).
Changed prior to commit:
https://reviews.llvm.org/D99306?vs=333167&id=333217#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99306/new/
https://reviews.llvm.org/D99306
Files:
libcxx/test/std/concepts/callable/invocable.compile.pass.cpp
libcxx/test/std/concepts/callable/regularinvocable.compile.pass.cpp
Index: libcxx/test/std/concepts/callable/regularinvocable.compile.pass.cpp
===================================================================
--- libcxx/test/std/concepts/callable/regularinvocable.compile.pass.cpp
+++ libcxx/test/std/concepts/callable/regularinvocable.compile.pass.cpp
@@ -19,19 +19,21 @@
#include "functions.h"
+// clang-format off
template <class F, class... Args>
-requires std::invocable<F, Args...> constexpr void
-ModelsRegularInvocable(F, Args&&...) noexcept{};
+requires std::regular_invocable<F, Args...>
+constexpr void ModelsRegularInvocable(F, Args&&...) noexcept {}
template <class F, class... Args>
-requires(!std::invocable<F, Args...>) constexpr
- void NotRegularInvocable(F, Args&&...) noexcept {}
+requires (!std::regular_invocable<F, Args...>)
+constexpr void NotRegularInvocable(F, Args&&...) noexcept {}
+// clang-format on
-static_assert(!std::invocable<void>);
-static_assert(!std::invocable<void*>);
-static_assert(!std::invocable<int>);
-static_assert(!std::invocable<int&>);
-static_assert(!std::invocable<int&&>);
+static_assert(!std::regular_invocable<void>);
+static_assert(!std::regular_invocable<void*>);
+static_assert(!std::regular_invocable<int>);
+static_assert(!std::regular_invocable<int&>);
+static_assert(!std::regular_invocable<int&&>);
int main(int, char**) {
{
Index: libcxx/test/std/concepts/callable/invocable.compile.pass.cpp
===================================================================
--- libcxx/test/std/concepts/callable/invocable.compile.pass.cpp
+++ libcxx/test/std/concepts/callable/invocable.compile.pass.cpp
@@ -20,13 +20,15 @@
#include "functions.h"
+// clang-format off
template <class F, class... Args>
-requires std::invocable<F, Args...> constexpr void
-ModelsInvocable(F, Args&&...) noexcept{};
+requires std::invocable<F, Args...>
+constexpr void ModelsInvocable(F, Args&&...) noexcept{}
template <class F, class... Args>
-requires(!std::invocable<F, Args...>) constexpr
- void NotInvocable(F, Args&&...) noexcept {}
+requires(!std::invocable<F, Args...>)
+constexpr void NotInvocable(F, Args&&...) noexcept {}
+// clang-format on
static_assert(!std::invocable<void>);
static_assert(!std::invocable<void*>);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99306.333217.patch
Type: text/x-patch
Size: 2230 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210325/0de81536/attachment.bin>
More information about the libcxx-commits
mailing list