Remix.run Logo
▲ dako2117 4 hours ago

I believe there are also cases where you have a member variable which has a complicated initialization that you may want to handle in some sort of manner that is not appropriate for the default ctor. So you may not want to initialize everything right away in this scenario.

▲spacechild1 4 hours ago | parent [-]

Can you give a concrete example? Why wouldn't you initialize the member to something, e.g. a sentinel value?

Note that if the member is non-trivial, its default constructor is called either way.