Re: [hub] on the specialized iteration over elements

Joaquin M López Muñoz via Boost <[email protected]>
Newsgroups gmane.comp.lib.boost.devel
Message-ID <[email protected]>
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
_______________________________________________
Boost mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.boost.org/mailman3/lists/boost.lists.boost.org/
Archived at: https://lists.boost.org/archives/list/[email protected]/message/PYL5AMWSTWFFIXHNJ4YBGSYBGPWMET35/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.