>>282
これでいいじゃんw

BOOST_FOREACH(char ch, boost::make_iterator_range(input_iterator(in), input_iterator()))
{
buf.push_back(ch);
*s++ = ch;
}