samedi 24 août 2019

The three std::complex specializations and noexcept

I have a C++17 question about std::complex<float>, std::complex<double>, and std::complex<long double> and their member functions real() and imag().

Obviously, these member functions cannot throw an exception as they just return a value by copy of built-in floating-point type.

So why are they not specified noexcept?

Aucun commentaire:

Enregistrer un commentaire