std::list::sort()
昨日、Zソートに使ったstd::list<T,A>::sort()ですが、安定(stable)ソートじゃないとマズいことに気が付いて規格を確認しました。
23.2.2.4/31
ISO/IEC 14882/2003
Notes: Stable: the relative order of the equivalent elements is preserved.
セーフ。
std::list<T,A>::sort()は安定ソートです。
昨日、Zソートに使ったstd::list<T,A>::sort()ですが、安定(stable)ソートじゃないとマズいことに気が付いて規格を確認しました。
23.2.2.4/31
ISO/IEC 14882/2003
Notes: Stable: the relative order of the equivalent elements is preserved.
セーフ。
std::list<T,A>::sort()は安定ソートです。