-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add [[msvc::lifetimebound]] to minmax
#3831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add [[msvc::lifetimebound]] to minmax
#3831
Conversation
|
I really like this personally; however, I want to discuss it in the weekly meeting just to make sure we all agree 😄 |
|
We talked about this at the weekly maintainer meeting and are in favor of this approach. 😸 |
|
@StephanTLavavej @strega-nil-ms I pushed changes after you approved. |
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
|
I've had to push an additional commit to skip FYI @strega-nil-ms as you previously approved. |
|
Thanks for implementing these new diagnostics! ✅ |
Works towards #3754. Works towards #2094.
This PR adds
[[msvc::lifetimebound]]tostd::minmaxandstd::ranges::minmax, which are more error-prone thanstd::min/std::maxbut not as widely used.#define _SILENCE_LIFETIMEBOUND_WARNINGto suppress the warning.