It looks like a new fmt version is comming soon (ChangeLog.md), so I testet the current main in my project and got annoying unreachable code warnings.
Example (fmt/base.h::2927)
template <typename... T>
FMT_INLINE void println(FILE* f, format_string<T...> fmt, T&&... args) {
vargs<T...> va = {{args...}};
if FMT_CONSTEXPR20 (detail::use_utf8) return vprintln(f, fmt.str, va);
detail::vprint_mojibake(f, fmt.str, va, true);
}
In my case, the compiler sees detail::vprint_mojibake(f, fmt.str, va, true); as dead (unreachable) code.
Would it be acceptable for you if I supply a pr to add else in such places to avoid the warning?
template <typename... T>
FMT_INLINE void println(FILE* f, format_string<T...> fmt, T&&... args) {
vargs<T...> va = {{args...}};
if FMT_CONSTEXPR20 (detail::use_utf8) return vprintln(f, fmt.str, va);
else detail::vprint_mojibake(f, fmt.str, va, true);
}
It looks like a new fmt version is comming soon (ChangeLog.md), so I testet the current main in my project and got annoying unreachable code warnings.
Example (fmt/base.h::2927)
In my case, the compiler sees
detail::vprint_mojibake(f, fmt.str, va, true);as dead (unreachable) code.Would it be acceptable for you if I supply a pr to add
elsein such places to avoid the warning?