libstdc++/4543

Craig Rodrigues rodrigc@mediaone.net
Sun Oct 14 12:26:00 GMT 2001


The following reply was made to PR libstdc++/4543; it has been noted by GNATS.

From: Craig Rodrigues <rodrigc@mediaone.net>
To: gcc-patches@gcc.gnu.org
Cc: libstdc++@gcc.gnu.org, gcc-gnats@gcc.gnu.org, brendan@zen.org,
   rodrigc@gcc.gnu.org
Subject: Re: libstdc++/4543
Date: Sun, 14 Oct 2001 15:18:01 -0400

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4543&database=gcc
 
 Hi,
 
 Please apply following patch to mainline, which addresses PR 4543.
 
 "Library DR #79 resolved that the second argument to polar should 
  be a default argument initialized to 0. Otherwise, calls to
  polar with only one argument will result in complaints that 
  there is no available candidate."
 
 
 2001-08-11  Brendan Kehoe  <brendan@zen.org>
 
 	* include/bits/std_complex.h:
 	  Default initialize second argument of polar to 0, as
 	  specified in Library DR #79
 
  
 
 *** include/bits/std_complex.h.~1~	Mon Aug 13 17:22:12 2001
 --- include/bits/std_complex.h	Thu Oct 11 16:09:39 2001
 *************** namespace std
 *** 57,61 ****
   
     template<typename _Tp> complex<_Tp> conj(const complex<_Tp>&);
 !   template<typename _Tp> complex<_Tp> polar(const _Tp&, const _Tp&);
   
     // Transcendentals:
 --- 57,61 ----
   
     template<typename _Tp> complex<_Tp> conj(const complex<_Tp>&);
 !   template<typename _Tp> complex<_Tp> polar(const _Tp&, const _Tp& = 0);
   
     // Transcendentals:
 *************** namespace std
 *** 428,432 ****
     template<typename _Tp>
       inline complex<_Tp>
 !     polar(const _Tp& __rho, const _Tp& __theta)
       { return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); }
   
 --- 428,432 ----
     template<typename _Tp>
       inline complex<_Tp>
 !     polar(const _Tp& __rho, const _Tp& __theta = 0)
       { return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); }
   
 -- 
 Craig Rodrigues        
 http://www.gis.net/~craigr    
 rodrigc@mediaone.net          



More information about the Gcc-prs mailing list