Skip to content

Commit

Permalink
Give gcc 4.8 a hand in constructing fields
Browse files Browse the repository at this point in the history
  • Loading branch information
HowardHinnant committed Jun 2, 2021
1 parent 8c12652 commit fb2554a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/date/date.h
Original file line number Diff line number Diff line change
Expand Up @@ -4787,7 +4787,11 @@ struct fields
hh_mm_ss<Duration> tod{};
bool has_tod = false;

#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ <= 409)
fields() : ymd{nanyear/0/0}, wd{8u}, tod{}, has_tod{false} {}
#else
fields() = default;
#endif

fields(year_month_day ymd_) : ymd(ymd_) {}
fields(weekday wd_) : wd(wd_) {}
Expand Down

0 comments on commit fb2554a

Please sign in to comment.