Changeset 6d2af204 for libcfa/src/iterator.hfa
- Timestamp:
- Feb 5, 2023, 11:42:15 AM (3 years ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 8fa77eb
- Parents:
- 9ef5516 (diff), 35d1de5 (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. - File:
-
- 1 edited
-
libcfa/src/iterator.hfa (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/iterator.hfa
r9ef5516 r6d2af204 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 7 08:37:25 201713 // Update Count : 1 012 // Last Modified On : Thu Feb 2 11:21:50 2023 13 // Update Count : 11 14 14 // 15 15 … … 17 17 18 18 // An iterator can be used to traverse a data structure. 19 trait iterator( iterator_type, elt_type ) { 19 forall( iterator_type, elt_type ) 20 trait iterator { 20 21 // point to the next element 21 22 // iterator_type ?++( iterator_type & ); … … 31 32 }; 32 33 33 trait iterator_for( iterator_type, collection_type, elt_type | iterator( iterator_type, elt_type ) ) { 34 forall( iterator_type, collection_type, elt_type | iterator( iterator_type, elt_type ) ) 35 trait iterator_for { 34 36 // [ iterator_type begin, iterator_type end ] get_iterators( collection_type ); 35 37 iterator_type begin( collection_type );
Note:
See TracChangeset
for help on using the changeset viewer.