From 23b1f007fe2f0eae33333286785560693d5f6eb3 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Sun, 25 Nov 2018 14:38:54 -0500 Subject: [PATCH] Patch for VS-2017 compatiblity --- include/date/tz.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/include/date/tz.h b/include/date/tz.h index 49e4320..8c96d91 100644 --- a/include/date/tz.h +++ b/include/date/tz.h @@ -357,6 +357,7 @@ public: explicit zoned_time(TimeZonePtr z); #if HAS_STRING_VIEW +# if !defined(_MSC_VER) || (_MSC_VER > 1900) template ::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 ::locate_zone(std::string())) >::value >::type> -#endif +# endif explicit zoned_time(const std::string& name); #endif @@ -1376,7 +1378,9 @@ zoned_time::zoned_time(TimeZonePtr z) #if HAS_STRING_VIEW template +# if !defined(_MSC_VER) || (_MSC_VER > 1900) template +# endif inline zoned_time::zoned_time(std::string_view name) : zoned_time(zoned_traits::locate_zone(name)) @@ -1385,9 +1389,9 @@ zoned_time::zoned_time(std::string_view name) #else // !HAS_STRING_VIEW template -#if !defined(_MSC_VER) || (_MSC_VER > 1900) +# if !defined(_MSC_VER) || (_MSC_VER > 1900) template -#endif +# endif inline zoned_time::zoned_time(const std::string& name) : zoned_time(zoned_traits::locate_zone(name))