[cfe-commits] [Patch][Review][libc++] constexpr-ification of <utility>

Jonathan Sauer jonathan.sauer at gmx.de
Tue Apr 3 11:09:01 PDT 2012


Hello,

attached is a patch that constexpr-ifies libc++'s <utility> header, at least as far as FDIS
and N3337 specify (unfortunately, the latter does not seem to make additional functions constexpr).
I tried to be backwards-compatible with C++03, but the tests fail in unrelated places due to
failing static_assert's.

Please review and, if ok, commit :-)

As mentioned above, there are in my opinion at least some functions in <utility> that could/
should be made constexpr to increase their versatility, such as std::forward. But as LWG2013
is as of yet undecided, I'm hesitant to constexpr-ify any additional methods. Still, std::forward
is soooo tempting ...


Jonathan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: utility.diff
Type: application/octet-stream
Size: 1211 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120403/10866347/attachment.obj>
-------------- next part --------------




More information about the cfe-commits mailing list