basic_format_parse_context -> parse_context

This commit is contained in:
Victor Zverovich
2024-09-01 08:05:06 -07:00
parent 66920feeee
commit 64a6c84592
7 changed files with 55 additions and 71 deletions

View File

@@ -2098,8 +2098,7 @@ struct formatter<weekday, Char> : private formatter<std::tm, Char> {
bool use_tm_formatter_ = false;
public:
FMT_CONSTEXPR auto parse(basic_format_parse_context<Char>& ctx)
-> decltype(ctx.begin()) {
FMT_CONSTEXPR auto parse(parse_context<Char>& ctx) -> decltype(ctx.begin()) {
auto it = ctx.begin(), end = ctx.end();
if (it != end && *it == 'L') {
++it;
@@ -2128,8 +2127,7 @@ struct formatter<day, Char> : private formatter<std::tm, Char> {
bool use_tm_formatter_ = false;
public:
FMT_CONSTEXPR auto parse(basic_format_parse_context<Char>& ctx)
-> decltype(ctx.begin()) {
FMT_CONSTEXPR auto parse(parse_context<Char>& ctx) -> decltype(ctx.begin()) {
auto it = ctx.begin(), end = ctx.end();
use_tm_formatter_ = it != end && *it != '}';
return use_tm_formatter_ ? formatter<std::tm, Char>::parse(ctx) : it;
@@ -2154,8 +2152,7 @@ struct formatter<month, Char> : private formatter<std::tm, Char> {
bool use_tm_formatter_ = false;
public:
FMT_CONSTEXPR auto parse(basic_format_parse_context<Char>& ctx)
-> decltype(ctx.begin()) {
FMT_CONSTEXPR auto parse(parse_context<Char>& ctx) -> decltype(ctx.begin()) {
auto it = ctx.begin(), end = ctx.end();
if (it != end && *it == 'L') {
++it;
@@ -2184,8 +2181,7 @@ struct formatter<year, Char> : private formatter<std::tm, Char> {
bool use_tm_formatter_ = false;
public:
FMT_CONSTEXPR auto parse(basic_format_parse_context<Char>& ctx)
-> decltype(ctx.begin()) {
FMT_CONSTEXPR auto parse(parse_context<Char>& ctx) -> decltype(ctx.begin()) {
auto it = ctx.begin(), end = ctx.end();
use_tm_formatter_ = it != end && *it != '}';
return use_tm_formatter_ ? formatter<std::tm, Char>::parse(ctx) : it;
@@ -2209,8 +2205,7 @@ struct formatter<year_month_day, Char> : private formatter<std::tm, Char> {
bool use_tm_formatter_ = false;
public:
FMT_CONSTEXPR auto parse(basic_format_parse_context<Char>& ctx)
-> decltype(ctx.begin()) {
FMT_CONSTEXPR auto parse(parse_context<Char>& ctx) -> decltype(ctx.begin()) {
auto it = ctx.begin(), end = ctx.end();
use_tm_formatter_ = it != end && *it != '}';
return use_tm_formatter_ ? formatter<std::tm, Char>::parse(ctx) : it;
@@ -2241,8 +2236,7 @@ struct formatter<std::chrono::duration<Rep, Period>, Char> {
basic_string_view<Char> format_str_;
public:
FMT_CONSTEXPR auto parse(basic_format_parse_context<Char>& ctx)
-> decltype(ctx.begin()) {
FMT_CONSTEXPR auto parse(parse_context<Char>& ctx) -> decltype(ctx.begin()) {
auto it = ctx.begin(), end = ctx.end();
if (it == end || *it == '}') return it;
@@ -2327,8 +2321,7 @@ template <typename Char> struct formatter<std::tm, Char> {
}
public:
FMT_CONSTEXPR auto parse(basic_format_parse_context<Char>& ctx)
-> decltype(ctx.begin()) {
FMT_CONSTEXPR auto parse(parse_context<Char>& ctx) -> decltype(ctx.begin()) {
auto it = ctx.begin(), end = ctx.end();
if (it == end || *it == '}') return it;