I would like to use a standard map with the following custom key:
struct ParserKey{
ParserKey(uint16_t compno,
uint8_t resno,
uint64_t precinctIndex) : compno_(compno),
resno_(resno),
precinctIndex_(precinctIndex)
{
}
uint16_t compno_;
uint8_t resno_;
uint64_t precinctIndex_;
};
There's no obvious way of ordering the keys, though. Can these keys be ordered, or do I need a different associative collection ?
std::unordered_mapthen?compno_first, byresno_second and byprecinctIndex_third? All things considered, you may not even seek ordering at all. In that case, you may findstd::unordered_mapuseful.