mirror of
https://github.com/HowardHinnant/date.git
synced 2025-01-14 17:58:03 +08:00
Adjust HAS_CHRONO_ROUNDING macro for MSVC with v140_clang_c2 and LLVM-vs2014
This commit is contained in:
parent
bd51baf31e
commit
f4b12ab023
@ -1108,7 +1108,7 @@ trunc(const std::chrono::duration<Rep, Period>& d)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAS_CHRONO_ROUNDING
|
#ifndef HAS_CHRONO_ROUNDING
|
||||||
# if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190023918
|
# if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 190023918 || (_MSC_FULL_VER >= 190000000 && defined (__clang__)))
|
||||||
# define HAS_CHRONO_ROUNDING 1
|
# define HAS_CHRONO_ROUNDING 1
|
||||||
# elif defined(__cpp_lib_chrono) && __cplusplus > 201402 && __cpp_lib_chrono >= 201510
|
# elif defined(__cpp_lib_chrono) && __cplusplus > 201402 && __cpp_lib_chrono >= 201510
|
||||||
# define HAS_CHRONO_ROUNDING 1
|
# define HAS_CHRONO_ROUNDING 1
|
||||||
|
@ -2465,7 +2465,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(date::floor<days>(tp)).year();
|
auto y = year_month_day(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)) + ", "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user