mirror of
https://github.com/fmtlib/fmt.git
synced 2025-02-09 12:41:04 +00:00
Simplify parse functions
This commit is contained in:
parent
a73a9b6a84
commit
caa6974942
@ -3948,10 +3948,9 @@ template <> struct formatter<bytes> {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
template <typename ParseContext>
|
template <typename ParseContext>
|
||||||
FMT_CONSTEXPR auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {
|
FMT_CONSTEXPR auto parse(ParseContext& ctx) -> const char* {
|
||||||
auto end = parse_format_specs(ctx.begin(), ctx.end(), specs_, ctx,
|
return parse_format_specs(ctx.begin(), ctx.end(), specs_, ctx,
|
||||||
detail::type::string_type);
|
detail::type::string_type);
|
||||||
return end;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
@ -3988,10 +3987,9 @@ template <typename T> struct formatter<group_digits_view<T>> : formatter<T> {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
template <typename ParseContext>
|
template <typename ParseContext>
|
||||||
FMT_CONSTEXPR auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {
|
FMT_CONSTEXPR auto parse(ParseContext& ctx) -> const char* {
|
||||||
auto end = parse_format_specs(ctx.begin(), ctx.end(), specs_, ctx,
|
return parse_format_specs(ctx.begin(), ctx.end(), specs_, ctx,
|
||||||
detail::type::int_type);
|
detail::type::int_type);
|
||||||
return end;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
@ -4007,6 +4005,7 @@ template <typename T> struct formatter<group_digits_view<T>> : formatter<T> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// DEPRECATED! join_view will be moved to ranges.h.
|
||||||
template <typename It, typename Sentinel, typename Char = char>
|
template <typename It, typename Sentinel, typename Char = char>
|
||||||
struct join_view : detail::view {
|
struct join_view : detail::view {
|
||||||
It begin;
|
It begin;
|
||||||
@ -4049,7 +4048,7 @@ struct formatter<join_view<It, Sentinel, Char>, Char> {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
template <typename ParseContext>
|
template <typename ParseContext>
|
||||||
FMT_CONSTEXPR auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {
|
FMT_CONSTEXPR auto parse(ParseContext& ctx) -> const Char* {
|
||||||
return value_formatter_.parse(ctx);
|
return value_formatter_.parse(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user