Inconsistent return with std::expected and auto return (stackoverflow.com)stack
21 points by Romain in stackoverflow.com · 1h ago · stack
I am having a compile error I do not understand while using std::expected and auto return. Here is a simplified version of the code: #include <string> #include <tuple> #include <expected> std::expected<std::tuple<double,double,double,bool,bool>,std::string> func1(bool input){ if…