We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b94c2a1 commit 1ede098Copy full SHA for 1ede098
example/sortkeys/sortkeys.cpp
@@ -42,7 +42,13 @@ int main() {
42
}
43
*/
44
45
+// C++11 supports std::move() of Value so it always have no problem for std::sort().
46
+// Some C++03 implementations of std::sort() requires copy constructor which causes compilation error.
47
+// Needs a sorting function only depends on std::swap() instead.
48
+#if __cplusplus >= 201103L || !defined(__GLIBCXX__)
49
std::sort(d.MemberBegin(), d.MemberEnd(), NameComparator());
50
+#endif
51
+
52
printIt(d);
53
54
/*
0 commit comments