use FMT_CONSTEXPR_DECL
This commit is contained in:
parent
45c7c29bd5
commit
eefa1e5b1b
@ -764,10 +764,10 @@ inline std::chrono::duration<Rep, std::milli> get_milliseconds(
|
||||
|
||||
template <typename Char, typename Rep, typename OutputIt>
|
||||
OutputIt format_duration_value(OutputIt out, Rep val, int precision) {
|
||||
static constexpr const Char pr_f[] = {'{', ':', '.', '{', '}', 'f', '}', 0};
|
||||
static FMT_CONSTEXPR_DECL const Char pr_f[] = {'{', ':', '.', '{', '}', 'f', '}', 0};
|
||||
if (precision >= 0) return format_to(out, FMT_STRING(pr_f), val, precision);
|
||||
static constexpr const Char fp_f[] = {'{', ':', 'g', '}', 0};
|
||||
static constexpr const Char format[] = {'{', '}', 0};
|
||||
static FMT_CONSTEXPR_DECL const Char fp_f[] = {'{', ':', 'g', '}', 0};
|
||||
static FMT_CONSTEXPR_DECL const Char format[] = {'{', '}', 0};
|
||||
if(std::is_floating_point<Rep>::value) {
|
||||
return format_to(out, FMT_STRING(fp_f), val);
|
||||
} else {
|
||||
@ -792,9 +792,9 @@ template <typename Char, typename Period, typename OutputIt>
|
||||
OutputIt format_duration_unit(OutputIt out) {
|
||||
if (const char* unit = get_units<Period>())
|
||||
return copy_unit(string_view(unit), out, Char());
|
||||
static constexpr const Char num_f[] = {'[', '{', '}', ']', 's', 0};
|
||||
static FMT_CONSTEXPR_DECL const Char num_f[] = {'[', '{', '}', ']', 's', 0};
|
||||
if (const_check(Period::den == 1)) return format_to(out, FMT_STRING(num_f), Period::num);
|
||||
static constexpr const Char num_def_f[] = {'[', '{', '}', '/', '{', '}', ']', 's', 0};
|
||||
static FMT_CONSTEXPR_DECL const Char num_def_f[] = {'[', '{', '}', '/', '{', '}', ']', 's', 0};
|
||||
return format_to(out, FMT_STRING(num_def_f), Period::num, Period::den);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user