Quick Q; Recursive unordered_map

Quick A: there is no guarantee for a container to work with incomplete types.

Recently on SO:

Recursive unordered_map

STL containers are not required to work with incomplete types. If you don't mind extra indirection, then the workaround is std::map<int, std::unique_ptr<Node>>.

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.