remove magic constant 17

This commit is contained in:
sunmy 2021-06-11 22:26:03 +08:00
parent 972be9bd44
commit d949a388f0

View File

@ -451,7 +451,9 @@ FMT_END_DETAIL_NAMESPACE
template <typename Char, typename Duration>
struct formatter<std::chrono::time_point<std::chrono::system_clock, Duration>,
Char> : formatter<std::tm, Char> {
FMT_CONSTEXPR formatter() { this->specs = {default_specs, 17}; }
FMT_CONSTEXPR formatter() {
this->specs = {default_specs, sizeof(default_specs) / sizeof(Char)};
}
template <typename ParseContext>
FMT_CONSTEXPR auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {