Closed jamespharvey20 closed 5 years ago
Hi, sorry for bringing up this old issue, but I'm having some trouble compiling code with the named_paramteres extension on gcc 9.3 due to this pedantic warning...
You see, in my org, we treat warnings as errors, and we enable all warnings, passing -Wall -Werror
to gcc (using CMake).
AFAIU, the pragma referenced in the fix forces a pedantic warning on the string-literal block of code, and since we treat all warnings as errors, it makes the compiler error out, and this is NOT the desired behavior.
I played with it a bit and found out that if I replace the pragma's warning
with ignored
, it compiles, but that would force me to modify boost::di's source code and I don't want that (I'm getting it from Conan for multiple projects, can't change the source even if I wanted to).
@jamespharvey20 @krzysztof-jusiak Any ideas on how to handle that?
@MrPointer, hmm, are you getting the same warning/error?
constexpr auto operator""_s() {
as before?
Yep, exactly that, along with a nice informative message on literals not being adopted by ISO C++ (don't have it in front of me now, replying from mobile). It's basically the same behavior as was before this "fix", it seems.
Expected Behavior
test.injections_named_parameters
andexample.annotations
should compile.Actual Behavior
gcc 9 may be released as early as tomorrow. Using its current git build, or using the new gcc 10 git build, fails with this error:
(Same error for
example/annotations.cpp:60:16
.)Steps to Reproduce the Problem
make test.injections_named_parameters
ormake example.annotations
Specifications