@@ -170,36 +170,21 @@ class Tuple
170170 T mm[SIZE];
171171};
172172
173+ // /////////////////////////////////////////////////////////////////////////
173174
174- // //////////////////////////////////////
175-
176-
177- // / @return true if t0 < t1, comparing components in order of significance.
178- template <int SIZE, typename T0, typename T1>
179- bool
180- operator <(const Tuple<SIZE, T0>& t0, const Tuple<SIZE, T1>& t1)
175+ template <int SIZE>
176+ inline Tuple<SIZE, bool > operator &&(const Tuple<SIZE, bool > a, const Tuple<SIZE, bool > b)
181177{
182- for (int i = 0 ; i < SIZE-1 ; ++i) {
183- if (!isExactlyEqual (t0[i], t1[i])) return t0[i] < t1[i];
184- }
185- return t0[SIZE-1 ] < t1[SIZE-1 ];
178+ return a & b;
186179}
187180
188-
189- // / @return true if t0 > t1, comparing components in order of significance.
190- template <int SIZE, typename T0, typename T1>
191- bool
192- operator >(const Tuple<SIZE, T0>& t0, const Tuple<SIZE, T1>& t1)
181+ template <int SIZE>
182+ inline Tuple<SIZE, bool > operator ||(const Tuple<SIZE, bool > a, const Tuple<SIZE, bool > b)
193183{
194- for (int i = 0 ; i < SIZE-1 ; ++i) {
195- if (!isExactlyEqual (t0[i], t1[i])) return t0[i] > t1[i];
196- }
197- return t0[SIZE-1 ] > t1[SIZE-1 ];
184+ return a | b;
198185}
199186
200-
201- // //////////////////////////////////////
202-
187+ // /////////////////////////////////////////////////////////////////////////
203188
204189// / @return the absolute value of the given Tuple.
205190template <int SIZE, typename T>
0 commit comments