Avoid reserved identifier collisions with newlib #281
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Newlib defines a macro _U in ctype.h (https://github.com/bminor/newlib/blob/048031501043e61ca31713b92ce2190213c7fb21/newlib/libc/include/ctype.h#L60-L67), resulting in a collision with the existing template names for __compressed_pair. Use _T1 and _T2 instead of _T and _U to avoid this collision. _T1 and _T2 are already used elsewhere, for example in type_list.hpp (
mdspan/include/experimental/__p0009_bits/type_list.hpp
Line 76 in 9d0a451
Fixes #187.
Readme example compiler explorer demonstrating the original issue:
https://godbolt.org/z/s6qzafWP4
And a successful build made with this patch:
https://godbolt.org/z/zbMf4hddj