class SomeClassT {
...
private:
int avar{4};
...
class FooT {
public:
FooT(typeA paramA):
var1{initialValue}, var2{initialvalue} ...
{
}
private:
type1 var1;
type2 var2;
... }
var1, var2, ...) are constructed
constructor ()
try
: initilizer
{
// normal constructor body
} catch {
// free raw pointers or other raw resources.
// remember the destructor will not be called.
// log errors
// throw a new exception
}