D - overloaded member bug
- imr1984 (15/15) Feb 21 2004 ok so i created a struct with 2 methods like this:
- Manfred Nowak (6/8) Feb 21 2004 [...]
ok so i created a struct with 2 methods like this: struct mat4 { float m[16]; void translate(vec3 vec){...}//used to apply a translation to this matrix static mat4 translate(vec3 vec){...}//returns a translation matrix } and when i use the struct like so: mat4 myMatrix; myMatrix.translate(myVec); //the STATIC overloaded function is called instead of the non static one. The only way i could make the non static one get called is by commenting out the static one. the compiler should be able to see from this context that its the non static overloaded function that i want to call, but evidently it doesnt.
Feb 21 2004
On Sat, 21 Feb 2004 10:36:54 +0000, imr1984 wrote: [...]void translate(vec3 vec){...}//used to apply a translation to this matrix static mat4 translate(vec3 vec){...}//returns a translation matrix[...] Are you sure that your compiler did not yield an error like `function translate conflicts with mat4.translate '? So long.
Feb 21 2004