Ignore:
Timestamp:
Apr 27, 2016, 5:35:59 PM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, 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, resolv-new, with_gc
Children:
84bb4d9
Parents:
21ae786
Message:

modified vector_test to use constructors and destructors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/examples/array.h

    r21ae786 r1ad1c99  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // array.h -- 
     7// array.h --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Wed May 27 17:56:53 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Mar  2 18:13:35 2016
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Wed Apr 27 17:26:04 2016
    1313// Update Count     : 5
    1414//
     
    2626
    2727// 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 );
     28trait bounded_array( otype array_type, otype elt_type | array( array_type *, elt_type ) ) {
     29        int last( array_type * );
    3030};
    3131
     
    4141// return iterators corresponding to the first element and the one-past-the-end element, STL-style.
    4242forall( otype array_type, otype elt_type | bounded_array( array_type, elt_type ) )
    43 elt_type *begin( array_type );
     43elt_type * begin( array_type * array );
    4444
     45// The end iterator should point one past the last element.
    4546forall( otype array_type, otype elt_type | bounded_array( array_type, elt_type ) )
    46 elt_type *end( array_type );
     47elt_type * end( array_type * array );
    4748
    4849#endif // ARRAY_H
Note: See TracChangeset for help on using the changeset viewer.