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

Review our API for default arguments that are of non-trivial type and replace with overloading

    XMLWordPrintable

Details

    • Expensive default arguments
    • All
    • 14fe0bbea (dev), bc99032f9 (6.4), 1dc04109d (6.5), 8134b35f2 (tqtc/lts-5.15), 6af0a4c31 (tqtc/lts-6.2), 71d9ebfb1 (dev), dacc75de2 (6.6), 3adf81f09 (dev), a44a81ceb (6.6)

    Description

      Default arguments are a convenient way to avoid overloads, but if the defaulted argument isn't a Trivial Type, and a common use case is to not pass the extra argument explicitly, the construction of the temporary can dominate the call's runtime. It certainly causes useless code being emitted at the call site.

      Therefore, check all of our APIs for non-trivial default arguments and consider replacing them with overloads.

      Attachments

        For Gerrit Dashboard: QTBUG-98117
        # Subject Branch Project Status CR V

        Activity

          People

            cnn Qt Core & Network
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: