Workaround of sortkeys example

This commit is contained in:
Milo Yip 2019-02-11 14:14:35 +08:00
parent b94c2a1203
commit 1ede098e90

View File

@ -42,7 +42,13 @@ 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__)
std::sort(d.MemberBegin(), d.MemberEnd(), NameComparator());
#endif
printIt(d);
/*