4 ms·
Boost.Python (and Luabind which descends from that) has a similar concept they call Custodian And Ward. There, an object can extend the lifetime of another one,
by jzwinck 11y ago
Boost.Python (and Luabind which descends from that) has a similar concept they call Custodian And Ward. There, an object can extend the lifetime of another one, often for the same parent and child rationale in this article. It doesn't come up often in application programming, but in library development it certainly does.
That said, this constructor is not a secret. It's obscure yet occasionally useful, like half of C++.