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

Code Completion can not support std::unique_ptr

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: Qt Creator 2.7.0-rc, Qt Creator 2.8.0-beta, Qt Creator 3.0.0, Qt Creator 3.0.1, Qt Creator 3.1.0-beta
    • Fix Version/s: None
    • Component/s: C/C++/Obj-C++ Support
    • Labels:
      None
    • Environment:
      Mac OS Mountain Lion 10.8
    • Commits:
      07f8c474be629de75780d235df62a50ae6f27870

      Description

      Please see QTCREATORBUG-629.

      Basically, auto-complete does not work with unique_ptr. This issue was fixed in 629 for shared_ptr but it still does not work with unique_ptr.

      Here is the example from 629 with unique_ptr in place of shared_ptr:

      #include <iostream>
      #include <memory>
      struct Test
      {
      void test(){}
      int i;
      };
      int main()

      { std::unique_ptr<Test>p(new Test); p-> // HERE, showing nothing <--------- The problem p. // HERE, DOES WORK and seems OKAY. return 0; }

        Attachments

        1. clangmodel broken highlighting 1.png
          97 kB
          Aaron Barany
        2. clangmodel broken highlighting 2.png
          26 kB
          Aaron Barany
        3. clangmodel broken highlighting 3.png
          18 kB
          Aaron Barany
        4. correct highlighting 1.png
          123 kB
          Aaron Barany
        5. correct highlighting 2.png
          28 kB
          Aaron Barany
        6. correct highlighting 3.png
          23 kB
          Aaron Barany

          Issue Links

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

            Activity

              People

              • Assignee:
                kosjar Nikolai Kosjar
                Reporter:
                totoro Andy Brohard
              • Votes:
                87 Vote for this issue
                Watchers:
                73 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes