I have these macros which generate error in Visual Studio 2015.
#define log_params __FILE__, __LINE__
#define log(file, line, message, ...) _snprintf_s(nullptr, 0, 0, message, __VA_ARGS__)
Now calling this never works
log(log_params, "testing %d", 4)
Any thoughts? I also checked output of preprocessor and it is:
_snprintf_s(nullptr, 0, 0, 4 );
EDIT 1 Intresting finding
#define log(file, line, message, ...) file line
will produce this :
"service.cpp", 164 "testing %d"
Is it normal?