On 5/11/22 2:13 PM, ikod wrote:
I don't know if this compatible with your approach, but for my hashmap I
added goals like:
* allow @nogc and/or @safe operations on hashmap if key and value types
allow this
I believe everything is attributed or inferred as it should be (it is a
template, so inference should happen on all the methods). I copied all
the attributes from the aaA.d file, and assignment/opEquals for the
value/key should be inferred based on the appropriate calls. Everything
should be correct, because now the language is doing it for me, instead
of having to infer this with weird wrappers (e.g.
[here](https://github.com/dlang/druntime/blob/9631e0d515fa4354b7302c8e2404dd119ff201aa/src/object.d#L3443)).
* 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