Is it possible to specify the address returned by the address of operator?
Mengu
mengukagan at gmail.com
Fri Sep 29 22:15:44 UTC 2017
On Friday, 29 September 2017 at 02:34:08 UTC, DreadKyller wrote:
> On Thursday, 28 September 2017 at 14:01:33 UTC, user1234 wrote:
>> [...]
>
> I understand that, but because the operator isn't defined
> normally for classes unless overloaded, then your statement
> about this being an inconsistency on the concerns stated prior
> about wrecking implementation of standard features. If & can't
> be overloaded then the type of &object will always be a
> pointer, you can't override the dereference operator of the
> pointer itself as far as I can tell, overloading it on the
> class doesn't overload the pointer, thus any standard
> implementation that uses pointers to store an object would be
> completely unaffected by overloading the dereference operator.
> This I don't consider it an inconsistency.
>
> [...]
+1 for forum issue.
More information about the Digitalmars-d-learn
mailing list