Hi,
I am facing some more range problem from boost::range;
According to the CVS RC_1_34 works. Revision 1.21 version specified by
Thorsten Ottosen , most of the classes work.
What is my interest is to have a get_range function inside some of the
container class like std::vector and boost::circular_buffer (from boost
CVS)
Here I have test class to show the problem I am facing.
First, when I inherit from a vector , and specify a range function just
like iterator functions ( begin() and end() )
template<typename T>
class range_vector : public std::vector<T>{
public:
typedef boost::sub_range range;
typedef boost::sub_range<const range_vector> const_range;
range get_range(size_type from,size_type to){
std::cout<<"range"< range;
typedef boost::sub_range<const range_vector> const_range;
range get_range(size_type from,size_type to){
std::cout<<"range"<
]
and
[
C=range_vector<int>
]
///now trying to get a non-version and assign it to const version
range_vector<int>::const_range r = v.get_range(1,5);
It gives the same error.
Here C (container) is passed as correct one. begin() and end() are too
executes correct version (non-const one).
Not getting why it won't work.
Any kind of help is highly appreciated.
Thanks to boost community in advance.
abir basak
--
Abir Basak, Member IEEE
Software Engineer, Read Ink Technologies
B. Tech, IIT Kharagpur
email: abir@abirbasak.com
homepage: www.abirbasak.com