Changeset 68ea8d2 for libcfa


Ignore:
Timestamp:
Jul 16, 2024, 10:35:09 PM (2 days ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
97f9619
Parents:
09dd830
Message:

Seperate CfaEnum? and Serial.

Location:
libcfa/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/enum.cfa

    r09dd830 r68ea8d2  
    3737}
    3838
    39 forall( istype & | istream( istype ), E | CfaEnum( E ) )
     39forall( istype & | istream( istype ), E | CfaEnum( E )| Serial(E) )
    4040istype & ?|?( istype & is, E & e ) {
    4141//      fprintf( stderr, "here0\n" );
  • libcfa/src/enum.hfa

    r09dd830 r68ea8d2  
    3434// };
    3535
    36 forall( E | Serial( E ) ) trait CfaEnum {
     36forall( E ) trait CfaEnum {
    3737    const char * label( E e );
    3838    unsigned int posn( E e );
     
    4545// I/O
    4646
    47 forall( istype & | istream( istype ), E | CfaEnum( E ) )
     47forall( istype & | istream( istype ), E | CfaEnum( E ) | Serial(E) )
    4848istype & ?|?( istype &, E & );
    4949
     
    5454
    5555static inline
    56 forall( E | CfaEnum( E ) ) {
     56forall( E | Serial(E) | CfaEnum(E) ) {
    5757    int ?==?( E l, E r ) { return posn( l ) == posn( r ); }     // relational operators
    5858    int ?!=?( E l, E r ) { return posn( l ) != posn( r ); }
Note: See TracChangeset for help on using the changeset viewer.