mirror of
https://github.com/HowardHinnant/date.git
synced 2025-01-14 01:37:57 +08:00
Use CONSTDATA in function parse making compiler without constexpr support happy
This commit is contained in:
parent
c6f3dd2832
commit
41093d05d8
12
date.h
12
date.h
@ -5165,25 +5165,25 @@ parse(std::basic_istream<CharT, Traits>& is,
|
||||
const CharT* command = nullptr;
|
||||
auto modified = CharT{};
|
||||
auto width = -1;
|
||||
constexpr int not_a_year = 33000;
|
||||
CONSTDATA int not_a_year = 33000;
|
||||
int Y = not_a_year;
|
||||
constexpr int not_a_century = not_a_year / 100;
|
||||
CONSTDATA int not_a_century = not_a_year / 100;
|
||||
int C = not_a_century;
|
||||
constexpr int not_a_2digit_year = 100;
|
||||
CONSTDATA int not_a_2digit_year = 100;
|
||||
int y = not_a_2digit_year;
|
||||
int m{};
|
||||
int d{};
|
||||
int j{};
|
||||
constexpr int not_a_weekday = 7;
|
||||
CONSTDATA int not_a_weekday = 7;
|
||||
int wd = not_a_weekday;
|
||||
constexpr int not_a_hour_12_value = 0;
|
||||
CONSTDATA int not_a_hour_12_value = 0;
|
||||
int I = not_a_hour_12_value;
|
||||
hours h{};
|
||||
minutes min{};
|
||||
Duration s{};
|
||||
int g = not_a_2digit_year;
|
||||
int G = not_a_year;
|
||||
constexpr int not_a_week_num = 100;
|
||||
CONSTDATA int not_a_week_num = 100;
|
||||
int V = not_a_week_num;
|
||||
int U = not_a_week_num;
|
||||
int W = not_a_week_num;
|
||||
|
Loading…
x
Reference in New Issue
Block a user