In general, we do not expect array types to be copyable according to the 'is_copy_constructible_v' trait. However, the following started passing in gcc 10: #include <type_traits> static_assert(!std::is_copy_constructible_v<const void *[13]>); Note that the 'const' is important, arrays of 'void *' remain non-copyable according to the trait. 'void' may be a specific trigger too, as arrays of 'const int *' do not have this problem. Finally, the array bound does not seem significant, other than it gives the expected answer again for an array of unknown bound.
Forgot to add this is specific to -std=c++20 too.
This is behaving as specified. const void* const a[10]; const void* const b[10](a); is valid code in C++20; it initializes b[0] with &a[0] converted to a const void*, and the rest of b with null pointers. The void* case is void* const a[10]; void* const b[10](a); which is invalid because &a[0] is a void* const*; converting that to void* is not allowed because it casts away constness.
Sorry, thought I had confirmed that I agree with the analysis above - this is a (perhaps surprising) change to the specification of C++20. What is the best way to withdraw this report as invalid?
Status -> RESOLVED INVALID
Just to follow up, gcc trunk right now does this: int main() { int a[3]{}; void const* b[3](a); // ok void const* c[3]{}; void const* d[3](c); // error: array must be initialized with a brace-enclosed initializer } If 'd' is actually an error, then it's not because of that, so at the very least, the diagnostic is wrong.