[Issue 15017] 2.068.1-b2 regression: assigning a Variant to be value in a hashmap

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Sep 5 09:33:57 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=15017

--- Comment #2 from Dylan Knutson <tcdknutson at gmail.com> ---
Reduced variant.d 

```
template maxSize(T...)
{
        enum maxSize = T[0].sizeof;
}

struct VariantN(size_t maxDataSize, AllowedTypesParam...)
{
    // Allow assignment from another variant which is a subset of this one
    VariantN opAssign()    {
    }

    // returns 1 if the two are equal
    bool opEquals(T)(T )     {
    }

}

alias Variant = VariantN!(maxSize!creal);
```

--


More information about the Digitalmars-d-bugs mailing list