Changeset dafbde8 for tests/zombies/gc_no_raii/bug-repro/push_back.h
- Timestamp:
- Jan 20, 2021, 4:49:40 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 454f478
- Parents:
- 92bfda0 (diff), fd54fef (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/zombies/gc_no_raii/bug-repro/push_back.h
r92bfda0 rdafbde8 1 1 //------------------------------------------------------------------------------ 2 2 //Declaration 3 trait allocator_c( otype T, otypeallocator_t) {3 trait allocator_c(T, allocator_t) { 4 4 void ctor(allocator_t* const); 5 5 void dtor(allocator_t* const); … … 8 8 }; 9 9 10 forall( otype T, otypeallocator_t | allocator_c(T, allocator_t))10 forall(T, allocator_t | allocator_c(T, allocator_t)) 11 11 struct vector 12 12 { … … 17 17 //------------------------------------------------------------------------------ 18 18 //Initialization 19 forall( otype T, otypeallocator_t | allocator_c(T, allocator_t))19 forall(T, allocator_t | allocator_c(T, allocator_t)) 20 20 void vector_ctor(vector(T, allocator_t) *const this); 21 21 22 forall( otype T, otypeallocator_t | allocator_c(T, allocator_t))22 forall(T, allocator_t | allocator_c(T, allocator_t)) 23 23 void dtor(vector(T, allocator_t) *const this); 24 24 25 25 //------------------------------------------------------------------------------ 26 26 //Allocator 27 forall( otypeT)27 forall(T) 28 28 struct heap_allocator 29 29 { … … 32 32 }; 33 33 34 forall( otypeT)34 forall(T) 35 35 void ctor(heap_allocator(T) *const this); 36 36 37 forall( otypeT)37 forall(T) 38 38 void dtor(heap_allocator(T) *const this); 39 39 40 forall( otypeT)40 forall(T) 41 41 void realloc(heap_allocator(T) *const this, size_t size); 42 42 43 forall( otypeT)43 forall(T) 44 44 inline T* data(heap_allocator(T) *const this) 45 45 { … … 49 49 //------------------------------------------------------------------------------ 50 50 //Capacity 51 forall( otype T, otypeallocator_t | allocator_c(T, allocator_t))51 forall(T, allocator_t | allocator_c(T, allocator_t)) 52 52 inline bool empty(vector(T, allocator_t) *const this) 53 53 { … … 55 55 } 56 56 57 forall( otype T, otypeallocator_t | allocator_c(T, allocator_t))57 forall(T, allocator_t | allocator_c(T, allocator_t)) 58 58 inline bool size(vector(T, allocator_t) *const this) 59 59 { … … 61 61 } 62 62 63 forall( otype T, otypeallocator_t | allocator_c(T, allocator_t))63 forall(T, allocator_t | allocator_c(T, allocator_t)) 64 64 inline void reserve(vector(T, allocator_t) *const this, size_t size) 65 65 { … … 69 69 //------------------------------------------------------------------------------ 70 70 //Modifiers 71 forall( otype T, otypeallocator_t | allocator_c(T, allocator_t))71 forall(T, allocator_t | allocator_c(T, allocator_t)) 72 72 void push_back(vector(T, allocator_t) *const this, T value);
Note: See TracChangeset
for help on using the changeset viewer.