LWG Issue 2141: common type

Marshall Clow mclow.lists at gmail.com
Sun Oct 6 09:37:25 PDT 2013


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.

-- 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 --------------
A non-text attachment was scrubbed...
Name: ish2141.patch
Type: application/octet-stream
Size: 5126 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131006/76c970d3/attachment.obj>


More information about the cfe-commits mailing list