libstdc++: Add __maybe_const_t and __maybe_empty_t aliases
authorJonathan Wakely <jwakely@redhat.com>
Wed, 26 Feb 2020 15:19:43 +0000 (15:19 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 26 Feb 2020 15:19:43 +0000 (15:19 +0000)
commit8017d95c7f55b98bcee1caf0216fdfd7fd613849
tree1809954a9a655bb8e75f52ca13ca84aaee3736c7
parent4a305fa2fd4c9d553b26efa00f868aa1e4416a9f
libstdc++: Add __maybe_const_t and __maybe_empty_t aliases

This introduces a couple of convenience alias templates to be used for
some repeated patterns using std::conditional_t.

* include/std/ranges (__detail::__maybe_empty_t): Define new helper
alias.
(__detail::__maybe_const_t): Likewise.
(__adaptor::_RangeAdaptor): Use __maybe_empty_t.
(transform_view, take_view, take_while_view, elements_view): Use
__maybe_const_t.
(join_view, split_view): Use both.
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/ranges