[Issue 19200] New: Variant operators don't overload correctly
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Aug 28 12:44:37 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19200
Issue ID: 19200
Summary: Variant operators don't overload correctly
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: simen.kjaras at gmail.com
There are issues when using Variant with types that have their own overloaded
operators:
struct S {
static int opBinaryRight(string op : "|", T)(T rhs) {
return 3;
}
}
unittest {
import std.variant;
S s;
Variant v;
auto b = v | s;
}
std\variant.d(1004): Error: no property min for type S
In addition, Variant's operator overloads are of the old kind (opAdd, opMul,
and so on). These should be updated anyway.
--
More information about the Digitalmars-d-bugs
mailing list