Hi Asif,
On Mon, Aug 1, 2011 at 10:45 AM, asif saeed
Base(std::string s) : sep_(";"), tok_(s,sep_), i_(tok_.begin()) { }
These lines are your problem -- the tokenizer stores the iterators
from the string 's', but once the constructor is exited (prior to the
body of the derived class being called) the argument 's' is destroyed
-- invalidating the iterators stored by the tokenizer data member.
Try the following change to Base:
class Base
{
public:
typedef boost::char_separator<char> sep_type_t;
typedef boost::tokenizer