summaryrefslogtreecommitdiffstats
path: root/libcxx/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-07-16 16:17:34 +0000
committerHoward Hinnant <hhinnant@apple.com>2012-07-16 16:17:34 +0000
commit403845ba75f6b1663013cfac10766e2ef3cd27c3 (patch)
tree2f8e512a7041628f509ab67cd14276780d71729b /libcxx/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con
parent874dae6119916f372fac0298b7167a56cd658ce9 (diff)
downloadbcm5719-llvm-403845ba75f6b1663013cfac10766e2ef3cd27c3.tar.gz
bcm5719-llvm-403845ba75f6b1663013cfac10766e2ef3cd27c3.zip
Relax the complete-type checks that are happening under __invokable<Fp, Args...> to only check Fp, and not Args... . This should be sufficient to give the desired high quality diagnostics under both bind and function. And this allows a test reported by Rich E on cfe-dev to pass. Tracked by <rdar://problem/11880602>.
llvm-svn: 160285
Diffstat (limited to 'libcxx/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con')
-rw-r--r--libcxx/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/libcxx/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp b/libcxx/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp
new file mode 100644
index 00000000000..4659556897f
--- /dev/null
+++ b/libcxx/test/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp
@@ -0,0 +1,29 @@
+//===----------------------------------------------------------------------===//
+//
+// 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>
+
+// class function<R(ArgTypes...)>
+
+// template<class F> function(F);
+
+// Allow incomplete argument types in the __is_callable check
+
+#include <functional>
+
+struct X{
+ typedef std::function<void(X&)> callback_type;
+ virtual ~X() {}
+private:
+ callback_type _cb;
+};
+
+int main()
+{
+}
OpenPOWER on IntegriCloud