
2 Aug
2006
2 Aug
'06
7:26 a.m.
Le vendredi 28 juillet 2006 à 14:51 -0500, Terry Golubiewski a écrit :
The following code does not compile with g++ nor MSVC 2003 because of ambiguity of first argument to std::max() in numeric::abs(). Is a typecast needed in interval/utility.hpp?
Thanks for spotting this shortcoming. You are right, the first argument to max indeed requires static_cast<T>(_). We didn't expect the library to be used with a unary minus operator that looks like "not_T operator- (T)". Unfortunately primitive types shorter than int do have this property. Best regards, Guillaume