mirror of
https://github.com/charles-lunarg/vk-bootstrap.git
synced 2024-11-22 15:24:34 +00:00
Fix: dangling reference in the range-based for loop
This commit is contained in:
parent
2321c238d4
commit
df5d11fc25
@ -130,7 +130,7 @@ template <typename T> class Result {
|
|||||||
const T& value () const& noexcept { assert (m_init); return m_value; }
|
const T& value () const& noexcept { assert (m_init); return m_value; }
|
||||||
T& value () & noexcept { assert (m_init); return m_value; }
|
T& value () & noexcept { assert (m_init); return m_value; }
|
||||||
const T&& value () const&& noexcept { assert (m_init); return std::move (m_value); }
|
const T&& value () const&& noexcept { assert (m_init); return std::move (m_value); }
|
||||||
T&& value () && noexcept { assert (m_init); return std::move (m_value); }
|
T value () && noexcept { assert (m_init); return std::move (m_value); }
|
||||||
|
|
||||||
// std::error_code associated with the error
|
// std::error_code associated with the error
|
||||||
std::error_code error() const { assert (!m_init); return m_error.type; }
|
std::error_code error() const { assert (!m_init); return m_error.type; }
|
||||||
|
Loading…
Reference in New Issue
Block a user