The information in this article applies to:
SYMPTOMS
ClassView pops up the message "Cannot find the definition for this
function" for some member functions of a template class. This happens for
those member functions that return a template class, or a reference or
pointer to a template class. The function must also be defined outside of
the class. The sample code in the More Information section below
demonstrates this problem.
RESOLUTIONThe only workaround is to define the function inline by moving its body inside the class declaration. Note that defining the function outside the class declaration with the inline keyword will not solve the problem. Also note that projects with this problem will still build and run correctly; only the convenience of finding a function's definition via the ClassView is lost. STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This bug was corrected in Visual C++
version 5.0.
MORE INFORMATION
The following sample code will reproduce the problem. To reproduce, right
click on "mult_by_scalar" while in the class view and select Go To
Definition.
Q179012 ClassView Lacks "Go to Declaration" for Static Data Members Sample Code
Keywords : kberrmsg kbui kbCompiler kbCPPonly kbVC kbVC400bug kbVC410bug kbVC420bug kbVC500fix kbVC600bug kbGrpDSTools |
Last Reviewed: July 28, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |