Namespaces
Variants
Views
Actions

Talk:cpp/utility/functional/unwrap reference

From cppreference.com

[edit] typedef or type alias?

The description reads (twice):

... provides a member typedef type that names T.

But the possible implementation uses a type alias, for example:

using type = T;

Although the effect is the same, I think that using:

... provides a member type alias that names T.

Is more accurate. Do you agree?

ticotico (talk)

yes "typedef" here (and in other places) is a C-era colloquialism for "type alias", which can now be created using two different but equivalent syntaxes. I think it isn't material, but to follow the general guidance of shunning "typedef" (Core Guidelines and the standard itself - someone went over the entire thing at one point and replaced every remaining `typedef` with `using`) it'd make sense to say "alias" more often. --Cubbi (talk) 13:10, 12 October 2022 (PDT)