Skip to content

Commit

Permalink
Get rid of warnings in nullable.hpp (#3617)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinming-Hu authored May 4, 2022
1 parent e010b91 commit b9fb5ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdk/core/azure-core/inc/azure/core/nullable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ template <class T> class Nullable final {
* @param other Another `%Nullable` instance to copy.
*/
Nullable(const Nullable& other) noexcept(std::is_nothrow_copy_constructible<T>::value)
: m_hasValue(other.m_hasValue)
: m_disengaged{}, m_hasValue(other.m_hasValue)
{
if (m_hasValue)
{
Expand All @@ -73,7 +73,7 @@ template <class T> class Nullable final {
* @param other A `%Nullable` instance to move into the instance being constructed.
*/
Nullable(Nullable&& other) noexcept(std::is_nothrow_move_constructible<T>::value)
: m_hasValue(other.m_hasValue)
: m_disengaged{}, m_hasValue(other.m_hasValue)
{
if (m_hasValue)
{
Expand Down

0 comments on commit b9fb5ef

Please sign in to comment.