Ignore:
Timestamp:
Dec 3, 2020, 11:56:01 AM (12 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
89c982c, a78c3ff, cc5cc27
Parents:
1db306a
Message:

more code sharing in containers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/bits/stack_example.cfa

    r1db306a r636d3715  
    2727       
    2828        for ( i; 10 ) {
    29                 push( fred, new( 2 * i ) );
     29                push( fred, *new( 2 * i ) );
    3030        }
    3131
     
    3636       
    3737        for ( i; 9 ) {
    38                 delete( pop( fred ) );
     38                delete( &pop( fred ) );
    3939        }
    4040
     
    4545       
    4646        for ( i; 10 ) {
    47                 push( fred, new( 2 * i + 1 ) );
     47                push( fred, *new( 2 * i + 1 ) );
    4848        }
    4949        for ( over( fredIter, fred ); fredIter >> f; ) {
     
    7878       
    7979        for ( i; 10 ) {
    80                 push( mary, new( 2 * i ) );
     80                push( mary, *new( 2 * i ) );
    8181        }
    8282
     
    8787       
    8888        for ( i; 9 ) {
    89                 delete( pop( mary ) );
     89                delete( &pop( mary ) );
    9090        }
    9191
     
    9696       
    9797        for ( i; 10 ) {
    98                 push( mary, new( 2 * i + 1 ) );
     98                push( mary, *new( 2 * i + 1 ) );
    9999        }
    100100        for ( over( maryIter, mary ); maryIter >> m; ) {
Note: See TracChangeset for help on using the changeset viewer.