From b9ff4d7c489e2003dc1e2c7d5d6cf38a2a94c247 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 31 Oct 2019 14:07:11 +0000 Subject: Improve tests for std::add_pointer The type trait depends on is_void so the tests should check those cases. * testsuite/20_util/add_pointer/value.cc: Check void types. From-SVN: r277672 --- libstdc++-v3/ChangeLog | 2 ++ libstdc++-v3/testsuite/20_util/add_pointer/value.cc | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index d51a7d4..2a47289 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,7 @@ 2019-10-31 Jonathan Wakely + * testsuite/20_util/add_pointer/value.cc: Check void types. + * include/bits/range_access.h (__sizable): Rename to __sentinel_size. Remove workaround for PR c++/92268 and remove redundant requirements that are already checked by sized_sentinel_for. diff --git a/libstdc++-v3/testsuite/20_util/add_pointer/value.cc b/libstdc++-v3/testsuite/20_util/add_pointer/value.cc index acf9442..66d9478 100644 --- a/libstdc++-v3/testsuite/20_util/add_pointer/value.cc +++ b/libstdc++-v3/testsuite/20_util/add_pointer/value.cc @@ -31,8 +31,14 @@ void test01() static_assert(is_same::type, const int*>::value, ""); static_assert(is_same::type, int*>::value, ""); static_assert(is_same::type, - ClassType**>::value, ""); + ClassType**>::value, ""); static_assert(is_same::type, ClassType*>::value, ""); + static_assert(is_same::type, void*>::value, ""); + static_assert(is_same::type, const void*>::value, ""); + static_assert(is_same::type, + volatile void*>::value, ""); + static_assert(is_same::type, + const volatile void*>::value, ""); } void test02() -- cgit v1.1