PRB: Ambiguous Msg If Function Template Return Type Omitted (143081)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Professional Edition 4.0
- Microsoft Visual C++, 32-bit Learning Edition 4.0
This article was previously published under Q143081 SYMPTOMS
Given a function template, if the return type is omitted, the error that
results is a syntax error on the semicolon preceding the closing brace
of the function.
minmax.cpp(4) : error C2059: syntax error : ';'
RESOLUTION
Specify a return type for the function template.
STATUS
This behavior is by design.
Modification Type: | Minor | Last Reviewed: | 7/5/2005 |
---|
Keywords: | kbCompiler kbCPPonly kbprb KB143081 |
---|
|