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

QAnyStringView comparison operators should be hidden friends

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 6.0
    • Fix Version/s: 6.0.0
    • Labels:
      None
    • Commits:
      bd225ef95e948f375d54af517097039d2c59a5fa (qt/qtbase/dev)
    • Story Points:
      5
    • Sprint:
      Qt6_Foundation_Sprint 18, Qt6_Foundation_Sprint 19

      Description

      Like with QTBUG-85880 in QByteArrayView the == operator in QAnyStringView are globally visible and the constructors are quite greedy. If you use a hidden friend one of the arguments must be of the type of parameter. This is avoiding catching unwanted conversions or any ambiguity.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              heimrich Karsten Heimrich
              Reporter:
              bubke Marco Bubke
              PM Owner:
              Maurice Kalinowski Maurice Kalinowski
              RnD Owner:
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes