On Wed, Nov 20, 2024 at 6:21 PM mauro russo via Std-Discussion <std-discussion@lists.isocpp.org> wrote:
sorry, the previous message started as incomplete.

First, about the wrong examples: here is a godbolt link: https://godbolt.org/z/vf5q6nTKq
where you can find all compilers set with C++20 (but C++23 or C++2c works the same).


About the additional doubt, I cannot see where [over.match.class.deduct] states that
the selected overloaded notional constructor for CTAD must lead to deduce all
parameters of the class template, based on the arguments in the return type of the selected constructor,
Each guide has, at minimum, all the template parameters of the class. Under [over.match.class.deduct]/5, overload resolution is done with all the guides. In any one particular guide, if any template argument fails to be deduced in a guide, that guide does not produce a candidate ([over.match.funcs.general]/8). If no guide allows deduction of all template parameters, there are no candidates and overload resolution fails, resulting in an ill-formed program ([over.match.best.general]/3).
 
as well as that the final selected type is the template specialization with those arguments .
[dcl.class.type.deduct]/1
 

Maybe, p4 is aimed to this goal, but the way is not clear to me, as it seems a general statement,
not mentioned in p5. Hope you may provide any hint.
I am asking it as side point after having found the problems discussed above for the examples.
--
Std-Discussion mailing list
Std-Discussion@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion


--
Brian Bi