Skip to content

Conversation

@beinhaerter
Copy link
Contributor

When setting GSL_USE_STD_BYTE to zero, then the unit test does not compile because byte is ambiguous (could be std::byte or gsl::byte). So gsl:: prefix is needed for byte.
It looks like the unit tests never ran on a platform where gsl::byte is not based on std::byte.
It does not make much sense to test std::byte for compliance, so make the unit tests based on the GSL implementation of gsl::byte (#define GSL_USE_STD_BYTE 0).

When setting `GSL_USE_STD_BYTE` to zero, then the unit test does not compile because `byte` is ambiguous (could be `std::byte` or `gsl::byte`). So `gsl::` prefix is needed for `byte`.
It looks like the unit tests never ran on a platform where `gsl::byte` is not based on `std::byte`.
It does not make much sense to test `std::byte` for compliance, so make the unit tests based on the GSL implementation of `gsl::byte` (`#define GSL_USE_STD_BYTE 0`).
@carsonRadtke carsonRadtke added Type: Bug Indicates a bug or error Status: Review Needed Needs review from GSL maintainers labels Dec 18, 2024
@carsonRadtke carsonRadtke self-requested a review December 18, 2024 16:06
@carsonRadtke
Copy link
Member

Good find! Thanks for the fix :)

@carsonRadtke carsonRadtke merged commit b8ac820 into microsoft:main Dec 18, 2024
83 checks passed
@beinhaerter
Copy link
Contributor Author

Wow, that was a quick merge. It landed before I completed my other pull request. Thanks!

@beinhaerter beinhaerter deleted the byte_tests branch December 18, 2024 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Review Needed Needs review from GSL maintainers Type: Bug Indicates a bug or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants