Summary: Variant == const(Variant) doesn't compile
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos

--- Comment #0 from Don <> 2010-12-02 13:23:11 PST ---
import std.variant;

void foo(const Variant a)
    Variant b;
    assert (a == b);

>dmd test0
test0.d(12): Error: template std.variant.VariantN!(maxSize).VariantN.opEquals(T
) does not match any function template declaration
test0.d(12): Error: template std.variant.VariantN!(maxSize).VariantN.opEquals(T
) cannot deduce template function from argument types !()(VariantN!(maxSize))

And if you change the assert into:  assert(b==a);
you get:
c:\dmd\windows\bin\..\..\src\phobos\std\variant.d(499): Error: static assert 
ssigning Variant objects from const Variant objects is currently not

c:\dmd\windows\bin\..\..\src\phobos\std\variant.d(481):        instantiated
 here: opAssign!(const(VariantN!(maxSize)))
c:\dmd\windows\bin\..\..\src\phobos\std\variant.d(737):        instantiated
 here: __ctor!(const(VariantN!(maxSize)))
test0.d(12):        instantiated from here: opEquals!(const(VariantN!(maxSize))

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to