-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Repeat export specifiers on definitions, so that they stay if the declarations are gone #3927
Conversation
I understand what you're doing here, but can you please provide a PR description so that others can understand (both now, and people in the future doing PR archaeology)? For a PR fixing typos in comments, a title of "Fix typos" with no description would indeed be sufficient, but this PR is doing something much less obvious. |
Updated. |
Handling this variation is exactly what `_MRTIMP2_PURE` and `__CLRCALL_PURE_OR_CDECL` do.
I'm speculatively mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
I've pushed a merge with |
Thanks for fixing more of these inconsistencies and defending against future mistakes! 🛠️ 🛡️ 😸 |
We should have export specifiers on both function declaration and definition.
This is because after some future changes the declaration may be gone - either entirely, or header be no longer included.
By repeating export specifiers we make sure the function type and its impact on export surface stays the same.
See #3912 (comment)
Additionally, this simplifies the declarations in
stl/src/xmtx.hpp
to match the definitions (the declarations are functionally unchanged).