[libc++][test] test allocator<const T> extension only on libc++

This commit is contained in:
Casey Carter 2020-10-19 15:25:35 -07:00
parent 877766573b
commit d5971a63ca
2 changed files with 9 additions and 0 deletions

View File

@ -26,10 +26,14 @@ constexpr bool test() {
int main(int, char**)
{
test<int>();
#ifdef _LIBCPP_VERSION // extension
test<int const>();
#endif // _LIBCPP_VERSION
static_assert(test<int>());
#ifdef _LIBCPP_VERSION // extension
static_assert(test<int const>());
#endif // _LIBCPP_VERSION
return 0;
}

View File

@ -50,10 +50,15 @@ TEST_CONSTEXPR_CXX20 bool test()
int main(int, char**)
{
test<char, int>();
#ifdef _LIBCPP_VERSION // extension
test<char const, int const>();
#endif // _LIBCPP_VERSION
#if TEST_STD_VER > 17
static_assert(test<char, int>());
#ifdef _LIBCPP_VERSION // extension
static_assert(test<char const, int const>());
#endif // _LIBCPP_VERSION
#endif
return 0;
}