summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/function.objects/bind/func.bind
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/utilities/function.objects/bind/func.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