Skip to content

Commit 8735717

Browse files
committed
fix compile issue in g++
1 parent 6cc5d66 commit 8735717

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Diff for: include/fmt/chrono.h

+10-10
Original file line numberDiff line numberDiff line change
@@ -2131,10 +2131,10 @@ struct formatter<weekday, Char> : formatter<calendar_base, Char> {
21312131
auto format(weekday wd, FormatContext& ctx) const -> decltype(ctx.out()) {
21322132
auto time = std::tm();
21332133
time.tm_wday = static_cast<int>(wd.c_encoding());
2134-
if (use_tm_formatter_) {
2134+
if (this->use_tm_formatter_) {
21352135
return formatter<std::tm, Char>::format(time, ctx);
21362136
}
2137-
detail::get_locale loc(localized_, ctx.locale());
2137+
detail::get_locale loc(this->localized_, ctx.locale());
21382138
auto w = detail::tm_writer<decltype(ctx.out()), Char>(loc, ctx.out(), time);
21392139
w.on_abbr_weekday();
21402140
return w.out();
@@ -2148,10 +2148,10 @@ struct formatter<day, Char> : formatter<calendar_base, Char> {
21482148
auto format(day d, FormatContext& ctx) const -> decltype(ctx.out()) {
21492149
auto time = std::tm();
21502150
time.tm_mday = static_cast<int>(static_cast<unsigned>(d));
2151-
if (use_tm_formatter_) {
2151+
if (this->use_tm_formatter_) {
21522152
return formatter<std::tm, Char>::format(time, ctx);
21532153
}
2154-
detail::get_locale loc(localized_, ctx.locale());
2154+
detail::get_locale loc(this->localized_, ctx.locale());
21552155
auto w = detail::tm_writer<decltype(ctx.out()), Char>(loc, ctx.out(), time);
21562156
w.on_day_of_month(detail::numeric_system::standard);
21572157
return w.out();
@@ -2165,10 +2165,10 @@ struct formatter<month, Char> : formatter<calendar_base, Char> {
21652165
auto format(month m, FormatContext& ctx) const -> decltype(ctx.out()) {
21662166
auto time = std::tm();
21672167
time.tm_mon = static_cast<int>(static_cast<unsigned>(m)) - 1;
2168-
if (use_tm_formatter_) {
2168+
if (this->use_tm_formatter_) {
21692169
return formatter<std::tm, Char>::format(time, ctx);
21702170
}
2171-
detail::get_locale loc(localized_, ctx.locale());
2171+
detail::get_locale loc(this->localized_, ctx.locale());
21722172
auto w = detail::tm_writer<decltype(ctx.out()), Char>(loc, ctx.out(), time);
21732173
w.on_abbr_month();
21742174
return w.out();
@@ -2182,10 +2182,10 @@ struct formatter<year, Char> : formatter<calendar_base, Char> {
21822182
auto format(year y, FormatContext& ctx) const -> decltype(ctx.out()) {
21832183
auto time = std::tm();
21842184
time.tm_year = static_cast<int>(y) - 1900;
2185-
if (use_tm_formatter_) {
2185+
if (this->use_tm_formatter_) {
21862186
return formatter<std::tm, Char>::format(time, ctx);
21872187
}
2188-
detail::get_locale loc(localized_, ctx.locale());
2188+
detail::get_locale loc(this->localized_, ctx.locale());
21892189
auto w = detail::tm_writer<decltype(ctx.out()), Char>(loc, ctx.out(), time);
21902190
w.on_year(detail::numeric_system::standard);
21912191
return w.out();
@@ -2202,10 +2202,10 @@ struct formatter<year_month_day, Char> : formatter<calendar_base, Char> {
22022202
time.tm_year = static_cast<int>(val.year()) - 1900;
22032203
time.tm_mon = static_cast<int>(static_cast<unsigned>(val.month())) - 1;
22042204
time.tm_mday = static_cast<int>(static_cast<unsigned>(val.day()));
2205-
if (use_tm_formatter_) {
2205+
if (this->use_tm_formatter_) {
22062206
return formatter<std::tm, Char>::format(time, ctx);
22072207
}
2208-
detail::get_locale loc(localized_, ctx.locale());
2208+
detail::get_locale loc(this->localized_, ctx.locale());
22092209
auto w = detail::tm_writer<decltype(ctx.out()), Char>(loc, ctx.out(), time);
22102210
w.on_iso_date();
22112211
return w.out();

0 commit comments

Comments
 (0)