Quuxplusone / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
https://p1144.godbolt.org/z/jf67zx5hq
Other
1 stars 2 forks source link

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

Open Quuxplusone opened 2 weeks ago

Quuxplusone commented 2 weeks ago

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).