Workaround of sortkeys example
This commit is contained in:
parent
b94c2a1203
commit
1ede098e90
@ -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);
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user