Patch for VS-2017 compatiblity

This commit is contained in:
Howard Hinnant 2018-11-25 14:38:54 -05:00
parent a22125ca40
commit 23b1f007fe

View File

@ -357,6 +357,7 @@ public:
explicit zoned_time(TimeZonePtr z);
#if HAS_STRING_VIEW
# if !defined(_MSC_VER) || (_MSC_VER > 1900)
template <class T = TimeZonePtr,
class = typename std::enable_if
<
@ -366,9 +367,10 @@ public:
decltype(zoned_traits<T>::locate_zone(std::string_view()))
>::value
>::type>
# endif
explicit zoned_time(std::string_view name);
#else
#if !defined(_MSC_VER) || (_MSC_VER > 1900)
# if !defined(_MSC_VER) || (_MSC_VER > 1900)
template <class T = TimeZonePtr,
class = typename std::enable_if
<
@ -378,7 +380,7 @@ public:
decltype(zoned_traits<T>::locate_zone(std::string()))
>::value
>::type>
#endif
# endif
explicit zoned_time(const std::string& name);
#endif
@ -1376,7 +1378,9 @@ zoned_time<Duration, TimeZonePtr>::zoned_time(TimeZonePtr z)
#if HAS_STRING_VIEW
template <class Duration, class TimeZonePtr>
# if !defined(_MSC_VER) || (_MSC_VER > 1900)
template <class, class>
# endif
inline
zoned_time<Duration, TimeZonePtr>::zoned_time(std::string_view name)
: zoned_time(zoned_traits<TimeZonePtr>::locate_zone(name))
@ -1385,9 +1389,9 @@ zoned_time<Duration, TimeZonePtr>::zoned_time(std::string_view name)
#else // !HAS_STRING_VIEW
template <class Duration, class TimeZonePtr>
#if !defined(_MSC_VER) || (_MSC_VER > 1900)
# if !defined(_MSC_VER) || (_MSC_VER > 1900)
template <class T, class>
#endif
# endif
inline
zoned_time<Duration, TimeZonePtr>::zoned_time(const std::string& name)
: zoned_time(zoned_traits<TimeZonePtr>::locate_zone(name))