November 19, 2023

Hi,

This week I finished working on converting _d_newarray{mTX,miTX,OpT} to a single template and got the PR merged. They allocate and initialise multi-dimensional arrays. Similarly to _d_newarray{U,T,iT}, _d_newaraym* are now implemented by a single hook: _d_newarraymTX. Previously the two hooks were used to differentiate between default-initialised and zero-initialised types. _d_newarrayOpT was the common implementation called by both _d_newarraym{i,}TX hooks. _d_newarrayOpT received an alias template argument: either _d_newarrayiT or _d_newarrayT which it used to allocate the innermost 1-D array.

Now _d_newarraymTX can be made much simpler: it simply calls _d_newarrayT, which in turn uses DBI to figure out how to initialise the array. In the following weeks I'll start working on _d_arrayliteralTX and _d_assocarrayliteralTX.

Thanks,
Teo

November 19, 2023

On Sunday, 19 November 2023 at 21:33:44 UTC, Teodor Dutu wrote:

>

Hi,

This week I finished working on converting _d_newarray{mTX,miTX,OpT} to a single template and got the PR merged. They allocate and initialise multi-dimensional arrays. Similarly to _d_newarray{U,T,iT}, _d_newaraym* are now implemented by a single hook: _d_newarraymTX. Previously the two hooks were used to differentiate between default-initialised and zero-initialised types. _d_newarrayOpT was the common implementation called by both _d_newarraym{i,}TX hooks. _d_newarrayOpT received an alias template argument: either _d_newarrayiT or _d_newarrayT which it used to allocate the innermost 1-D array.

[...]

Well done