diff --git a/example/sortkeys/sortkeys.cpp b/example/sortkeys/sortkeys.cpp index c4737849..7ede9fb9 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 }