От: | dolgop8791 | ||
Дата: | 14.01.16 15:04 | ||
Оценка: |
unsigned int array[] {0, 1, 2};
gsl::span<unsigned int> my_span = gsl::span<unsigned int> (&array[0], 2);
my_span | boost::adaptors::indexed ();
error C2440: 'return': cannot convert from 'gsl::contiguous_span_iterator<gsl::span<unsigned int,-1>>' to 'gsl::contiguous_span_iterator<gsl::span<const unsigned int,-1>>'
1> boost/range/end.hpp(48): note: No constructor could take the source type, or constructor overload resolution was ambiguous
1> boost/range/end.hpp(105): note: see reference to function template instantiation 'gsl::contiguous_span_iterator<gsl::span<const unsigned int,-1>> boost::range_detail::range_end<const T>(C &)' being compiled
1> with
1> [
1> T=gsl::span<unsigned int,-1>,
1> C=gsl::span<unsigned int,-1>
1> ]
1> boost/range/concepts.hpp(300): note: see reference to function template instantiation 'gsl::contiguous_span_iterator<gsl::span<const unsigned int,-1>> boost::range_adl_barrier::end<gsl::span<unsigned int,-1>>(const T &)' being compiled
1> with
1> [
1> T=gsl::span<unsigned int,-1>
1> ]
template< typename C >
inline BOOST_DEDUCED_TYPENAME range_iterator<C>::type
range_end( C& c )
{
//
// If you get a compile-error here, it is most likely because
// you have not implemented range_begin() properly in
// the namespace of C
//
return c.end();
}