Add tests for the meta.unary.props that do not require a complete type. This is part of LWG#2582

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@275184 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow 2016-07-12 15:50:53 +00:00
parent 3384fa62f2
commit 3f5435853f
4 changed files with 14 additions and 0 deletions

View File

@ -29,6 +29,8 @@ void test_is_const()
#endif
}
struct A; // incomplete
int main()
{
test_is_const<void>();
@ -39,6 +41,8 @@ int main()
test_is_const<char[3]>();
test_is_const<char[]>();
test_is_const<A>();
static_assert(!std::is_const<int&>::value, "");
static_assert(!std::is_const<const int&>::value, "");
}

View File

@ -50,6 +50,8 @@ public:
~Class();
};
struct A; // incomplete
int main()
{
test_is_not_signed<void>();
@ -61,6 +63,7 @@ int main()
test_is_not_signed<char[]>();
test_is_not_signed<bool>();
test_is_not_signed<unsigned>();
test_is_not_signed<A>();
test_is_signed<int>();
test_is_signed<double>();

View File

@ -50,6 +50,8 @@ public:
~Class();
};
struct A; // incomplete
int main()
{
test_is_not_unsigned<void>();
@ -61,6 +63,7 @@ int main()
test_is_not_unsigned<char[]>();
test_is_not_unsigned<int>();
test_is_not_unsigned<double>();
test_is_not_unsigned<A>();
test_is_unsigned<bool>();
test_is_unsigned<unsigned>();

View File

@ -29,6 +29,8 @@ void test_is_volatile()
#endif
}
struct A; // incomplete
int main()
{
test_is_volatile<void>();
@ -39,6 +41,8 @@ int main()
test_is_volatile<char[3]>();
test_is_volatile<char[]>();
test_is_volatile<A>();
static_assert(!std::is_volatile<int&>::value, "");
static_assert(!std::is_volatile<volatile int&>::value, "");
}