Example of how they could be implemented:
if (auto const validate_result = validatefunc(param); !validate_result.success()) {
throw std::Invalid(fmt::format("bla {}", validate_result.what()));
}
if (auto const validate_result = validatefunc2(param); !validate_result.success()) {
throw std::Invalid(fmt::format("bla {}", validate_result.what()));
}
if (auto const validate_result = validatefunc3(param); !validate_result.success()) {
throw std::Invalid(fmt::format("bla {}", validate_result.what()));
}
if (auto const validate_result = validatefunc4(param); !validate_result.success()) {
throw std::Invalid(fmt::format("bla {}", validate_result.what()));
}