
Hi, I was trying to compile the following simple piece of code: #include <boost/range/algorithm.hpp> #include <boost/range/adaptors.hpp> #include <vector> int main(int argc, char *argv[]) { std::vector<int> vec(10); boost::fill(vec | boost::adaptors::reversed, 1); return 0; } But I get the following erros with gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3: test_fill.cpp: In function ‘int main(int, char**)’: test_fill.cpp:9: error: invalid initialization of non-const reference of type ‘boost::range_detail::reverse_range<std::vector<int, std::allocator<int> > >&’ from a temporary of type ‘boost::range_detail::reverse_range<std::vector<int, std::allocator<int>
’ /usr/local/include/boost/range/algorithm/fill.hpp:29: error: in passing argument 1 of ‘ForwardRange& boost::range::fill(ForwardRange&, const Value&) [with ForwardRange = boost::range_detail::reverse_range<std::vector<int, std::allocator<int> , Value = int]’
Am I missing something here? Best regards, Denis