This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Hi,

2013/5/23 Jason Merrill <jason@redhat.com>
>
> On 05/22/2013 04:53 PM, Fabien ChÃne wrote:
>>
>> Ah, I see, it works. Then we end up with three solutions:
>> 1) remove the pow(double,double) overload
>> 2) add a specialization template <> pow(double,double)
>> 3) add an extern "C" declaration to refer to the C library function
>>
>> I don't have a strong preference, I would say that all solutions are
>> more or less equivalent. In the end, builtins are just reached in
>> different ways I guess, depending on the optimisations enabled.
>> Given that Paolo already OKed the solution 1), I would go for it.
>
>
> I guess #1 and #2 involve forwarding through a template, whereas #3 avoids that and might give cleaner code without optimization.  But library design issues might be more important, so library folks should make the call here.

Saying that discussions are encouraged -- or even better a decision
--, is an understatement...
My opinion is that if #3 is the best choice, then it should not be
restricted to this case, and should be applied on all cases where
functions are forwarded through templates to builtins.
Then, It seems to me that such a change should ideally go in a separate patch.

Thank you.



--
Fabien


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]