BUG: Non-const Member Function Call Via const Object AllowedLast reviewed: July 21, 1997Article ID: Q167348 |
The information in this article applies to:
SYMPTOMSA compiler error is not generated when a non-const member function is called via a temporary const object.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft 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.
MORE INFORMATION
Sample Code
/* Compile Options Needed: None */ class myClass { public: const myClass f(); const myClass g(); }; int main( ) { myClass mc; mc.f().g(); // The return value of f() is const, but g() // is not a const member function. Therefore, // an error should be generated. return 0; } |
Keywords : kbcode vcbuglist400 vcbuglist500
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |