libcxx patch for N3655
hhinnant at apple.com
Wed Jul 3 14:31:29 PDT 2013
On Jul 3, 2013, at 2:44 PM, Marshall Clow <mclow.lists at gmail.com> wrote:
> On Jul 3, 2013, at 9:37 AM, Howard Hinnant <howard.hinnant at gmail.com> wrote:
>> On Jul 2, 2013, at 2:43 PM, Marshall Clow <mclow.lists at gmail.com> wrote:
>>> In N3655 (the first half of which was incorporated into C++14), Walter added a bunch of template aliases to simplify template metaprogramming.
>>> Lots of stuff like this:
>>> template <class T> using remove_const_t = typename remove_const<T>::type;
>>> This patch adds all those aliases into libc++, and tests.
>>> Also some drive-by cleanups of existing tests.
>> Thanks Marshall. I think you did your svn diff from the wrong subdirectory. The patch doesn't include an updated <type_traits>.
> Here's a better patch.
Looks pretty good to me. I've enclosed a few differences:
1. I tried to verify that those traits that do work in C++03 mode still worked. But I've let the '03 test suite deteriorate to the point that I was getting too many errors in '03 mode to see what had changed. So I took this opportunity to first make meta test cleanly in '03 mode.
2. To get your patch to test cleanly in C++03 mode I had to wrap static_assert in some irritating '()', and emulate variadics in a couple of tests.
3. I removed 'const' from the size_t in both aligned_storage and aligned_storage_t. That was just a latent bug and this was a good opportunity to clean that up.
4. I removed typename from several of the new tests. The typename didn't hurt, but it was nice to see that it is no longer needed with these new aliases.
You did a nice job with the updated comments, the macro protection and the c++1y protection. I couldn't find anything else to whine about. :-) Oh, I did remove section numbers from the comment section. They get outdated really quickly and become impossible to keep correct.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 113655 bytes
Desc: not available
More information about the cfe-commits