summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/function.objects
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-07-20 05:22:35 +0000
committerEric Fiselier <eric@efcs.ca>2016-07-20 05:22:35 +0000
commitd5b53598026c315234c4b81909d5d88d42fc01d6 (patch)
tree88f201d0e8056f2bbd2c76e7301a689cad4c22b6 /libcxx/test/std/utilities/function.objects
parentfd32ab923e15f9d14dc5d4d601831a9a20fb9823 (diff)
downloadbcm5719-llvm-d5b53598026c315234c4b81909d5d88d42fc01d6.tar.gz
bcm5719-llvm-d5b53598026c315234c4b81909d5d88d42fc01d6.zip
Add missed test in r276090.
llvm-svn: 276091
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