mercredi 3 février 2016

Pointer/Reference to element in std::unordered_set

Heym

im using a std::unordered_set to store my data object. But now i want to create a pointer/reference to them, for example (without hash function ... ):

struct Node
{
  Node* parent;
  ...
};
std::unordered_set<Node> list;

is it possible to use a std::unordered_set<Node>::const_iterator ? Im not sure how to figure out this information if (without removing elements!) the iterator "ordering" changes ?

Aucun commentaire:

Enregistrer un commentaire