Hi,
Sorry for this question if it's too basic but I'm just a C programmer starting with C++, I want to define this polymorphic function __max3 to work for all the different types of numeric values.
Like the built in function __max:
This is what my old C code for this was (now I want to do it a bit more clean with the function):Code:type __max( type a, type b );
I've tried this but doesn't work:Code:#define __max3(x1,x2,x3) __max(x1,max(x2,x3))
On another note, if I later want to make this function to be inlined with __forceinline, will it still work with the polymorphic definition?Code:type __max3(type a, type b, type c) { return ( __max(a,max(b,c)) ); }
TIA & Regards ...



LinkBack URL
About LinkBacks



