This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++20 status.

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

Section: 28.4.7 [complex.value.ops] Status: C++20 Submitter: Japan Opened: 2017-02-03 Last modified: 2021-02-25

Priority: Not Prioritized

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

View all issues with C++20 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 28.4.2 [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 28.4.2 [complex.syn], header `<complex>` synopsis, as indicated:

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

2. Modify 28.4.7 [complex.value.ops] as indicated:

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