ResultCode: use default copy assignment

Our definition of the copy assignment is equivalent to the default one, but prevents the type being trivially copyable
This commit is contained in:
Weiyi Wang 2018-11-05 21:28:45 -05:00
parent d373a6430d
commit 28513c5177

View File

@ -216,10 +216,7 @@ union ResultCode {
: raw(description.FormatValue(description_) | module.FormatValue(module_) |
summary.FormatValue(summary_) | level.FormatValue(level_)) {}
constexpr ResultCode& operator=(const ResultCode& o) {
raw = o.raw;
return *this;
}
constexpr ResultCode& operator=(const ResultCode& o) = default;
constexpr bool IsSuccess() const {
return is_error.ExtractValue(raw) == 0;