How would you use Alexandrescu’s Expected with void functions?
Have any of you tried Expected; in practice? It’s quite natural, I used it even before I saw this talk. How would you apply this idiom to functions returning nothing (that is, void functions)? The form presented in the slides has some subtle implications: The exception is bound to the value. It’s ok to handle … Read more