Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Small annoyance (I haven't read the entire thing, but I have strong feelings about this): gsl::index is disgustingly verbose. If you use stl, just use size_t. If you're using something else, follow the conventions they use (be it size_t, int, or whatever). Their examples [1] conveniently omit size_t to push their alternative.

[1] https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...



I think you're missing the point that gsl::index, unlike size_t, is signed.


Ssize_t then. Or ptrdiff_t.


`ssize_t` isn't standard C++ (it is required by POSIX); `ptrdiff_t` is only one character fewer than `gsl::index`.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: