@@ -45,48 +45,58 @@ struct default_sentinel_t {
45
45
*/
46
46
LZ_INLINE_VAR constexpr default_sentinel_t default_sentinel{};
47
47
48
- template <class Derived , class Reference , class Pointer , class DifferenceType , class IterCat , class S = Derived>
48
+ } // namespace lz
49
+
50
+ namespace lz {
51
+ namespace detail {
52
+
53
+ template <class Derived , class Reference , class Pointer , class DifferenceType , class IterCat , class S >
49
54
struct iterator ;
50
55
56
+ }
57
+ } // namespace lz
58
+
59
+ LZ_MODULE_EXPORT namespace lz {
60
+
51
61
template <class Derived , class Reference , class Pointer , class DifferenceType , class IterCat , class Sentinel >
52
62
constexpr bool
53
- operator ==(const Sentinel& sent, const iterator<Derived, Reference, Pointer, DifferenceType, IterCat, Sentinel>& it) {
63
+ operator ==(const Sentinel& sent, const detail:: iterator<Derived, Reference, Pointer, DifferenceType, IterCat, Sentinel>& it) {
54
64
return it == sent;
55
65
}
56
66
57
67
template <class Derived , class Reference , class Pointer , class DifferenceType , class IterCat , class Sentinel >
58
- constexpr bool
59
- operator !=( const Sentinel& sent, const iterator<Derived, Reference, Pointer, DifferenceType, IterCat, Sentinel>& it) {
68
+ constexpr bool operator !=( const Sentinel& sent,
69
+ const detail:: iterator<Derived, Reference, Pointer, DifferenceType, IterCat, Sentinel>& it) {
60
70
return !(it == sent);
61
71
}
62
72
63
73
template <class Derived , class Reference , class Pointer , class DifferenceType , class IterCat , class Sentinel >
64
- LZ_NODISCARD constexpr bool
65
- operator <( const Sentinel& sent, const iterator<Derived, Reference, Pointer, DifferenceType, IterCat, Sentinel>& it) {
74
+ LZ_NODISCARD constexpr bool operator <(
75
+ const Sentinel& sent, const detail:: iterator<Derived, Reference, Pointer, DifferenceType, IterCat, Sentinel>& it) {
66
76
return sent - it < 0 ;
67
77
}
68
78
69
79
template <class Derived , class Reference , class Pointer , class DifferenceType , class IterCat , class Sentinel >
70
- LZ_NODISCARD constexpr bool
71
- operator >( const Sentinel& sent, const iterator<Derived, Reference, Pointer, DifferenceType, IterCat, Sentinel>& it) {
80
+ LZ_NODISCARD constexpr bool operator >(
81
+ const Sentinel& sent, const detail:: iterator<Derived, Reference, Pointer, DifferenceType, IterCat, Sentinel>& it) {
72
82
return it < sent;
73
83
}
74
84
75
85
template <class Derived , class Reference , class Pointer , class DifferenceType , class IterCat , class Sentinel >
76
- LZ_NODISCARD constexpr bool
77
- operator <=( const Sentinel& sent, const iterator<Derived, Reference, Pointer, DifferenceType, IterCat, Sentinel>& it) {
86
+ LZ_NODISCARD constexpr bool operator <=(
87
+ const Sentinel& sent, const detail:: iterator<Derived, Reference, Pointer, DifferenceType, IterCat, Sentinel>& it) {
78
88
return !(it < sent);
79
89
}
80
90
81
91
template <class Derived , class Reference , class Pointer , class DifferenceType , class IterCat , class Sentinel >
82
- LZ_NODISCARD constexpr bool
83
- operator >=( const Sentinel& sent, const iterator<Derived, Reference, Pointer, DifferenceType, IterCat, Sentinel>& it) {
92
+ LZ_NODISCARD constexpr bool operator >=(
93
+ const Sentinel& sent, const detail:: iterator<Derived, Reference, Pointer, DifferenceType, IterCat, Sentinel>& it) {
84
94
return !(sent < it);
85
95
}
86
96
87
97
template <class Derived , class Reference , class Pointer , class DifferenceType , class IterCat , class Sentinel >
88
- LZ_NODISCARD constexpr typename Derived::difference_type
89
- operator -( const Sentinel& sent, const iterator<Derived, Reference, Pointer, DifferenceType, IterCat, Sentinel>& it) {
98
+ LZ_NODISCARD constexpr typename Derived::difference_type operator -(
99
+ const Sentinel& sent, const detail:: iterator<Derived, Reference, Pointer, DifferenceType, IterCat, Sentinel>& it) {
90
100
return -(it - sent);
91
101
}
92
102
0 commit comments