Skip to content

Conversation

@mikomikotaishi
Copy link

This PR is another part of #1051, which marks important library information constants such as TIXML2_MAJOR_VERSION, TINYXML2_MAX_ELEMENT_DEPTH, etc. as constexpr if in C++11 or later, otherwise just static const as before.

This is a necessary first step as part of the modules proposal, as modules cannot directly export macros (as preprocessor macros are evaluated at preprocessing time, and modules can only export symbols). Furthermore, for a constant to be exportable, it must have external linkage (which is made possible with inline constexpr). For that reason it is a separate PR from the actual modules feature PR.

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.

1 participant