Silence some warnings.

This commit is contained in:
Howard Hinnant
2017-07-19 15:25:57 -04:00
parent 496497d16e
commit a1b19a2ed6

8
date.h
View File

@@ -3537,7 +3537,7 @@ private:
std::chrono::seconds s_; std::chrono::seconds s_;
public: public:
CONSTCD11 decimal_format_seconds() : s_() {}; CONSTCD11 decimal_format_seconds() : s_() {}
CONSTCD11 explicit decimal_format_seconds(const precision& s) NOEXCEPT CONSTCD11 explicit decimal_format_seconds(const precision& s) NOEXCEPT
: s_(s) : s_(s)
{} {}
@@ -6175,10 +6175,10 @@ from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
is.setstate(ios::eofbit); is.setstate(ios::eofbit);
break; break;
} }
auto C = Traits::to_char_type(i); auto wc = Traits::to_char_type(i);
auto c = static_cast<char>(C); auto c = static_cast<char>(wc);
// is c a valid time zone name or abbreviation character? // is c a valid time zone name or abbreviation character?
if (!(CharT{1} < C && C < CharT{127}) || !(isalnum(c) || if (!(CharT{1} < wc && wc < CharT{127}) || !(isalnum(c) ||
c == '_' || c == '/' || c == '-' || c == '+')) c == '_' || c == '/' || c == '-' || c == '+'))
break; break;
temp_abbrev.push_back(c); temp_abbrev.push_back(c);