Page MenuHomePhabricator

Implement most of P0451 - Constexpr for std::complex
Needs ReviewPublic

Authored by mclow.lists on Nov 30 2017, 7:22 AM.



This patch implements most of - the notable exception being division.
The current implementation of complex division in libc++ uses logb, fmax, and a couple of other primitives that are not constexpr. The paper has some approaches for dealing with this, but I haven't implemented those yet. I wanted to get all the mechanical bits out first.

Note that there are tests for division being constexpr; they currently fail.

Diff Detail

Event Timeline

mclow.lists created this revision.Nov 30 2017, 7:22 AM

More context in the diff, and removed some tabs.
Also commented out the constexpr tests for divide, since they fail at the moment.