Changes in src/examples/array.h [4040425:1ad1c99]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/examples/array.h
r4040425 r1ad1c99 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // array.h -- 7 // array.h -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Wed May 27 17:56:53 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Wed Mar 2 18:13:35201611 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Apr 27 17:26:04 2016 13 13 // Update Count : 5 14 14 // … … 26 26 27 27 // A bounded array is an array that carries its maximum index with it. 28 trait bounded_array( otype array_type, otype elt_type | array( array_type , elt_type ) ) {29 int last( array_type );28 trait bounded_array( otype array_type, otype elt_type | array( array_type *, elt_type ) ) { 29 int last( array_type * ); 30 30 }; 31 31 … … 41 41 // return iterators corresponding to the first element and the one-past-the-end element, STL-style. 42 42 forall( otype array_type, otype elt_type | bounded_array( array_type, elt_type ) ) 43 elt_type * begin( array_type);43 elt_type * begin( array_type * array ); 44 44 45 // The end iterator should point one past the last element. 45 46 forall( otype array_type, otype elt_type | bounded_array( array_type, elt_type ) ) 46 elt_type * end( array_type);47 elt_type * end( array_type * array ); 47 48 48 49 #endif // ARRAY_H
Note: See TracChangeset
for help on using the changeset viewer.