Ignore:
Timestamp:
Jan 20, 2021, 4:49:40 PM (9 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
454f478
Parents:
92bfda0 (diff), fd54fef (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' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/stdlib.cfa

    r92bfda0 rdafbde8  
    2828// Cforall allocation/deallocation and constructor/destructor, array types
    2929
    30 forall( dtype T | sized(T), ttype TT | { void ?{}( T &, TT ); } )
     30forall( T & | sized(T), TT... | { void ?{}( T &, TT ); } )
    3131T * anew( size_t dim, TT p ) {
    3232        T * arr = alloc( dim );
     
    3737} // anew
    3838
    39 forall( dtype T | sized(T) | { void ^?{}( T & ); } )
     39forall( T & | sized(T) | { void ^?{}( T & ); } )
    4040void adelete( T arr[] ) {
    4141        if ( arr ) {                                                                            // ignore null
     
    4848} // adelete
    4949
    50 forall( dtype T | sized(T) | { void ^?{}( T & ); }, ttype TT | { void adelete( TT ); } )
     50forall( T & | sized(T) | { void ^?{}( T & ); }, TT... | { void adelete( TT ); } )
    5151void adelete( T arr[], TT rest ) {
    5252        if ( arr ) {                                                                            // ignore null
     
    9797//---------------------------------------
    9898
    99 forall( otype E | { int ?<?( E, E ); } ) {
     99forall( E | { int ?<?( E, E ); } ) {
    100100        E * bsearch( E key, const E * vals, size_t dim ) {
    101101                int cmp( const void * t1, const void * t2 ) {
     
    156156
    157157
    158 forall( otype K, otype E | { int ?<?( K, K ); K getKey( const E & ); } ) {
     158forall( K, E | { int ?<?( K, K ); K getKey( const E & ); } ) {
    159159        E * bsearch( K key, const E * vals, size_t dim ) {
    160160                int cmp( const void * t1, const void * t2 ) {
Note: See TracChangeset for help on using the changeset viewer.