Timestamp:
Jan 10, 2024, 12:01:02 PM (5 months ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
master
Children:
4d689e2, b262cb3
Parents:
40002c5
Message:

Enable array RAII and provide uninit(-), a uNoCtor equivalent.

Enable construction/destruction of "new" CFA array elements,
which was previously deactivated to avoid a compiler performance issue.
The enabled RAII steps more carefully around the performance issue.

Provide uninit(-), with tests covering the typical use case:

struct Foo;
void ?{}( Foo & this, int i ) { printf( "ctor at %d\n", i ); }
uninit(Foo) a[10]; no prints
for (i; 10) (a[i]){ i };
prints
array(uninit(Foo), 10) b; no prints
for (i; 10) (b[i]){ i };
prints

Location:
tests/array-collections
Files:
5 added

Note: See TracChangeset for help on using the changeset viewer.