Due to using a library that I don't want to edit the code of, I find myself requiring the use of std::map<Identifier, String>
.
struct compareIdentifiers
{
bool operator()(const Identifier& a, const Identifier& b) const
{
// return a < b;
return true;
}
};
typedef std::map<Identifier, String, compareIdentifiers> IdentifierMap;
Should I return true or false? No comparison needs to be made. I imagine returning true or returning false would be wildly different in efficiency because one will cause the map to re-order, the other won't... right?
I tried to use std::unordered_map<Identifier, String>
but got error:
Error C2280 'std::hash<_Kty>::hash(void)': attempting to reference a deleted function