This program ``` template<typename T> concept C = requires(T t[2]) { t; }; static_assert(!C<void>); ``` seems valid because arrays of voids are not allowed, and it is accepted by Clang and MSVC. But in GCC static_assert evaluates to opposite value. Online demo: https://gcc.godbolt.org/z/nM8Mj8qrb
The interesting thing is the reason why clang outputs: <source>:2:25: note: because 't' would be invalid: array has incomplete element type 'void' Is not exactly correct as if you change void to being a incomplete type: struct A; static_assert(C<A>); it is accepted by all compilers ...
I think this is a dup of bug 24664.
Yes it is a dup. The following should also be rejected but currently is not: ``` template<class T, class T1 = int*(T[5])> int f(T*); int j=f<void>(nullptr); ``` Basically function arguments (including concepts "arguments") decay too early for arrays to pointers. *** This bug has been marked as a duplicate of bug 24664 ***