charles-lunarg / vk-bootstrap

Vulkan Bootstrapping Iibrary
MIT License
821 stars 82 forks source link

VS2022 build issue, missing return #218

Closed CwTCwT closed 1 year ago

CwTCwT commented 1 year ago

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

charles-lunarg commented 1 year ago

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.

CwTCwT commented 1 year ago

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

charles-lunarg commented 1 year ago

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!