Fix a handful of tests that fail in C++03

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@243392 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2015-07-28 07:31:50 +00:00
parent bfb46e486d
commit b47a434d60
8 changed files with 35 additions and 35 deletions

View File

@@ -56,13 +56,14 @@ int main()
static_assert((std::is_same<decltype(std::move_if_noexcept(ca)), const A&&>::value), "");
static_assert((std::is_same<decltype(std::move_if_noexcept(l)), const legacy&>::value), "");
#else // C++ < 11
// libc++ defines decltype to be __typeof__ in C++03. __typeof__ does not
// deduce the reference qualifiers.
static_assert((std::is_same<decltype(std::move_if_noexcept(i)), const int>::value), "");
static_assert((std::is_same<decltype(std::move_if_noexcept(ci)), const int>::value), "");
static_assert((std::is_same<decltype(std::move_if_noexcept(a)), const A>::value), "");
static_assert((std::is_same<decltype(std::move_if_noexcept(ca)), const A>::value), "");
static_assert((std::is_same<decltype(std::move_if_noexcept(l)), const legacy>::value), "");
// In C++03 libc++ #define's decltype to be __decltype on clang and
// __typeof__ for other compilers. __typeof__ does not deduce the reference
// qualifiers and will cause this test to fail.
static_assert((std::is_same<decltype(std::move_if_noexcept(i)), const int&>::value), "");
static_assert((std::is_same<decltype(std::move_if_noexcept(ci)), const int&>::value), "");
static_assert((std::is_same<decltype(std::move_if_noexcept(a)), const A&>::value), "");
static_assert((std::is_same<decltype(std::move_if_noexcept(ca)), const A&>::value), "");
static_assert((std::is_same<decltype(std::move_if_noexcept(l)), const legacy&>::value), "");
#endif
#if TEST_STD_VER > 11