-
Notifications
You must be signed in to change notification settings - Fork 184
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
std::auto_ptr<...> needs to have dll-interface
warning on Visual Studio 2022 (MSBuild 17)
#32
Comments
Sorry about this!
|
Ok, I've just removed std::auto_ptr. A bit of a side quest, but that was bothering me more. However that does not scrub this warning from the codebase, and since the fix involves one instance of std::unique_ptr, there is now a new instance of the warning for that. There are 2 ways to fix the warning.
To change this in code, we would need to add the I don't think the extra memory management work (specifically, manually deleting the implementation details on destruction) would be worth eliminating this warning, I think option 1 is the best path forward. I have a follow up PR that does this here: #34 To be honest though, I'm not thrilled with littering the headers with so many pragmas. I'll re-consider the CMake option later. What do you think? |
FWIW, pimpl can be done with |
I'm not sure if this is related to #18.
We see the warning
std::auto_ptr<...> needs to have dll-interface
when building with VS2022 (MSBuild 17.x).This appears to be ignored in one of the official analyzers: https://github.com/saleae/modbus-analyzer/blob/0b2845dc1d2bb1322aae695a32b94d42d9bb2012/src/ModbusAnalyzer.h#L28-L30
Is the warning relevant? If not, is it appropriate to suppress the warning in the header as it was done there?
The text was updated successfully, but these errors were encountered: