From b931c4b52c4ad15279e82bfc4a5806fd26c90522 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Tue, 7 Apr 2020 18:35:37 +0200 Subject: [PATCH] Fix wxArrayString build error when using c++17 with MSVC MSVC does not set the correct __cplusplus version, so check MSVC compiler version as well. --- src/common/arrstr.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/arrstr.cpp b/src/common/arrstr.cpp index e3ebe2e43e..1b05c1d556 100644 --- a/src/common/arrstr.cpp +++ b/src/common/arrstr.cpp @@ -59,7 +59,7 @@ wxArrayString::wxArrayString(size_t sz, const wxString* a) #include "wx/arrstr.h" -#if __cplusplus >= 201103L +#if __cplusplus >= 201103L || wxCHECK_VISUALC_VERSION(14) int wxArrayString::Index(const wxString& str, bool bCase, bool WXUNUSED(bFromEnd)) const { @@ -153,7 +153,7 @@ wxStringCompareLess wxStringCompare(F f) void wxArrayString::Sort(CompareFunction function) { std::sort(begin(), end(), -#if __cplusplus >= 201103L +#if __cplusplus >= 201103L || wxCHECK_VISUALC_VERSION(14) [function](const wxString& s1, const wxString& s2) { return function(s1, s2) < 0; @@ -185,7 +185,7 @@ int wxSortedArrayString::Index(const wxString& str, wxSortedArrayString::const_iterator it = std::lower_bound(begin(), end(), str, -#if __cplusplus >= 201103L +#if __cplusplus >= 201103L || wxCHECK_VISUALC_VERSION(14) [](const wxString& s1, const wxString& s2) { return s1 < s2;