This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
2013/10/28 Daniel Molina García <unomas@correo.ugr.es>:I'm not sure if my code is valid, but I think that unordered_map is not working ok with valarray as key.Correct. The code is invalid, because the standard does not specify a specialization of std::hash for std::valarray. - Daniel
However, nothing stops one from providing a specialization of std::hash<std::valarray<> >. You could look at hash<std::string> ro hash<const char*> as a starting point.
Fang
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |