Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2005-08-17 12:50:05


The following code:
<========================
   template
   < class Container
>
   void
test_iter_range(Container& a_cont)
{
     typedef typename range_result_iterator<Container>::type citer_type;
     typedef iterator_range<citer_type> riter_type;
     riter_type a_riter(a_cont.begin(),a_cont.end());
     std::cout<<"a_riter.front="<<a_riter.front()<<"\n";
}
>=========================
Gives compile time error when Container is const.
See test driver and compiler output in
sandbox vault under cppljevans and in file
iter_range_test.zip.

Is this an error in the range lib or am I doing something wrong?

TIA.

-regards,
Larry


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk