L
LRS Kumar
In Chapter 1(Page 25 in my copy) of Modern C++ Design, Alexandrescu
uses a macro called STATIC_CHECK:
#define STATIC_CHECK(expr, msg) \
{\
class ERROR_##msg {};
(void)sizeof((CompileTimeChecker<(expr) !=
0>((ERROR_##msg()))));\
}
Does anyone know why he casts to void?
Thanks.
LRS
uses a macro called STATIC_CHECK:
#define STATIC_CHECK(expr, msg) \
{\
class ERROR_##msg {};
(void)sizeof((CompileTimeChecker<(expr) !=
0>((ERROR_##msg()))));\
}
Does anyone know why he casts to void?
Thanks.
LRS