Boost logo

Boost :

From: amerio (amerio_at_[hidden])
Date: 2003-04-08 06:54:57

I'm trying to put a parsed file into a std::string

typedef file_iterator <char> IteratorT;
parse_info <IteratorT> _Info = parse (_Start,_End,_Rule [&Echo]);

void Echo (IteratorT const & rBegin, IteratorT const & rEnd)
string s0(rBegin, rEnd); // <<-- this produces garbage !!!
std::cout << s0 << endl;
string s1; for_each(rBegin, rEnd, append(s1)); // <<-- this works as
std::cout << s1 << endl;

I don't understand why string s0(rBegin, rEnd) does not work with
It does work with "standard" iterator, so...
Maybe I overlooked something ?

Boost list run by bdawes at, gregod at, cpdaniel at, john at