Article ID: 241569 - Last Review: June 2, 2005 - Revision: 3.0 Error C2258 and error C2252 occur if you try to perform in-place initialization of static const integral member data in Visual C++This article was previously published under Q241569 SYMPTOMS You may get the following error message if you try to
perform in-place initialization of static const integral member data. CAUSE The compiler does not support in-place initialization of
static const integral member data as specified in the C++ standard (section
9.2) quoted in the following: 4 - A member-declarator can contain a constant-initializer only if it declares a static member of integral or enumeration type. WORKAROUND Use one of the following workarounds:
STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
MORE INFORMATIONSteps to Reproduce BehaviorThe following example demonstrates the error.APPLIES TO
| Article Translations
|

Back to the top
