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

Will Wray <wjwray at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wjwray at gmail dot com

--- Comment #7 from Will Wray <wjwray at gmail dot com> ---
Fails to match for variadic arguments. Reopen or file a new bug?

https://godbolt.org/z/zuJagw

    #include <cstdio>

    void cat(auto const(&...a)[]);
    //void cat(auto const(&...)[]); // REJECT error: variable or field
                                    //              'cat' declared void
    void cat(auto const(&)[]...);   // ACCEPT: is this well formed? (IDK)
    void cat(auto const(&a)[]...);  // ACCEPT: is this well formed? (IDK)
                                    //        can't provide a definition

    // If the char[6] overload below is removed then this [] overload fails:
    //   error: no matching function for call to 'cat(const char [6]...)'
    void cat(auto const(&...cstr)[]) { (puts(cstr),...); }

    void cat(auto const(&...cstr)[6]) { (puts(cstr),...); }

    int main() {
        cat("Hello","world");
    }

Reply via email to