Changeset accc5dbb for libcfa/src/bits/stack.hfa
- Timestamp:
- Dec 16, 2020, 4:01:15 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- b3c8496
- Parents:
- 8a81b09
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/stack.hfa
r8a81b09 raccc5dbb 3 3 #include "bits/collection.hfa" 4 4 5 forall( dtype T ) {5 forall( dtype T | { T *& Next ( T * ); bool listed ( T * ); } ) { 6 6 struct Stack { 7 7 inline Collection; // Plan 9 inheritance … … 44 44 T & t = head( s ); 45 45 if ( root ) { 46 root = ( T *)Next( root );46 root = ( T *)Next( (T *)root ); 47 47 if ( &head( s ) == &t ) root = 0p; // only one element ? 48 48 Next( &t ) = 0p; … … 58 58 59 59 60 forall( dtype T ) {60 forall( dtype T | { T *& Next ( T * ); bool listed ( T * ); } ) { 61 61 struct StackIter { 62 62 inline ColIter; // Plan 9 inheritance
Note: See TracChangeset
for help on using the changeset viewer.