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

Daniel Krügler daniel.kruegler@gmail.com
Wed Feb 26 18:31:00 GMT 2020


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.

Thanks,

- Daniel



More information about the Libstdc++ mailing list