On Tuesday, 17 April 2018 at 11:38:17 UTC, Jonathan M Davis wrote:
On Sunday, April 15, 2018 17:59:01 Dgame via
Digitalmars-d-learn wrote:
How am I supposed to insert a struct with immutable members
into an assoc. array?
Reduced example:
struct A {
immutable string name;
}
A[string]
On Tuesday, 17 April 2018 at 11:07:55 UTC, bauss wrote:
Even though it works in static this, then it still looks like a
bug if you ask me, because the associative array itself isn't
immutable.
Yeah... I'm not sure, if this behavior is wanted, too...
If you argue, that an absent field in in
On Sunday, April 15, 2018 17:59:01 Dgame via Digitalmars-d-learn wrote:
> How am I supposed to insert a struct with immutable members into
> an assoc. array?
>
> Reduced example:
>
> struct A {
> immutable string name;
> }
>
> A[string] as;
> as["a"] = A("a"); // Does not work
>
I w
On Sunday, 15 April 2018 at 18:51:52 UTC, Alex wrote:
On Sunday, 15 April 2018 at 17:59:01 UTC, Dgame wrote:
How am I supposed to insert a struct with immutable members
into an assoc. array?
Reduced example:
struct A {
immutable string name;
}
A[string] as;
as["a"] = A("a"); // Does
On Sunday, 15 April 2018 at 17:59:01 UTC, Dgame wrote:
How am I supposed to insert a struct with immutable members
into an assoc. array?
Reduced example:
struct A {
immutable string name;
}
A[string] as;
as["a"] = A("a"); // Does not work
Via a static this() it would work. But