libstdc++: Implement missing operator overloads in max_size_type.h
authorPatrick Palka <ppalka@redhat.com>
Mon, 15 Mar 2021 14:31:45 +0000 (10:31 -0400)
committerPatrick Palka <ppalka@redhat.com>
Mon, 15 Mar 2021 14:31:45 +0000 (10:31 -0400)
commitdce586ff83e5bf86956cb24e646c7b9a21283ce4
treebda38ab3ea0d336f441ad1c8d4ce229571bad175
parent33f36b34ac20d410d07ff4d144fc8165efcc11ef
libstdc++: Implement missing operator overloads in max_size_type.h

This implements operator++, operator-- and operator<=> for the
integer-class types defined in max_size_type.h, which I overlooked
when originally implementing the class.

libstdc++-v3/ChangeLog:

* include/bits/max_size_type.h (__max_size_type::operator _Tp):
Fix formatting.
(__max_size_type::operator++): Define.
(__max_size_type::operator--): Likewise.
(__max_size_type::operator<=>): Conditionally define (in place
of the other comparison operators).
(__max_diff_type::operator _Tp): Fix formatting.
(__max_diff_type::operator++): Define.
(__max_diff_type::operator--): Likewise.
(__max_diff_type::operator<=>): Conditionally define (in place
of the other comparison operators).
* testsuite/std/ranges/iota/max_size_type.cc (test01): Test
these operator overloads.
libstdc++-v3/include/bits/max_size_type.h
libstdc++-v3/testsuite/std/ranges/iota/max_size_type.cc