id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 10514,Cannot copy const sub_range to non-const,Braden McDaniel ,Neil Groves,"The following code does not compile with Visual Studio 2013 using Boost 1.56.0: {{{ #!c++ typedef std::vector vec_t; typedef boost::sub_range range_t; vec_t vec(10); range_t r(vec.begin(), vec.end()); const range_t & r_ref = r; range_t v = r_ref; }}} The following error results: {{{ boost/range/iterator_range_core.hpp(69) : error C2440: 'static_cast' : cannot convert from 'std::_Vector_const_iterator>>' to 'std::_Vector_iterator>>' No constructor could take the source type, or constructor overload resolution was ambiguous c:\build\ng-10.5-x64\API\inc\boost/range/sub_range.hpp(184) : see reference to function template instantiation 'IteratorT boost::iterator_range_detail::iterator_range_impl::adl_begin>(const boost::range_detail::sub_range_base &)' being compiled with [ IteratorT=std::_Vector_iterator>> , ForwardRange=vec_t ] c:\build\ng-10.5-x64\API\inc\boost/range/sub_range.hpp(187) : see reference to function template instantiation 'IteratorT boost::iterator_range_detail::iterator_range_impl::adl_begin>(const boost::range_detail::sub_range_base &)' being compiled with [ IteratorT=std::_Vector_iterator>> , ForwardRange=vec_t ] c:\build\ng-10.5-x64\API\inc\boost/range/sub_range.hpp(184) : while compiling class template member function 'boost::sub_range::sub_range(const boost::sub_range &)' sub_range_test.cpp(11) : see reference to function template instantiation 'boost::sub_range::sub_range(const boost::sub_range &)' being compiled sub_range_test.cpp(9) : see reference to class template instantiation 'boost::sub_range' being compiled boost/range/iterator_range_core.hpp(75) : error C2440: 'static_cast' : cannot convert from 'std::_Vector_const_iterator>>' to 'std::_Vector_iterator>>' No constructor could take the source type, or constructor overload resolution was ambiguous c:\build\ng-10.5-x64\API\inc\boost/range/sub_range.hpp(186) : see reference to function template instantiation 'IteratorT boost::iterator_range_detail::iterator_range_impl::adl_end>(const boost::range_detail::sub_range_base &)' being compiled with [ IteratorT=std::_Vector_iterator>> , ForwardRange=vec_t ] c:\build\ng-10.5-x64\API\inc\boost/range/sub_range.hpp(187) : see reference to function template instantiation 'IteratorT boost::iterator_range_detail::iterator_range_impl::adl_end>(const boost::range_detail::sub_range_base &)' being compiled with [ IteratorT=std::_Vector_iterator>> , ForwardRange=vec_t ] }}} So it looks as though having a `const` `sub_range` implies that it uses `const_iterator`s, which doesn't seem appropriate. Code of this nature compiled using Boost 1.55.0. ",Bugs,new,To Be Determined,range,Boost 1.56.0,Regression,,,