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

    • a8c858acdd264bed457b09d2b7030280b3fde7d2

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes