[Bug libstdc++/54075] [4.7.1] unordered_map insert still slower than 4.6.2

Paolo Carlini paolo.carlini@oracle.com
Wed Nov 14 22:48:00 GMT 2012


Hi,

On 11/14/2012 10:27 PM, François Dumont wrote:
> We do not cache if the following conditions are all met:
> - key type is an integral
> - hash functor is empty and not final
> - hash functor doesn't throw
Can somebody remind me why *exactly* we have a condition having to do 
with the empty-ness of the functor? I don't really understand it (and 
it's always tricky vs final). Otherwise I think we are coming to the 
conclusion that we could simply keep only the last condition possibly 
with the string (and wstring, etc) special cases for std::hash 
specializations + documentation explaining that the user can direct the 
behavior wrt caching via noexcept on the call operator.

Paolo.



More information about the Libstdc++ mailing list