4 ms·
The original use case was that std::vector's API was specifically designed to make it possible to have a vector of a type with const members, but it turned out
by plorkyeran 3y ago
The original use case was that std::vector's API was specifically designed to make it possible to have a vector of a type with const members, but it turned out to be impossible to implement without hitting UB. std::launder was introduced as a way to make the obvious implementation correct. Since then the object lifetime rules were adjusted to make it unnecessary for that.
- renewiltord 3y agoOh interesting. Thank you.