forked from HowardHinnant/date
Use CONSTDATA in function parse making compiler without constexpr support happy
This commit is contained in:
committed by
Howard Hinnant
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;
|
const CharT* command = nullptr;
|
||||||
auto modified = CharT{};
|
auto modified = CharT{};
|
||||||
auto width = -1;
|
auto width = -1;
|
||||||
constexpr int not_a_year = 33000;
|
CONSTDATA int not_a_year = 33000;
|
||||||
int Y = not_a_year;
|
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;
|
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 y = not_a_2digit_year;
|
||||||
int m{};
|
int m{};
|
||||||
int d{};
|
int d{};
|
||||||
int j{};
|
int j{};
|
||||||
constexpr int not_a_weekday = 7;
|
CONSTDATA int not_a_weekday = 7;
|
||||||
int wd = not_a_weekday;
|
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;
|
int I = not_a_hour_12_value;
|
||||||
hours h{};
|
hours h{};
|
||||||
minutes min{};
|
minutes min{};
|
||||||
Duration s{};
|
Duration s{};
|
||||||
int g = not_a_2digit_year;
|
int g = not_a_2digit_year;
|
||||||
int G = not_a_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 V = not_a_week_num;
|
||||||
int U = not_a_week_num;
|
int U = not_a_week_num;
|
||||||
int W = not_a_week_num;
|
int W = not_a_week_num;
|
||||||
|
Reference in New Issue
Block a user