c++ - 预期不是标准库的一部分
问题描述
我曾经在旧框架中使用 Expected 来返回 value 或 Error 。
Expected<int a> foo () ;
我想使用它,并且我认为它 Expected 现在是 std 库的一部分,但
Std::expect <int a> foo ();
返回 ERRORExpected is not part of std libary
我在哪里可以找到 Expected 库?在 C++ 中从函数中重新运行错误或值的最简单方法是什么?