Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Cheney-W
Copy link

@Cheney-W Cheney-W commented Dec 25, 2024

PR Description

I'm a member of the Microsoft vcpkg team, I am submitting this Pull Request to address the compilation warning triggered by the use of the std::runtime_error constructor on line 26 of libsrc/meta.cpp. This warning is issued by the MSVC compiler (C4834) due to the discarded return value of a function with the [[nodiscard]] attribute.

It's important to note that this warning does not exist in the released versions of Visual Studio but was introduced after the recent STL PR (microsoft/STL#5174)). This change causes the compiler to issue a warning when the return value is discarded.

Specific Change:

  • Added the throw keyword to the std::runtime_error call in meta.cpp.

This change resolves the warning and ensures compatibility with the latest STL implementation.

Thank you for reviewing this PR! If there are any other changes or improvements needed, please feel free to let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant