Is it possible to specify the address returned by the address of operator?
DreadKyller
dreadkyller at gmail.com
Wed Sep 27 21:16:52 UTC 2017
On Wednesday, 27 September 2017 at 21:01:36 UTC, Jesse Phillips
wrote:
> For example, if you store your Matrix in a custom container it
> could try to store pointer rather than the struct itself, if &
> is overloaded the generic implementation would be broken
> because it would no longer be a pointer to Matrix but to the
> inner element.
>
> Whereas generic code which utilizes addition or append can
> assume the type appropriately defined the behavior to
> semantically match the desired use, generic code would be
> broken if the type changed & to do something different from
> what the language defines it to do.
Alright, that makes sense, that's some valid reasoning, I can
accept that.
More information about the Digitalmars-d-learn
mailing list