I’ve seen a lot of two-phase initialization used. The justification is to call virtual functions from the secondary constructor. However, I’ve never, ever, seen any use case in which this was necessary. Are there any?
I’ve seen a lot of two-phase initialization used. The justification is to call virtual
Share
On platforms where there is no support for exceptions, or the code size increase due to exception handling is unacceptable, two-phase initialization allows you to put activities that might fail in the secondary constructor.