Changeset 9a4e996


Ignore:
Timestamp:
Aug 8, 2017, 8:04:39 PM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
533804b
Parents:
b0440b7
Message:

Update vector_test to remove lvalue keyword

Location:
src/tests/vector
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/tests/vector/array.h

    rb0440b7 r9a4e996  
    2222// element has index 0.
    2323trait array( otype array_type, otype elt_type ) {
    24         lvalue elt_type ?[?]( array_type, int );
     24        elt_type & ?[?]( array_type, int );
    2525};
    2626
  • src/tests/vector/vector_int.c

    rb0440b7 r9a4e996  
    6161// implement bounded_array
    6262
    63 lvalue int ?[?]( vector_int * vec, int index ) {
     63int & ?[?]( vector_int * vec, int index ) {
    6464        return vec->data[ index ];
    6565}
  • src/tests/vector/vector_int.h

    rb0440b7 r9a4e996  
    2626
    2727void ?{}( vector_int & );                                                               // allocate vector with default capacity
    28 void ?{}( vector_int &, int reserve );          // allocate vector with specified capacity
    29 void ?{}( vector_int & vec, vector_int other ); // copy constructor
     28void ?{}( vector_int &, int reserve );                                  // allocate vector with specified capacity
     29void ?{}( vector_int & vec, vector_int other );                 // copy constructor
    3030void ^?{}( vector_int & );                                                              // deallocate vector's storage
    3131
     
    3535// implement bounded_array
    3636
    37 lvalue int ?[?]( vector_int * vec, int index );                 // access to arbitrary element (does not resize)
    38 int last( vector_int * vec );                                                           // return last element
     37int & ?[?]( vector_int * vec, int index );                              // access to arbitrary element (does not resize)
     38int last( vector_int * vec );                                                   // return last element
    3939
    4040#endif // VECTOR_INT_H
Note: See TracChangeset for help on using the changeset viewer.