std::pair copy and move constructor

François Dumont frs.dumont@gmail.com
Sat Feb 16 09:47:00 GMT 2013


On 02/15/2013 10:00 PM, Daniel Krügler wrote:
> 2013/2/15 François Dumont <frs.dumont@gmail.com>:
>> Hi
>>
>>      I had a problem with the result of
>> std::is_copy_assignable<std::pair<const int, int>>::type which used to be
>> true_type. So here is a patch to fix that.
> This patch would break with the requirements of the library. In
> particular it would prevent that std::pair's of references are
> copy-assignable and that exactly is the purpose for the user-provided
> copy-assignment operators of pair (and tuple).

I knew there must have been something.

Is there a test showing this problem ? Cause I see no regression with 
this patch. Add having std::is_copy_assignable<std::pair<const int, 
int>> being true_type is a problem, no ?

François



More information about the Libstdc++ mailing list