diff --git a/include/fmt/ostream.h b/include/fmt/ostream.h index 5d893c92164c..71fd6c887e49 100644 --- a/include/fmt/ostream.h +++ b/include/fmt/ostream.h @@ -150,7 +150,7 @@ inline void vprint(std::ostream& os, string_view fmt, format_args args) { FMT_EXPORT template void print(std::ostream& os, format_string fmt, T&&... args) { fmt::vargs vargs = {{args...}}; - if (detail::use_utf8) return vprint(os, fmt.str, vargs); + if (detail::const_check(detail::use_utf8)) return vprint(os, fmt.str, vargs); auto buffer = memory_buffer(); detail::vformat_to(buffer, fmt.str, vargs); detail::write_buffer(os, buffer);