[Qt-creator] qtcreator and c++11 (<memory>): no auto-completion?

Wilhelm wilhelm.meier at fh-kl.de
Thu Mar 28 09:29:32 CET 2013


Hi all,

in the following simple example using c++11-features I heavily miss the
autocompletion: the templates of <memory> aren't autocompleted as well 
as for the members of the std::shared_ptr and the pointed-to object.

I'm using qtcreator-2.7 and gcc-4.8.0.

Is there any chance to get this working?

---------------

#include <memory>
#include <string>

class X
{
public:
     inline std::string name() {
         return mName;
     }
private:
     std::string mName;
};

int main()
{
     // no completion for std::make_shared
     auto p1 = std::make_shared<X>();
     // no completion for member-function
     p1->name();

     // no completion for std::shared_ptr
     std::shared_ptr<X> p2 = std::make_shared<X>();
     // no completion for member-function
     p2->name();
}

----------------------

QT       += core
QT       -= gui

TARGET = l0002
CONFIG   += console
CONFIG   -= app_bundle

TEMPLATE = app

QMAKE_CXXFLAGS += -Wall -Wextra -std=c++11

SOURCES += main.cc

-- 
Wilhelm




More information about the Qt-creator mailing list