c++ - Will std::multimap preserve the insert order if the key of 2 elements equal to each other? -


I wonder if this is true or not? If so, is this behavior a guarantee of the standard c ++?

element in std: map must have unique keys, therefore ... No.

std :: multimap container allows multiple keys to be mapped in one key. When it goes back to std :: multimap , the elements are ordered according to the key, but the sequence of elements with the same key is not specified.

Note that the relative ordering of the C ++ 0x standard (N3092), guaranteed elements of the same key (that is, at some point, Will be able to rely on behavior).


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -