Merge branch 'master' into error-message

This commit is contained in:
ToruNiina
2018-12-22 17:55:59 +09:00
2 changed files with 12 additions and 7 deletions

View File

@@ -406,10 +406,10 @@ struct result
if(is_err()) {return opt;}
return this->succ.value;
}
value_type&& unwrap_or(value_type opt) &&
value_type unwrap_or(value_type opt) &&
{
if(is_err()) {return std::move(opt);}
return std::move(this->succ.value);
if(is_err()) {return opt;}
return this->succ.value;
}
error_type& unwrap_err() &