[Issue 5040] opOpAssign should be automatically visible for types.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 29 09:38:08 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=5040

RazvanN <razvan.nitu1305 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |razvan.nitu1305 at gmail.com
         Resolution|---                         |WONTFIX

--- Comment #2 from RazvanN <razvan.nitu1305 at gmail.com> ---
The operators may only be defined for classes and structs. For generic code,
the mixin construct may be used as previously stated. In D there is a
distinction between basic types and aggregate types and not all aggregate
operators make sense in the context of builtin types. Also, adding the extra
complexity in the compiler does not worth it, considering that we have a
perfectly valid workaround.

--


More information about the Digitalmars-d-bugs mailing list