Skip to content

Fix issues on compatibility with Windows headers and std::numeric_limits min/max, add namespace, and prefix preprocessor macros#59

Open
GiovanniDicanio wants to merge 1 commit intodcleblanc:masterfrom
GiovanniDicanio:patch-fix-issues-51-56-57
Open

Fix issues on compatibility with Windows headers and std::numeric_limits min/max, add namespace, and prefix preprocessor macros#59
GiovanniDicanio wants to merge 1 commit intodcleblanc:masterfrom
GiovanniDicanio:patch-fix-issues-51-56-57

Conversation

@GiovanniDicanio
Copy link

Fix issues #51 #56 #57 #58

Fix compatibility with Windows Platform SDK headers with proper parentheses around (std::numeric_limits<T>::min)() and (std::numeric_limits<T>::max)(). Moreover, encloses the header code in a namespace (safeint) to avoid polluting the global namespace. And prefixes preprocessor macros defined in the header with a proper SAFEINT_ prefix, again to avoid naming collisions.

…in/max, add namespace, and prefix preprocessor macros

Fix compatibility with Windows Platform SDK headers with proper parentheses around `(std::numeric_limits<T>::min)()` and `(std::numeric_limits<T>::max)()`. Moreover, encloses the header code in a namespace (`safeint`) to avoid polluting the global namespace. And prefixes preprocessor macros defined in the header with a proper `SAFEINT_` prefix, again to avoid naming collisions.
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

Comments