summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/any/any.class/any.cons/value.pass.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-10-16 02:51:50 +0000
committerEric Fiselier <eric@efcs.ca>2016-10-16 02:51:50 +0000
commit50253ed1c67b75c71c8ec2d24ed915c032b11822 (patch)
tree95aa7eb8def3b368a026bf4ff96322688bad8582 /libcxx/test/std/utilities/any/any.class/any.cons/value.pass.cpp
parent9c737fddba93bce4127dbed4fa2a4440414c1afb (diff)
downloadbcm5719-llvm-50253ed1c67b75c71c8ec2d24ed915c032b11822.tar.gz
bcm5719-llvm-50253ed1c67b75c71c8ec2d24ed915c032b11822.zip
Update issue status for LWG 2744
llvm-svn: 284322
Diffstat (limited to 'libcxx/test/std/utilities/any/any.class/any.cons/value.pass.cpp')
-rw-r--r--libcxx/test/std/utilities/any/any.class/any.cons/value.pass.cpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/libcxx/test/std/utilities/any/any.class/any.cons/value.pass.cpp b/libcxx/test/std/utilities/any/any.class/any.cons/value.pass.cpp
index e39f139dadc..24160dcc1de 100644
--- a/libcxx/test/std/utilities/any/any.class/any.cons/value.pass.cpp
+++ b/libcxx/test/std/utilities/any/any.class/any.cons/value.pass.cpp
@@ -108,17 +108,12 @@ void test_copy_move_value() {
// Test that any(ValueType&&) is *never* selected for a std::in_place type.
void test_sfinae_constraints() {
- using Tag = std::in_place_type_t<int>;
-#if defined(__clang__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wignored-qualifiers"
-#endif
- static_assert(std::is_same<Tag, const Tag>::value, "");
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#endif
+ using BadTag = std::in_place_type_t<int>;
+ using OKTag = std::in_place_t;
+ using OKDecay = std::decay_t<OKTag>;
// Test that the tag type is properly handled in SFINAE
- Tag t = std::in_place;
+ BadTag t = std::in_place;
+ OKTag ot = std::in_place;
{
std::any a(t);
assertContains<int>(a, 0);
@@ -128,11 +123,24 @@ void test_sfinae_constraints() {
assertContains<int>(a, 0);
}
{
+ std::any a(ot);
+ assertContains<OKDecay>(a, ot);
+ }
+ {
+ OKDecay d = ot;
+ std::any a(d);
+ assertContains<OKDecay>(a, ot);
+ }
+ {
struct Dummy { Dummy() = delete; };
using T = std::in_place_type_t<Dummy>;
static_assert(!std::is_constructible<std::any, T>::value, "");
}
{
+ using DecayTag = std::decay_t<BadTag>;
+ static_assert(!std::is_constructible<std::any, DecayTag>::value, "");
+ }
+ {
// Test that the ValueType&& constructor SFINAE's away when the
// argument is non-copyable
struct NoCopy {
OpenPOWER on IntegriCloud