mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-02 20:24:27 +02:00
Work around uniform initialization bug for clang-3.6
This commit is contained in:
6
date.h
6
date.h
@@ -4032,7 +4032,7 @@ format(const std::locale& loc, std::basic_string<CharT, Traits> fmt,
|
|||||||
tm.tm_mon = static_cast<int>(static_cast<unsigned>(ymd.month()) - 1);
|
tm.tm_mon = static_cast<int>(static_cast<unsigned>(ymd.month()) - 1);
|
||||||
tm.tm_year = static_cast<int>(ymd.year()) - 1900;
|
tm.tm_year = static_cast<int>(ymd.year()) - 1900;
|
||||||
tm.tm_wday = static_cast<int>(static_cast<unsigned>(weekday{ld}));
|
tm.tm_wday = static_cast<int>(static_cast<unsigned>(weekday{ld}));
|
||||||
tm.tm_yday = static_cast<int>((ld - local_days{ymd.year()/1/1}).count());
|
tm.tm_yday = static_cast<int>((ld - local_days(ymd.year()/1/1)).count());
|
||||||
f.put(os, os, os.fill(), &tm, fmt.data(), fmt.data() + fmt.size());
|
f.put(os, os, os.fill(), &tm, fmt.data(), fmt.data() + fmt.size());
|
||||||
return os.str();
|
return os.str();
|
||||||
}
|
}
|
||||||
@@ -4291,9 +4291,9 @@ parse(std::basic_istream<CharT, Traits>& is,
|
|||||||
if ((err & ios_base::failbit) == 0)
|
if ((err & ios_base::failbit) == 0)
|
||||||
{
|
{
|
||||||
using namespace std::chrono;
|
using namespace std::chrono;
|
||||||
tp = floor<Duration>(sys_days{year{tm.tm_year + 1900}/
|
tp = floor<Duration>(sys_days(year{tm.tm_year + 1900}/
|
||||||
(tm.tm_mon+1)/
|
(tm.tm_mon+1)/
|
||||||
(tm.tm_mday)} +
|
(tm.tm_mday)) +
|
||||||
hours{tm.tm_hour} + minutes{tm.tm_min} +
|
hours{tm.tm_hour} + minutes{tm.tm_min} +
|
||||||
seconds{tm.tm_sec} + subseconds);
|
seconds{tm.tm_sec} + subseconds);
|
||||||
abbrev = std::move(temp_abbrev);
|
abbrev = std::move(temp_abbrev);
|
||||||
|
Reference in New Issue
Block a user