6 Dec
2005
6 Dec
'05
8:43 p.m.
Hugh Hoover
On Dec 3, 2005, at 15:44, David Abrahams wrote:
Hugh Hoover
writes: I have a need to provide STL compliant iterators from an abstract class A, that is, without knowing the runtime type of the actual "collection" being iterated.. As near as I can tell, these things
<snip>
Have you looked at boost::indirect_iterator? Just make a container of pointers to the abstract base and iterate over that :)
Thanks for the suggestion, but that won't really work.
Why? -- Dave Abrahams Boost Consulting www.boost-consulting.com