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

span index is an int instead of unsigned int #339

Closed
rianquinn opened this issue Aug 23, 2016 · 1 comment
Closed

span index is an int instead of unsigned int #339

rianquinn opened this issue Aug 23, 2016 · 1 comment
Assignees

Comments

@rianquinn
Copy link
Contributor

Is there a reason why span takes an int instead of unsigned int? It's really annoying when you have to convert index's to unsigned int every time you want to index into a span (assuming your using -Wsign-conversion -Wconversion).

What's even more annoying is how it's not consistent with std::vector and friends which take unsigned ints, so your constantly having to static_cast / verify sizes via numeric_limit<>.

@neilmacintosh
Copy link
Collaborator

This issue has been raised and answered before in #322, #238 and #171, so I'll close it as a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants