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

Template instantiation doesn't work for nested classes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Not Evaluated Not Evaluated
    • Qt Creator 2.7.0
    • Qt Creator 2.5.0, Qt Creator 2.6.0
    • C/C++/Obj-C++ Support
    • None
    • 23844410fdc100342860e400a62e86c408ac4605

      struct Foo { int bar; };
      
      template<typename T>
      struct Outer
      {
          T *t;
          struct Nested { T *nt; } nested;
      };
      
      int main(int argc, char *argv[])
      {
          Outer<Foo> list;
          list.t-> // works
          list.nested.nt-> // doesn't work
          Outer<Foo>::Nested nested;
          nested.nt-> // doesn't work
          return 0;
      }

      This makes iterators hard to use...

      IIRC it used to work, can't remember on which version.

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

            kosjar Nikolai Kosjar
            orgads Orgad Shaneh
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes