Azure / azure-sdk-for-cpp

This repository is for active development of the Azure SDK for C++. For consumers of the SDK we recommend visiting our versioned developer docs at https://azure.github.io/azure-sdk-for-cpp.
MIT License
177 stars 127 forks source link

Investigate whether an MSVC warning is a false positive - C26800 - Use of a moved from object: 'accessToken' #5741

Open ahsonkhan opened 3 months ago

ahsonkhan commented 3 months ago

Try to create a simple repro of the warning and reach out to vcsig - the folks who own the C++ compiler to verify.

Before, which causes the warning in VS: https://github.com/Azure/azure-sdk-for-cpp/blob/9271d13542a9e227d246b4ca3939823038199b30/sdk/identity/azure-identity/src/token_credential_impl.cpp#L448-L456

After, to workaround the warning: https://github.com/Azure/azure-sdk-for-cpp/blob/7d463cd596313c0b5ab54ec7f8cc02db1e8b7821/sdk/identity/azure-identity/src/token_credential_impl.cpp#L449-L457

More context https://github.com/Azure/azure-sdk-for-cpp/pull/5733#discussion_r1648218489