tudocomp
– The TU Dortmund Compression Framework
IntegerBase.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 namespace tdc {
4 
5 static_assert(sizeof(int) * 8 == 32, "Make sure the logic here remains correct");
6 
7 template<class T, class X = void>
9 };
10 
11 template<class T, class X = void>
13 };
14 
15 template<class Self>
17 template<class Self, class Other>
19 template<class Self, class Other>
21 
22 template<class Self, class Other>
24 public:
26 private:
27  inline static SelfMaxBit cast_for_32_op(const Self& self) {
28  return ConstIntegerBaseTrait<Self>::Dispatch::template cast_for_op<Self, SelfMaxBit>(self);
29  }
30 
31  friend class IntegerBaseWith32<Self, Other>;
32 public:
33  friend SelfMaxBit operator+(const Other& lhs, const Self& rhs) { return lhs + cast_for_32_op(rhs); }
34  friend SelfMaxBit operator+(const Self& lhs, const Other& rhs) { return cast_for_32_op(lhs) + rhs; }
35 
36  friend SelfMaxBit operator-(const Other& lhs, const Self& rhs) { return lhs - cast_for_32_op(rhs); }
37  friend SelfMaxBit operator-(const Self& lhs, const Other& rhs) { return cast_for_32_op(lhs) - rhs; }
38 
39  friend SelfMaxBit operator*(const Other& lhs, const Self& rhs) { return lhs * cast_for_32_op(rhs); }
40  friend SelfMaxBit operator*(const Self& lhs, const Other& rhs) { return cast_for_32_op(lhs) * rhs; }
41 
42  friend SelfMaxBit operator/(const Other& lhs, const Self& rhs) { return lhs / cast_for_32_op(rhs); }
43  friend SelfMaxBit operator/(const Self& lhs, const Other& rhs) { return cast_for_32_op(lhs) / rhs; }
44 
45  friend SelfMaxBit operator%(const Other& lhs, const Self& rhs) { return lhs % cast_for_32_op(rhs); }
46  friend SelfMaxBit operator%(const Self& lhs, const Other& rhs) { return cast_for_32_op(lhs) % rhs; }
47 
48  friend SelfMaxBit operator&(const Other& lhs, const Self& rhs) { return lhs & cast_for_32_op(rhs); }
49  friend SelfMaxBit operator&(const Self& lhs, const Other& rhs) { return cast_for_32_op(lhs) & rhs; }
50 
51  friend SelfMaxBit operator|(const Other& lhs, const Self& rhs) { return lhs | cast_for_32_op(rhs); }
52  friend SelfMaxBit operator|(const Self& lhs, const Other& rhs) { return cast_for_32_op(lhs) | rhs; }
53 
54  friend SelfMaxBit operator^(const Other& lhs, const Self& rhs) { return lhs ^ cast_for_32_op(rhs); }
55  friend SelfMaxBit operator^(const Self& lhs, const Other& rhs) { return cast_for_32_op(lhs) ^ rhs; }
56 
57  friend SelfMaxBit operator<<(const Other& lhs, const Self& rhs) { return lhs << cast_for_32_op(rhs); }
58  friend SelfMaxBit operator<<(const Self& lhs, const Other& rhs) { return cast_for_32_op(lhs) << rhs; }
59 
60  friend SelfMaxBit operator>>(const Other& lhs, const Self& rhs) { return lhs >> cast_for_32_op(rhs); }
61  friend SelfMaxBit operator>>(const Self& lhs, const Other& rhs) { return cast_for_32_op(lhs) >> rhs; }
62 
63  friend bool operator==(const Other& lhs, const Self& rhs) { return lhs == cast_for_32_op(rhs); }
64  friend bool operator==(const Self& lhs, const Other& rhs) { return cast_for_32_op(lhs) == rhs; }
65 
66  friend bool operator!=(const Other& lhs, const Self& rhs) { return lhs != cast_for_32_op(rhs); }
67  friend bool operator!=(const Self& lhs, const Other& rhs) { return cast_for_32_op(lhs) != rhs; }
68 
69  friend bool operator>(const Other& lhs, const Self& rhs) { return lhs > cast_for_32_op(rhs); }
70  friend bool operator>(const Self& lhs, const Other& rhs) { return cast_for_32_op(lhs) > rhs; }
71 
72  friend bool operator<(const Other& lhs, const Self& rhs) { return lhs < cast_for_32_op(rhs); }
73  friend bool operator<(const Self& lhs, const Other& rhs) { return cast_for_32_op(lhs) < rhs; }
74 
75  friend bool operator>=(const Other& lhs, const Self& rhs) { return lhs >= cast_for_32_op(rhs); }
76  friend bool operator>=(const Self& lhs, const Other& rhs) { return cast_for_32_op(lhs) >= rhs; }
77 
78  friend bool operator<=(const Other& lhs, const Self& rhs) { return lhs <= cast_for_32_op(rhs); }
79  friend bool operator<=(const Self& lhs, const Other& rhs) { return cast_for_32_op(lhs) <= rhs; }
80 };
81 
82 template<class Self, class Other>
84 public:
86 private:
87  inline static Other cast_for_64_op(const Self& self) {
88  return ConstIntegerBaseTrait<Self>::Dispatch::template cast_for_op<Self, uint64_t>(self);
89  }
90 
91  friend class IntegerBaseWith64<Self, Other>;
92 public:
93  friend Other operator+(const Other& lhs, const Self& rhs) { return lhs + cast_for_64_op(rhs); }
94  friend Other operator+(const Self& lhs, const Other& rhs) { return cast_for_64_op(lhs) + rhs; }
95 
96  friend Other operator-(const Other& lhs, const Self& rhs) { return lhs - cast_for_64_op(rhs); }
97  friend Other operator-(const Self& lhs, const Other& rhs) { return cast_for_64_op(lhs) - rhs; }
98 
99  friend Other operator*(const Other& lhs, const Self& rhs) { return lhs * cast_for_64_op(rhs); }
100  friend Other operator*(const Self& lhs, const Other& rhs) { return cast_for_64_op(lhs) * rhs; }
101 
102  friend Other operator/(const Other& lhs, const Self& rhs) { return lhs / cast_for_64_op(rhs); }
103  friend Other operator/(const Self& lhs, const Other& rhs) { return cast_for_64_op(lhs) / rhs; }
104 
105  friend Other operator%(const Other& lhs, const Self& rhs) { return lhs % cast_for_64_op(rhs); }
106  friend Other operator%(const Self& lhs, const Other& rhs) { return cast_for_64_op(lhs) % rhs; }
107 
108  friend Other operator&(const Other& lhs, const Self& rhs) { return lhs & cast_for_64_op(rhs); }
109  friend Other operator&(const Self& lhs, const Other& rhs) { return cast_for_64_op(lhs) & rhs; }
110 
111  friend Other operator|(const Other& lhs, const Self& rhs) { return lhs | cast_for_64_op(rhs); }
112  friend Other operator|(const Self& lhs, const Other& rhs) { return cast_for_64_op(lhs) | rhs; }
113 
114  friend Other operator^(const Other& lhs, const Self& rhs) { return lhs ^ cast_for_64_op(rhs); }
115  friend Other operator^(const Self& lhs, const Other& rhs) { return cast_for_64_op(lhs) ^ rhs; }
116 
117  friend Other operator<<(const Other& lhs, const Self& rhs) { return lhs << cast_for_64_op(rhs); }
118  friend Other operator<<(const Self& lhs, const Other& rhs) { return cast_for_64_op(lhs) << rhs; }
119 
120  friend Other operator>>(const Other& lhs, const Self& rhs) { return lhs >> cast_for_64_op(rhs); }
121  friend Other operator>>(const Self& lhs, const Other& rhs) { return cast_for_64_op(lhs) >> rhs; }
122 
123  friend bool operator==(const Other& lhs, const Self& rhs) { return lhs == cast_for_64_op(rhs); }
124  friend bool operator==(const Self& lhs, const Other& rhs) { return cast_for_64_op(lhs) == rhs; }
125 
126  friend bool operator!=(const Other& lhs, const Self& rhs) { return lhs != cast_for_64_op(rhs); }
127  friend bool operator!=(const Self& lhs, const Other& rhs) { return cast_for_64_op(lhs) != rhs; }
128 
129  friend bool operator>(const Other& lhs, const Self& rhs) { return lhs > cast_for_64_op(rhs); }
130  friend bool operator>(const Self& lhs, const Other& rhs) { return cast_for_64_op(lhs) > rhs; }
131 
132  friend bool operator<(const Other& lhs, const Self& rhs) { return lhs < cast_for_64_op(rhs); }
133  friend bool operator<(const Self& lhs, const Other& rhs) { return cast_for_64_op(lhs) < rhs; }
134 
135  friend bool operator>=(const Other& lhs, const Self& rhs) { return lhs >= cast_for_64_op(rhs); }
136  friend bool operator>=(const Self& lhs, const Other& rhs) { return cast_for_64_op(lhs) >= rhs; }
137 
138  friend bool operator<=(const Other& lhs, const Self& rhs) { return lhs <= cast_for_64_op(rhs); }
139  friend bool operator<=(const Self& lhs, const Other& rhs) { return cast_for_64_op(lhs) <= rhs; }
140 };
141 
142 template<class Self>
144 public:
146 private:
147  inline static SelfMaxBit cast_for_self_op(const Self& self) {
148  return ConstIntegerBaseTrait<Self>::Dispatch::template cast_for_op<Self, SelfMaxBit>(self);
149  }
150 
151  friend class IntegerBaseWithSelf<Self>;
152 public:
153  friend SelfMaxBit operator+(const Self& lhs, const Self& rhs) { return cast_for_self_op(lhs) + cast_for_self_op(rhs); }
154  friend SelfMaxBit operator-(const Self& lhs, const Self& rhs) { return cast_for_self_op(lhs) - cast_for_self_op(rhs); }
155  friend SelfMaxBit operator*(const Self& lhs, const Self& rhs) { return cast_for_self_op(lhs) * cast_for_self_op(rhs); }
156  friend SelfMaxBit operator/(const Self& lhs, const Self& rhs) { return cast_for_self_op(lhs) / cast_for_self_op(rhs); }
157  friend SelfMaxBit operator%(const Self& lhs, const Self& rhs) { return cast_for_self_op(lhs) % cast_for_self_op(rhs); }
158  friend SelfMaxBit operator&(const Self& lhs, const Self& rhs) { return cast_for_self_op(lhs) & cast_for_self_op(rhs); }
159  friend SelfMaxBit operator|(const Self& lhs, const Self& rhs) { return cast_for_self_op(lhs) | cast_for_self_op(rhs); }
160  friend SelfMaxBit operator^(const Self& lhs, const Self& rhs) { return cast_for_self_op(lhs) ^ cast_for_self_op(rhs); }
161  friend SelfMaxBit operator~(const Self& self) { return ~(cast_for_self_op(self)); }
162  friend SelfMaxBit operator<<(const Self& lhs, const Self& rhs) { return cast_for_self_op(lhs) << cast_for_self_op(rhs); }
163  friend SelfMaxBit operator>>(const Self& lhs, const Self& rhs) { return cast_for_self_op(lhs) >> cast_for_self_op(rhs); }
164  friend bool operator==(const Self& lhs, const Self& rhs) { return cast_for_self_op(lhs) == cast_for_self_op(rhs); }
165  friend bool operator!=(const Self& lhs, const Self& rhs) { return cast_for_self_op(lhs) != cast_for_self_op(rhs); }
166  friend bool operator>(const Self& lhs, const Self& rhs) { return cast_for_self_op(lhs) > cast_for_self_op(rhs); }
167  friend bool operator<(const Self& lhs, const Self& rhs) { return cast_for_self_op(lhs) < cast_for_self_op(rhs); }
168  friend bool operator>=(const Self& lhs, const Self& rhs) { return cast_for_self_op(lhs) >= cast_for_self_op(rhs); }
169  friend bool operator<=(const Self& lhs, const Self& rhs) { return cast_for_self_op(lhs) <= cast_for_self_op(rhs); }
170 };
171 
172 template<typename...>
174 
175 template<typename T, typename... Ts>
176 class ConstIntegerBaseCombiner<T, Ts...>: public T, public ConstIntegerBaseCombiner<Ts...> {
177 };
178 
179 template<typename T>
180 class ConstIntegerBaseCombiner<T>: public T {
181 };
182 
183 template<class Self>
197 >;
198 
199 template<class Self, class Other>
200 class IntegerBaseWith32: public ConstIntegerBaseWith32<Self, Other> {
201 private:
202  inline static void assign(Self& self, uint32_t v) {
203  IntegerBaseTrait<Self>::Dispatch::template assign<Self, uint32_t>(self, v);
204  }
205 
206  inline static void assign(Self& self, uint64_t v) {
207  IntegerBaseTrait<Self>::Dispatch::template assign<Self, uint64_t>(self, v);
208  }
209 public:
210  Self& operator+=(const Other& v) { auto& self = static_cast<Self&>(*this); assign(self, self + v); return self; }
211  Self& operator-=(const Other& v) { auto& self = static_cast<Self&>(*this); assign(self, self - v); return self; }
212  Self& operator*=(const Other& v) { auto& self = static_cast<Self&>(*this); assign(self, self * v); return self; }
213  Self& operator/=(const Other& v) { auto& self = static_cast<Self&>(*this); assign(self, self / v); return self; }
214  Self& operator%=(const Other& v) { auto& self = static_cast<Self&>(*this); assign(self, self % v); return self; }
215  Self& operator&=(const Other& v) { auto& self = static_cast<Self&>(*this); assign(self, self & v); return self; }
216  Self& operator|=(const Other& v) { auto& self = static_cast<Self&>(*this); assign(self, self | v); return self; }
217  Self& operator^=(const Other& v) { auto& self = static_cast<Self&>(*this); assign(self, self ^ v); return self; }
218  Self& operator>>=(const Other& v) { auto& self = static_cast<Self&>(*this); assign(self, self >> v); return self; }
219  Self& operator<<=(const Other& v) { auto& self = static_cast<Self&>(*this); assign(self, self << v); return self; }
220 };
221 
222 template<class Self, class Other>
223 class IntegerBaseWith64: public ConstIntegerBaseWith64<Self, Other> {
224 private:
225  inline static void assign(Self& self, uint32_t v) {
226  IntegerBaseTrait<Self>::Dispatch::template assign<Self, uint32_t>(self, v);
227  }
228 
229  inline static void assign(Self& self, uint64_t v) {
230  IntegerBaseTrait<Self>::Dispatch::template assign<Self, uint64_t>(self, v);
231  }
232 public:
233  Self& operator+=(const Other& v) { auto& self = static_cast<Self&>(*this); assign(self, self + v); return self; }
234  Self& operator-=(const Other& v) { auto& self = static_cast<Self&>(*this); assign(self, self - v); return self; }
235  Self& operator*=(const Other& v) { auto& self = static_cast<Self&>(*this); assign(self, self * v); return self; }
236  Self& operator/=(const Other& v) { auto& self = static_cast<Self&>(*this); assign(self, self / v); return self; }
237  Self& operator%=(const Other& v) { auto& self = static_cast<Self&>(*this); assign(self, self % v); return self; }
238  Self& operator&=(const Other& v) { auto& self = static_cast<Self&>(*this); assign(self, self & v); return self; }
239  Self& operator|=(const Other& v) { auto& self = static_cast<Self&>(*this); assign(self, self | v); return self; }
240  Self& operator^=(const Other& v) { auto& self = static_cast<Self&>(*this); assign(self, self ^ v); return self; }
241  Self& operator>>=(const Other& v) { auto& self = static_cast<Self&>(*this); assign(self, self >> v); return self; }
242  Self& operator<<=(const Other& v) { auto& self = static_cast<Self&>(*this); assign(self, self << v); return self; }
243 };
244 
245 template<class Self>
246 class IntegerBaseWithSelf: public ConstIntegerBaseWithSelf<Self> {
247 private:
249  inline static SelfMaxBit cast_for_self_op(const Self& self) {
250  return ConstIntegerBaseTrait<Self>::Dispatch::template cast_for_op<Self, SelfMaxBit>(self);
251  }
252 
253  inline static void assign(Self& self, uint32_t v) {
254  IntegerBaseTrait<Self>::Dispatch::template assign<Self, uint32_t>(self, v);
255  }
256 
257  inline static void assign(Self& self, uint64_t v) {
258  IntegerBaseTrait<Self>::Dispatch::template assign<Self, uint64_t>(self, v);
259  }
260 public:
261  Self& operator+=(const Self& v) { auto& self = static_cast<Self&>(*this); assign(self, self + v); return self; }
262  Self& operator-=(const Self& v) { auto& self = static_cast<Self&>(*this); assign(self, self - v); return self; }
263  Self& operator*=(const Self& v) { auto& self = static_cast<Self&>(*this); assign(self, self * v); return self; }
264  Self& operator/=(const Self& v) { auto& self = static_cast<Self&>(*this); assign(self, self / v); return self; }
265  Self& operator%=(const Self& v) { auto& self = static_cast<Self&>(*this); assign(self, self % v); return self; }
266 
267  Self& operator++() { auto& self = static_cast<Self&>(*this); assign(self, self + 1u); return self; }
268  Self& operator--() { auto& self = static_cast<Self&>(*this); assign(self, self - 1u); return self; }
269  SelfMaxBit operator++(int) { auto& self = static_cast<Self&>(*this); auto tmp = cast_for_self_op(self); assign(self, self + 1u); return tmp; }
270  SelfMaxBit operator--(int) { auto& self = static_cast<Self&>(*this); auto tmp = cast_for_self_op(self); assign(self, self - 1u); return tmp; }
271 
272  Self& operator&=(const Self& v) { auto& self = static_cast<Self&>(*this); assign(self, self & v); return self; }
273  Self& operator|=(const Self& v) { auto& self = static_cast<Self&>(*this); assign(self, self | v); return self; }
274  Self& operator^=(const Self& v) { auto& self = static_cast<Self&>(*this); assign(self, self ^ v); return self; }
275  Self& operator>>=(const Self& v) { auto& self = static_cast<Self&>(*this); assign(self, self >> v); return self; }
276  Self& operator<<=(const Self& v) { auto& self = static_cast<Self&>(*this); assign(self, self << v); return self; }
277 };
278 
279 
280 // NB: This is a hack needed to get the lookup rules for the operator memebers
281 // play nice. The basic issue is that different overloads in different base
282 // classes will be considered ambigious, so we need to import them all into
283 // the same base class.
284 
285 template<typename...>
287 
288 template<typename T, typename... Ts>
289 class IntegerBaseCombiner<T, Ts...>: public T, public IntegerBaseCombiner<Ts...> {
290 public:
291  using T::operator +=;
292  using T::operator -=;
293  using T::operator *=;
294  using T::operator /=;
295  using T::operator %=;
296  using T::operator &=;
297  using T::operator |=;
298  using T::operator ^=;
299  using T::operator >>=;
300  using T::operator <<=;
301 
302  using IntegerBaseCombiner<Ts...>::operator +=;
303  using IntegerBaseCombiner<Ts...>::operator -=;
304  using IntegerBaseCombiner<Ts...>::operator *=;
305  using IntegerBaseCombiner<Ts...>::operator /=;
306  using IntegerBaseCombiner<Ts...>::operator %=;
307  using IntegerBaseCombiner<Ts...>::operator &=;
308  using IntegerBaseCombiner<Ts...>::operator |=;
309  using IntegerBaseCombiner<Ts...>::operator ^=;
310  using IntegerBaseCombiner<Ts...>::operator >>=;
311  using IntegerBaseCombiner<Ts...>::operator <<=;
312 };
313 
314 template<typename T>
315 class IntegerBaseCombiner<T>: public T {
316 public:
317  using T::operator +=;
318  using T::operator -=;
319  using T::operator *=;
320  using T::operator /=;
321  using T::operator %=;
322  using T::operator &=;
323  using T::operator |=;
324  using T::operator ^=;
325  using T::operator >>=;
326  using T::operator <<=;
327 };
328 
329 template<class Self>
343 >;
344 
345 }
346 
friend bool operator<=(const Self &lhs, const Other &rhs)
Definition: IntegerBase.hpp:79
Self & operator^=(const Other &v)
friend SelfMaxBit operator<<(const Other &lhs, const Self &rhs)
Definition: IntegerBase.hpp:57
Contains the text compression and encoding framework.
Definition: namespaces.hpp:11
Self & operator<<=(const Other &v)
friend bool operator!=(const Other &lhs, const Self &rhs)
friend bool operator>(const Self &lhs, const Other &rhs)
Self & operator*=(const Self &v)
friend bool operator<(const Other &lhs, const Self &rhs)
Self & operator+=(const Other &v)
friend SelfMaxBit operator%(const Self &lhs, const Self &rhs)
friend Other operator%(const Self &lhs, const Other &rhs)
friend Other operator-(const Self &lhs, const Other &rhs)
Definition: IntegerBase.hpp:97
friend SelfMaxBit operator/(const Self &lhs, const Other &rhs)
Definition: IntegerBase.hpp:43
friend SelfMaxBit operator^(const Self &lhs, const Self &rhs)
friend bool operator>(const Other &lhs, const Self &rhs)
Definition: IntegerBase.hpp:69
friend Other operator+(const Self &lhs, const Other &rhs)
Definition: IntegerBase.hpp:94
friend bool operator==(const Self &lhs, const Self &rhs)
friend SelfMaxBit operator+(const Self &lhs, const Self &rhs)
friend SelfMaxBit operator^(const Other &lhs, const Self &rhs)
Definition: IntegerBase.hpp:54
friend bool operator>=(const Other &lhs, const Self &rhs)
friend SelfMaxBit operator>>(const Other &lhs, const Self &rhs)
Definition: IntegerBase.hpp:60
Self & operator/=(const Other &v)
friend bool operator==(const Self &lhs, const Other &rhs)
friend bool operator<(const Self &lhs, const Other &rhs)
Self & operator-=(const Other &v)
friend bool operator<=(const Self &lhs, const Other &rhs)
friend bool operator!=(const Other &lhs, const Self &rhs)
Definition: IntegerBase.hpp:66
friend SelfMaxBit operator*(const Other &lhs, const Self &rhs)
Definition: IntegerBase.hpp:39
friend Other operator/(const Self &lhs, const Other &rhs)
friend SelfMaxBit operator|(const Self &lhs, const Self &rhs)
friend bool operator<(const Other &lhs, const Self &rhs)
Definition: IntegerBase.hpp:72
friend bool operator<=(const Other &lhs, const Self &rhs)
Definition: IntegerBase.hpp:78
friend Other operator|(const Self &lhs, const Other &rhs)
friend SelfMaxBit operator^(const Self &lhs, const Other &rhs)
Definition: IntegerBase.hpp:55
friend Other operator^(const Self &lhs, const Other &rhs)
Self & operator^=(const Other &v)
Self & operator<<=(const Self &v)
Self & operator<<=(const Other &v)
friend bool operator>=(const Self &lhs, const Other &rhs)
Self & operator+=(const Other &v)
friend SelfMaxBit operator*(const Self &lhs, const Self &rhs)
friend SelfMaxBit operator-(const Self &lhs, const Self &rhs)
Self & operator%=(const Other &v)
friend bool operator==(const Self &lhs, const Other &rhs)
Definition: IntegerBase.hpp:64
friend bool operator!=(const Self &lhs, const Self &rhs)
ConstIntegerBaseTrait< Self >::Dispatch::SelfMaxBit SelfMaxBit
Definition: IntegerBase.hpp:85
ConstIntegerBaseTrait< Self >::Dispatch::SelfMaxBit SelfMaxBit
friend Other operator>>(const Other &lhs, const Self &rhs)
friend Other operator<<(const Self &lhs, const Other &rhs)
friend bool operator<=(const Other &lhs, const Self &rhs)
friend SelfMaxBit operator/(const Self &lhs, const Self &rhs)
friend Other operator<<(const Other &lhs, const Self &rhs)
friend Other operator>>(const Self &lhs, const Other &rhs)
friend SelfMaxBit operator>>(const Self &lhs, const Self &rhs)
Self & operator-=(const Other &v)
friend bool operator<(const Self &lhs, const Self &rhs)
friend Other operator*(const Self &lhs, const Other &rhs)
friend SelfMaxBit operator|(const Other &lhs, const Self &rhs)
Definition: IntegerBase.hpp:51
friend SelfMaxBit operator+(const Other &lhs, const Self &rhs)
Definition: IntegerBase.hpp:33
friend Other operator^(const Other &lhs, const Self &rhs)
Self & operator|=(const Other &v)
Self & operator^=(const Self &v)
Self & operator-=(const Self &v)
friend bool operator>=(const Other &lhs, const Self &rhs)
Definition: IntegerBase.hpp:75
friend bool operator>=(const Self &lhs, const Self &rhs)
friend SelfMaxBit operator~(const Self &self)
Self & operator>>=(const Other &v)
friend Other operator+(const Other &lhs, const Self &rhs)
Definition: IntegerBase.hpp:93
friend SelfMaxBit operator-(const Other &lhs, const Self &rhs)
Definition: IntegerBase.hpp:36
friend Other operator|(const Other &lhs, const Self &rhs)
friend bool operator!=(const Self &lhs, const Other &rhs)
Definition: IntegerBase.hpp:67
friend Other operator-(const Other &lhs, const Self &rhs)
Definition: IntegerBase.hpp:96
SelfMaxBit operator++(int)
friend bool operator==(const Other &lhs, const Self &rhs)
Self & operator/=(const Other &v)
friend bool operator<=(const Self &lhs, const Self &rhs)
friend bool operator>(const Self &lhs, const Self &rhs)
friend Other operator/(const Other &lhs, const Self &rhs)
Self & operator+=(const Self &v)
Self & operator|=(const Other &v)
Self & operator/=(const Self &v)
ConstIntegerBaseTrait< Self >::Dispatch::SelfMaxBit SelfMaxBit
Definition: IntegerBase.hpp:25
friend SelfMaxBit operator+(const Self &lhs, const Other &rhs)
Definition: IntegerBase.hpp:34
friend SelfMaxBit operator<<(const Self &lhs, const Other &rhs)
Definition: IntegerBase.hpp:58
friend SelfMaxBit operator|(const Self &lhs, const Other &rhs)
Definition: IntegerBase.hpp:52
Self & operator*=(const Other &v)
friend bool operator>(const Self &lhs, const Other &rhs)
Definition: IntegerBase.hpp:70
friend Other operator%(const Other &lhs, const Self &rhs)
friend SelfMaxBit operator<<(const Self &lhs, const Self &rhs)
friend SelfMaxBit operator>>(const Self &lhs, const Other &rhs)
Definition: IntegerBase.hpp:61
friend bool operator!=(const Self &lhs, const Other &rhs)
friend bool operator>(const Other &lhs, const Self &rhs)
friend Other operator*(const Other &lhs, const Self &rhs)
Definition: IntegerBase.hpp:99
SelfMaxBit operator--(int)
Self & operator%=(const Self &v)
friend SelfMaxBit operator%(const Other &lhs, const Self &rhs)
Definition: IntegerBase.hpp:45
friend bool operator>=(const Self &lhs, const Other &rhs)
Definition: IntegerBase.hpp:76
friend SelfMaxBit operator*(const Self &lhs, const Other &rhs)
Definition: IntegerBase.hpp:40
friend SelfMaxBit operator/(const Other &lhs, const Self &rhs)
Definition: IntegerBase.hpp:42
friend SelfMaxBit operator-(const Self &lhs, const Other &rhs)
Definition: IntegerBase.hpp:37
Self & operator%=(const Other &v)
Self & operator>>=(const Other &v)
friend bool operator==(const Other &lhs, const Self &rhs)
Definition: IntegerBase.hpp:63
Self & operator|=(const Self &v)
friend bool operator<(const Self &lhs, const Other &rhs)
Definition: IntegerBase.hpp:73
friend SelfMaxBit operator%(const Self &lhs, const Other &rhs)
Definition: IntegerBase.hpp:46
Self & operator*=(const Other &v)
Self & operator>>=(const Self &v)