Skip to content
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

Should gsl::span::index_type be harmonized with std::span::index_type #1511

Open
JordanMaples opened this issue Sep 4, 2019 · 2 comments
Open
Assignees

Comments

@JordanMaples
Copy link

gsl::span is std::ptrdiff_t whereas the std::span is std::size_t. Should we update the guidelines to have these definitions converge?

@hsutter
Copy link
Contributor

hsutter commented Sep 5, 2019

Editors' call: Normally when a GSL type is standardized we drop the GSL type. In this case, we're not withdrawing GSL span because some users rely on checking, which std::span doesn't do. But we should make gsl::span as close as possible to std::span, including adding CTAD and considering changing signed to unsigned for index_type.

See also #1497 and #1504.

@hsutter
Copy link
Contributor

hsutter commented Sep 5, 2019

Editors' call: We feel it's time to switch to unsigned. We still feel that using signed is the better solution, but the standards committee has decided on unsigned, and we feel we should not diverge from the standard on this point. (In contrast, we do feel we must diverge for guaranteed checking.)

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

No branches or pull requests

2 participants