Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/enum.cfa

    r85855b0 r41c8312  
    11#include "enum.hfa"
    2 #include "fstream.hfa"
    32
    43#pragma GCC visibility push(default)
    54
    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);
     5forall(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); }
    916}
    10 
    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);
    14 }
Note: See TracChangeset for help on using the changeset viewer.