summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/function.objects
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/utilities/function.objects')
-rw-r--r--libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp23
1 files changed, 23 insertions, 0 deletions
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
index 00000000000..3370a2fe9d6
--- /dev/null
+++ b/libcxx/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.
+//
+//===----------------------------------------------------------------------===//
+
+// <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
OpenPOWER on IntegriCloud