From b4538b53637b7caf41cd8ce993514d1d54b2d1fb Mon Sep 17 00:00:00 2001 From: ylavic Date: Sun, 28 Apr 2019 00:51:20 +0200 Subject: [PATCH] Fix compilation of sortkeys.cpp with MSVC 2013 (hopefully). --- example/sortkeys/sortkeys.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/sortkeys/sortkeys.cpp b/example/sortkeys/sortkeys.cpp index c473784..7ede9fb 100644 --- a/example/sortkeys/sortkeys.cpp +++ b/example/sortkeys/sortkeys.cpp @@ -45,9 +45,8 @@ int main() { // C++11 supports std::move() of Value so it always have no problem for std::sort(). // Some C++03 implementations of std::sort() requires copy constructor which causes compilation error. // Needs a sorting function only depends on std::swap() instead. -#if __cplusplus >= 201103L || !defined(__GLIBCXX__) +#if __cplusplus >= 201103L || (!defined(__GLIBCXX__) && (!defined(_MSC_VER) || _MSC_VER >= 1900)) std::sort(d.MemberBegin(), d.MemberEnd(), NameComparator()); -#endif printIt(d); @@ -59,4 +58,5 @@ int main() { "zeta": false } */ +#endif }