r/cpp • u/User_Deprecated • Aug 26 '26
C++26: std::inplace_vector
https://www.sandordargo.com/blog/2026/08/26/cpp26-inplace-vector
180
Upvotes
r/cpp • u/User_Deprecated • Aug 26 '26
View all comments
Show parent comment
1
u/Ameisen vemips, avr, rendering, systems Aug 27 '26
Yes, but
Nullablesemantics in C# are vastly nicer thanstd::optionalin C++.Including trivially using
ifwith them:if (Method() is {} value)I should also point out that in C#,
Foo?is identical toFooifFoois a reference-type. That would be the equivalent ofstd::optional<T&>being a type-alias forT*.