minor patches to build on Windows with MSVC v140_clang_c2 and LLVM-vs2014

This commit is contained in:
Tullio Menga 2017-11-15 12:22:21 +01:00 committed by Howard Hinnant
parent 517c0f2704
commit ec514101a6
2 changed files with 3 additions and 2 deletions

View File

@ -7431,6 +7431,7 @@ msl(CharT c) NOEXCEPT
} }
CONSTCD14 CONSTCD14
inline
std::size_t std::size_t
to_string_len(std::intmax_t i) to_string_len(std::intmax_t i)
{ {

View File

@ -508,7 +508,7 @@ load_timezone_mappings_from_xml_file(const std::string& input_path)
throw std::runtime_error(msg); throw std::runtime_error(msg);
}; };
// [optional space]a="b" // [optional space]a="b"
auto read_attribute = [&line_num, &line, &error] auto read_attribute = [&line, &error]
(const char* name, std::string& value, std::size_t startPos) (const char* name, std::string& value, std::size_t startPos)
->std::size_t ->std::size_t
{ {
@ -2434,7 +2434,7 @@ time_zone::get_info_impl(sys_seconds tp, int tz_int) const
using namespace date; using namespace date;
tz timezone = static_cast<tz>(tz_int); tz timezone = static_cast<tz>(tz_int);
assert(timezone != tz::standard); assert(timezone != tz::standard);
auto y = year_month_day(floor<days>(tp)).year(); auto y = year_month_day(date::floor<days>(tp)).year();
if (y < min_year || y > max_year) if (y < min_year || y > max_year)
throw std::runtime_error("The year " + std::to_string(static_cast<int>(y)) + throw std::runtime_error("The year " + std::to_string(static_cast<int>(y)) +
" is out of range:[" + std::to_string(static_cast<int>(min_year)) + ", " " is out of range:[" + std::to_string(static_cast<int>(min_year)) + ", "