From b9fb5efb6ace3a755ec26c377188fa10344d1af8 Mon Sep 17 00:00:00 2001 From: JinmingHu Date: Thu, 5 May 2022 07:10:34 +0800 Subject: [PATCH] Get rid of warnings in nullable.hpp (#3617) --- sdk/core/azure-core/inc/azure/core/nullable.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/core/azure-core/inc/azure/core/nullable.hpp b/sdk/core/azure-core/inc/azure/core/nullable.hpp index 1233d21671..97e97f89a7 100644 --- a/sdk/core/azure-core/inc/azure/core/nullable.hpp +++ b/sdk/core/azure-core/inc/azure/core/nullable.hpp @@ -59,7 +59,7 @@ template class Nullable final { * @param other Another `%Nullable` instance to copy. */ Nullable(const Nullable& other) noexcept(std::is_nothrow_copy_constructible::value) - : m_hasValue(other.m_hasValue) + : m_disengaged{}, m_hasValue(other.m_hasValue) { if (m_hasValue) { @@ -73,7 +73,7 @@ template class Nullable final { * @param other A `%Nullable` instance to move into the instance being constructed. */ Nullable(Nullable&& other) noexcept(std::is_nothrow_move_constructible::value) - : m_hasValue(other.m_hasValue) + : m_disengaged{}, m_hasValue(other.m_hasValue) { if (m_hasValue) {