Open cyrilcourvoisier opened 1 year ago
On Visual Studio 2022 compiler, the macro expansion of DLOG_IF_F fails for some reasons. __VA_ARGS__ is expanded into 'cond' variable of the VLOG_IF macro and : loguru::log() only got three arguments.
((verbosity) > loguru::current_verbosity_cutoff() || (cond) == false) \ ? (void)0 \ : loguru::log(verbosity, __FILE__, __LINE__, __VA_ARGS__)
I have added 'cond' parameter to DLOG_IF_F and DVLOG_IF_F so the signature maps correctly with VLOG_IF_F and it fixes the problem.
On Visual Studio 2022 compiler, the macro expansion of DLOG_IF_F fails for some reasons. __VA_ARGS__ is expanded into 'cond' variable of the VLOG_IF macro and : loguru::log() only got three arguments.
define VLOG_IF_F(verbosity, cond, ...) \
I have added 'cond' parameter to DLOG_IF_F and DVLOG_IF_F so the signature maps correctly with VLOG_IF_F and it fixes the problem.