aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-05-18 14:43:54 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-05-18 14:43:54 +0300
commit7129383fde53ab1d74b43f31ed67d50674839f08 (patch)
treee507d23b592329fb26e6100ea12f0beed51e6e33
parentb946e380d4e414cec85082ebe67c8ffed6579277 (diff)
Add workarounds for all releases of VC15
-rw-r--r--libbutl/regex.cxx4
-rw-r--r--tests/base64/driver.cxx2
-rw-r--r--tests/timestamp/driver.cxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/libbutl/regex.cxx b/libbutl/regex.cxx
index a48102a..90374cd 100644
--- a/libbutl/regex.cxx
+++ b/libbutl/regex.cxx
@@ -15,7 +15,7 @@
#include <ostream>
#include <sstream>
#include <stdexcept> // runtime_error
-#if defined(_MSC_VER) && _MSC_VER <= 1914
+#if defined(_MSC_VER) && _MSC_VER < 1920
# include <cstring> // strstr()
#endif
#endif
@@ -52,7 +52,7 @@ namespace std
{
const char* d (e.what ());
-#if defined(_MSC_VER) && _MSC_VER <= 1914
+#if defined(_MSC_VER) && _MSC_VER < 1920
// Note: run the regex test like this to check new VC version:
//
// ./driver.exe a '{' b
diff --git a/tests/base64/driver.cxx b/tests/base64/driver.cxx
index a9a6313..bb18e88 100644
--- a/tests/base64/driver.cxx
+++ b/tests/base64/driver.cxx
@@ -40,7 +40,7 @@ encode (const string& i, const string& o)
// VC15 seekg() doesn't clear eofbit.
//
-#if defined(_MSC_VER) && _MSC_VER <= 1914
+#if defined(_MSC_VER) && _MSC_VER < 1920
is.clear ();
#endif
diff --git a/tests/timestamp/driver.cxx b/tests/timestamp/driver.cxx
index ce5d204..1401541 100644
--- a/tests/timestamp/driver.cxx
+++ b/tests/timestamp/driver.cxx
@@ -133,7 +133,7 @@ main ()
// "Apr 19:31:10 2016" for the format "%b %d %H:%M:%S %Y" as if the input were
// "Apr 19 00:31:10 2016".
//
-#if !defined(_MSC_VER) || _MSC_VER > 1914
+#if !defined(_MSC_VER) || _MSC_VER >= 1920
assert (fail ("Apr 19:31:10 2016", "%b %d %H:%M:%S %Y"));
assert (fail (":31 2016", "%H:%M %Y"));
#endif