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

2017-09-30 Thread Paolo Invernizzi via Digitalmars-d-learn
On Friday, 29 September 2017 at 22:15:44 UTC, Mengu wrote: On Friday, 29 September 2017 at 02:34:08 UTC, DreadKyller wrote: [...] +1 for forum issue. +1 please...

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

2017-09-29 Thread Mengu via Digitalmars-d-learn
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

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-28 Thread user1234 via Digitalmars-d-learn
On Thursday, 28 September 2017 at 00:11:56 UTC, DreadKyller wrote: On Wednesday, 27 September 2017 at 23:24:58 UTC, user1234 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

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

2017-09-28 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/27/17 12:35 PM, 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 matrix object to aid with the matrix math required for working with 3D transforms. However

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

2017-09-28 Thread kinke via Digitalmars-d-learn
On Thursday, 28 September 2017 at 10:24:28 UTC, Jonathan M Davis wrote: On Wednesday, September 27, 2017 22:01:26 DreadKyller via Digitalmars-d- learn wrote: Also off-topic slightly, but am I the only one with massive latency on this site? It took like almost 2 minutes from me hitting reply

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

2017-09-28 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, September 27, 2017 22:01:26 DreadKyller via Digitalmars-d- learn wrote: > Also off-topic slightly, but am I the only one with massive > latency on this site? It took like almost 2 minutes from me > hitting reply before this page showed up, and my last few posts > took like a minute

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 user1234 via Digitalmars-d-learn
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 ones that can't apparently is the address of operator (). My

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 nkm1 via Digitalmars-d-learn
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 philosophy. Not even modern, see Java :) ("I left out operator

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 Jesse Phillips via Digitalmars-d-learn
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 ones that can't apparently is the address of operator (). My question is have I simply missed it or does it actually not exist, and if it's

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

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

2017-09-27 Thread nkm1 via Digitalmars-d-learn
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 matrix object to aid with the matrix math required for working

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)