Codechange: Use __VA_OPT__(,) instead of , ## (#12921)
`__VA_OPT__` is a C++20 standard, `##` is, apparently, a GNU extension. MSVC needs /Zc:preprocessor adding for whatever reason.
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
[[noreturn]] void UserErrorI(const std::string &str);
|
||||
[[noreturn]] void FatalErrorI(const std::string &str);
|
||||
#define UserError(format_string, ...) UserErrorI(fmt::format(FMT_STRING(format_string), ## __VA_ARGS__))
|
||||
#define FatalError(format_string, ...) FatalErrorI(fmt::format(FMT_STRING(format_string), ## __VA_ARGS__))
|
||||
#define UserError(format_string, ...) UserErrorI(fmt::format(FMT_STRING(format_string) __VA_OPT__(,) __VA_ARGS__))
|
||||
#define FatalError(format_string, ...) FatalErrorI(fmt::format(FMT_STRING(format_string) __VA_OPT__(,) __VA_ARGS__))
|
||||
|
||||
#endif /* ERROR_FUNC_H */
|
||||
|
||||
Reference in New Issue
Block a user