Boost logo

Boost :

From: Sean Huang (huangsean_at_[hidden])
Date: 2007-09-26 19:04:36


The following simple problem produces an error when compiling with VC8+SP1
on Windows:

#include <vector>
#include <boost/range/sub_range.hpp>

int main(int argc, char* argv[])
{
    typedef std::vector< int > VectorType;
    VectorType v;
    boost::sub_range< VectorType > range;
    boost::sub_range< VectorType > range1;
    range = range1;
        return 0;
}

boost\boost\range\iterator_range.hpp(60) : error C2440:
'<function-style-cast>' : cannot convert from
'std::_Vector_const_iterator<_Ty,_Alloc>' to
'std::_Vector_iterator<_Ty,_Alloc>'
1> with
1> [
1> _Ty=int,
1> _Alloc=std::allocator<int>
1> ]
1> No constructor could take the source type, or constructor overload
resolution was ambiguous

This happens with both 1.34.1 and trunk but 1.33 is OK.

Regards,

Sean


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