++ and D overloaded operators should live in
different worlds.
Can't we map both static and member operators to opBinary
resp. opBinaryRight members in this case? How likely is it
that both are defined on the C++ side, and if they are, how
likely is it that they will behave differently
) will not
provide the same behaviour as operator+ in D.
Thus: C++ and D overloaded operators should live in
different worlds.
Can't we map both static and member operators to opBinary
resp. opBinaryRight members in this case? How likely is it
that both are defined on the C++ side
); //unable to map it to D, because
static module-level Foo opAdd(int, Foo) will not provide the same
behaviour as operator+ in D.
Thus: C++ and D overloaded operators should live in different
worlds.
as operator+ in D.
Thus: C++ and D overloaded operators should live in different
worlds.
Can't we map both static and member operators to opBinary resp.
opBinaryRight members in this case? How likely is it that both
are defined on the C++ side, and if they are, how likely
module-level Foo opAdd(int, Foo) will not provide the
same behaviour as operator+ in D.
Thus: C++ and D overloaded operators should live in different
worlds.
Can't we map both static and member operators to opBinary resp.
opBinaryRight members in this case? How likely is it that both
are defined
operator+(int a, Foo f); //unable to map it to D, because
static module-level Foo opAdd(int, Foo) will not provide the
same behaviour as operator+ in D.
Thus: C++ and D overloaded operators should live in different
worlds.
Can't we map both static and member operators to opBinary
resp
can't be mapped to D, if them
implemented as static functions:
Foo operator+(int a, Foo f); //unable to map it to D,
because static module-level Foo opAdd(int, Foo) will not
provide the same behaviour as operator+ in D.
Thus: C++ and D overloaded operators should live in
different worlds.
Can't
Now D provides very powerfull means to link C++ code with D.
However D doesn't allow to call C++ overloaded operators.
It's very annoying, because C++ code may don't provide
non-operator analogues.
What we know about C++ overloadable operators? Overloaded
operator in C++ is a trivial
On Tuesday, 11 November 2014 at 22:26:48 UTC, IgorStepanov wrote:
Now D provides very powerfull means to link C++ code with D.
However D doesn't allow to call C++ overloaded operators.
It's very annoying, because C++ code may don't provide
non-operator analogues.
What we know about C++