Closed sizeak closed 2 years ago
I am getting the same on GCC 11 (however only as warning):
external/cxxopts/include/cxxopts.hpp:68:27: note: an attribute that appertains to a type-specifier is ignored
68 | #define CXXOPTS_NODISCARD [[nodiscard]]
| ^
external/cxxopts/include/cxxopts.hpp:1252:1: note: in expansion of macro ‘CXXOPTS_NODISCARD’
1252 | CXXOPTS_NODISCARD
| ^~~~~~~~~~~~~~~~~
the offending line is this: https://github.com/jarro2783/cxxopts/blob/e976f964c3ee6a4f6faa836ecb38f3ff8b043114/include/cxxopts.hpp#L1251-L1254
Update: moving CXXOPTS_NODISCARD
before inline
helps.
I'll take a look at this.
I wonder why I don't see this, are there any unusual flags that you are using?
Oh it's a C++17 thing. Pushing a fix now.
Thanks for the fast response!
When compiling with GCC 12, I get the following error: