M
Mark
Hi,
I've got a template function
move_by( rect<T>&, T x, T y) being called as
rect<float> r;
move_by( r, 3.0, 4.0 );
However, i'm getting stupid ambiguities when I use
floating point numbers.
event_handler.cpp(43) : error C2782: 'void ' : template parameter 'T' is
ambiguous
could be 'double'
or 'float'
This message is referring to the x,y arguments.
Do I really have to specialise for these types? It
seems rediculous and defeats the purpose of having templates
to begin with.
Any ideas?
Thanks,
Mark.
I've got a template function
move_by( rect<T>&, T x, T y) being called as
rect<float> r;
move_by( r, 3.0, 4.0 );
However, i'm getting stupid ambiguities when I use
floating point numbers.
event_handler.cpp(43) : error C2782: 'void ' : template parameter 'T' is
ambiguous
could be 'double'
or 'float'
This message is referring to the x,y arguments.
Do I really have to specialise for these types? It
seems rediculous and defeats the purpose of having templates
to begin with.
Any ideas?
Thanks,
Mark.