Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Agreeing: the problem is a constructor that doesnβt initialize all members.
- Note that you can add initializers at the field declaration and have it happen automatically in C++11.
- Also, Iβd simply suggest to not refactor unless needed, and only refactor using the Rule-Of-Zero.
- Finally, thereβs constructor-body level try/catch for some situations like this as well.
Advertisement
Add Comment
Please, Sign In to add comment