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

    • 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), 79ab9305c (dev), ab53b1293 (dev), 7e7f7daa2 (6.10), bbb284cd7 (6.10)

      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.

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

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

              Created:
              Updated: