6 May
2005
6 May
'05
5:10 a.m.
Dave Steffen wrote:
My question is fairly simple: I have a container that only provides const_iterators; it's effectively "read-only" except to a small, select group of classes.
Is there a way to tell the BOOST_FOREACH macro to use const_iterator instead of iterator?
(Not a huge thing - I can add iterators to the class, or I can teach FOREACH how to iterate over it as described in the docs. I'm just wondering if I'm missing something...)
You're not missing anything. Those would be my two suggestions, in that order. -- Eric Niebler Boost Consulting www.boost-consulting.com