mirror of
https://github.com/HowardHinnant/date.git
synced 2025-01-14 09:47:57 +08:00
Workaround for MSVC
This commit is contained in:
parent
5524dd1ae8
commit
a1ceec19fe
@ -2197,8 +2197,6 @@ from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
|
||||
return is;
|
||||
}
|
||||
|
||||
#if !defined(_MSC_VER) || _MSC_VER > 1913
|
||||
|
||||
// clock_time_conversion
|
||||
|
||||
template <class DstClock, class SrcClock>
|
||||
@ -2438,7 +2436,8 @@ cc_impl(const time_point<SrcClock, Duration>& t, const void*)
|
||||
template <class DstClock, class SrcClock, class Duration>
|
||||
auto
|
||||
cc_impl(const time_point<SrcClock, Duration>& t, const void*)
|
||||
-> decltype(conv_clock<DstClock>(conv_clock<utc_clock>(t)))
|
||||
-> decltype(0, // MSVC_WORKAROUND
|
||||
conv_clock<DstClock>(conv_clock<utc_clock>(t)))
|
||||
{
|
||||
return conv_clock<DstClock>(conv_clock<utc_clock>(t));
|
||||
}
|
||||
@ -2456,7 +2455,8 @@ cc_impl(const time_point<SrcClock, Duration>& t, ...)
|
||||
template <class DstClock, class SrcClock, class Duration>
|
||||
auto
|
||||
cc_impl(const time_point<SrcClock, Duration>& t, ...)
|
||||
-> decltype(conv_clock<DstClock>(conv_clock<system_clock>(conv_clock<utc_clock>(t))))
|
||||
-> decltype(0, // MSVC_WORKAROUND
|
||||
conv_clock<DstClock>(conv_clock<system_clock>(conv_clock<utc_clock>(t))))
|
||||
{
|
||||
return conv_clock<DstClock>(conv_clock<system_clock>(conv_clock<utc_clock>(t)));
|
||||
}
|
||||
@ -2471,8 +2471,6 @@ clock_cast(const std::chrono::time_point<SrcClock, Duration>& tp)
|
||||
return clock_cast_detail::cc_impl<DstClock>(tp, &tp);
|
||||
}
|
||||
|
||||
#endif // !defined(_MSC_VER) || _MSC_VER > 1913
|
||||
|
||||
// Deprecated API
|
||||
|
||||
template <class Duration>
|
||||
|
Loading…
x
Reference in New Issue
Block a user