summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2019-07-14 18:30:34 +0000
committerEric Fiselier <eric@efcs.ca>2019-07-14 18:30:34 +0000
commit273857d1ea9a39ab976b6dda446b8564e88d068a (patch)
tree531eb2c93412f8d95421a59c8a581d8e3352f88e
parent8f1d7d1c55c76d315fb766128b8174389dbd46f5 (diff)
downloadbcm5719-llvm-273857d1ea9a39ab976b6dda446b8564e88d068a.tar.gz
bcm5719-llvm-273857d1ea9a39ab976b6dda446b8564e88d068a.zip
Harden variant test added in r366022
The test was brittle since it only went boom for one specific type, when really it should go boom for all of them. llvm-svn: 366025
-rw-r--r--libcxx/test/std/utilities/variant/variant.variant/variant.ctor/T.pass.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/T.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/T.pass.cpp
index ef074828581..d05e800b302 100644
--- a/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/T.pass.cpp
+++ b/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/T.pass.cpp
@@ -177,13 +177,13 @@ void test_T_ctor_basic() {
#endif
}
-struct BoomOnInt {
+struct BoomOnAnything {
template <class T>
- constexpr BoomOnInt(T) { static_assert(!std::is_same<T, int>::value, ""); }
+ constexpr BoomOnAnything(T) { static_assert(!std::is_same<T, T>::value, ""); }
};
void test_no_narrowing_check_for_class_types() {
- using V = std::variant<int, BoomOnInt>;
+ using V = std::variant<int, BoomOnAnything>;
V v(42);
assert(v.index() == 0);
assert(std::get<0>(v) == 42);
OpenPOWER on IntegriCloud