
17 Aug
2005
17 Aug
'05
5:50 p.m.
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