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.wrap.func/derive_from.pass.cpp | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp (limited to 'test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp') diff --git a/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp b/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp new file mode 100644 index 0000000000000..5bdf9e98e897a --- /dev/null +++ b/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp @@ -0,0 +1,29 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03 +// REQUIRES-ANY: c++11, c++14 + +// + +// See https://llvm.org/bugs/show_bug.cgi?id=20002 + +#include +#include + +#include "test_macros.h" + +using Fn = std::function; +struct S : public std::function { using function::function; }; + +int main() { + S s( [](){} ); + S f1( s ); + S f2(std::allocator_arg, std::allocator{}, s); +} -- cgit v1.2.3