|
28 | 28 | #include <alp/backends.hpp> |
29 | 29 | #include <alp/type_traits.hpp> |
30 | 30 |
|
| 31 | +#include "internalops.hpp" |
| 32 | + |
31 | 33 |
|
32 | 34 | namespace alp { |
33 | 35 |
|
@@ -209,12 +211,9 @@ namespace alp { |
209 | 211 | /** |
210 | 212 | * Standard equal (\a eq) relation. |
211 | 213 | * |
212 | | - * Assumes native availability of \a operator== on the given data types |
213 | | - * or assumes that the relevant operators are properly overloaded. |
214 | | - * |
215 | | - * Assumes that \a eq is an equivalence relation. |
216 | | - * Non-standard/non-matching data types or non-standard (overloaded) |
217 | | - * \a operator== should therefore be used with caution. |
| 214 | + * Assumes native availability of ALP internal operator \a less_than |
| 215 | + * forming an equivalence relation on SET. Non-standard/non-matching |
| 216 | + * data types should therefore be used with caution. |
218 | 217 | * |
219 | 218 | * @tparam SET The input data type. |
220 | 219 | */ |
@@ -287,21 +286,23 @@ namespace alp { |
287 | 286 | static bool check( const domain * const a, |
288 | 287 | const codomain * const b |
289 | 288 | ) { |
290 | | - return *a == *b; |
| 289 | + bool check; |
| 290 | + operators::internal::template equal< |
| 291 | + SET, SET, bool, implementation |
| 292 | + >::apply( a, b, &check ); |
| 293 | + return check; |
291 | 294 | } |
292 | 295 | }; |
293 | 296 |
|
294 | 297 | /** |
295 | 298 | * Standard not-equal (\a neq) operator. |
296 | 299 | * |
297 | | - * Assumes native availability of \a operator!= on the given data types |
298 | | - * or assumes that the relevant operators are properly overloaded. |
| 300 | + * Assumes availability of ALP internal operator \a not_equal. |
299 | 301 | * |
300 | | - * While \a neq does not require two values to be members of |
301 | | - * an ordered set, the relation is still assumed to be irreflexive, |
302 | | - * symmetric and connected. |
303 | | - * Non-standard/non-matching data types or non-standard (overloaded) |
304 | | - * \a operator!= should therefore be used with caution. |
| 302 | + * While \a not_equal does not require to form an order or an |
| 303 | + * equivalence relation on SET, the formed relation is still assumed |
| 304 | + * to be irreflexive, symmetric, and connected. Non-standard/non-matching |
| 305 | + * data types should therefore be used with caution. |
305 | 306 | * |
306 | 307 | * @tparam SET The input data type. |
307 | 308 | */ |
@@ -374,7 +375,11 @@ namespace alp { |
374 | 375 | static bool check( const domain * const a, |
375 | 376 | const codomain * const b |
376 | 377 | ) { |
377 | | - return *a != *b; |
| 378 | + bool check; |
| 379 | + operators::internal::template not_equal< |
| 380 | + SET, SET, bool, implementation |
| 381 | + >::apply( a, b, &check ); |
| 382 | + return check; |
378 | 383 | } |
379 | 384 | }; |
380 | 385 |
|
|
0 commit comments