boostorg / describe

A C++14 reflection library
https://boost.org/libs/describe
69 stars 24 forks source link

`-Wgnu-zero-variadic-macro-arguments` generated by use of the `-pedantic` flag #12

Closed cmazakas closed 3 years ago

cmazakas commented 3 years ago

Using clang 11 with -pedantic, Describe generates warnings around: -Wgnu-zero-variadic-macro-arguments in the BOOST_DESCRIBE_STRUCT macro when no bases are specified.

pdimov commented 3 years ago

I suppose you could try (,) instead of () (or use -std=c++20 where zero arguments are explicitly allowed by the standard IIRC) but in general I find -pedantic under Clang mostly unusable as it's too pedantic.

cmazakas commented 3 years ago

I tried (,) and I still got the warning. Upgrading to C++20 is definitely on the roadmap for sure but I found it easier to simply just remove -pedantic from the build.

I'll close this as something that doesn't need to be fixed.