Boost Users :
Subject: Re: [Boost-users] [corrected]How to delay the initialisation of a member in a C++ base class until the ctor of derived class is executed?
From: Alex MDC (alex.mdc_at_[hidden])
Date: 2009-03-25 05:13:02
> Is there any C++ design pattern could achieve it? Thanks
Since you're passing the size into the derived constructor, why don't you
just pass it through to the base constructor?
p_array.reset(new unsigned char[size]);
boost::shared_array<unsigned char> p_array;
Will that work for you?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net