Add missed test in r276090.
authorEric Fiselier <eric@efcs.ca>
Wed, 20 Jul 2016 05:22:35 +0000 (05:22 +0000)
committerEric Fiselier <eric@efcs.ca>
Wed, 20 Jul 2016 05:22:35 +0000 (05:22 +0000)
llvm-svn: 276091

libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp [new file with mode: 0644]

diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp
new file mode 100644 (file)
index 0000000..3370a2f
--- /dev/null
@@ -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.
+//
+//===----------------------------------------------------------------------===//
+
+// <functional>
+
+// See https://llvm.org/bugs/show_bug.cgi?id=20002
+
+#include <functional>
+#include <type_traits>
+
+using Fn = std::function<void()>;
+struct S : Fn { using function::function; };
+
+int main() {
+    S f1( Fn{} );
+    S f2(std::allocator_arg, std::allocator<void>{}, Fn{});
+}
\ No newline at end of file