|
Boost Users : |
From: David Abrahams (dave_at_[hidden])
Date: 2005-12-06 15:43:39
Hugh Hoover <hugh_at_[hidden]> writes:
> On Dec 3, 2005, at 15:44, David Abrahams wrote:
>
>> Hugh Hoover <hugh_at_[hidden]> 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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net