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

US201 18.05.4 totally_ordered_with both directly and indirectly requires common_reference_with LWG 3329 #199

Closed
wg21bot opened this issue Oct 23, 2019 · 3 comments · Fixed by cplusplus/draft#3748
Labels
Milestone

Comments

@wg21bot
Copy link
Collaborator

wg21bot commented Oct 23, 2019

The totally_ordered_with<T, U> redundantly requires both common_reference_with<const remove_reference_t&, const remove_reference_t&> and equality_comparable_with<T, U> (which also has the common_reference_with requirement). The redundant requirement should be removed.

Proposed change:
Change the definition of totally_ordered_with to:

template<class T, class U>
  concept totally_ordered_with =
    totally_ordered<T> && totally_ordered<U> &&
    equality_comparable_with<T, U> &&
    totally_ordered<
      common_reference_t<
        const remove_reference_t<T>&,
        const remove_reference_t<U>&>> &&
    requires(const remove_reference_t<T>& t,
                    const remove_reference_t<U>& u) {
      [...as before...]
@tituswinters
Copy link

LEWG in Belfast: Forward to LWG for C++20, the proposed change/wording appears correct.

@tituswinters tituswinters added LWG Library and removed LEWG Library Evolution labels Nov 6, 2019
@Dani-Hub
Copy link
Member

Dani-Hub commented Nov 7, 2019

The associated issue is LWG 3329

@jensmaurer jensmaurer changed the title US201 18.05.4 totally_ordered_with both directly and indirectly requires common_reference_with US201 18.05.4 totally_ordered_with both directly and indirectly requires common_reference_with LWG 3329 Nov 7, 2019
@mclow
Copy link

mclow commented Nov 8, 2019

LWG Accepted Friday AM in Belfast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants