[C++ Patch] for c++/54537

Paolo Carlini paolo.carlini@oracle.com
Wed Sep 19 18:33:00 GMT 2012


Hi Fabien,

On 09/19/2012 07:29 PM, Fabien Chêne wrote:
>>> But I'm afraid this is still not completely correct, because if the user
>>> code has a using std::pow in the global namespace and then and include
>>> <tr1/cmath> the latter drags again in namespace std::tr1 the overloads pow
>>> (*, int) which we don't want there... grrrrr
> I'll add a testcase for this, if you agree.
Sure, if you like (the never ending story of std::pow between C++99 and 
C++11, I'm still meeting people missing the (*, int) overloads ;)
>> You know what? All in all, I think we can go with your original idea of just
>> removing the overload for (double, double): what I didn't realize the first
>> time I saw the idea is that we have anyway the templatized pow which
>> forwards to std::pow. Thus, I suppose things should work pretty well. But
>> please add a big comment before the commented out overload. And let's see if
>> over the next months somebody complaints, otherwise, I think it will be
>> enough for TR1, at this point.
>>
>> Thanks for your patience!!!
> It seems reasonable, I'll update the patch soon with the comment that
> you suggest.
Thanks! (if you feel lazy about the comment, just add a couple of URLs 
to the front-end issue and to this discussion, it's more than enough to 
understand what's going on)

Paolo.



More information about the Libstdc++ mailing list