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

jakub at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Oct 22 21:24:00 GMT 2008



------- Comment #5 from jakub at gcc dot gnu dot org  2008-10-22 21:22 -------
Couldn't cmath just use:
   template<typename _Tp, typename _Up>
     inline
     typename __gnu_cxx::__promote_2<
-    typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
-        && __is_arithmetic<_Up>::__value,
+    typename __gnu_cxx::__enable_if<bool(__is_arithmetic<_Tp>::__value)
+        && bool(__is_arithmetic<_Up>::__value),
         _Tp>::__type, _Up>::__type
     pow(_Tp __x, _Up __y)
     {
...
?  Though 4.4 cc1plus doesn't complain...


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bkoz at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list