boostorg / container

STL-like containers from Boost
http://www.boost.org/libs/container/
Boost Software License 1.0
100 stars 116 forks source link

flat_map doc misleading complexity #125

Closed mglisse closed 4 years ago

mglisse commented 5 years ago

Hello, the documentation of some flat_map operations has a misleading complexity guarantee. For instance, operator[] or insert_or_assign say "logarithmic", but while the number of comparisons is logarithmic, the number of move/copy can be linear. emplace kind of acknowledges this ("Logarithmic search time plus linear insertion to the elements with bigger keys than x"), although it is still wrong if the capacity is exceeded.

igaztanaga commented 4 years ago

Many thanks for the report!