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

Follow Symbol Under Cursor does not work for unique_ptr

XMLWordPrintable

    • 07f8c474be629de75780d235df62a50ae6f27870

      If an objects defines operator->() (like all smart pointer do), and it is used to dereference inner object, Follow Symbol Under Cursor (F2) does not point to right point.

      For example try to press F2 on "run" part of a->run(); in the code below:

      #include <iostream>
      #include <memory>

      class A {
      public:
      void run()

      { std::cout << "run\n"; }

      };

      int main()
      {
      std::unique_ptr<A> a(new A);
      a->run();
      }

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

            orgads Orgad Shaneh
            mpusz Mateusz Pusz
            Votes:
            15 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes