p-ranav / argparse

Argument Parser for Modern C++
MIT License
2.72k stars 250 forks source link

parse_args(): work around GCC 12 warning bug. #359

Closed ericonr closed 6 months ago

ericonr commented 6 months ago

This bug [1] causes GCC to emit a wrong warning when adding a short string literal to a std::string. Wrapping the literal in a std::string doesn't have a large impact and avoids the warning.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329


Fixes #358