Boost logo

Boost Users :

Subject: [Boost-users] boost::zip_iterator does not work with std::istreambuf_iterator
From: Krzysztof Żelechowski (giecrilj_at_[hidden])
Date: 2011-09-03 18:40:03


  1. boost::zip_iterator requires a readable iterator.
  2. std::istreambuf_iterator is a readable iterator.
  3. boost::zip_iterator cannot dereference std::istream_iterator because
std::istreambuf_iterator returns by value while boost::zip_iterator returns
by reference; the exact error message is
  invalid initialization of non-const reference of type ‘char&’ from an
rvalue of type ‘std::istreambuf_iterator<char, std::char_traits<char>
>::char_type’

Contradiction? Am I missing anything?

Chris


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net