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

Impact of C++20 concepts on our code

    XMLWordPrintable

Details

    • Epic
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • Core: Other
    • None
    • C++20 concepts @ Qt

    Description

      C++20 added "Concepts Lite", a reduced version of "Concepts TS", itself a reduced version of the concepts that were, for a while, in C++11, before being yanked out at the last moment.

      The impact of concepts on Qt has several axes:

      1. Qt types should model corresponding std concepts where it makes sense. This should be checked at compile-time in the type's respective unit-test, and it should be documented (ex: QMutex models std::basic_lockable).
      2. Qt function and class templates may want to constrain their template arguments (and document that) using either
        1. ad-hoc concepts: these concepts are completely self-defined without help from the std header <concepts>, which means they can be used in C++17, too (with std::enable_if). There's a danger here that each library will do the same thing and we get a world of NIH concepts, though.
        2. (directly or indirectly) std concepts
      3. ...

      Attachments

        Issue Links

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

          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:

                Gerrit Reviews

                  There are no open Gerrit changes