Skip to content

Should accept comma-less ellipsis parameter in void f(Ts...[0] t ...) #42

@Quuxplusone

Description

@Quuxplusone

https://godbolt.org/z/fYq5c46fe

template<class T, class... Ts>
struct S {
    void f(T t ...);         // OK
    void f(X<Ts...> t0 ...); // OK
    void f(Ts...[0] t0 ...); // should be OK
};

P3176R0 "The Oxford variadic comma" deprecates the usage of T t ... to mean T t, .... But it's not deprecated yet! And even when it's deprecated, it'll still be legal C++ (just warning-worthy, not actually ill-formed). So Clang ought to be able to parse it.

But it seems to have a bad interaction with Clang's nascent support for P2662 "Pack Indexing" (new in C++26).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions