Talk:cpp/language/class template argument deduction
From cppreference.com
Why does this page say "Automatic Deduction Guides"? Although the standard is silent on the name, our discussions in committee have generally used "implicitly generated deduction guides."
- At first I wrote "implicit" and "explicit", but then p0512r0 happened and "explicit" appeared here, so "automatic" and "user-defined" was the wording I picked. "Implicitly-generated" would work too, no objections. --Cubbi (talk) 09:50, 18 April 2018 (PDT)
- If you don't give something a name, don't be surprised when people make up different names. Especially if you also take up the good, generic name with the deduction-guide nonterminal that only refers to user-defined/explicit/customized/whatever thingies. Maybe we should simply call the implicit/automatic/implicitly-generated/whatever thingy "the function template formed during class template argument deduction from the constructor of the primary template". T. Canens (talk) 12:17, 18 April 2018 (PDT)
- All of the above makes sense, and I couldn't agree more that we should not be surprised when people make up their own names if none are given in the standard. Still, I think it is best to use the language that the committee uses internally if known (I am the primary inventor of the feature). If there is no objection, I'd like to go ahead and change it to implicitly-generated deduction guides. Mps (talk) 13:34, 18 April 2018 (PDT)
- Not hearing any objections, I'm making the change. This is my first edit here, so if I am violating etiquette, please feel free to revert. Thanks! Mps (talk) 09:04, 19 April 2018 (PDT)
[edit] Contradiction between pages
- In cpp/language/class_template_argument_deduction#Deduction for alias templates, it introduces how alias templates deduced.
- In cpp/language/template_argument_deduction#Alias templates, it states 'Alias templates are never deduced'.
Is it a contradiction between pages? Yaossg (talk) 08:42, 1 June 2022 (PDT)
- not quite, but indeed p1021 made the "never" outdated. Added a link to CTAD. --Cubbi (talk) 11:58, 1 June 2022 (PDT)
- oh, and the std still says "Note: An alias template name is never deduced." in https://eel.is/c++draft/temp.alias#note-1 --Cubbi (talk) 14:18, 1 June 2022 (PDT)
- Please, consider the statement 'Alias templates are never deduced' in the sense that no alias is ever obtained as result of deduction. I do agree that, for the sake of clearness, the wording might be differentiated to avoid any doubt.
- mauro_russo 09:55, 07 March 2025.