The doc says that the container we should pass to this function can be std::vector<boost::iterator_range>. But when I run the program it gives a compile error. But when the result container passed, is a std::vector, everything works fine.
First code snippet is using std::vector<boost::iterator_range> as the result.
Following is the last 3 lines of the compiler error. The whole error is too long.
c:\mingw\include\c++\9.2.0\bits\stl_iterator.h:787:11: note: no known conversion for argument 1 from 'gnu_cxx::__normal_iterator<const char*, std::cxx11::basic_string >' to 'const gnu_cxx::__normal_iterator<char*, std::cxx11::basic_string >&'
c:\mingw\include\c++\9.2.0\bits\stl_iterator.h:787:11: note: no known conversion for argument 1 from 'gnu_cxx::__normal_iterator<const char*, std::cxx11::basic_string >' to 'gnu_cxx::__normal_iterator<char*, std::cxx11::basic_string >&&'
Also I ran the same program in Clang compiler too. Still the same result.
But when I run the following program with the container as std::vector everything works without a hitch.
The doc says that the container we should pass to this function can be std::vector<boost::iterator_range>. But when I run the program it gives a compile error. But when the result container passed, is a std::vector, everything works fine.
First code snippet is using std::vector<boost::iterator_range> as the result.
Following is the last 3 lines of the compiler error. The whole error is too long.
c:\mingw\include\c++\9.2.0\bits\stl_iterator.h:787:11: note: no known conversion for argument 1 from 'gnu_cxx::__normal_iterator<const char*, std::cxx11::basic_string >' to 'const gnu_cxx::__normal_iterator<char*, std::cxx11::basic_string >&'
c:\mingw\include\c++\9.2.0\bits\stl_iterator.h:787:11: note: candidate: 'constexpr gnu_cxx::__normal_iterator<char*, std::cxx11::basic_string >::normal_iterator(__gnu_cxx::normal_iterator<char*, std::__cxx11::basic_string >&&)'
c:\mingw\include\c++\9.2.0\bits\stl_iterator.h:787:11: note: no known conversion for argument 1 from 'gnu_cxx::__normal_iterator<const char*, std::cxx11::basic_string >' to 'gnu_cxx::__normal_iterator<char*, std::cxx11::basic_string >&&'
Also I ran the same program in Clang compiler too. Still the same result.
But when I run the following program with the container as std::vector everything works without a hitch.