auto
Keyword: The Basics
auto
Keyword: The Rest of the Story
auto
Is Not a Luxury
decltype
keyword: The Basics
decltype
Deduces the Type of an Expression: Case 1
decltype
Deduces the Type of an Expression: Case 2
decltype
Most of the language features that were introduced with the C++11 Standard
are easy to learn, and the benefit that they provide is quite obvious. Looking
at them doesn't make you think, "Oh no, now I'm going to have to learn this."
Instead, your immediate reaction is, "Oh great, I've always wanted that." In some
cases, like lambdas, the syntax is a bit hairy, but that's of course not
much of a problem. For me, the one big exception to all this were rvalue references.
I had a really hard time wrapping my head around those. Therefore, I did what I always do
when I need to understand something: I scraped up all the information
I could get my hands on, then wrote an
article on the subject.
It turned out that a lot of people were having the same problem,
and the article helped quite a few of them. Great, everybody's happy.
A while later, sometime in 2012, I noticed that there was another feature, or
rather, a pair of features, in C++11
that I had not fully understood, namely, the auto keyword.
|