Skip to content

Commit b4538b5

Browse files
committed
Fix compilation of sortkeys.cpp with MSVC 2013 (hopefully).
1 parent 01950eb commit b4538b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

example/sortkeys/sortkeys.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ int main() {
4545
// C++11 supports std::move() of Value so it always have no problem for std::sort().
4646
// Some C++03 implementations of std::sort() requires copy constructor which causes compilation error.
4747
// Needs a sorting function only depends on std::swap() instead.
48-
#if __cplusplus >= 201103L || !defined(__GLIBCXX__)
48+
#if __cplusplus >= 201103L || (!defined(__GLIBCXX__) && (!defined(_MSC_VER) || _MSC_VER >= 1900))
4949
std::sort(d.MemberBegin(), d.MemberEnd(), NameComparator());
50-
#endif
5150

5251
printIt(d);
5352

@@ -59,4 +58,5 @@ int main() {
5958
"zeta": false
6059
}
6160
*/
61+
#endif
6262
}

0 commit comments

Comments
 (0)