source: libcfa/src/enum.cfa@ 4117761

Last change on this file since 4117761 was 259012e, checked in by Peter A. Buhr <pabuhr@…>, 15 months ago

put back quasi_void print

  • Property mode set to 100644
File size: 760 bytes
RevLine 
[c333ed2]1#include "enum.hfa"
[85855b0]2#include "fstream.hfa"
[c333ed2]3
[03ac869]4#pragma GCC visibility push(default)
5
[d5efcb7]6forall( ostype & | basic_ostream(ostype), E, V | CfaEnum(E, V) ) {
7 ostype & ?|?( ostype& os, E e ) {
8 return os | label( e );
9 }
10 OSTYPE_VOID_IMPL( E )
[85855b0]11}
[c333ed2]12
[259012e]13forall( ostype & | basic_ostream(ostype), E | CfaEnum(E, quasi_void) )
14ostype & ?|?( ostype & os, E e ) {
15 return os | label( e );
16}
[525f7ad]17
[d5efcb7]18forall( E, V | CfaEnum(E, V) ) { // relational operators
[5eb3f65]19 int ?==?(E l, E r) { return posn(l) == posn(r); }
[d5efcb7]20 int ?!=?(E l, E r) { return posn(l) != posn(r); }
[5eb3f65]21 int ?<?(E l, E r) { return posn(l) < posn(r); }
[d5efcb7]22 int ?<=?(E l, E r) { return posn(l) <= posn(r); }
[5eb3f65]23 int ?>?(E l, E r) { return posn(l) > posn(r); }
[d5efcb7]24 int ?>=?(E l, E r) { return posn(l) >= posn(r); }
[525f7ad]25}
Note: See TracBrowser for help on using the repository browser.