4 ms·
It's nice to avoid the default initialization and construct a member directly with the argument you want. Then you can construct a second member which might dep
by jasonzemos 13y ago
It's nice to avoid the default initialization and construct a member directly with the argument you want. Then you can construct a second member which might depend on that previous one, etc. This can even include lambdas right in the initialization list, and all of this may throw and log an error with the catch block. Personally, I rarely like to see code in the actual constructor body anymore.