This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3 PATCH] PR libstdc++/77288 and the newest proposed resolution for LWG 2756
- From: Christophe Lyon <christophe dot lyon at linaro dot org>
- To: Ville Voutilainen <ville dot voutilainen at gmail dot com>
- Cc: Jonathan Wakely <jwakely at redhat dot com>, "libstdc++" <libstdc++ at gcc dot gnu dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 22 Sep 2016 10:55:43 +0200
- Subject: Re: [v3 PATCH] PR libstdc++/77288 and the newest proposed resolution for LWG 2756
- Authentication-results: sourceware.org; auth=none
- References: <CAFk2RUYEMvG5hwUbfr8OKBfSrXz89Vr1NJJFnEZAMvc4M=hTvw@mail.gmail.com> <CAFk2RUYZz9MEjFr-g7j-x-vFmysHigoUPvpsyYbwhuySwjBh8g@mail.gmail.com> <20160921093115.GI17376@redhat.com> <CAFk2RUZay+zaXXw4z6ipoSweY=Ldgf7eEB5jJDtYw3BcdqM=ug@mail.gmail.com>
Hi,
On 21 September 2016 at 21:42, Ville Voutilainen
<ville.voutilainen@gmail.com> wrote:
> On 21 September 2016 at 12:31, Jonathan Wakely <jwakely@redhat.com> wrote:
>> On 06/09/16 09:00 +0300, Ville Voutilainen wrote:
>>>
>>> PR libstdc++/77288
>>> * include/std/optional (__is_optional_impl, __is_optional): Remove.
>>> (__converts_from_optional, __assigns_from_optional): New.
>>> (optional(_Up&&)): Use is_same instead of __is_optional.
>>> (optional(const optional<_Up>&)): Constrain with
>>> __converts_from_optional.
>>> (optional(optional<_Up>&&)): Likewise.
>>> (operator=(_Up&&)): Use is_same instead of __is_optional, check
>>> is_same and is_scalar.
>>> (operator=(const optional<_Up>&)): Constrain with
>>> __converts_from_optional and __assigns_from_optional.
>>> (operator=(optional<_Up>&&)): Likewise.
>>> * testsuite/20_util/optional/77288.cc: New.
>>> * testsuite/20_util/optional/cons/value.cc: Adjust.
>>
>>
>> OK for trunk, thanks.
>
> Thanks, applied - I will cook up a separate patch for making the same
> fix for experimental::optional.
> The plan is to then backport that one to the gcc-6 branch.
The new test 77288.cc fails on old arm targets (armv5t):
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/20_util/optional/77288.cc:
In function 'void test01()':
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/20_util/optional/77288.cc:31:
error: 'exception_ptr' is not a member of 'std'
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/20_util/optional/77288.cc:31:
error: template argument 1 is invalid
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/20_util/optional/77288.cc:31:
error: template argument 1 is invalid
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/20_util/optional/77288.cc:32:
error: 'exception_ptr' is not a member of 'std'
/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/20_util/optional/77288.cc:32:
error: template argument 1 is invalid
Christophe