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

[spike] Create a policy for [[nodiscard]] on ctors

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • P2: Important
    • 6.6
    • None
    • Core: Other
    • None
    • 5
    • ca86afb97 (master)
    • Foundation Sprint 84, Foundation Sprint 85

    Description

      QTBUG-104161 will give us the go to apply [[nodiscard]] (or a wrapper macro) to constructors. This ticket is about finding out on which kinds of ctors we'd want this attribute, and getting buy-in for that from the community (dev ML?).

      Seeing the proliferation of [[nodiscard]] on almost all non-void-return functions, I wouldn't be surprised if the outcome is "all ctors" (at least the non-SMF¹ ones).

      ¹ SMF == Special Member Function

      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