Uh oh!
There was an error while loading. Please reload this page.
fix compilation for Visual Studio 2022 - #1492
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #1492 +/- ##
=======================================
Coverage 64.71% 64.71% =======================================
Files 3 3 Lines 1981 1981 Branches 687 687 =======================================
Hits 1282 1282 Misses 138 138 Partials 561 561 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mhdawson
commented
May 6, 2024
@vmoroz thanks for the investigation and the PR. One question about the I'd have to look closer but adding noexcept I think means it would be breaking to remove those. I understand that if we did make them throw exceptions we'd have to change some other methods to catch those, but the way adding them now would change that to a breaking versus non-breaking change so we should make sure we believe that for those with the additions we believe it would never make sense for them to through an exception. Otherwise we should possibly add a try catch around the calls versus adding the noexcept. |
vmoroz
commented
May 6, 2024
@mhdawson , it were the recommendations from Visual Studio. The move constructors and assignment operators are typically must be noexcept. In other cases VS saw that methods never through and suggested to make them noexcept. |
mhdawson
commented
May 6, 2024
@vmoroz I'd say lets keep this PR to just what is needed to fix the compile failures, and then we can look more closely at the good to haves :) |
vmoroz
commented
May 6, 2024
@mhdawson , I have removed all newly added |
mhdawson
commented
May 7, 2024
@vmoroz many thanks. I'm going to go ahead an land this so that we can get the cross platform CI testing green again. |
Fix PR fixes compilation errors and warnings while compiling code in VS 2022.
std::allocatorAPIs. Their use is is replaced with APIs that is still valid.ObjectWrap<T>::WrappedMethod. It was saying that&operation requires an l-value. The issue is fixed by copyingmethodpointer to a local variable before invocation.{}.noexcept. They are augmented withNAPI_NOEXCEPT.BEGIN_COMMIT_OVERRIDE
fix: fix compilation for Visual Studio 2022 (#1492)
END_COMMIT_OVERRIDE