aboutsummaryrefslogtreecommitdiff
path: root/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.fail.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.fail.cpp')
-rw-r--r--test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.fail.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.fail.cpp b/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.fail.cpp
new file mode 100644
index 000000000000..2d232193607b
--- /dev/null
+++ b/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.fail.cpp
@@ -0,0 +1,28 @@
+//===----------------------------------------------------------------------===//
+//
+// 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>
+
+// template <CopyConstructible Arg, Returnable Result>
+// pointer_to_unary_function<Arg, Result>
+// ptr_fun(Result (*f)(Arg));
+// UNSUPPORTED: c++98, c++03, c++11, c++14
+
+#include <functional>
+#include <type_traits>
+#include <cassert>
+
+#include "test_macros.h"
+
+double unary_f(int i) {return 0.5 - i;}
+
+int main()
+{
+ assert(std::ptr_fun(unary_f)(36) == -35.5);
+}