From: Rob Stewart (stewart_at_[hidden])
Date: 2004-03-30 10:48:09
From: "Reece Dunn" <msclrhd_at_[hidden]>
> So the errorcheck object will be in a half-constructed state. That is, the
> int will be constructed, but the errorcheck object isn't, therefore the
> int's destructor will be called, but errorcheck's deconstructor will not.
> The solution would therefore be to throw an intermediate object, like the
> Trules from the C++ Templates book by David Vandervoorde and Nico Josuttis.
> This would then get around the throwing in a constructor problem.
Why not throw a new errorcheck object using a private ctor that
stores but doesn't check the return value?
-- Rob Stewart stewart_at_[hidden] Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk