You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While code-base spring cleaning I noticed that I (unwisely) ignored some refl-cpp variadic macro warnings that prevent gcc|clang compiling with more strict checks enabled (i.e. -Werror).
This shows up already for C++17 with the existing basic refl-cpp's default serialiser example and -pedantic compiler flags.
The corresponding sample output and warnings from running the tests at compiler-explorer:
gcc 10.2 or newer produces the following warning:
https://raw.githubusercontent.com/veselink1/refl-cpp/master/include/refl.hpp:4363:31: warning: ISO C++11 requires at least one argument for the "..." in a variadic macro
clang 12.0 or newer produce a bit more understandable warning outputs:
https://raw.githubusercontent.com/veselink1/refl-cpp/master/include/refl.hpp:4363:5: warning: must specify at least one argument for '...' parameter of variadic macro [-Wgnu-zero-variadic-macro-arguments]
REFL_DETAIL_PRIMITIVE(char);
^
https://raw.githubusercontent.com/veselink1/refl-cpp/master/include/refl.hpp:4359:23: note: expanded from macro 'REFL_DETAIL_PRIMITIVE'
REFL_TYPE(TypeName) \
^
These checks seem to become more enforced for but also there seems to be a clean solution for C++20 #define FOO(x, ...) bar(x __VA_OPT__(,) __VA_ARGS__) as, for example, discussed in more detail here.
I was wondering whether this could be addressed under the premise that refl-cpp is C++17-based?
Any help would be much appreciated! Thanks in advance!
The text was updated successfully, but these errors were encountered:
While code-base spring cleaning I noticed that I (unwisely) ignored some refl-cpp variadic macro warnings that prevent gcc|clang compiling with more strict checks enabled (i.e.
-Werror
).This shows up already for C++17 with the existing basic refl-cpp's default serialiser example and
-pedantic
compiler flags.The corresponding sample output and warnings from running the tests at compiler-explorer:
These checks seem to become more enforced for but also there seems to be a clean solution for C++20
#define FOO(x, ...) bar(x __VA_OPT__(,) __VA_ARGS__)
as, for example, discussed in more detail here.I was wondering whether this could be addressed under the premise that refl-cpp is C++17-based?
Any help would be much appreciated! Thanks in advance!
The text was updated successfully, but these errors were encountered: