Guest User

commetn

a guest
Jul 29th, 2013
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. Agreeing: the problem is a constructor that doesn’t initialize all members.
  2.  
  3. Note that you can add initializers at the field declaration and have it happen automatically in C++11.
  4.  
  5. Also, I’d simply suggest to not refactor unless needed, and only refactor using the Rule-Of-Zero.
  6.  
  7. Finally, there’s constructor-body level try/catch for some situations like this as well.
Advertisement
Add Comment
Please, Sign In to add comment