The type trait depends on is_void so the tests should check those cases.
* testsuite/20_util/add_pointer/value.cc: Check void types. Tested x86_64-linux, committed to trunk.
commit 5b35f49aeb052513b4580ed4d9ea0ef3118a200d Author: Jonathan Wakely <jwak...@redhat.com> Date: Thu Oct 31 14:05:47 2019 +0000 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. diff --git a/libstdc++-v3/testsuite/20_util/add_pointer/value.cc b/libstdc++-v3/testsuite/20_util/add_pointer/value.cc index acf9442851f..66d94783c11 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()