Namespaces
Variants
Views
Actions

Talk:cpp/container/map/map

From cppreference.com
< Talk:cpp‎ | container‎ | map

"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. 81.110.180.57 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 << ", ";' ? 86.91.208.67 04:30, 11 July 2015 (PDT)