Using C++17 std::optional -- Bartlomiej Filipek

See how and when std::optional from C++17 is useful:<img alt="" data-cke-saved-src="" src="" 400px;="" height:="" 128px;="" float:="" right;"="" style="height: 74px; width: 230px; float: right;">

Using C++17 std::optional

by Bartlomiej Filipek

From the article:

By adding the boolean flag to other types, you can achieve a thing called “nullable types”. As mentioned, the flag is used to indicate whether the value is available or not. Such wrapper represents an object that might be empty in an expressive way (so not via comments smile)

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.