Changeset 81ab5eb


Ignore:
Timestamp:
Mar 29, 2026, 9:52:51 PM (2 days ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
e6e250d
Parents:
00675ed4
Message:

2nd attempt at harmonizing isOp functions, e.g., isEmpty, to C/C++ form empty

Files:
10 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/bits/sequence.hfa

    r00675ed4 r81ab5eb  
    6565                void ?{}( Sequence(T) & s ) with( s ) {
    6666                        ((Collection &)s){};
    67                 }       // post: isEmpty()
     67                }       // post: empty()
    6868        }
    6969
  • libcfa/src/collections/list.hfa

    r00675ed4 r81ab5eb  
    1010// Created On       : Wed Apr 22 18:00:00 2020
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Mar 27 08:02:56 2026
    13 // Update Count     : 99
     12// Last Modified On : Sun Mar 29 21:20:44 2026
     13// Update Count     : 101
    1414//
    1515
     
    206206        }
    207207
    208         bool isEmpty( dlist( tE, tLinks ) & list ) {
     208        bool isEmpty( dlist( tE, tLinks ) & list ) {            // deprecated
    209209                return empty( list );
    210210        }
     
    413413        // Transfer the "from" list to the end of this sequence; the "from" list is empty after the transfer.
    414414//      void transfer( dlist( tE, tLinks ) & to, dlist( tE, tLinks ) & from ) {
    415 //              if ( isEmpty( from ) ) return;                                  // "from" list empty ?
    416 //              if ( isEmpty( to ) ) {                                                  // "to" list empty ?
     415//              if ( empty( from ) ) return;                                    // "from" list empty ?
     416//              if ( empty( to ) ) {                                                    // "to" list empty ?
    417417//                      root = from.root;
    418418//              } else {                                                                                // "to" list not empty
  • libcfa/src/collections/list2.hfa

    r00675ed4 r81ab5eb  
    1919// Created On       : Wed Apr 22 18:00:00 2020
    2020// Last Modified By : Peter A. Buhr
    21 // Last Modified On : Tue Mar 24 22:20:56 2026
    22 // Update Count     : 8
     21// Last Modified On : Sun Mar 29 21:47:53 2026
     22// Update Count     : 12
    2323//
    2424
     
    206206                };
    207207
    208                 static inline tE * $get_list_origin_addr( dlist(tE, tLinks) & lst ) {
     208                static inline tE * $get_list_origin_addr( dlist(tE, tLinks) & list ) {
    209209                        dlink(tE) & link_from_null = ( * (tE *) 0p )`inner;
    210210                        ptrdiff_t link_offset = (ptrdiff_t) & link_from_null;
    211                         size_t origin_addr = ((size_t) & lst) - link_offset;
     211                        size_t origin_addr = ((size_t) & list) - link_offset;
    212212                        size_t preResult = ORIGIN_TAG_ENABL( origin_addr );
    213213                        return (tE *)preResult;
     
    430430        }
    431431
    432         static inline tE & first( dlist(tE, tLinks) & lst ) {
    433                 verify (&lst != 0p);
    434                 dlink(tE) * firstLnk = lst.next;
     432        static inline tE & first( dlist(tE, tLinks) & list ) {
     433                verify (&list != 0p);
     434                dlink(tE) * firstLnk = list.next;
    435435                if (ORIGIN_TAG_QUERY((size_t)firstLnk)) return * 0p;
    436436                tytagref( tLinks, dlink(tE) ) firstLnkTagged = {*firstLnk};
    437437                return downcast$( firstLnkTagged );
    438438        }
    439         static inline tE & last ( dlist(tE, tLinks) & lst ) {
    440                 verify (&lst != 0p);
    441                 dlink(tE) * lastLnk = lst.prev;
     439        static inline tE & last ( dlist(tE, tLinks) & list ) {
     440                verify (&list != 0p);
     441                dlink(tE) * lastLnk = list.prev;
    442442                if (ORIGIN_TAG_QUERY((size_t)lastLnk)) return * 0p;
    443443                tytagref( tLinks, dlink(tE) ) lastLnkTagged = {*lastLnk};
     
    445445        }
    446446
    447         static inline bool isEmpty( dlist(tE, tLinks) & lst ) {
    448                 verify (&lst != 0p);
    449                 if ( & first(lst) == 0p || & last(lst) == 0p ) {
    450                         verify( & last(lst) == 0p && & last(lst) == 0p );
     447        static inline bool empty( dlist(tE, tLinks) & list ) {
     448                verify (&list != 0p);
     449                if ( & first(list) == 0p || & last(list) == 0p ) {
     450                        verify( & last(list) == 0p && & last(list) == 0p );
    451451                        return true;
    452452                }
    453453                return false;
     454        }
     455
     456        static inline bool isEmpty( dlist(tE, tLinks) & list ) __attribute__ ((deprecated));
     457        static inline bool isEmpty( dlist(tE, tLinks) & list ) {
     458                return empty( list );
    454459        }
    455460
     
    469474        }
    470475
    471         static inline tE & iter( dlist(tE, tLinks) & lst ) {
    472                 tE * origin = $get_list_origin_addr( lst );
     476        static inline tE & iter( dlist(tE, tLinks) & list ) {
     477                tE * origin = $get_list_origin_addr( list );
    473478                return *origin;
    474479        }
     
    538543        // Applies knowledge of tag pattern around head (unknown to optimizer) to reduce runtime tag operations.
    539544
    540         static inline void insert_first( dlist(tE, tLinks) &lst, tE & e ) {
     545        static inline void insert_first( dlist(tE, tLinks) &list, tE & e ) {
    541546                dlink(tE) & linkToInsert = e`inner;
    542547          NOLOOSE(
     
    548553                verify(ORIGIN_TAG_CLEAR((size_t)linkToInsert.next) == (size_t)&linkToInsert);
    549554          )
    550                 dlink(tE) & list_pos_links = lst;
     555                dlink(tE) & list_pos_links = list;
    551556          MAYBE_INSERT_READ_EARLY(
    552557                dlink(tE) & afterLinks = * (dlink(tE) *) ORIGIN_TAG_CLEAR( (size_t) list_pos_links.next );
     
    577582        }
    578583
    579         static inline void insert_last( dlist(tE, tLinks) &lst, tE & e ) {
     584        static inline void insert_last( dlist(tE, tLinks) &list, tE & e ) {
    580585                dlink(tE) & linkToInsert = e`inner;
    581586          NOLOOSE(
     
    587592                verify(ORIGIN_TAG_CLEAR((size_t)linkToInsert.prev) == (size_t)&linkToInsert);
    588593          )
    589                 dlink(tE) & list_pos_links = lst;
     594                dlink(tE) & list_pos_links = list;
    590595          MAYBE_INSERT_READ_EARLY(
    591596                dlink(tE) & beforeLinks = * (dlink(tE) *) ORIGIN_TAG_CLEAR( (size_t) list_pos_links.prev );
     
    630635        }
    631636
    632         static inline tE & remove_first( dlist(tE, tLinks) &lst ) {
    633                 verify (&lst != 0p);
    634                 dlink(tE) & list_links = lst;
     637        static inline tE & remove_first( dlist(tE, tLinks) &list ) {
     638                verify (&list != 0p);
     639                dlink(tE) & list_links = list;
    635640                // call is valid on empty list; when so, list_links.next and after_links.prev have otags set
    636641
     
    657662        }
    658663
    659         static inline tE & remove_last( dlist(tE, tLinks) &lst ) {
    660                 verify (&lst != 0p);
    661                 dlink(tE) & list_links = lst;
     664        static inline tE & remove_last( dlist(tE, tLinks) &list ) {
     665                verify (&list != 0p);
     666                dlink(tE) & list_links = list;
    662667                // call is valid on empty list; when so, list_links.prev and before_links.next have otags set
    663668
     
    684689        }
    685690
    686         static inline tE & try_pop_first( dlist(tE, tLinks) &lst ) {
    687                 tE & first_inlist = first(lst);
     691        static inline tE & try_pop_first( dlist(tE, tLinks) &list ) {
     692                tE & first_inlist = first(list);
    688693                tE & first_item = first_inlist;
    689694                if (&first_item) remove(first_inlist);  // TODO: should it use pop_front?
     
    691696        }
    692697
    693         static inline tE & try_pop_last( dlist(tE, tLinks) &lst ) {
    694                 tE & last_inlist = last(lst);
     698        static inline tE & try_pop_last( dlist(tE, tLinks) &list ) {
     699                tE & last_inlist = last(list);
    695700                tE & last_item = last_inlist;
    696701                if (&last_item) remove(last_inlist);  // TODO: should it use pop_back?
  • libcfa/src/concurrency/channel.hfa

    r00675ed4 r81ab5eb  
    117117                printf("Channel %p Producer Blocks: %lu,\tProducer Ops: %lu,\t%.2f%% of Producer ops blocked\n", &c, c_blocks, c_ops, ((double)c_blocks)/c_ops * 100);
    118118            #endif
    119                 verifyf( __handle_waituntil_OR( cons ) || __handle_waituntil_OR( prods ) || isEmpty( cons ) && isEmpty( prods ),
     119                verifyf( __handle_waituntil_OR( cons ) || __handle_waituntil_OR( prods ) || empty( cons ) && empty( prods ),
    120120                                 "Attempted to delete channel with waiting threads (Deadlock).\n" );
    121121                if ( size != 0 ) delete( buffer );
     
    123123        size_t get_count( channel(T) & chan ) with(chan) { return __atomic_load_n( &count, __ATOMIC_RELAXED ); }
    124124        size_t get_size( channel(T) & chan ) with(chan) { return __atomic_load_n( &size, __ATOMIC_RELAXED ); }
    125         bool has_waiters( channel(T) & chan ) with(chan) { return ! isEmpty( cons ) || ! isEmpty( prods ); }
    126         bool has_waiting_consumers( channel(T) & chan ) with(chan) { return ! isEmpty( cons ); }
    127         bool has_waiting_producers( channel(T) & chan ) with(chan) { return ! isEmpty( prods ); }
     125        bool has_waiters( channel(T) & chan ) with(chan) { return ! empty( cons ) || ! empty( prods ); }
     126        bool has_waiting_consumers( channel(T) & chan ) with(chan) { return ! empty( cons ); }
     127        bool has_waiting_producers( channel(T) & chan ) with(chan) { return ! empty( prods ); }
    128128
    129129        // closes the channel and notifies all blocked threads
     
    164164        void flush( channel(T) & chan, T elem ) with(chan) {
    165165                lock( mutex_lock );
    166                 while ( count == 0 && ! isEmpty( cons ) ) {
     166                while ( count == 0 && ! empty( cons ) ) {
    167167                        __cons_handoff( chan, elem );
    168168                }
     
    186186
    187187          ConsEmpty:
    188                 if ( ! isEmpty( cons ) ) {
     188                if ( ! empty( cons ) ) {
    189189                        if ( ! __handle_waituntil_OR( cons ) ) break ConsEmpty;
    190190                        __cons_handoff( chan, elem );
     
    233233                // buffer count must be zero if cons are blocked (also handles zero-size case)
    234234          ConsEmpty:
    235                 if ( ! isEmpty( cons ) ) {
     235                if ( ! empty( cons ) ) {
    236236                        if ( ! __handle_waituntil_OR( cons ) ) break ConsEmpty;
    237237                        __cons_handoff( chan, elem );
     
    261261                count -= 1;
    262262                front = (front + 1) % size;
    263                 if (count == size - 1 && ! isEmpty( prods ) ) {
     263                if (count == size - 1 && ! empty( prods ) ) {
    264264                        if ( ! __handle_waituntil_OR( prods ) ) return;
    265265                        __buf_insert( chan, *(T *)first( prods ).extra );  // do waiting producer work
     
    276276
    277277          ZeroSize:
    278                 if ( size == 0 && ! isEmpty( prods ) ) {
     278                if ( size == 0 && ! empty( prods ) ) {
    279279                        if ( ! __handle_waituntil_OR( prods ) ) break ZeroSize;
    280280                        __prods_handoff( chan, retval );
     
    332332                // have to check for the zero size channel case
    333333          ZeroSize:
    334                 if ( size == 0 && ! isEmpty( prods ) ) {
     334                if ( size == 0 && ! empty( prods ) ) {
    335335                        if ( ! __handle_waituntil_OR( prods ) ) break ZeroSize;
    336336                        __prods_handoff( chan, retval );
     
    384384        // special case of __handle_waituntil_OR, that does some work to avoid starvation/deadlock case
    385385        bool __handle_pending( dlist( select_node ) & queue, select_node & mine ) {
    386             while ( ! isEmpty( queue ) ) {
     386            while ( ! empty( queue ) ) {
    387387                // if node not a special OR case or if we win the special OR case race break
    388388                if ( ! first( queue ).clause_status || first( queue ).park_counter || __pending_set_other( first( queue ), mine, ((unsigned long int)(&(first( queue )))) ) )
     
    421421            if ( ! node.park_counter ) {
    422422                // are we special case OR and front of cons is also special case OR
    423                 if ( ! unlikely(closed) && ! isEmpty( prods ) && first( prods ).clause_status && ! first( prods ).park_counter ) {
     423                if ( ! unlikely(closed) && ! empty( prods ) && first( prods ).clause_status && ! first( prods ).park_counter ) {
    424424                    if ( ! __make_select_node_pending( node ) ) {
    425425                        unlock( mutex_lock );
     
    437437                }
    438438                // check if we can complete operation. If so race to establish winner in special OR case
    439                 if ( count != 0 || ! isEmpty( prods ) || unlikely(closed) ) {
     439                if ( count != 0 || ! empty( prods ) || unlikely(closed) ) {
    440440                    if ( ! __make_select_node_available( node ) ) { // we didn't win the race so give up on registering
    441441                        unlock( mutex_lock );
     
    453453            // have to check for the zero size channel case
    454454            ZeroSize:
    455                 if ( size == 0 && ! isEmpty( prods ) ) {
     455                if ( size == 0 && ! empty( prods ) ) {
    456456                        if ( ! __handle_waituntil_OR( prods ) ) break ZeroSize;
    457457                        __prods_handoff( *chan, *ret );
     
    522522            if ( ! node.park_counter ) {
    523523                // are we special case OR and front of cons is also special case OR
    524                 if ( ! unlikely(closed) && ! isEmpty( cons ) && first( cons ).clause_status && ! first( cons ).park_counter ) {
     524                if ( ! unlikely(closed) && ! empty( cons ) && first( cons ).clause_status && ! first( cons ).park_counter ) {
    525525                    if ( ! __make_select_node_pending( node ) ) {
    526526                        unlock( mutex_lock );
     
    537537                        }
    538538                        // check if we can complete operation. If so race to establish winner in special OR case
    539                         if ( count != size || ! isEmpty( cons ) || unlikely(closed) ) {
     539                        if ( count != size || ! empty( cons ) || unlikely(closed) ) {
    540540                                if ( ! __make_select_node_available( node ) ) { // we didn't win the race so give up on registering
    541541                                        unlock( mutex_lock );
     
    554554                // handle blocked consumer case via handoff (buffer is implicitly empty)
    555555    ConsEmpty:
    556                 if ( ! isEmpty( cons ) ) {
     556                if ( ! empty( cons ) ) {
    557557                        if ( ! __handle_waituntil_OR( cons ) ) break ConsEmpty;
    558558                        __cons_handoff( *chan, elem );
  • libcfa/src/concurrency/cofor.hfa

    r00675ed4 r81ab5eb  
    3333
    3434void main( cofor_runner & this ) with(this) {
    35     while ( ! done || ! isEmpty( items ) ) {
     35    while ( ! done || ! empty( items ) ) {
    3636                lock( mutex_lock );
    3737        runner_node * node = &remove_first( items );
  • libcfa/src/concurrency/future.hfa

    r00675ed4 r81ab5eb  
    1010// Created On       : Wed Jan 06 17:33:18 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Nov 24 16:08:52 2025
    13 // Update Count     : 222
     12// Last Modified On : Sun Mar 29 21:13:04 2026
     13// Update Count     : 223
    1414//
    1515
     
    173173
    174174                bool fulfil$( future(T) & fut ) with( fut ) {   // helper
    175                         bool ret_val = ! isEmpty( waiters );
     175                        bool ret_val = ! empty( waiters );
    176176                        state = FUTURE_FULFILLED$;
    177                         while ( ! isEmpty( waiters ) ) {
     177                        while ( ! empty( waiters ) ) {
    178178                                if ( !__handle_waituntil_OR( waiters ) ) // handle special waituntil OR case
    179179                                        break; // if handle_OR returns false then waiters is empty so break
     
    211211                void reset( future(T) & fut ) with( fut ) {             // mark future as empty (for reuse)
    212212                        lock( lock );
    213                   if ( ! isEmpty( waiters ) ) abort( "Attempting to reset a future with blocked waiters" );
     213                  if ( ! empty( waiters ) ) abort( "Attempting to reset a future with blocked waiters" );
    214214                        state = FUTURE_EMPTY$;
    215215                        free( except );
  • libcfa/src/concurrency/io.cfa

    r00675ed4 r81ab5eb  
    594594                lock( queue.lock __cfaabi_dbg_ctx2 );
    595595                {
    596                         was_empty = isEmpty( queue.queue );
     596                        was_empty = empty( queue.queue );
    597597
    598598                        // Add our request to the list
     
    632632        // notify the arbiter that new allocations are available
    633633        static void __ioarbiter_notify( io_arbiter$ & this, io_context$ * ctx ) {
    634                 /* paranoid */ verify( ! isEmpty( this.pending.queue ) );
     634                /* paranoid */ verify( ! empty( this.pending.queue ) );
    635635                /* paranoid */ verify( __preemption_enabled() );
    636636
     
    642642                        // as long as there are pending allocations try to satisfy them
    643643                        // for simplicity do it in FIFO order
    644                         while( ! isEmpty( this.pending.queue ) ) {
     644                        while( ! empty( this.pending.queue ) ) {
    645645                                // get first pending allocs
    646646                                __u32 have = ctx->sq.free_ring.tail - ctx->sq.free_ring.head;
     
    727727                        // pop each operation one at a time.
    728728                        // There is no wait morphing because of the io sq ring
    729                         while( ! isEmpty( ctx.ext_sq.queue ) ) {
     729                        while( ! empty( ctx.ext_sq.queue ) ) {
    730730                                // drop the element from the queue
    731731                                __external_io & ei = (__external_io&)remove_first( ctx.ext_sq.queue );
  • libcfa/src/concurrency/kernel.cfa

    r00675ed4 r81ab5eb  
    1010// Created On       : Tue Jan 17 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Apr 25 07:02:42 2025
    13 // Update Count     : 82
     12// Last Modified On : Sun Mar 29 21:20:54 2026
     13// Update Count     : 83
    1414//
    1515
     
    785785                        // update the pointer to the head wait context
    786786                        struct __fd_waitctx * wctx = 0;
    787                         if ( ! isEmpty( this.idles )) wctx = &first( this. idles ).idle_wctx;
     787                        if ( ! empty( this.idles )) wctx = &first( this. idles ).idle_wctx;
    788788                        __atomic_store_n(&this.fdw, wctx, __ATOMIC_SEQ_CST);
    789789                }
  • libcfa/src/concurrency/select.hfa

    r00675ed4 r81ab5eb  
    1111// Created On       : Thu Jan 21 19:46:50 2023
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Sun Nov 23 22:38:36 2025
    14 // Update Count     : 8
     13// Last Modified On : Sun Mar 29 21:12:52 2026
     14// Update Count     : 9
    1515//
    1616
     
    169169// Returns true if execution can continue normally and false if the queue has now been drained
    170170static inline bool __handle_waituntil_OR( dlist( select_node ) & queue ) {
    171         if ( isEmpty( queue ) ) return false;
     171        if ( empty( queue ) ) return false;
    172172        if ( first( queue ).clause_status && ! first( queue ).park_counter ) {
    173                 while ( ! isEmpty( queue ) ) {
     173                while ( ! empty( queue ) ) {
    174174                        // if node not a special OR case or if we win the special OR case race break
    175175                        if ( ! first( queue ).clause_status || first( queue ).park_counter || __make_select_node_available( first( queue ) ) )
  • tests/list/dlist-insert-remove.cfa

    r00675ed4 r81ab5eb  
    14361436// Section 4g
    14371437//
    1438 // Test cases of isEmpty, isFirst, isLast,
     1438// Test cases of empty, isFirst, isLast,
    14391439// remove_first, remove_last, modifications via iter
    14401440//
     
    14491449        mary m3 = {3.7};
    14501450
    1451         dlist(mary) ml;                 assert( isEmpty( ml ));
    1452 
    1453         insert_last(ml, m1);    assert(!isEmpty( ml ));
    1454         insert_last(ml, m2);    assert(!isEmpty( ml ));
    1455         insert_last(ml, m3);    assert(!isEmpty( ml ));
     1451        dlist(mary) ml;                 assert(empty( ml ));
     1452
     1453        insert_last(ml, m1);    assert(!empty( ml ));
     1454        insert_last(ml, m2);    assert(!empty( ml ));
     1455        insert_last(ml, m3);    assert(!empty( ml ));
    14561456
    14571457        mary & m1prev = prev( m1 );
     
    14941494        // queue, back to front
    14951495
    1496         assert( isEmpty( ml ));
     1496        assert(empty( ml ));
    14971497
    14981498        insert_last(ml, m1);
     
    15001500        insert_last(ml, m3);
    15011501
    1502         &m1r = & remove_first(ml);      assert(!isEmpty( ml ));
    1503         &m2r = & remove_first(ml);      assert(!isEmpty( ml ));
    1504         &m3r = & remove_first(ml);      assert( isEmpty( ml ));
    1505         &mxr = & remove_first(ml);      assert( isEmpty( ml ));
     1502        &m1r = & remove_first(ml);      assert(!empty( ml ));
     1503        &m2r = & remove_first(ml);      assert(!empty( ml ));
     1504        &m3r = & remove_first(ml);      assert(empty( ml ));
     1505        &mxr = & remove_first(ml);      assert(empty( ml ));
    15061506
    15071507        assert( &m1r == &m1 );
     
    15161516        // queue, front to back
    15171517
    1518         assert( isEmpty( ml ));
     1518        assert(empty( ml ));
    15191519
    15201520        insert_first(ml, m1);
     
    15221522        insert_first(ml, m3);
    15231523
    1524         &m1r = & remove_last(ml);       assert(!isEmpty( ml ));
    1525         &m2r = & remove_last(ml);       assert(!isEmpty( ml ));
    1526         &m3r = & remove_last(ml);       assert( isEmpty( ml ));
    1527         &mxr = & remove_last(ml);       assert( isEmpty( ml ));
     1524        &m1r = & remove_last(ml);       assert(!empty( ml ));
     1525        &m2r = & remove_last(ml);       assert(!empty( ml ));
     1526        &m3r = & remove_last(ml);       assert(empty( ml ));
     1527        &mxr = & remove_last(ml);       assert(empty( ml ));
    15281528
    15291529        assert( &m1r == &m1 );
     
    15381538        // stack at front
    15391539
    1540         assert( isEmpty( ml ));
     1540        assert(empty( ml ));
    15411541
    15421542        insert_first(ml, m1);
     
    15441544        insert_first(ml, m3);
    15451545
    1546         &m3r = & remove_first(ml);      assert(!isEmpty( ml ));
    1547         &m2r = & remove_first(ml);      assert(!isEmpty( ml ));
    1548         &m1r = & remove_first(ml);      assert( isEmpty( ml ));
    1549         &mxr = & remove_first(ml);      assert( isEmpty( ml ));
     1546        &m3r = & remove_first(ml);      assert(!empty( ml ));
     1547        &m2r = & remove_first(ml);      assert(!empty( ml ));
     1548        &m1r = & remove_first(ml);      assert(empty( ml ));
     1549        &mxr = & remove_first(ml);      assert(empty( ml ));
    15501550
    15511551        assert( &m1r == &m1 );
     
    15601560        // stack at back
    15611561
    1562         assert( isEmpty( ml ));
     1562        assert(empty( ml ));
    15631563
    15641564        insert_last(ml, m1);
     
    15661566        insert_last(ml, m3);
    15671567
    1568         &m3r = & remove_last(ml);       assert(!isEmpty( ml ));
    1569         &m2r = & remove_last(ml);       assert(!isEmpty( ml ));
    1570         &m1r = & remove_last(ml);       assert( isEmpty( ml ));
    1571         &mxr = & remove_last(ml);       assert( isEmpty( ml ));
     1568        &m3r = & remove_last(ml);       assert(!empty( ml ));
     1569        &m2r = & remove_last(ml);       assert(!empty( ml ));
     1570        &m1r = & remove_last(ml);       assert(empty( ml ));
     1571        &mxr = & remove_last(ml);       assert(empty( ml ));
    15721572
    15731573        assert( &m1r == &m1 );
     
    15931593
    15941594        insert_before( iter( ml ), m1 );
    1595         assert( ! isEmpty( ml ) );
     1595        assert( !empty( ml ) );
    15961596
    15971597        mary & mlfirst = first( ml );
Note: See TracChangeset for help on using the changeset viewer.