Article ID: 240869 - Last Review: July 5, 2005 - Revision: 1.1 BUG: C2667 and C2668 on Partial Ordering of Function TemplatesThis article was previously published under Q240869 On This PageSYMPTOMS
You may get the following error message if you try to use partial ordering of template functions:
error C2667: 'f' : none of 3 overload have a best conversion
error C2668: 'f' : ambiguous call to overloaded function
CAUSE
The compiler does not support partial ordering of template functions as specified in the C++ Standard, section 14.5.5.2, which is quoted below:
1 - If a function template is overloaded, the use of a function template
specialization might be ambiguous because template argument deduction may associate the function template specialization with more than one function template declaration. Partial ordering of overloaded function template declarations is used in the following contexts to select the function template to which a function template specialization refers:
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. MORE INFORMATIONSteps to Reproduce BehaviorThe following sample code demonstrates the error:REFERENCES
Please refer to the C++ Standard, section 14.5.5.2, for more information.
| Article Translations
|
Back to the top
