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

Autocompletion for vector<T> (known, bit non-instantiated class templates)

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 4.6.2, Qt Creator 4.7.0-beta1, Qt Creator 4.7.0-beta2, Qt Creator 12.0.0
    • C/C++/Obj-C++ Support
    • None
    • Ubuntu Linux 18.04 with gcc 7.3

    Description

      Consider the following functions:

      template <class T>
      auto func(std::vector<T>& v)
      {
          v. // No autocomplation. FIXED in v4.6
      }
      
      template <class CharT>
      auto func(std::basic_string<CharT>& s)
      {
          s. // No autocomplation FIXED in v4.6
      }
      
      template<class T>
      auto func2(std::vector<T>& v)
      {
          v. // OK auto-completion works since v4.6
          
          std::vector<T> x;
          x. // OK
          
          std::vector<T>(). // OK
          
          auto y = std::vector<T>();
          y. // OK, FIXED
          
          v.get_allocator(). // BAD, no auto-completion
          
          typename std::vector<T>::allocator_type al = v.get_allocator();
          al. // BAD, no auto-completion
                          
      }
      

      The type is not fully known, but we are certain that the type is vector or basic_string, thus autocompletion is possible.

       

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            dimztimz Dimitrij Mijoski
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes