I know that before C++11 the auto
keyword had a completely different meaning; it was a storage type specifier indicating an object that has automatic storage type (ie, placed on the stack).
That's how the theory goes... How would you actually use this keyword (syntax), and why? Also, I haven't seen this keyword in actual code pre-C++11; when was it useful (what time period)?
It was used to declare a local variable with automatic storage duration (i.e., "on the stack").
At least since C90 it has been a useless keyword, since automatic storage duration is the default storage duration for a local variable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With