This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [committed] libstdc++: Add __maybe_const_t and __maybe_empty_t aliases
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Daniel Krügler <daniel dot kruegler at gmail dot com>
- Cc: Jonathan Wakely <jwakely at redhat dot com>, "libstdc++" <libstdc++ at gcc dot gnu dot org>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 27 Feb 2020 00:02:02 +0000
- Subject: Re: [committed] libstdc++: Add __maybe_const_t and __maybe_empty_t aliases
- References: <20200226152024.GA2443959@redhat.com> <CAGNvRgC3mjPEULD9kWOZKTmYzhNbnEmzdZniZidCOBHzek83tg@mail.gmail.com>
On Wed, 26 Feb 2020 at 18:31, Daniel Krügler wrote:
>
> Am Mi., 26. Feb. 2020 um 16:20 Uhr schrieb Jonathan Wakely <jwakely@redhat.com>:
> >
> > This introduces a couple of convenience alias templates to be used for
> > some repeated patterns using std::conditional_t.
>
> I find it a bit confusing/inconsistent to define __maybe_const_t such
> that the bool argument says "is const", while for __maybe_empty_t the
> corresponding bool argument says "is not empty". Suggestion: Implement
> __maybe_empty_t such that its bool argument says "is empty" or change
> the alias to __maybe_nonempty_t.
Good point, I'll make that change. Thanks.