[libcxx] r185863 - Implement n3668 - std::exchange

Marshall Clow mclow.lists at gmail.com
Wed Jul 10 11:03:40 PDT 2013


On Jul 8, 2013, at 2:12 PM, Richard Smith <richard at metafoo.co.uk> wrote:

> On Mon, Jul 8, 2013 at 1:54 PM, Marshall Clow <mclow.lists at gmail.com> wrote:
>> Author: marshall
>> Date: Mon Jul  8 15:54:40 2013
>> New Revision: 185863
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=185863&view=rev
>> Log:
>> Implement n3668 - std::exchange
>> 
>> Added:
>>    libcxx/trunk/test/utilities/utility/exchange/
>>    libcxx/trunk/test/utilities/utility/exchange/exchange.pass.cpp
>> Modified:
>>    libcxx/trunk/include/utility
>> 
>> Modified: libcxx/trunk/include/utility
>> URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/utility?rev=185863&r1=185862&r2=185863&view=diff
>> ==============================================================================
>> --- libcxx/trunk/include/utility (original)
[ snippage]
> 
> It'd be useful to also test std::exchange's default template argument
> trick, for the case where U is not deducible. Something like:
> 
>  std::exchange( s3, {} )

Good idea!

Committed revision 186022. 

-- 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





More information about the cfe-commits mailing list