The information in this article applies to:
SYMPTOMSWhen instantiating a class template with a member function that has a default parameter, error C2512 may be generated. CAUSEThis behavior can occur when the default parameter is an explicitly-created temporary of the parameterized type of the template. The sample code below demonstrates this. RESOLUTION
Do not use an explicitly-generated temporary as a default argument. STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This bug has been fixed in Visual Studio
97 Service Pack 3. Q170365 INFO: Visual Studio 97 Service Packs - What, Where, and Why MORE INFORMATIONSample
Additional query words:
Keywords : kbCompiler kbCPPonly kbVC500bug kbVS97sp2fix |
Last Reviewed: August 18, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |