I wanted to define a compile time input validity checker for the library I am developing. So I thought maybe #define a function like #if preprocessor in C which is going to be compiled with GCC, something link this:
#define VALIDITY_CHECK(x) {#if (x)>10
#error "input out of range"
#endif}
But it doesn't work. So what is the proper way of writing such compile time validity checker?