Referring to any non-static member or base class of an object
in the handler for a function-try-block
of a constructor or destructor for that object
results in undefined behavior.
[Example 1: #include<iostream>struct A {
A()try: x(0?1:throw1){}catch(int){
std::cout <<"y: "<< y << std::endl; // undefined behavior, referring to non-static member y in// the handler of function-try-block}int x;
int y =42;
};
— end example]