Remove incorrect #ifdef guards around variant tests.

The tests were previously guarded by #if defined(_LIBCPP_VER) || defined(_MSVC_STL_VER),
which is both incorrect (e.g. _LIBCPP_VERSION) and unneeded. Although the tests are
technically non-standard (yet) they are supported by both libc++ and MSVC's STL.

libstdc++ doesn't regularly use the test suite so I'm not concerned about guarding these
tests for them.

llvm-svn: 303953
This commit is contained in:
Eric Fiselier 2017-05-26 01:27:08 +00:00
parent 86248d5632
commit abaf967ceb
2 changed files with 2 additions and 4 deletions

View File

@ -149,7 +149,7 @@ constexpr bool test_constexpr_copy_ctor_extension_imp(
}
void test_constexpr_copy_ctor_extension() {
#if defined(_LIBCPP_VER) || defined(_MSVC_STL_VER)
// NOTE: This test is for not yet standardized behavior.
using V = std::variant<long, void*, const int>;
#ifdef TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE
static_assert(std::is_trivially_destructible<V>::value, "");
@ -163,7 +163,6 @@ void test_constexpr_copy_ctor_extension() {
static_assert(test_constexpr_copy_ctor_extension_imp<0>(V(42l)), "");
static_assert(test_constexpr_copy_ctor_extension_imp<1>(V(nullptr)), "");
static_assert(test_constexpr_copy_ctor_extension_imp<2>(V(101)), "");
#endif
}
int main() {

View File

@ -186,7 +186,7 @@ constexpr bool test_constexpr_ctor_extension_imp(
}
void test_constexpr_move_ctor_extension() {
#if defined(_LIBCPP_VER) || defined(_MSVC_STL_VER)
// NOTE: This test is for not yet standardized behavior.
using V = std::variant<long, void*, const int>;
#ifdef TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE
static_assert(std::is_trivially_destructible<V>::value, "");
@ -201,7 +201,6 @@ void test_constexpr_move_ctor_extension() {
static_assert(test_constexpr_ctor_extension_imp<0>(V(42l)), "");
static_assert(test_constexpr_ctor_extension_imp<1>(V(nullptr)), "");
static_assert(test_constexpr_ctor_extension_imp<2>(V(101)), "");
#endif
}
int main() {