C++ Logo

std-discussion

Advanced search

Re: wrong examples in standard text (also based on major compilers)

From: mauro russo <ing.russomauro_at_[hidden]>
Date: Thu, 21 Nov 2024 00:20:52 +0100
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,
as well as that the final selected type is the template specialization with
those arguments .

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.

Received on 2024-11-20 23:21:04