|
24 | 24 | #include "encodedstream.h"
|
25 | 25 | #include <new> // placement new
|
26 | 26 | #include <limits>
|
27 |
| -#ifdef __cpp_impl_three_way_comparison |
| 27 | +#ifdef __cpp_lib_three_way_comparison |
28 | 28 | #include <compare>
|
29 | 29 | #endif
|
30 | 30 |
|
@@ -250,16 +250,15 @@ class GenericMemberIterator {
|
250 | 250 |
|
251 | 251 | //! @name relations
|
252 | 252 | //@{
|
253 |
| -#ifdef __cpp_impl_three_way_comparison |
254 |
| - template <bool Const_> bool operator==(const GenericMemberIterator<Const_,Encoding,Allocator>& that) const { return ptr_ == that.ptr_; } |
255 |
| - template <bool Const_> std::strong_ordering operator<=>(const GenericMemberIterator<Const_,Encoding,Allocator>& that) const { return ptr_ <=> that.ptr_; } |
256 |
| -#else |
257 |
| - bool operator==(ConstIterator that) const { return ptr_ == that.ptr_; } |
258 |
| - bool operator!=(ConstIterator that) const { return ptr_ != that.ptr_; } |
259 |
| - bool operator<=(ConstIterator that) const { return ptr_ <= that.ptr_; } |
260 |
| - bool operator>=(ConstIterator that) const { return ptr_ >= that.ptr_; } |
261 |
| - bool operator< (ConstIterator that) const { return ptr_ < that.ptr_; } |
262 |
| - bool operator> (ConstIterator that) const { return ptr_ > that.ptr_; } |
| 253 | + template <bool Const_> bool operator==(const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ == that.ptr_; } |
| 254 | + template <bool Const_> bool operator!=(const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ != that.ptr_; } |
| 255 | + template <bool Const_> bool operator<=(const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ <= that.ptr_; } |
| 256 | + template <bool Const_> bool operator>=(const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ >= that.ptr_; } |
| 257 | + template <bool Const_> bool operator< (const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ < that.ptr_; } |
| 258 | + template <bool Const_> bool operator> (const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ > that.ptr_; } |
| 259 | + |
| 260 | +#ifdef __cpp_lib_three_way_comparison |
| 261 | + template <bool Const_> std::strong_ordering operator<=>(const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ <=> that.ptr_; } |
263 | 262 | #endif
|
264 | 263 | //@}
|
265 | 264 |
|
|
0 commit comments