Commit 1ede098e authored by Milo Yip's avatar Milo Yip

Workaround of sortkeys example

parent b94c2a12
......@@ -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);
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment