"Complexity" says that the iterator constructor is linear. It's only linear if the elements are already ordered, otherwise it's N log N.
I think the fix is to edit the template that this comes from (http://en.cppreference.com/w/Template:cpp/container/constructor_ord), since the same is true for all associative containers. 22.214.171.124 06:07, 19 March 2013 (PDT)
- Fixed, thanks! P12 12:50, 19 March 2013 (PDT)
I'm glad for this info, but less happy with the comma "array-of-three chars" implementation, wouldn't it be cleaner just to use a bool isFirst flag and then at the top of the loop do 'if (!first) cout << ", ";' ? 126.96.36.199 04:30, 11 July 2015 (PDT)