[Bug libstdc++/37582] [4.3 Regression] std::pow strange overload resolution

jakub at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Dec 11 19:56:00 GMT 2008



------- Comment #9 from jakub at gcc dot gnu dot org  2008-12-11 19:55 -------
Created an attachment (id=16888)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16888&action=view)
gcc43-pr37582.patch

Given:
  // N.B. The conversions to bool are needed due to the issue
  // explained in c++/19404.
  template<class _Sp, class _Tp>
    struct __traitor
    {
      enum { __value = bool(_Sp::__value) || bool(_Tp::__value) };
      typedef typename __truth_type<__value>::__type __type;
    };
I see this isn't the first time libstdc++ works around the C++ bug.
So, either IMHO we should cast to bool there, or as done in this patch
use __traitor instead.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37582



More information about the Gcc-bugs mailing list