O'Reilly logo

C++ Primer Plus by Stephen Prata

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Specifiers and Qualifiers

Certain C++ keywords, called storage class specifiers and cv-qualifiers, provide additional information about storage. Here’s a list of the storage class specifiers:

auto (eliminated as a specifier in C++11)registerstaticexternthread_local (added by C++11)mutable

You’ve already seen most of these, and you can use no more than one of them in a single declaration, except that thread_local can be used with static or extern. To review, prior to C++11, the keyword auto could be used in a declaration to document that the variable is an automatic variable. (In C++11, auto is used for automatic type deduction.) The keyword register is used in a declaration to indicate the register storage class, which, in C++11, simply is an ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required