[Bug c++/95568] No CTAD with list initialization within requires-clause
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jun 18 21:48:16 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95568
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
So far my guess is that this doesn't work because in a template
finish_decltype_type will create a DECLTYPE_TYPE in the deduction guide, so
we'll have
template<class T> X(decltype (X<T>::x))-> X<T>
deduction guide. type_unification_real then tries to deduce T from a P/A pair
decltype (X<T>::x) and 0. But:
The non-deduced contexts are:
-- The expression of a decltype-specifier.
and
If a template parameter is used only in non-deduced contexts and is not
explicitly specified, template argument deduction fails.
More information about the Gcc-bugs
mailing list