News for hackers. Stuff that matters.
Re:C++11 Tuple Implementation Details (2012) by saurik on Monday February 08, 2021 @04:21PM (#26070322)
Correct. The implementation I had in mind when I said "internal iterator"--and which I think I've coded before back almost two decades ago--is that the tuple one-by-one in-order does a placement new on each of its elements, calling a templated callback you provide which returns the element (so you get RVO through to the placement new); in the case of an exception, it knows which it has already done by code (not by state) and so can deconstruct the appropriate objects.

There are no comments on this comment yet.