3 ms·
Googler here. We avoid doing "work" in constructors as per the style guide: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Doing_Work_in_Constru
by rozim 12y ago
Googler here. We avoid doing "work" in constructors as per
the style guide: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Doing_Work_in_Constructors http://google-styleguide.googlecode.com/svn/trunk/cppguide.x...
- lmm 12y agoYeah, that's pretty much what you have to do, and go back to a C-style init method. But then you've lost the benefits of RAII, and you can't necessarily use those types with templates (which won't know about your init method).