El 17/04/2026 a las 0:23, Jean-Louis Leroy via Boost escribió:
Third, the interface is rather unusual, and it allows one hub to iterate over another hub's elements:
hub<T> h, g; h.visit(g.begin(), g.end(), fun); I guess it can be useful to iterate over a narrower range. But in that spirit, I would expect 'visit' to return the "end" iterator.
To be quite honest, I don't see tremendous value on iterating over a range narrower than the whole container, because insertion order in hub is arbitrary and there's no meaningul property that elements of a subrange would share --same rationale applies to other unordered containers like, for instance, std::unordered_map. The function visit(first, last, f) is there for operational closure reasons, so to say. Joaquín M López Muñoz