Summary: Overloading an operator breaks when using typeof(this)
--- Comment #0 from akb...@gmail.com 2011-02-06 10:58:08 PST ---
If you overload an operator and use tyepof(this) as the type of the parameter,
the compiler will throw an error about incompatible types. See the attached d
source file for an example.
This can be worked around by using the struct/class name instead of
typeof(this) for the parameter. If you're defining the operator in a template
mixin (the case where I originally noticed the bug), you will need to pass the
type as a template argument.
I am using gdc 2.051 compiled against gcc version 4.5.2 on an x64 Linux system
running Debian Squeeze. I initially posted this on gdc's bug tracker
but they said it's likely a problem with the frontend.
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------