Notes

1Thanks to Javier Estrada for suggesting this cool tip!

2In contrast, static and thread-local objects will be zero-initialized.

3Unless accessed by friend functions or classes.

4The lifetime of a temporary object may be extended by binding to a const lvalue reference or to an rvalue reference. See more at https://en.cppreference.com/w/cpp/language/lifetime.

5Technically, those types will be different as the version without the constructor will be considered an aggregate type, but for the purpose of the discussion, it’s not essential now.