From 41093d05d838926a885487635475b08043da23d4 Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Sat, 7 Jan 2017 18:50:57 +0100 Subject: [PATCH] Use CONSTDATA in function parse making compiler without constexpr support happy --- date.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/date.h b/date.h index 81a748a..d611dbd 100644 --- a/date.h +++ b/date.h @@ -5165,25 +5165,25 @@ parse(std::basic_istream& 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;