BUG: C2143 When Initializing Static Member in Class Template (128788)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Editions 2.0
- Microsoft Visual C++, 32-bit Editions 2.1
This article was previously published under Q128788 SYMPTOMS
When initializing a static data member that has a user-defined type in a
class template, the compiler generates the following error message on the
line after the last line of code:
Error C2143: syntax error : missing ';' before 'newline'
RESOLUTION
To work around the problem, specify a specialized instance for particular
data types when initializing the static data member -- as in the "Sample
Code" section in this article.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This problem was corrected in Microsoft
Visual C++, 32-bit Edition, version 4.0.
Modification Type: | Major | Last Reviewed: | 10/2/2003 |
---|
Keywords: | kbbug kbCompiler kbCPPonly KB128788 |
---|
|