source: libcfa/src/enum.cfa @ ca4f2b2

Last change on this file since ca4f2b2 was 41c8312, checked in by Peter A. Buhr <pabuhr@…>, 6 months ago

small cleanups

  • Property mode set to 100644
File size: 509 bytes
RevLine 
[c333ed2]1#include "enum.hfa"
2
[03ac869]3#pragma GCC visibility push(default)
4
5forall(T, E| TypedEnum(T, E)) {
[c333ed2]6    // constructors
7
8    // comparison
9    int ?==?(E l, E r) { return posE(l) == posE(r); }
[03ac869]10    int ?!=?(E l, E r) { return posE(l) != posE(r); }
[c333ed2]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); }
[41c8312]16}
Note: See TracBrowser for help on using the repository browser.