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

writting <> with every string_view type is non productive and also di… #93

Closed
wants to merge 1 commit into from

Conversation

kevgs
Copy link

@kevgs kevgs commented Sep 29, 2015

…ffers from what C++ Core Guidelines proposes

…ffers from what C++ Core Guidelines proposes
@kevgs kevgs closed this Sep 29, 2015
@kevgs kevgs reopened this Sep 29, 2015
@kevgs
Copy link
Author

kevgs commented Sep 29, 2015

Looks like clang++-3.6 isn't working on travis server for some reason.

@tamaskenez
Copy link
Contributor

@neilmacintosh neilmacintosh self-assigned this Sep 29, 2015
@neilmacintosh
Copy link
Collaborator

For now, the <> implements the design correctly and is just a requirement of the language. It may be annoying but it does allow us to write string_view<10> (for example) when we want to specify a fixed-size string_view,

@tamaskenez
Copy link
Contributor

What about separate string_view and string_view_n? I think dynamic-range views are far more common.

template<size_t Extent>
using string_view_n = basic_string_view<char, Extent>;

and

using string_view = basic_string_view<char>;

@neilmacintosh
Copy link
Collaborator

Sure, they are. We've certainly considered that option (with a couple of different name variants). I'll see what people think on the committee as we propose this type for standardization and if we end up with that type of naming scheme, then it will be reflected here.

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

Successfully merging this pull request may close these issues.

3 participants