Title
Math function overloads ambiguous
Status
nad
Section
[c.math]
Submitter
Nico Josuttis

Created on 2000-02-26.00:00:00 last changed 172 months ago

Messages

Date: 2010-10-21.18:28:33

Rationale:

These math issues are an understood and accepted consequence of the design. They have been discussed several times in the past. Users must write casts or write floating point expressions as arguments.

Date: 2000-02-26.00:00:00

Due to the additional overloaded versions of numeric functions for float and long double according to Section 26.5, calls such as int x; std::pow (x, 4) are ambiguous now in a standard conforming implementation. Current implementations solve this problem very different (overload for all types, don't overload for float and long double, use preprocessor, follow the standard and get ambiguities).

This behavior should be standardized or at least identified as implementation defined.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg1875
2000-02-26 00:00:00admincreate