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

Auto-indent fails after double template closing (>>) in a function's return type

    XMLWordPrintable

Details

    • a8c858acdd264bed457b09d2b7030280b3fde7d2

    Description

      Since somewhat recently, using the C++11 way of closing template argument lists without spacing no longer gets underlined as a syntax error.
      However the auto-indent feature still seems to recognize the double right-angle bracket (>>) as the operator when used in the return type of a function implementation.

      foo<foo<bar>> foo1; //Declaring a variable
      //OK
      void baz(foo<foo<bar>> foo2){
        //OK
      }
      foo<foo<bar>> baz(){ //Implementing a function
                    //Not OK
        //Expected position
                    }//Not OK either
                    //Even less OK
      

      The shift in the indentation continues until it a semicolon is encountered outside a function.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTCREATORBUG-9199
          # Subject Branch Project Status CR V

          Activity

            People

              erikv Erik Verbruggen
              khaur Khaur
              Votes:
              6 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes