Re: Is it possible to specify the address returned by the address of operator?

2017-09-28 Thread DreadKyller via Digitalmars-d-learn
On Thursday, 28 September 2017 at 14:01:33 UTC, user1234 wrote: On Thursday, 28 September 2017 at 00:11:56 UTC, DreadKyller wrote: Notice how dereferencing the pointer did not call the overloaded function, because a pointer to Test is not the same type as a Test. Yeah, this is rather made to

Re: Is it possible to specify the address returned by the address of operator?

2017-09-27 Thread DreadKyller via Digitalmars-d-learn
On Wednesday, 27 September 2017 at 23:24:58 UTC, user1234 wrote: On Wednesday, 27 September 2017 at 21:01:36 UTC, Jesse Phillips wrote: On Wednesday, 27 September 2017 at 16:35:54 UTC, DreadKyller wrote: My question is about overloading, several operators can be overloaded in D, one of the

Re: Is it possible to specify the address returned by the address of operator?

2017-09-27 Thread DreadKyller via Digitalmars-d-learn
On Wednesday, 27 September 2017 at 21:18:50 UTC, nkm1 wrote: On Wednesday, 27 September 2017 at 20:24:24 UTC, DreadKyller wrote: The attitude of "some people use this feature incorrectly, so let's ban it's use entirely" is honestly ridiculous to me, but oh well, that's apparently the modern

Re: Is it possible to specify the address returned by the address of operator?

2017-09-27 Thread DreadKyller via Digitalmars-d-learn
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

Re: Is it possible to specify the address returned by the address of operator?

2017-09-27 Thread DreadKyller via Digitalmars-d-learn
On Wednesday, 27 September 2017 at 19:55:07 UTC, nkm1 wrote: On Wednesday, 27 September 2017 at 16:35:54 UTC, DreadKyller wrote: Been using D for a couple years now, however one problem I've had, more so recently since I've been dealing a lot with OpenGL is related to pointers. I have a

Is it possible to specify the address returned by the address of operator?

2017-09-27 Thread DreadKyller via Digitalmars-d-learn
Been using D for a couple years now, however one problem I've had, more so recently since I've been dealing a lot with OpenGL is related to pointers. I have a matrix object to aid with the matrix math required for working with 3D transforms. However OpenGL (I'm using DerelictGL3 bindings)