Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-119100

Provide std::is_(lt,gt,n,)eq for Q*Ordering types

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • P2: Important
    • 6.7.0 FF
    • None
    • Core: Other
    • None

    Description

      The std::is_eq family of functions (https://en.cppreference.com/w/cpp/utility/compare/named_comparison_functions) can be considered part of the API of the std::_ordering types. As such, our own ordering types should support these free functions, too, and not just when compiling in C++20 mode.

      In order to avoid ambiguities with the std:: functions, these operators should be implemented as hidden friends in each of the three Q*Ordering classes, not as one free function taking QPartialOrdering. That means they will not be candidates when the user writes std::is_eq, and don't cause ambiguities when the user uses unqualified name lookup on std::_ordering types.

      Acceptance criteria:

      • Each of the three Q*Ordering classes has the full set of six is_ functions as hidden friends
      • These functions are documented and tested.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              mmutz Marc Mutz
              mmutz Marc Mutz
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes