On 3/27/22 12:27 PM, JN wrote:
int* getX(T)(T t) { return &t.x; }
Remove this one. It's a bad idea. It probably won't compile, but if it does, you will be using corrupted memory.
-Steve
Steven Schveighoffer via Digitalmars-d-learn Sun, 27 Mar 2022 11:16:26 -0700
On 3/27/22 12:27 PM, JN wrote:
int* getX(T)(T t) { return &t.x; }
Remove this one. It's a bad idea. It probably won't compile, but if it does, you will be using corrupted memory.
-Steve