2870. Default value of parameter theta of polar should be dependent

Section: 29.5.7 [complex.value.ops] Status: WP Submitter: Japan Opened: 2017-02-03 Last modified: 2017-11-13

Priority: Not Prioritized

View all other issues in [complex.value.ops].

View all issues with WP status.

Discussion:

Addresses JP 25

Parameter theta of polar has the type of the template parameter. Therefore, it needs to change the default initial value to T(). The change of the declaration of this function in 29.5.1 [complex.syn] is accompanied by this change.

Proposed change:

template<class T> complex<T> polar(const T& rho, const T& theta = 0T());

[2017-02 pre-Kona]

(twice)

[ 2017-06-27 Moved to Tentatively Ready after 7 positive votes on c++std-lib. ]

Proposed resolution:

This wording is relative to N4659.

  1. Modify 29.5.1 [complex.syn], header <complex> synopsis, as indicated:

    template<class T> complex<T> polar(const T&, const T& = 0T());
    
  2. Modify 29.5.7 [complex.value.ops] as indicated:

    template<class T> complex<T> polar(const T& rho, const T& theta = 0T());