Hi,

Here is my code:

struct CharIterator 
{
CharIterator( const std::string &s, char_t const *delimiters)
: s_(s),
begin_(boost::algorithm::split_iterator<std::string::iterator>(s, boost::token_finder(boost::is_any_of(delimiters), boost::token_compress_off))),
end_(boost::algorithm::split_iterator<std::string::iterator>()),
i_(begin_) 
{
}

const std::string s_&;
boost::algorithm::split_iterator<std::string::iterator> begin_, end_, i_;
};


The compile gives me an error on parameter 1 of the above constructor. It compiles fine if I change "const std::string &s" to "std::string s" - that is, pass by value. I just want to store a reference to a string. Could you help me on this?

Best regards, Asif