We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I noticed that using the alignment flag as in fmt::print(" ... {:<42} ...", "test") annoyingly triggers -Wstrict-overflow (GCC) :
fmt::print(" ... {:<42} ...", "test")
-Wstrict-overflow
client.cc:29:5: in 'constexpr' expansion of 'fmt::v8::basic_format_string<char, const std::basic_string_view<char, std::char_traits<char> >&, const std::basic_string_view<char, std::char_traits<char> >&>("connection to {}{:<12}...\0337")' /home/linuxbrew/.linuxbrew/include/fmt/core.h:3069:40: in 'constexpr' expansion of 'fmt::v8::detail::parse_format_string<true, char, fmt::v8::detail::format_string_checker<char, fmt::v8::detail::error_handler, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> > > >(((fmt::v8::basic_format_string<char, const std::basic_string_view<char, std::char_traits<char> >&, const std::basic_string_view<char, std::char_traits<char> >&>*)this)->fmt::v8::basic_format_string<char, const std::basic_string_view<char, std::char_traits<char> >&, const std::basic_string_view<char, std::char_traits<char> >&>::str_, fmt::v8::detail::format_string_checker<char, fmt::v8::detail::error_handler, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> > >(fmt::v8::basic_string_view<char>(((const char*)s)), (fmt::v8::detail::error_handler(), fmt::v8::detail::error_handler())))' /home/linuxbrew/.linuxbrew/include/fmt/core.h:2627:44: in 'constexpr' expansion of 'fmt::v8::detail::parse_replacement_field<char, fmt::v8::detail::format_string_checker<char, fmt::v8::detail::error_handler, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> > >&>((p + -1), end, (* & handler))' /home/linuxbrew/.linuxbrew/include/fmt/core.h:2602:38: in 'constexpr' expansion of '(& handler)->fmt::v8::detail::format_string_checker<char, fmt::v8::detail::error_handler, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> > >::on_format_specs(adapter.fmt::v8::detail::parse_replacement_field<char, fmt::v8::detail::format_string_checker<char, fmt::v8::detail::error_handler, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> > >&>(const char*, const char*, fmt::v8::detail::format_string_checker<char, fmt::v8::detail::error_handler, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> > >&)::id_adapter::arg_id, (begin + 1), end)' /home/linuxbrew/.linuxbrew/include/fmt/core.h:2933:51: in 'constexpr' expansion of '((fmt::v8::detail::format_string_checker<char, fmt::v8::detail::error_handler, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> > >*)this)->fmt::v8::detail::format_string_checker<char, fmt::v8::detail::error_handler, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> > >::parse_funcs_[id](((fmt::v8::detail::format_string_checker<char, fmt::v8::detail::error_handler, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> > >*)this)->fmt::v8::detail::format_string_checker<char, fmt::v8::detail::error_handler, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> > >::context_)' /home/linuxbrew/.linuxbrew/include/fmt/core.h:2676:17: in 'constexpr' expansion of 'f.fmt::v8::formatter<fmt::v8::basic_string_view<char>, char, void>::parse<fmt::v8::detail::compile_parse_context<char, fmt::v8::detail::error_handler> >((* & ctx))' /home/linuxbrew/.linuxbrew/include/fmt/core.h:2984:41: in 'constexpr' expansion of 'fmt::v8::detail::parse_format_specs<char, fmt::v8::detail::specs_checker<fmt::v8::detail::dynamic_specs_handler<fmt::v8::detail::compile_parse_context<char, fmt::v8::detail::error_handler> > >&>(begin, end, checker)' /home/linuxbrew/.linuxbrew/include/fmt/core.h:2515:22: in 'constexpr' expansion of 'fmt::v8::detail::parse_align<char, fmt::v8::detail::specs_checker<fmt::v8::detail::dynamic_specs_handler<fmt::v8::detail::compile_parse_context<char, fmt::v8::detail::error_handler> > >&>(begin, end, (* & handler))' ../../up/io.hh:111:93: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
The text was updated successfully, but these errors were encountered:
I was not able to repro it on current master: https://godbolt.org/z/YP6Kfoq38.
Sorry, something went wrong.
It does with -std=c++20
-std=c++20
Fixed in 8e2e4d4. Thanks for reporting.
No branches or pull requests
I noticed that using the alignment flag as in
fmt::print(" ... {:<42} ...", "test")
annoyingly triggers-Wstrict-overflow
(GCC) :The text was updated successfully, but these errors were encountered: