Skip to content
New issue

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

Range formatter #2983

Merged
merged 10 commits into from
Jul 29, 2022
Prev Previous commit
Other PR comments.
brevzin committed Jul 27, 2022
commit 0c15787d8ea5c3513a3a170db09dc6ff04e2857b
6 changes: 3 additions & 3 deletions include/fmt/ranges.h
Original file line number Diff line number Diff line change
@@ -310,14 +310,14 @@ OutputIt write_range_entry(OutputIt out, const Arg& v) {
}

template <typename CharT, CharT... C> struct string_literal {
static constexpr CharT value[] = {C...};
static constexpr CharT value[sizeof...(C)] = {C...};
constexpr operator basic_string_view<CharT>() const {
return {value, sizeof...(C)};
}
};

template <typename CharT, CharT... C>
constexpr CharT string_literal<CharT, C...>::value[];
constexpr CharT string_literal<CharT, C...>::value[sizeof...(C)];

} // namespace detail

@@ -447,7 +447,7 @@ struct range_formatter<
}

template <class U>
FMT_CONSTEXPR static void maybe_set_debug_format(U&, long) {}
FMT_CONSTEXPR static void maybe_set_debug_format(U&, ...) {}

FMT_CONSTEXPR void maybe_set_debug_format() {
maybe_set_debug_format(underlying_, 0);