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



Jonathan Wakely <redi at gcc dot gnu.org> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

             Status|UNCONFIRMED                 |NEW

   Last reconfirmed|                            |2013-04-23

          Component|libstdc++                   |c++

      Known to work|                            |4.6.3

     Ever Confirmed|0                           |1

      Known to fail|                            |4.7.3, 4.8.0, 4.9.0



--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-04-23 
11:12:21 UTC ---

I think this is a front-end issue, the following compiles OK with G++ 4.6,

Clang 3.3 and ICC 13, but not G++ 4.7+ (in c++98 or c++11 mode)





template<typename D> struct complex { };



template<typename Tp>

inline complex<Tp>

pow(const complex<Tp>& x, const complex<Tp>& y)

{ return x; }



template<typename T, typename U>

struct promote_2

{

    typedef T type;

};



template<typename Tp, typename Up>

inline complex<typename promote_2<Tp, Up>::type>

pow(const complex<Tp>& x, const complex<Up>& y)

{ return x; }





complex<double> (*powcc)(const complex<double>&, const complex<double>&) = pow;

Reply via email to