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

Autocomplete fails for most C++11 smart pointer member access operators

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • None
    • Qt Creator 3.6.1
    • C/C++/Obj-C++ Support
    • None
    • Windows 7

    Description

      Tested unique_ptr, shared_ptr, and weak_ptr and autocomplete only works for 1 out of 6 member access operators.
      (*ptr). is included for completeness although it is probably much less common than the overloaded -> operator

      std::unique_ptr<Foo> uptr(new Foo());
      qDebug() << uptr->bar(); // Autocomplete fails
      qDebug() << (*uptr).bar(); // Autocomplete fails

      std::shared_ptr<Foo> sptr(new Foo());
      qDebug() << sptr->bar(); // Autocomplete works
      qDebug() << (*sptr).bar(); // Autocomplete fails

      std::weak_ptr<Foo> wptr(new Foo());
      qDebug() << wptr->bar(); // Autocomplete fails
      qDebug() << (*wptr).bar(); // Autocomplete fails

      Attachments

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

        Activity

          People

            kosjar Nikolai Kosjar
            42 Robert Deaver
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes