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

[utility.intcmp] Remove Mandates implied by Equivalent to #5008

Closed
wants to merge 1 commit into from

Conversation

JohelEGP
Copy link
Contributor

@JohelEGP JohelEGP commented Oct 6, 2021

Resolves #5007.

@timsong-cpp
Copy link
Contributor

timsong-cpp commented Oct 7, 2021

This was discussed in Prague during LWG's review of the paper. LWG wasn't satisfied that numeric_limits<R>::min() and ::max() are guaranteed to be of type R for arbitrary types, given that it is entirely unclear what the requirements on user specializations are. It follows that the Mandates: isn't redundant.

@JohelEGP
Copy link
Contributor Author

JohelEGP commented Oct 7, 2021

Doesn't https://eel.is/c++draft/library#contents-3 prevent ADL? Or is it to allow some two-step dance as with std::swap?

@timsong-cpp
Copy link
Contributor

The point is that we want to ban in_range<Meow>(42) even if numeric_limits<Meow>::min() is an int.

@JohelEGP
Copy link
Contributor Author

JohelEGP commented Oct 7, 2021

Makes sense. Thank you.

@JohelEGP JohelEGP closed this Oct 7, 2021
@JohelEGP JohelEGP deleted the utility.intcmp branch October 7, 2021 01:22
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.

[utility.intcmp].9 is redundant
2 participants