VS2022 build issue, missing return
CwTCwT opened this issue · comments
move operator doesnt contain return, added it (return *this) locally, worked.
(only needed when warnings are treated as errors, at least on my side)
Result& operator=(Result&& result) noexcept {
m_init = result.m_init;
if (m_init)
new (&m_value) T{ std::move(result.m_value) };
else
m_error = std::move(result.m_error);
**return *this;**
}
BTW: hope its ok to inform you using this way :D
Whoops!
Certainly looks silly on my part to forget that. Course, its been almost 3 years since that Result type was written, surprised nobody else has reported that issue earlier.
Whoops! Certainly looks silly on my part to forget that. Course, its been almost 3 years since that Result type was written, surprised nobody else has reported that issue earlier.
possibly only me compiles with warnings as errors :D
very fast fixed, thx
Well, I do dev with warnings as errors and I didn't get this (using 2022 as well). Buuut thats definitely a mistake, so its easy enough to fix.
Thank you for reporting!