Boost logo

Boost :

Subject: Re: [boost] no match for ‘operator=’ error with circular_buffer iterator when addressing buffer by reference?
From: Bernd Prager (bernd_at_[hidden])
Date: 2012-01-08 08:24:02


On 1/8/2012 12:07 AM, Agustín K-ballo Bergé wrote:
> On 08/01/2012 1:13, Bernd Prager wrote:
>> Test::Test(const Test&t) {
>> b.resize(10);
>>
>> size_t s1 = b.size();
>> size_t s2 = t.b.size();
>>
>> boost::circular_buffer<int>::iterator it1 = b.begin();
>> boost::circular_buffer<int>::iterator it2 = t.b.begin();
>> }
>
> Since t is a const reference, I'm guessing all you can get from t.b
> are const_iterators.
>
> Agustín K-ballo Bergé.-
> http://talesofcpp.blogspot.com
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
Thank you, you guessed completely right.


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