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:
@@ -17,7 +17,7 @@ void f() {}
|
||||
|
||||
int main()
|
||||
{
|
||||
static_assert(std::is_same<std::new_handler, void(*)()>::value, "");
|
||||
static_assert((std::is_same<std::new_handler, void(*)()>::value), "");
|
||||
std::new_handler p = f;
|
||||
assert(p == &f);
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ void f() {}
|
||||
|
||||
int main()
|
||||
{
|
||||
static_assert(std::is_same<std::terminate_handler, void(*)()>::value, "");
|
||||
static_assert((std::is_same<std::terminate_handler, void(*)()>::value), "");
|
||||
std::terminate_handler p = f;
|
||||
assert(p == &f);
|
||||
}
|
||||
|
@@ -37,8 +37,8 @@ template <class TestType, class IntType>
|
||||
void test_div_struct() {
|
||||
TestType obj;
|
||||
static_assert(sizeof(obj) >= sizeof(IntType) * 2, ""); // >= to account for alignment.
|
||||
static_assert(std::is_same<decltype(obj.quot), IntType>::value, "");
|
||||
static_assert(std::is_same<decltype(obj.rem), IntType>::value, "");
|
||||
static_assert((std::is_same<decltype(obj.quot), IntType>::value), "");
|
||||
static_assert((std::is_same<decltype(obj.rem), IntType>::value), "");
|
||||
((void) obj);
|
||||
};
|
||||
|
||||
@@ -46,7 +46,7 @@ int main()
|
||||
{
|
||||
std::size_t s = 0;
|
||||
((void)s);
|
||||
static_assert(std::is_same<std::size_t, decltype(sizeof(int))>::value, "");
|
||||
static_assert((std::is_same<std::size_t, decltype(sizeof(int))>::value), "");
|
||||
test_div_struct<std::div_t, int>();
|
||||
test_div_struct<std::ldiv_t, long>();
|
||||
test_div_struct<std::lldiv_t, long long>();
|
||||
|
Reference in New Issue
Block a user