Код: Выделить всё
struct S {
template< typename T >
operator T () {
std::cout
< /blockquote>
I выводит, что a = const int & < /code> и p = t < /code>.
Теперь пункт 4: < /p>
< /ol>
< /blockquote>
Теперь сначала < /code> не является CV-квалифицированным. Затем, во -вторых, является ссылочным типом, и поэтому I Remove & из и получить выведен a = const int .
Теперь я сравнивал выведен A = const int с t и получить t = const int .
obster
Подробнее здесь: [url]https://stackoverflow.com/questions/79753825/template-argument-deduction-for-templated-conversion-operator[/url]