Hi!

Simple program:
import std.variant;

shared Variant[string] t;

void main() {
    t["t"] = "bebebe";
}

Without "shared" this program compiles and works.

With shared I get:

aa.d(6): Error: template std.variant.VariantN!32LU.VariantN.opAssign cannot deduce function from argument types !()(string) shared, candidates are: /usr/include/dmd/phobos/std/variant.d(577): std.variant.VariantN!32LU.VariantN.opAssign(T)(T rhs) aa.d(6): Error: cannot implicitly convert expression (VariantN(& handler, cast(ubyte)0u, ).this("bebebe")) of type VariantN!32LU to shared(VariantN!32LU)

Help me, please.

Reply via email to