Step 4 (of 4) fixing bug 16599

Howard Hinnant hhinnant at apple.com
Fri Jul 19 13:07:12 PDT 2013


On Jul 18, 2013, at 11:57 AM, Marshall Clow <mclow.lists at gmail.com> wrote:

> The final (I hope) step towards fixing http://llvm.org/bugs/show_bug.cgi?id=16599
> 
> Makes std::tuple's constructors/make_tuple/tuple_cat/get<>(tuple) and relational operators constexpr.
> 
> (And I thought that this would be a simple bug to fix!)

This looks awesome Marshall!

I've got a few tweaks both in <tuple> and in the tests.  I'm attaching tuple.patch with my suggestions for review.  I've also attached a diff which shows the differences between my patch and Marshall's.

In words, the difference is I've added _LIBCPP_CONSTEXPR_AFTER_CXX11 in a few places and removed it in a few places.  I believe the places where I removed it, it was redundant.  In testing I also discovered some dead code in __tuple_leaf, and so removed that as well.  I added to the tests to justify each place I added _LIBCPP_CONSTEXPR_AFTER_CXX11.

Howard

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tuple.patch
Type: application/octet-stream
Size: 25919 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130719/ae016483/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff
Type: application/octet-stream
Size: 8488 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130719/ae016483/attachment-0001.obj>


More information about the cfe-commits mailing list