automatic variable.
Alex Blekhman wrote:
`__declspec(thread)' modifier can be applied to static variables only.
Hmmm, that statement is pretty misleading, 'static' is not sufficient to
describe the requirement:
namespace answer {
int __declspec(thread) fourtytwo;
}
This is perfectly valid without any 'static'. Further, the 'namespace' is
only to demonstrate that the declaration is not local or at class scope,
it
could have been in the global namespace or an anonymous one, too.
* You can specify the thread attribute only on data items
with static storage duration.
"static storage duration" is the key here, variables at namespace scope
also
fall under this category.
Uli