-
Notifications
You must be signed in to change notification settings - Fork 738
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
zstring family require empty template parameter list for use #992
Comments
I've reached out the C++ Core Guidelines editors for comment on whether or not we should redefine zstring to remove the empty angle brackets. |
Echoing this question from the Guidelines issue: Do we have data about whether the extra parameter is used in the field? |
I ran a quick search on Github for |
whoops, didn't mean to close. |
This issue has now been resolved in PR #998 |
Based on the cpp core guidelines I expect to be able to write code like this
int length(zstring p);
but with this gsl implementation the code must look like this (at least on my compiler)
int length(zstring<> p);
I infer from the unit tests that this problem is not specific to me or my compiler. See for example:
GSL/tests/string_span_tests.cpp
Line 988 in 8a4b9ed
Not sure if this is a problem with the core guidelines or the gsl implementation but based on #770 it seems like the type alias shouldn't be templated.
zstring<>
is only marginally worse thanzstring
but the time wasted figuring out why the example code wouldn't compile in practice is my primary concern.The text was updated successfully, but these errors were encountered: