Full name of submitter (unless configured in github; will be published with the issue): Jay Ghiron
Reference (section label): [temp.res.general]/6
Issue description:
The program is ill-formed, no diagnostic required, if
...
every valid specialization of a variadic template requires an empty template parameter pack, or
There seem to be several issues with this text:
- It makes programs which do
static_assert(!sizeof...(pack)) IFNDR, which seems unintended.
- If a template does
static_assert(false), then it has no valid specializations so vacuously it is IFNDR because of this wording.
- It seems to make the following program IFNDR, for no apparent reason:
template<typename...T,typename...U>void foo(U...){
int x[!sizeof...(T)!=!sizeof...(U)];//exactly one pack must be empty
}
- This does not apply to structured binding packs, even though existing implementations apply the same restrictions:
void foo(auto x){
auto[...y]=x;
union U:decltype(y)...{};//unions cannot have base classes, requires y be an empty pack
}
int main(){
struct S{};
foo(S{});
}
- It is unclear if this requirement makes zero dimensional mdspans IFNDR because of [mdspan.mdspan.members]/1:
Constraints:
...
sizeof...(OtherIndexTypes) == rank() is true
For the last point, it is unclear whether or not "every valid specialization" of a member function template in a class template refers to just the valid specializations for one member function template in a particular specialization of the class template, or instead collectively to all valid specializations of the member function templates for all specializations of the class template.
Full name of submitter (unless configured in github; will be published with the issue): Jay Ghiron
Reference (section label): [temp.res.general]/6
Issue description:
There seem to be several issues with this text:
static_assert(!sizeof...(pack))IFNDR, which seems unintended.static_assert(false), then it has no valid specializations so vacuously it is IFNDR because of this wording.For the last point, it is unclear whether or not "every valid specialization" of a member function template in a class template refers to just the valid specializations for one member function template in a particular specialization of the class template, or instead collectively to all valid specializations of the member function templates for all specializations of the class template.