Boost logo

Boost :

Subject: Re: [boost] [iterator adaptor] requires default constructor?
From: Jeffrey Lee Hellrung, Jr. (jhellrung_at_[hidden])
Date: 2010-06-11 21:21:10

On 6/11/2010 6:14 PM, Neal Becker wrote:
> IIUC, in typical usage, the default constructor will be called.
> Here is my example:
> This is a bit confusing. IIUC, the issue is that we did not explicitly
> invoke the super_t constructor, so we got the default constructor, which in
> turn calls (iterator_adaptor.hpp:280)
> iterator_adaptor() {}
> Adding an explicity super_t constructor call fixes it:
> But is not very obvious.

How so? Makes sense to me that you should be conscious of how the base
class is constructed (assuming it is nontrivial) in all the derived
class' constructors, regardless of the context...

- Jeff

Boost list run by bdawes at, gregod at, cpdaniel at, john at