https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91364

--- Comment #9 from Will Wray <wjwray at gmail dot com> ---
The variadic unknown-bound 1st overload matches exact T(&)[] only
https://godbolt.org/z/9qZpWX

#include <cstdio>
void cat(auto const(&...cstr)[]) { (((void)cstr,puts("G'bye")),...); }
void cat(auto const(&...cstr)[6]) { (puts(cstr),...); }

using punk = char(*)[]; // Pointer to UNKnown-bound char array

int main() {
    cat("Hello");  // Outputs "Hello" via 2nd overload
    cat(*punk{});  // Outputs "G'bye" via 1st overload
}

Reply via email to