3 Aug
2011
3 Aug
'11
7:55 p.m.
I have boost tokenizer and its iterator stored in my base class. The tokenizer got initialized with a const std::string&. I do the tokenization in my base class and provide the iterator, pointing to the first token, to the derived classes - but only to be used in their constructors. After the derived class constructor has been executed, the tokenizer and its iterator should not remain available - what can I do to accomplish that?
[This is less of a boost issue and more of a general design issue...] Why do the tokenizer and the iterator need to be in the base class at all? Why not just construct them on the stack in the derived constructor? Regards, Nate