Changeset 4a9ccc3 for src/tests/vector
- Timestamp:
- Jan 24, 2017, 3:56:33 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- ad6343e
- Parents:
- 0bfaf80
- Location:
- src/tests/vector
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/vector/array.c
r0bfaf80 r4a9ccc3 16 16 #include "array.h" 17 17 18 /// forall( otype array_type, elt_type | bounded_array( array_type, elt_type ) ) 19 /// [ array_iterator begin, array_iterator end ] 20 /// get_iterators( array_type array ) 21 /// { 22 /// begin = 0; 23 /// end = last( array ); 24 /// } 18 forall( otype array_type, otype elt_type | bounded_array( array_type, elt_type ) ) 19 [ elt_type * begin, elt_type * end ] get_iterators( array_type * array ) { 20 return [ begin( array ), end( array ) ]; 21 } 25 22 26 23 // The first element is always at index 0. -
src/tests/vector/array.h
r0bfaf80 r4a9ccc3 32 32 // implement iterator_for 33 33 34 typedef int array_iterator; 35 36 /// forall( otype array_type, elt_type | bounded_array( array_type, elt_type ) ) 37 /// [ array_iterator begin, array_iterator end ] get_iterators( array_type ); 34 forall( otype array_type, otype elt_type | bounded_array( array_type, elt_type ) ) 35 [ elt_type * begin, elt_type * end ] get_iterators( array_type * ); 38 36 39 37
Note: See TracChangeset
for help on using the changeset viewer.