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,

"Fabien ChÃne" <fabien.chene@gmail.com> ha scritto:

>2012/9/11 Fabien ChÃne <fabien.chene@gmail.com>:
>> Oops, not sure how I test that change initially, or I must be blind,
>> because it triggers an error in tr1/cmath about pow. I'll see what I
>> can do...
>
>Well, as summarized in the code below, the problem seems to be the
>redundant overload of std::tr1::pow(double,double). As one can note
>that std::pow(double,double) is not defined, I guess the right fix
>would consist in removing the definition of
>std::tr1::pow(double,double).
>
>extern double pow (double __x, double __y) throw ();
>
>namespace std
>{
>  using ::pow;
>
>  inline float
>  pow(float __x, float __y)
>  { return __builtin_powf(__x, __y); }
>
>  inline long double
>  pow(long double __x, long double __y)
>  { return __builtin_powl(__x, __y); }
>}
>
>namespace std
>{
>namespace tr1
>{
>  // inline double
>  // pow(double __x, double __y)
>  // { return std::pow(__x, __y); }
>
>  inline float
>  pow(float __x, float __y)
>  { return std::pow(__x, __y); }
>
>  inline long double
>  pow(long double __x, long double __y)
>  { return std::pow(__x, __y); }
>}
>}

I don't understand: what's wrong - exactly - with the std::tr1::pow (double, double) overload above? Now I can't immediately check, but do the EDG and CLANG front ends accept it or not?

Paolo


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