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

Work around noexcept-in-type-system VS2017 bug #316

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

dunhor
Copy link
Member

@dunhor dunhor commented Apr 5, 2023

Fixes #302

TL;DR - as I recall from vague understanding in the past - is that MSVC's "noexcept in the type system" update for C++17 "infected" pre-C++17 compilations, specifically for decltype. From what I recall when this initially started to impact us, decltype includes noexcept in the type, but that makes it impossible to assign/bind anything to such a function pointer since the noexcept gets dropped (as it should pre-C++17). VS2017 seems to be even more broken than this as allegedly even building with C++17 as the standard produces an error.

This change explicitly declares the function pointer type so that the issue will not be observed with the buggy version of the compiler. Ideally, we could just drop the type and use auto, but that's also a C++17 feature :/

@dunhor dunhor requested review from ChrisGuzak and jonwis April 5, 2023 21:28
Copy link
Member

@jonwis jonwis left a comment

Choose a reason for hiding this comment

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

sad-panda.wav.tiff.mp4

@jonwis jonwis merged commit 70155eb into master Apr 6, 2023
@dunhor dunhor deleted the dunhor/vs2017noexcept branch April 6, 2023 18:55
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.

VS2017 noexcept-in-typesystem bug is hitting with the definition of 'unique_private_namespace'
3 participants