source: src/examples/gc_no_raii/src/vector.h@ c44e622

ADT aaron-thesis arm-eh ast-experimental cleanup-dtors ctor deferred_resn demangler enum forall-pointer-decay gc_noraii jacob/cs343-translation jenkins-sandbox memory new-ast new-ast-unique-expr new-env no_list persistent-indexer pthread-emulation qualifiedEnum resolv-new stuck-waitfor-destruct with_gc
Last change on this file since c44e622 was c44e622, checked in by Thierry Delisle <tdelisle@…>, 10 years ago

intermediate implementation of vector

  • Property mode set to 100644
File size: 265 bytes
Line 
1
2
3context allocator(type T, type all) {
4 T realloc(all*, size_t);
5};
6
7forall(type T, type all | allocator(T, all))
8struct vector
9{
10 T *m_data;
11};
12
13// forall(type T, type all)
14// void push_back(vector(T, all)* this, T value)
15// {
16// (*(this->m_data)) = value;
17// }
Note: See TracBrowser for help on using the repository browser.