diff --git a/talk/morelanguage/morestl.tex b/talk/morelanguage/morestl.tex index c5cf8ce7..4ead2b2b 100644 --- a/talk/morelanguage/morestl.tex +++ b/talk/morelanguage/morestl.tex @@ -102,6 +102,7 @@ return in; // equiv. to optional{in}; return {}; // or: return std::nullopt; (empty opt.) } + auto v = parse_phone(...); if (v) { // or: v.has_value() process_phone(v.value()); // or: *v (unchecked) v->call(); // calls Phone::call() (unchecked)