Skip to content

Conversation

shaneasd
Copy link
Contributor

@shaneasd shaneasd commented Mar 16, 2020

As written, that rule would permit the code

[[nodiscard]] getX() { return INT_MAX; }
float x = (float)getX();

which I don't believe is the intention. I've clarified the wording. Prompted by discussion in #1580

@beinhaerter
Copy link
Contributor

getX <-> getMyInt? You probably meant to write the same function name in both lines!?

@hsutter
Copy link
Contributor

hsutter commented Mar 26, 2020

Editors call: Looks good, thanks for the catch!

@hsutter hsutter merged commit 040b141 into isocpp:master Mar 26, 2020
@hsutter hsutter self-assigned this Mar 26, 2020
hsutter added a commit that referenced this pull request Mar 26, 2020
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

Successfully merging this pull request may close these issues.

3 participants