From a82ec3c21ac680e5bf9614bdcf50ea78a52542ce Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 13 Mar 2019 00:38:34 +0300 Subject: Add workarounds for all cl releases until 20.00 --- libbutl/manifest-rewriter.cxx | 8 ++++++-- libbutl/regex.cxx | 4 ++-- libbutl/standard-version.ixx | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-) (limited to 'libbutl') diff --git a/libbutl/manifest-rewriter.cxx b/libbutl/manifest-rewriter.cxx index f504c35..2be53f1 100644 --- a/libbutl/manifest-rewriter.cxx +++ b/libbutl/manifest-rewriter.cxx @@ -13,6 +13,7 @@ #ifndef __cpp_lib_modules #include #include // uint64_t +#include // size_t #endif // Other includes. @@ -99,7 +100,9 @@ namespace butl os << ' '; manifest_serializer s (os, path_.string ()); - s.write_value (nv.value, nv.colon_pos - nv.start_pos + 2); + + s.write_value (nv.value, + static_cast (nv.colon_pos - nv.start_pos + 2)); } os << suffix; @@ -132,7 +135,8 @@ namespace butl if (!nv.value.empty ()) { os << ' '; - s.write_value (nv.value, nv.colon_pos - nv.start_pos + 2); + s.write_value (nv.value, + static_cast (nv.colon_pos - nv.start_pos + 2)); } os << suffix; diff --git a/libbutl/regex.cxx b/libbutl/regex.cxx index f988193..ab32693 100644 --- a/libbutl/regex.cxx +++ b/libbutl/regex.cxx @@ -15,7 +15,7 @@ #include #include #include // runtime_error -#if defined(_MSC_VER) && _MSC_VER < 1920 +#if defined(_MSC_VER) && _MSC_VER < 2000 # include // strstr() #endif #endif @@ -52,7 +52,7 @@ namespace std { const char* d (e.what ()); -#if defined(_MSC_VER) && _MSC_VER < 1920 +#if defined(_MSC_VER) && _MSC_VER < 2000 // Note: run the regex test like this to check new VC version: // // ./driver.exe a '{' b diff --git a/libbutl/standard-version.ixx b/libbutl/standard-version.ixx index c0833c4..6142586 100644 --- a/libbutl/standard-version.ixx +++ b/libbutl/standard-version.ixx @@ -51,7 +51,8 @@ namespace butl { return release () || stub () ? nullopt - : optional (version / 10 % 1000); + : optional ( + static_cast (version / 10 % 1000)); } inline optional standard_version:: -- cgit v1.1