Can member variables be used to initialize other members in an initialization list?
This is well-defined and portable,1 but it’s potentially error-prone. Members are initialized in the order they’re declared in the class body, not the order they’re listed in the initialization list. So if you change the class body, this code may silently fail (although many compilers will spot this and emit a warning). 1. From [class.base.init] … Read more