Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-20901

Allow code style rules for lambdas

    XMLWordPrintable

Details

    Description

      When opening curly braces for lambdas, they are indented all the way back to the indentation line of the current scope, like so:

       

          std::transform(container.begin(), container.end(),
                         std::back_inserter(targetContainer),
                         [](const QString& string)
          {
              return string.front();
          };

      However, the lambda body is still part of the std::transform call, so users may prefer to indent like so (or similar):

          std::transform(container.begin(), container.end(),
                         std::back_inserter(targetContainer),
                         [](const QString& string)
                          {
                              return string.front();
                          };
      

       

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            asperamanca Robert Schimkowitsch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes