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

Impact of C++20 integer comparison functions on our code

XMLWordPrintable

    • Icon: Epic Epic
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • None
    • None
    • Core: Other
    • None
    • C++20 int compare @ Qt

      C++20 added integer comparison functions to the <utility> header (https://en.cppreference.com/w/cpp/utility#Integer_comparison_functions). While these don't have impact on our APIs, we may want to reimplement them under the q20 mechanism and start using them instead of the traditional ==/!=/</>/<=/>= for mixed-integer types, because developers all too often get these wrong.

      We might need to do something for qfloat16 and the q_le types.

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

            tatiana.borisova Tatiana Borisova
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes