This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3 PATCH] Make optional's comparisons be two-parameter templates.
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Ville Voutilainen <ville dot voutilainen at gmail dot com>
- Cc: 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: Fri, 10 Mar 2017 15:23:43 +0000
- Subject: Re: [v3 PATCH] Make optional's comparisons be two-parameter templates.
- Authentication-results: sourceware.org; auth=none
- References: <CAFk2RUaQN6ecy=+v_b4tMMyCFV+ABsh9oBczQtyvaTZFb-YVoQ@mail.gmail.com>
On 19/02/17 17:53 +0200, Ville Voutilainen wrote:
This has not been adopted by LEWG/LWG yet, but was submitted
as a proposed resolution for a new LWG issue; optional<const T> can't
current be compared to a T, and an optional<T> can't be compared
to something non-T that is comparable to a T. This approach fixes
both of those problems, allowing optional's comparisons to actually
work like the comparisons of the underlying type.
Tested on Linux-x64.
Please mention LWG 2934 in the changelog. OK for trunk, thanks.