Ignore:
Timestamp:
Mar 3, 2016, 1:28:56 PM (10 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
3627356
Parents:
9d7b3ea (diff), 4040425 (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
  • src/libcfa/iterator

    r9d7b3ea r36ebd03  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jan 27 23:49:13 2016
    13 // Update Count     : 7
     12// Last Modified On : Wed Mar  2 18:06:05 2016
     13// Update Count     : 9
    1414//
    1515
     
    1818
    1919// An iterator can be used to traverse a data structure.
    20 context iterator( type iterator_type, type elt_type ) {
     20trait iterator( otype iterator_type, otype elt_type ) {
    2121        // point to the next element
    2222//      iterator_type ?++( iterator_type * );
     
    3232};
    3333
    34 context iterator_for( type iterator_type, type collection_type, type elt_type | iterator( iterator_type, elt_type ) ) {
     34trait iterator_for( otype iterator_type, otype collection_type, otype elt_type | iterator( iterator_type, elt_type ) ) {
    3535//      [ iterator_type begin, iterator_type end ] get_iterators( collection_type );
    3636        iterator_type begin( collection_type );
     
    3838};
    3939
    40 forall( type iterator_type, type elt_type | iterator( iterator_type, elt_type ) )
     40forall( otype iterator_type, otype elt_type | iterator( iterator_type, elt_type ) )
    4141void for_each( iterator_type begin, iterator_type end, void (*func)( elt_type ) );
    4242
    43 forall( type iterator_type, type elt_type | iterator( iterator_type, elt_type ) )
     43forall( otype iterator_type, otype elt_type | iterator( iterator_type, elt_type ) )
    4444void for_each_reverse( iterator_type begin, iterator_type end, void (*func)( elt_type ) );
    4545
Note: See TracChangeset for help on using the changeset viewer.