The information in this article applies to:
SYMPTOMS
When compiling code with the /Za compiler option (Disable Microsoft Language extensions) you may get the following error: For details, please look in the "More Information" section. CAUSE
The compiler is unable to defer the access checking until it determines the use of a private member as a return type. The C++ Standard, Section 11 Paragraph 5 states the following: RESOLUTION
There are two workarounds for this problem.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. MORE INFORMATIONSteps to Reproduce BehaviorTo reproduce the problem, compile the following piece of code with the /Za option.
The use of A::inner is well formed here because A::inner is a member of class A. This implies that the access checking for the first use of A::inner must be deferred until it is determined that this use of A::inner is as the return type of a member of class A. Additional query words:
Keywords : kbCompiler kbCPPonly kbVC600 kbVC600bug |
Last Reviewed: November 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |