dtoh: Provide operator[] for _d_dynamicArray ...

... s.t. it can be used like a normal array (+ bounds checking)
This commit is contained in:
MoonlightSentinel 2020-10-18 18:14:44 +02:00
parent aeb3dbd1f4
commit 3a426c842a
No known key found for this signature in database
GPG key ID: 1A1A60AECDC956AB
20 changed files with 211 additions and 1 deletions

View file

@ -13,6 +13,8 @@ int main()
assert(!c->s.b);
assert(c->name.ptr == name);
assert(c->name.length == length);
assert(c->name[1] == 'e');
assert(const_cast<const C*>(c)->name[2] == 'a');
c->verify();
assert(foo(c->s) == bar(c));