The information in this article applies to:
SYMPTOMSThe compiler generates the following error message when the friend function in a template class is not prototyped:
CAUSEFriend functions must be declared before they are used in a template class. You cannot have a friend function defined within a class definition. This is a Microsoft Specific requirement. Templates are not officially standardized and, as a result, different C++ compiler vendors have implemented them differently, so this requirement may change in future versions of the compiler. RESOLUTIONDeclare the friend function before using it in the template definition. STATUSThis behavior is by design. MORE INFORMATIONFor more information about the Microsoft-specific implementations on the templates, please see the Books Online under C/C++, C++ Language Reference, Chapter 6 Declarations, Template Specifications, Differences from Other Implementations. Sample Code to Demonstrate Behavior
Additional query words: 2.00 2.10 8.0 8.00 8.0c 8.00c 9.0 9.00 9.1 9.10
Keywords : kberrmsg kbCompiler kbCPPonly kbVC |
Last Reviewed: September 10, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |