r/cpp • u/User_Deprecated • Aug 26 '26
C++26: std::inplace_vector
https://www.sandordargo.com/blog/2026/08/26/cpp26-inplace-vector
185
Upvotes
r/cpp • u/User_Deprecated • Aug 26 '26
View all comments
Show parent comment
3
u/jwakely libstdc++ tamer, LWG chair Aug 29 '26
When you chain multiple calls like that it's less clear because of the use of nesting instead of chaining. But mostly because a pointer is still not a reference:
https://brevzin.github.io/c++/2021/12/13/optional-ref-ptr/
An optional ref is simply the more expressive type for these functions and fits the semantics better:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3981r2.html