From 7ee34209c63120c771290269f3a0845e9f90ac75 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Wed, 20 Jul 2016 05:22:35 +0000 Subject: [PATCH] Add missed test in r276090. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@276091 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../func.wrap.func/derive_from.pass.cpp | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 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 000000000..3370a2fe9 --- /dev/null +++ b/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp @@ -0,0 +1,23 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// + +// See https://llvm.org/bugs/show_bug.cgi?id=20002 + +#include +#include + +using Fn = std::function; +struct S : Fn { using function::function; }; + +int main() { + S f1( Fn{} ); + S f2(std::allocator_arg, std::allocator{}, Fn{}); +} \ No newline at end of file