libcxx patch for N3655
mclow.lists at gmail.com
Wed Jul 3 17:12:46 PDT 2013
On Jul 3, 2013, at 2:31 PM, Howard Hinnant <hhinnant at apple.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.
> 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.
Committed as 185597.
Marshall Clow Idio Software <mailto:mclow.lists at gmail.com>
A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
-- Yu Suzuki
More information about the cfe-commits