Skip to main content
8 votes
4 answers
269 views

How to convert a std::optional to a std::expected?

I'm trying to convert a std::optional into a std::expected using a lambda function. The code I have written does not compile. The compiler complains that the monadic functions of std::optional must ...
user2138149's user avatar
  • 17.9k