LWG Issue 2141: common type

Marshall Clow mclow.lists at gmail.com
Mon Oct 7 13:36:50 PDT 2013


On Oct 7, 2013, at 1:26 PM, Richard Smith <richard at metafoo.co.uk> wrote:
> On Sun, Oct 6, 2013 at 9:37 AM, Marshall Clow <mclow.lists at gmail.com> wrote:
> Ref: http://cplusplus.github.io/LWG/lwg-defects.html#2141
> 
> Fix common_type to match the suggested implementation in the standard.
> Add tests to make sure it (now) does what it should.
> 
> Also, a drive by fix on the tests for is_trivially_copyable. Clang recently fixed a bug in the intrinsic that libc++ uses for this type_trait, and this exposed an error in the test suite.
> 
> Note that most of the change in <type_traits> is from hoisting the definition of std::decay from the end of the file to somewhere closer to the front.
> That's just a movement of source code - there are no changes to decay.
> 
> You don't seem to have any test coverage outside C++1y mode. Could you move the tests out of the _LIBCPP_STD_VER > 11 block and switch them from common_type_t to common_type<...>::type ?

No. (at least to your specific request).
There needs to be tests for common_type_t (which is C++14 specific)

However, I'll look into moving some of the other tests outside the #if _LIBCPP_STD_VER > 11 block.

-- Marshall

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131007/ba9652eb/attachment.html>


More information about the cfe-commits mailing list