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

Shorthand-if inside an initializer list is being misinterpreted when using uniform initialization syntax

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • Qt Creator 10.0.0-beta1
    • Qt Creator 3.5.0
    • C/C++/Obj-C++ Support
    • None
    • Xubuntu Linux 15.10, Qt Creator 3.5 with Qt 5.4.2

    Description

      The code Editor does improper auto-indentation after encountering the following code:

      class A
      {
          int m;
          A(int n = 0)
              : m{n ? n : 5} // m(n ? n : 5) works fine!
          { }
      };
      

      Attachments

        Issue Links

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

          Activity

            People

              kandeler Christian Kandeler
              adrian5 Adrian Parker
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes