Library associative array project v0.0.1
ikod
igor.khasilev at gmail.com
Wed May 11 21:41:23 UTC 2022
On Wednesday, 11 May 2022 at 19:15:36 UTC, Steven Schveighoffer
wrote:
>> * add some methods returning a copy of the value instead of a
>> pointer to value
>
> I return a reference to the value (via `opIndex`). Can you
> elaborate on why you would need it to be a copy? What is your
> API?
>
> -Steve
Sorry, it is safe to return reference for your implementation, as
you call `new Entry` on every insert, like standard AA. I keep
entries in preallocated vector for performance reasons and every
`resize` can break reference.
More information about the Digitalmars-d-announce
mailing list