Boost logo

Boost :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2003-07-22 16:52:48


Hello Jano,

"Jan Gaspar" <jga_at_[hidden]> wrote in message
news:3F1D81F8.77F165D0_at_whitestein.com...

> > 3. This fragment fails:
> > struct Test {}
> > circular_buffer<Test> a(2);
> > a.push_back(Test());
> > a.push_back(a[0]);
> >
> I don't understand this. IMHO there will be 2 copies of Test(). Nothing
should be
> destroyed in the second push_back(). I think, everything is OK.
>
It works OK - I did mistake. The circular_buffer<> can safely pushXXX its
own values.

> > > > 3. cb_iterator: is the m_end value needed?
> Should or shouldn't impact performance? What about setting m_it to 0 ?
>
Zero is even better.

/Pavel


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