12.15 — std::optional
In lesson , we discussed cases where a function encounters an error that it cannot reasonably handle itself. For example, consider a function that calculates and returns a value: int doIntDivision(int x, int y) { return x / y; } If the caller passes in a value that is semantically …