hot reloading template specailizations

2025-06-25 Thread monkyyy via Digitalmars-d-learn
I have my hotreloading lib and went to use it on some templates code; stockily it broke upon contract with templates(I half expected it to break) I planed on having an overload set of maybe 256 "tiles" ```d int tile(int I:0)(float x,float y){ return 0; } ``` I defined `int temptile(flo

Re: Should I worry about this hashOf warning ?

2025-06-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, June 25, 2025 9:38:55 AM Mountain Daylight Time axricard via Digitalmars-d-learn wrote: > When trying to use Nullable with a struct containing an > overlapping pointer: > > ```D > import std; > > struct S > { > union > { > long foo; > int[] bar; > } > }

Should I worry about this hashOf warning ?

2025-06-25 Thread axricard via Digitalmars-d-learn
When trying to use Nullable with a struct containing an overlapping pointer: ```D import std; struct S { union { long foo; int[] bar; } } void main() { Nullable!S s; } ``` I get this warning: ``` /dlang/dmd/linux/bin64/../../src/phobos/std/typecons.d(3820):

Re: Operator Overloading - Only for Classes and Structs?

2025-06-25 Thread Andy Valencia via Digitalmars-d-learn
I was a little surprised the subclassing syntax didn't do structural concatenation for struct's. That is, ```d import std.stdio : writeln; struct A { int a; void printA() { println(this.a); } } struct B : A { int b; void printAB() { this.printA(); println(this.b); } } void an_A_fu