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

operator* for nested template class has no highlighting

XMLWordPrintable

    • 7c74482ad361ee81f87c8ed039b789807934f0e7

      struct Foo { int foo; };
      
      template<class T>
      struct Outer
      {
        struct Nested
        {
          const T &operator*() { return t; }
          T t;
        };
      };
      
      void bug()
      {
        Outer<Foo>::Nested nested;
        (*nested).foo; // Not highlighted, can't run find usages
      }

      Placing the caret on this line highlights both appearances of foo (the declaration and the usage) but doesn't allow Find Usages.

      Running Find Usages on the declaration does find this usage.

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

            orgads Orgad Shaneh
            orgads Orgad Shaneh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes