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

substr() throws if pos == size #3

Open
AdmiralCurtiss opened this issue Jul 4, 2019 · 1 comment
Open

substr() throws if pos == size #3

AdmiralCurtiss opened this issue Jul 4, 2019 · 1 comment

Comments

@AdmiralCurtiss
Copy link

For example:

    string_view x("abc");
    string_view y = x.substr(3);
    ASSERT_TRUE(y == "");

I would expect an empty string to be returned.
Compare https://en.cppreference.com/w/cpp/string/basic_string_view/substr

Note: See also bitwizeshift/string_view-standalone#3, same issue there.

satoren added a commit that referenced this issue Jul 7, 2019
@satoren
Copy link
Owner

satoren commented Jul 7, 2019

Thank you for report.

satoren added a commit that referenced this issue Jul 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants