diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-10-31 14:07:11 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-10-31 14:07:11 +0000 |
commit | b9ff4d7c489e2003dc1e2c7d5d6cf38a2a94c247 (patch) | |
tree | 6aa97457b7b323dbf995f57451b17efb12b59d64 | |
parent | b3ffa117e5cc0e0451ab1fb2aafd6ca56258912b (diff) | |
download | gcc-b9ff4d7c489e2003dc1e2c7d5d6cf38a2a94c247.zip gcc-b9ff4d7c489e2003dc1e2c7d5d6cf38a2a94c247.tar.gz gcc-b9ff4d7c489e2003dc1e2c7d5d6cf38a2a94c247.tar.bz2 |
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
-rw-r--r-- | libstdc++-v3/ChangeLog | 2 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/20_util/add_pointer/value.cc | 8 |
2 files changed, 9 insertions, 1 deletions
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 <jwakely@redhat.com> + * 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<add_pointer<const int>::type, const int*>::value, ""); static_assert(is_same<add_pointer<int&>::type, int*>::value, ""); static_assert(is_same<add_pointer<ClassType*>::type, - ClassType**>::value, ""); + ClassType**>::value, ""); static_assert(is_same<add_pointer<ClassType>::type, ClassType*>::value, ""); + static_assert(is_same<add_pointer<void>::type, void*>::value, ""); + static_assert(is_same<add_pointer<const void>::type, const void*>::value, ""); + static_assert(is_same<add_pointer<volatile void>::type, + volatile void*>::value, ""); + static_assert(is_same<add_pointer<const volatile void>::type, + const volatile void*>::value, ""); } void test02() |