"Error: Overloading Ambiguity ..." When Using Standard Functions in C++
(Doc ID 1002026.1)
Last updated on AUGUST 03, 2016
Applies to:Oracle Solaris Studio - Version Forte Developer 6 Update 2 to 12.4 [Release 6.0 to 12]
Oracle Solaris on x86-64 (64-bit)
Oracle Solaris on x86 (32-bit)
Oracle Solaris on SPARC (64-bit)
Oracle Solaris on SPARC (32-bit)
In default -compat=5 mode, the Oracle Solaris Studio/Sun Studio C++ compiler rejects a call to a mathematical standard function with an overloading ambiguity error message such as:
"foo.cpp", line 10: Error: Overloading ambiguity between "std::sqrt(double)" and "std::sqrt(long double)"
"bar.cc", line 9: Error: Overloading ambiguity between "std::abs(int)" and "std::abs(double)".
"test.cpp", line 9: Error: Overloading ambiguity between "std::pow(double, int)" and "std::pow(long double, int)".
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!