Changeset 85855b0 for libcfa/src/enum.cfa
- Timestamp:
- Jun 10, 2024, 2:43:13 AM (4 weeks ago)
- Branches:
- master
- Children:
- 42cdd07d
- Parents:
- d68de59
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/enum.cfa
rd68de59 r85855b0 1 1 #include "enum.hfa" 2 #include "fstream.hfa" 2 3 3 4 #pragma GCC visibility push(default) 4 5 5 forall(T, E| TypedEnum(T, E)) { 6 // constructors 6 forall(ostype & | basic_ostream(ostype), E, V| CfaEnum(E, V)) 7 ostype & ?|?(ostype& os, E e) { 8 return os | type_name(e) | "." | labelE(e); 9 } 7 10 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); } 11 forall(ostype & | basic_ostream(ostype), E| CfaEnum(E, quasi_void)) 12 ostype & ?|?(ostype& os, E e) { 13 return os | type_name(e) | "." | labelE(e); 16 14 }
Note: See TracChangeset
for help on using the changeset viewer.