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

Wrong specification of basic_string_view::starts_with(basic_string_view) #2087

Closed
lhmouse opened this issue May 26, 2018 · 3 comments
Closed
Labels
lwg Issue must be reviewed by LWG.

Comments

@lhmouse
Copy link

lhmouse commented May 26, 2018

Equivalent to: \tcode{return compare(0, npos, x) == 0;}

The current specification, which is equivalent to

return compare(x) == 0;

, compares the entire basic_string_view with x.

As its name suggests, the expected implementation is

return compare(0, x.size(), x) == 0;
@zygoloid zygoloid added the lwg Issue must be reviewed by LWG. label May 26, 2018
@zygoloid
Copy link
Member

I agree, but this is not editorial. Can you email lwgchair@gmail.com and ask to have an issue opened?

@cpplearner
Copy link
Contributor

This is a duplicate of #1870 and LWG 3040

@jensmaurer
Copy link
Member

(The current proposed resolution for LWG 3040 seems technically incorrect; I've sent an e-mail to the -lib reflector.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lwg Issue must be reviewed by LWG.
Projects
None yet
Development

No branches or pull requests

4 participants