Skip to content

Regarding this proposal and the suggestion in P3862 #28

@YexuanXiao

Description

@YexuanXiao

P3862 points out that basic_string::subview should consider returning cstring_view instead of string_view. I think that concern is reasonable, but I would like to propose my own solution. I believe basic_string should provide two member functions: one returning string_view and another returning z/cstring_view. Under this premise, the proposal should use the name zstring_view rather than cstring_view. The reason is that names like csubview or subcview could be confused with the c in cbegin. In contrast, zsubview or subzview avoids this issue because z is one of the least common letters, so it is unlikely to block future extensions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions