Commit 05548901 authored by Jennifer Buehler's avatar Jennifer Buehler

Fixed compiler errors

parent 91ad6ffe
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
#include <string> #include <string>
#include <utility> #include <utility>
#include <type_traits> #include <type_traits>
#include <memory>
#ifdef __GNUC__ #ifdef __GNUC__
# pragma GCC diagnostic push # pragma GCC diagnostic push
...@@ -4232,7 +4233,7 @@ struct fields ...@@ -4232,7 +4233,7 @@ struct fields
weekday wd{7u}; weekday wd{7u};
time_of_day<Duration> tod{}; time_of_day<Duration> tod{};
fields() = default; fields() {} // = default; // Note: doesn't compile with default
fields(year_month_day ymd_) : ymd(ymd_) {} fields(year_month_day ymd_) : ymd(ymd_) {}
fields(weekday wd_) : wd(wd_) {} fields(weekday wd_) : wd(wd_) {}
...@@ -4370,7 +4371,7 @@ scan_keyword(std::basic_istream<CharT, Traits>& is, FwdIter kb, FwdIter ke) ...@@ -4370,7 +4371,7 @@ scan_keyword(std::basic_istream<CharT, Traits>& is, FwdIter kb, FwdIter ke)
const unsigned char does_match = '\2'; const unsigned char does_match = '\2';
unsigned char statbuf[100]; unsigned char statbuf[100];
unsigned char* status = statbuf; unsigned char* status = statbuf;
unique_ptr<unsigned char, void(*)(void*)> stat_hold(0, free); std::unique_ptr<unsigned char, void(*)(void*)> stat_hold(0, free);
if (nkw > sizeof(statbuf)) if (nkw > sizeof(statbuf))
{ {
status = (unsigned char*)malloc(nkw); status = (unsigned char*)malloc(nkw);
...@@ -4576,10 +4577,10 @@ to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt, ...@@ -4576,10 +4577,10 @@ to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt,
auto d = static_cast<int>(static_cast<unsigned>(fds.ymd.day())); auto d = static_cast<int>(static_cast<unsigned>(fds.ymd.day()));
if (d < 10) if (d < 10)
os << ' '; os << ' ';
os << d << ' ' os << d << ' '
<< make_time(duration_cast<seconds>(fds.tod.to_duration())) << make_time(duration_cast<seconds>(fds.tod.to_duration()))
<< ' ' << fds.ymd.year(); << ' ' << fds.ymd.year();
} }
else // *fmt == 'x' else // *fmt == 'x'
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment