public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* libstdc++/4543: std_complex should give polar a default arg
@ 2001-10-11  8:16 brendan
  0 siblings, 0 replies; 2+ messages in thread
From: brendan @ 2001-10-11  8:16 UTC (permalink / raw)
  To: gcc-gnats

>Number:         4543
>Category:       libstdc++
>Synopsis:       std_complex should give polar a default arg
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 11 08:16:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Brendan Kehoe
>Release:        CVS tree
>Organization:
>Environment:

>Description:
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.
>How-To-Repeat:

>Fix:
See attached patch.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="diffs-complex-1.txt"
Content-Disposition: inline; filename="diffs-complex-1.txt"

*** 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)); }
  


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: libstdc++/4543: std_complex should give polar a default arg
@ 2001-10-20 18:59 rodrigc
  0 siblings, 0 replies; 2+ messages in thread
From: rodrigc @ 2001-10-20 18:59 UTC (permalink / raw)
  To: brendan, gcc-bugs, gcc-prs, nobody

Synopsis: std_complex should give polar a default arg

State-Changed-From-To: open->closed
State-Changed-By: rodrigc
State-Changed-When: Sat Oct 20 18:59:58 2001
State-Changed-Why:
    Patch applied.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4543&database=gcc


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-10-20 18:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-11  8:16 libstdc++/4543: std_complex should give polar a default arg brendan
2001-10-20 18:59 rodrigc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).