On 06/29/2010 08:05 AM, Abdelrazak Younes wrote:
On 06/29/2010 01:46 PM, Pavel Sanda wrote:
Andre Poenitz wrote:
One could argue that it allows the kind of code that's conceptionally
closest to the model Rob has in mind to compile out-of-the-box, but
does qvector provide something special compared to std::vector?

QVector doesn't require a default constructor.

Two solution here to stay with vector:
1) give TocItem a default constructor

It has one:
class TocItem
{
    friend class Toc;
    friend class TocBackend;

public:
    /// Default constructor for STL containers.
    TocItem() : dit_(0) {}

2) use vector<TocItem *> instead.

I think he really does mean:
    vector<TocItem> *
But I'm not absolutely sure about that.

rh

Reply via email to