summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/function.objects/bind
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2015-02-05 20:28:37 +0000
committerEric Fiselier <eric@efcs.ca>2015-02-05 20:28:37 +0000
commitc281a7a19fbbf229334f595e879e0fed42613264 (patch)
treed4eaeac1d793795b29d0578203c694b19b7b04b1 /libcxx/test/std/utilities/function.objects/bind
parentd40bb5353dd91dd3b6c886495b20dd08bf3fe7d2 (diff)
downloadbcm5719-llvm-c281a7a19fbbf229334f595e879e0fed42613264.tar.gz
bcm5719-llvm-c281a7a19fbbf229334f595e879e0fed42613264.zip
Get tests running with warnings. Fix warnings in headers and tests
llvm-svn: 228344
Diffstat (limited to 'libcxx/test/std/utilities/function.objects/bind')
-rw-r--r--libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue.pass.cpp1
-rw-r--r--libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp7
2 files changed, 8 insertions, 0 deletions
diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue.pass.cpp
index 1125844a1f3..af5efe464d5 100644
--- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/invoke_lvalue.pass.cpp
@@ -276,6 +276,7 @@ test3()
const auto f = bind(&TFENode::foo, _1, 0UL);
const TFENode n = TFENode{};
bool b = f(n);
+ assert(b);
}
int main()
diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp
index fa791d46ff5..246186040c5 100644
--- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.place/placeholders.pass.cpp
@@ -12,13 +12,20 @@
// placeholders
#include <functional>
+#include <type_traits>
template <class T>
void
test(const T& t)
{
+ // Test default constructible.
T t2;
+ ((void)t2);
+ // Test copy constructible.
T t3 = t;
+ ((void)t3);
+ static_assert(std::is_nothrow_copy_constructible<T>::value, "");
+ static_assert(std::is_nothrow_move_constructible<T>::value, "");
}
int main()
OpenPOWER on IntegriCloud