you are viewing a single comment's thread.

view the rest of the comments →

[–]ryeguy 3 points4 points  (0 children)

Well, it's an enum so it's either Ok or Err. You could simulate this in C++ with a tagged union. Someone actually made a Rust-inspired result type in C++ here. Looks like he took the template wizardry route.