From 53a420fba21cf1644972b34dcd811a43cdb8368d Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 2 Jan 2017 19:18:58 +0000 Subject: Vendor import of libc++ trunk r290819: https://llvm.org/svn/llvm-project/libcxx/trunk@290819 --- .../func.wrap.func/func.wrap.func.con/F.pass.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F.pass.cpp') diff --git a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F.pass.cpp b/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F.pass.cpp index 82a6f6c5215e..fd296a7367b8 100644 --- a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F.pass.cpp +++ b/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F.pass.cpp @@ -16,6 +16,7 @@ #include #include +#include "test_macros.h" #include "count_new.hpp" class A @@ -49,6 +50,17 @@ int A::count = 0; int g(int) {return 0;} +#if TEST_STD_VER >= 11 +struct RValueCallable { + template + void operator()(Args&&...) && {} +}; +struct LValueCallable { + template + void operator()(Args&&...) & {} +}; +#endif + int main() { assert(globalMemCounter.checkOutstandingNewEq(0)); @@ -91,4 +103,13 @@ int main() std::function f(static_cast(0)); assert(!f); } +#if TEST_STD_VER >= 11 + { + using Fn = std::function; + static_assert(std::is_constructible::value, ""); + static_assert(std::is_constructible::value, ""); + static_assert(!std::is_constructible::value, ""); + static_assert(!std::is_constructible::value, ""); + } +#endif } -- cgit v1.2.3