[Patch] Fix variant::operator= on references

Tim Shen timshen@google.com
Thu Sep 22 10:36:00 GMT 2016


On Thu, Sep 22, 2016 at 3:03 AM, Jonathan Wakely <jwakely@redhat.com> wrote:
> On 22/09/16 01:49 -0700, Tim Shen wrote:
>>
>> Done. When writing the initial version, I was trying to save as much
>> qualifications as possible (as long as the semantic doesn't change)
>> for readability, but that might not be a good idea.
>
>
> It does change the semantics, as forward<_Tp>(__tp) can find another
> function via ADL (see the new test in this patch).

Then my question is, what about type traits uses like
is_copy_constructible? I have seen non-qualified uses in std::any and
std::optional and other places. Should all of them be qualified?

>
> Tested powerpc64le-linux, committed to trunk.
>
>



-- 
Regards,
Tim Shen



More information about the Libstdc++ mailing list