Ignore:
Timestamp:
Jun 12, 2023, 6:06:26 PM (13 months ago)
Author:
caparsons <caparson@…>
Branches:
ast-experimental, master
Children:
e172f42
Parents:
24d6572 (diff), 38e266c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into ast-experimental

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/math.trait.hfa

    r24d6572 r62d62db  
    1010// Created On       : Fri Jul 16 15:40:52 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb  2 11:36:56 2023
    13 // Update Count     : 20
     12// Last Modified On : Tue Jun  6 07:59:17 2023
     13// Update Count     : 24
    1414//
    1515
     
    1717
    1818forall( U )
    19 trait Not {
     19trait not {
    2020        void ?{}( U &, zero_t );
    2121        int !?( U );
    22 }; // Not
     22}; // not
    2323
    24 forall( T | Not( T ) )
    25 trait Equality {
     24forall( T | not( T ) )
     25trait equality {
    2626        int ?==?( T, T );
    2727        int ?!=?( T, T );
    28 }; // Equality
     28}; // equality
    2929
    30 forall( U | Equality( U ) )
    31 trait Relational {
     30forall( U | equality( U ) )
     31trait relational {
    3232        int ?<?( U, U );
    3333        int ?<=?( U, U );
    3434        int ?>?( U, U );
    3535        int ?>=?( U, U );
    36 }; // Relational
     36}; // relational
    3737
    3838forall ( T )
    39 trait Signed {
     39trait Signed {  // must be capitalized, conflict with keyword signed
    4040        T +?( T );
    4141        T -?( T );
     
    4444
    4545forall( U | Signed( U ) )
    46 trait Additive {
     46trait additive {
    4747        U ?+?( U, U );
    4848        U ?-?( U, U );
    4949        U ?+=?( U &, U );
    5050        U ?-=?( U &, U );
    51 }; // Additive
     51}; // additive
    5252
    53 forall( T | Additive( T ) )
    54 trait Incdec {
     53forall( T | additive( T ) )
     54trait inc_dec {
    5555        void ?{}( T &, one_t );
    5656        // T ?++( T & );
     
    5858        // T ?--( T & );
    5959        // T --?( T & );
    60 }; // Incdec
     60}; // inc_dec
    6161
    62 forall( U | Incdec( U ) )
    63 trait Multiplicative {
     62forall( U | inc_dec( U ) )
     63trait multiplicative {
    6464        U ?*?( U, U );
    6565        U ?/?( U, U );
    6666        U ?%?( U, U );
    6767        U ?/=?( U &, U );
    68 }; // Multiplicative
     68}; // multiplicative
    6969
    70 forall( T | Relational( T ) | Multiplicative( T ) )
    71 trait Arithmetic {
    72 }; // Arithmetic
     70forall( T | relational( T ) | multiplicative( T ) )
     71trait arithmetic {
     72}; // arithmetic
    7373
    7474// Local Variables: //
Note: See TracChangeset for help on using the changeset viewer.