Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Compiler Error C2483

'identifier' : object with constructor or destructor cannot be declared 'thread'

Variables declared with the thread attribute cannot be initialized with a constructor or other expression that requires run-time evaluation. A static expression is required to initialize thread data.

The following sample generates C2483.

// C2483.cpp
// compile with: /c
__declspec(thread) struct A {
} aa;   // C2483 error

__declspec(thread) struct B {} b;   // OK

Community Additions

© 2015 Microsoft