source:
libcfa/src/enum.cfa@
405dbb3
| Last change on this file since 405dbb3 was 41c8312, checked in by , 21 months ago | |
|---|---|
|
|
| File size: 509 bytes | |
| Line | |
|---|---|
| 1 | #include "enum.hfa" |
| 2 | |
| 3 | #pragma GCC visibility push(default) |
| 4 | |
| 5 | forall(T, E| TypedEnum(T, E)) { |
| 6 | // constructors |
| 7 | |
| 8 | // comparison |
| 9 | int ?==?(E l, E r) { return posE(l) == posE(r); } |
| 10 | int ?!=?(E l, E r) { return posE(l) != posE(r); } |
| 11 | int ?!=?(E l, zero_t) { return !( posE(l) == 0 ); } |
| 12 | int ?<?(E l, E r) { return posE(l) < posE(r); } |
| 13 | int ?<=?(E l, E r) { return posE(l) <= posE(r); } |
| 14 | int ?>?(E l, E r) { return posE(l) > posE(r); } |
| 15 | int ?>=?(E l, E r) { return posE(l) >= posE(r); } |
| 16 | } |
Note:
See TracBrowser
for help on using the repository browser.