[committed] libstdc++: Add __maybe_const_t and __maybe_empty_t aliases

Jonathan Wakely jwakely.gcc@gmail.com
Thu Feb 27 00:02:00 GMT 2020


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.



More information about the Libstdc++ mailing list