79492381

Date: 2025-03-07 13:03:09
Score: 1
Natty:
Report link

You could revise your second code snippet to make it much more concise.

std::expected<std::string, ErrorType> optional_to_expected(std::optional<int> opt) {
    if (opt) {
        return std::to_string(*opt);
    }
    return std::unexpected(ErrorType());
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: xvld