Skip to content
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

Support for VS2019 #343

Closed
wants to merge 1 commit into from
Closed

Support for VS2019 #343

wants to merge 1 commit into from

Conversation

isc30
Copy link
Contributor

@isc30 isc30 commented May 27, 2019

Hi, this PR fixes compilation on VS19.
There is also a problem with "Cannot delete pointer to incomplete type" that I'm not sure how to fix.

@mosra mosra added this to the 2019.0b milestone May 27, 2019
@mosra
Copy link
Owner

mosra commented May 27, 2019

Hi! I was planning to do this by reusing a subset of workarounds that are enabled by the MSVC2017_COMPATIBILITY CMake option in Corrade (so introducing a new MSVC2019_COMPATIBILITY option and changing corresponding #ifdefs) -- I guess majority of them is still relevant, but some might not be needed anymore. Plus the AppVeyor CI setup has to be updated to regularly test with VS19, otherwise things would get broken by accident again.

If you enable the above option on your side, does everything compile cleanly or is there extra work needed to be done?

@@ -488,7 +488,7 @@ template<class ...Types> ResourceManager<Types...>*& ResourceManagerInlineInstan
}

template<class T> void safeDelete(T* data) {
static_assert(sizeof(T) > 0, "Cannot delete pointer to incomplete type");
//static_assert(sizeof(T) > 0, "Cannot delete pointer to incomplete type");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: don't forget to fix this properly!

@isc30
Copy link
Contributor Author

isc30 commented May 27, 2019

Yup, if I set MSVC2017_COMPATIBILITY in CMake it builds without any problem.
It's your decision on how to fix it: adding a VS19 compatibility option that internally applies VS17 compatibility or fixing the code directly as I did. I could do both.
Thanks

@mosra
Copy link
Owner

mosra commented May 27, 2019

It's on my list for #340, so I'm going to look at it very soon one way or another. Can you live with the MSVC2017 option enabled for now?

Most of those are real workarounds for nonstandard compiler behavior and I'd rather keep them explicit to avoid them being reverted by accident. I still hope that at some point in the future there would be no need for such flags, but it's still not there yet unfortunately.

@mosra mosra mentioned this pull request May 27, 2019
60 tasks
@isc30
Copy link
Contributor Author

isc30 commented May 27, 2019

Sure thing, I can live with the VS17 workarounds. Thanks

@mosra
Copy link
Owner

mosra commented Jul 6, 2019

For the record, MSVC 2019 support is now done with mosra/corrade@161c9e0, ddb16f6, 9e2a111 and d542e2b 🎉

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

Successfully merging this pull request may close these issues.

2 participants