C++23: The <expected> header; expect the unexpected
https://www.sandordargo.com/blog/2022/11/16/cpp23-expected
Discussions: https://discu.eu/q/https://www.sandordargo.com/blog/2022/11/16/cpp23-expected
A better starting point is std::optional. Look at my post in response to the OP, which has a link to an article I did on this before std::expected.
I'd do the simplification of your question as:
```
using StringVec = td::vector<std::string>;
std::expected<StringVec, ErrorCode>
```
@rmerriam @c_discussions
Yeah, I use std::optional a lot, but the problem is that it doesn't convey information about error code. std::expected does, but as everything in #cpp world... it's very verbose. I'm aware that usage of `using` can improve readability, but my point is that such feature should have a syntactic sugar support ( something like parameter packs for instance), because for libraries compiled w/o -fexceptions it would be used heavily across the whole codebase.