BUG: Aggregate Initializer Fails In VC++ 32-bit, Ver. 1.0, 2.0 (119519)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Professional Edition 2.0
This article was previously published under Q119519 SYMPTOMS
If "operator =" is overridden in an aggregate class, you can no longer
use an initializer list to construct a constant object.
CAUSE
The assignment operator causes the const object to be place in read only
memory before it is initialized. Upon initialization of the object, the
application fails with an access violation.
RESOLUTION
To work around this problem, create a constructor to initialize the object.
STATUS
Microsoft has confirmed this to be a bug in the products listed at the
beginning of this article. We are researching this bug and will post new
information here in the Microsoft Knowledge Base as it becomes available.
Modification Type: | Minor | Last Reviewed: | 7/5/2005 |
---|
Keywords: | kbCompiler kbCPPonly KB119519 |
---|
|