From: David Abrahams (dave_at_[hidden])
Date: 2006-02-11 16:15:15
David Abrahams <dave_at_[hidden]> writes:
> Ion Gaztañaga <igaztanaga_at_[hidden]> writes:
>>>> Ok. I think I can provide both approaches so that who doesn't want (or
>>>> can't because of a restricted embedded enviroment) use exceptions can
>>>> have its alternative.
>>> < C R I N G E >
>>> If you really *must* provide 2-phase construction, then please make it
>>> a special mode that can be enabled with an #ifdef.
>> I see you have strong opinions like me. So, no ifdefs, please.
> Then consider making the class with 2-phase initialization a different
Or consider providing a function that tests whether initialization was
successful and is guaranteed to always return true unless exceptions
I'm sure given time we could think of even more ways to address this
without providing a default ctor.
The point is that the guarantees made to those who use a C++ compiler
shouldn't be weakened just in order to accomodate people who want to
disable standard C++ features.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk