From ed31a4d1b133591cbb38631287225ece46b4fc1b Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Mon, 30 Oct 2023 09:15:13 -0600 Subject: [PATCH] Fix missing return *this in Result class --- src/VkBootstrap.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/VkBootstrap.h b/src/VkBootstrap.h index 91a17a3..5ecf778 100644 --- a/src/VkBootstrap.h +++ b/src/VkBootstrap.h @@ -80,6 +80,7 @@ template class Result { new (&m_value) T{ result.m_value }; else m_error = result.m_error; + return *this; } Result(Result&& expected) noexcept : m_init(expected.m_init) { if (m_init) @@ -94,6 +95,7 @@ template class Result { new (&m_value) T{ std::move(result.m_value) }; else m_error = std::move(result.m_error); + return *this; } Result& operator=(const T& expect) noexcept { destroy();