I was asking myself (and couldn't find an answer) if the modern C++ compilers could check into the body of the constructors to see if they could infer the initialization list, instead of letting the developer specifying it?
As an example, consider the following code:
MyClass::MyClass (Obj o)
{
_o = o;
}
Can the compiler automatically translate it into:
MyClass::MyClass (Obj o) : _o(o)
{}
Thanks