|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.ide digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
digitalmars.D.bugs - [Issue 2074] New: Variant arithmetic operations fail
http://d.puremagic.com/issues/show_bug.cgi?id=2074 Summary: Variant arithmetic operations fail Product: D Version: 2.014 Platform: PC OS/Version: Windows Status: NEW Severity: normal Priority: P3 Component: Phobos AssignedTo: bugzilla digitalmars.com ReportedBy: arkangath gmail.com The following program fails: ----------------------- import std.stdio; import std.variant; Variant a; Variant b; void main () { a=2; b=3; writeln(b-a); } ------------------------------- With the error: testar.d(11): Error: overloads VariantN!(maxSize)(VariantN!(maxSize) rhs) and VariantN!(maxSize)(VariantN!(maxSize) lhs) both match argument list for opSub -- May 06 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2074 andrei metalanguage.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bugzilla digitalmars.com |andrei metalanguage.com ------- Comment #1 from andrei metalanguage.com 2008-05-06 10:54 ------- (In reply to comment #0) May 06 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2074 ------- Comment #2 from arkangath gmail.com 2008-05-06 12:23 ------- I think that there may be other operations failing, opDiv being one of them. I'm unsure about opMod however. -- May 06 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2074 andrei metalanguage.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED ------- Comment #3 from andrei metalanguage.com 2008-05-06 12:25 ------- (In reply to comment #2)I think that there may be other operations failing, opDiv being one of them. I'm unsure about opMod however. May 06 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2074 ------- Comment #4 from andrei metalanguage.com 2008-05-06 18:02 ------- I looked into it some more and I think the best engineering solution is to remove support for right-hand-side operations in Variant. This would require the occasional explicitness, e.g. Variant(5) - x instead of 5 - x, but I see that as a small disadvantage that avoids a hecatomb of bloating in the source. Please advise. -- May 06 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2074 ------- Comment #5 from arkangath gmail.com 2008-05-06 18:33 ------- (In reply to comment #4)I looked into it some more and I think the best engineering solution is to remove support for right-hand-side operations in Variant. This would require the occasional explicitness, e.g. Variant(5) - x instead of 5 - x, but I see that as a small disadvantage that avoids a hecatomb of bloating in the source. Please advise. May 06 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2074 andrei metalanguage.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED ------- Comment #6 from andrei metalanguage.com 2008-05-17 11:23 ------- Fixed in 2.014. -- May 17 2008
|