As keys in a set are treated as const, boost::concurrent_flat_set::visit(f) (and all *_or_visit operations)
are const member functions and behave exactly as their cvisit counterparts:
f is passed a const reference.
Access to the element is shared-locked.
In some cases, though, we may want to have const, exclusive-locked access, such as for instance if the element has a mutable data member we'd like to modify. This could be in principle served by a non-const overloads of boost::concurrent_flat_set::visit(f) and other operations implying visitation.
As keys in a set are treated as const,
boost::concurrent_flat_set::visit(f)
(and all*_or_visit
operations) are const member functions and behave exactly as theircvisit
counterparts:f
is passed a const reference.In some cases, though, we may want to have const, exclusive-locked access, such as for instance if the element has a
mutable
data member we'd like to modify. This could be in principle served by a non-const overloads ofboost::concurrent_flat_set::visit(f)
and other operations implying visitation.