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

--- Comment #2 from Fedor Chelnokov <fchelnokov at gmail dot com> ---
The explicit form is not in question: with a concrete parameter type there is
nothing to deduce. A placeholder adds one step — the type must first be deduced
from the argument, and an empty braced-init-list gives nothing to deduce from.

Two observations, independent of how that step is resolved:

1. `template <auto V> struct Au {}; using X = Au<{}>;` is rejected both without
<initializer_list> ("deducing from brace-enclosed initializer list requires
...") and with it ("unable to deduce 'auto' from '<brace-enclosed initializer
list>()'"). The same parameter kind is accepted once it is reached through a
template template parameter.

2. In the testcase the verdict flips on whether <initializer_list> is included,
though no std::initializer_list takes part in the accepted path: TT becomes A
and {} copy-initializes its int. So one of the two behaviours is wrong — either
the no-include diagnostic is spurious and Au<{}> should be accepted as well, or
both forms should be rejected.

Reply via email to