I have a header file for definitions . I want to have a max and min function for each built-in type .
I use the following macro :
#define DEFINE__MIN_MAX(type) \
   inline type max(type x, type y) { return (x>y) ?  x : y ; } \
   inline type min(type x, type y) { return (x<y) ?  x : y ; }
Now I call the macro to specialize short data-type
DEFINE_MIN_MAX(short)  // Error: type 'short' unexpected .
I am trying this in Windows using QtCreator 3.0.1 . I am not sure how to deal with this error.
Any inputs are welcome .
 
     
    