3 ms·
Yep, that's the idea. It's done in several parts of the standard library to in-place construct objects, usually via std::piecewise_construct. >It wouldn't work
by Kranar 6y ago
Yep, that's the idea. It's done in several parts of the standard library to in-place construct objects, usually via std::piecewise_construct.
>It wouldn't work if, e.g., later elements of the tuple are constructed with pointers into earlier elements...
That's right but there's no way to construct a tuple in this manner. You can construct a tuple with some default values and then after construction have elements of the tuple point to others, but you couldn't possibly construct a tuple where elements of the tuple are pointing to one another.