More Constexpr fun - implement n3302

Howard Hinnant hhinnant at apple.com
Wed Jul 31 10:31:34 PDT 2013


On Jul 29, 2013, at 10:48 AM, Marshall Clow <mclow.lists at gmail.com> wrote:

> Ridding the galaxy of run-time requirements, one paper at a time.
> Today quest: complex.

Thanks Marshall!

We're missing documentation, implementation and tests for section d) of the proposal:

d) Modify 26.4.7 [complex.value.ops] as follows:
template<class T> constexpr T real(const complex<T>& x);
template<class T> constexpr T imag(const complex<T>& x);

These are the namespace scope real/imag overloads.  Additionally I interpret this modified standard to mean that the extra real/imag overloads specified by [cmplx.over] should also be made constexpr.

Howard




More information about the cfe-commits mailing list