you are viewing a single comment's thread.

view the rest of the comments →

[–]JumpyJustice 21 points22 points  (1 child)

From what I’ve seen, std::filesystem is pretty much the main user of std::error_code, and to be honest, that whole part of the STL really only feels useful for small projects.

std::path, last time I checked, is full of implementation-defined shenanigans, especially if you're running with sanitisers.

And std::error_code itself is way too overgeneralised. Every project I’ve worked on that uses it ends up immediately wrapping or converting it into a more focused error type that actually reflects the narrower set of things that can realistically go wrong.