The C++26 inplace_vector container

The C++26 standard features a new container called std::inplace_vector, that sits in between the std::array and std::vector containers. It’s a container with a compiled-time fix capacity – like std::array, but a runtime variable size – like std::vector. In this article, we will discuss how it works and when to use it. A tale of two … Read more

Composite objects and C++26 the std::polymorphic type

In a previous article, I discussed the C++ std::indirect type and how it helps implementing the PImpl idiom. However, the std::indirect type was inducted in the standard alongside another type called std::polymorphic. This helps implementing composite classes, where composite means a class composed of member objects in an has-a relation, where the composite own the … Read more