[v3 PATCH] Make the perfect-forwarding constructor of a two-element tuple sfinae away when the first argument is an allocator_arg.
Jonathan Wakely
jwakely@redhat.com
Mon Dec 19 16:32:00 GMT 2016
On 19/12/16 14:34 +0200, Ville Voutilainen wrote:
>On 19 December 2016 at 12:19, Jonathan Wakely <jwakely@redhat.com> wrote:
>> On 18/12/16 13:33 +0200, Ville Voutilainen wrote:
>>>
>>> Andrzej Krzemienski pointed this out in a discussion related to any and
>>> tags.
>>> Our two-element tuple specialization doesn't make the perfect-forwarding
>>> constructor and the allocator constructor properly mutually exclusive;
>>> this
>>> patch fixes that.
>>>
>>> Tested on Linux-x64, ok for trunk, gcc-6 and gcc-5?
>>
>>
>> gcc-6-branch is frozen, so not there.
>
>Not now, but when that branch reopens, presumably then?
Yes please, for the 6.4 release.
>> Should this be reported as a defect in the standard?
>
>I don't think so, the standard doesn't specify a two-argument
>specialization and the variadic
>signature specified doesn't run into this problem. We can certainly
>give the other vendors a heads-up
>in case their implementations suffer from the same problem but the
>standard itself is not defective.
Ah of course, the 2-argument specialization is only implied by the
"only if sizeof...(Types) == 2" comments but not actually specified.
More information about the Libstdc++
mailing list