In-Place Construction for std::any, std::variant and std::optional--Bartlomiej Filipek

Efficient construction.

In-Place Construction for std::any, std::variant and std::optional

by Bartlomiej Filipek

From the article:

When you read articles or reference pages for std::any, std::optional or std::variant you might notice a few helper types called in_place_* available in constructors.

Why do we need such syntax? Is this more efficient than “standard” construction?

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.