[Qt-creator] completion for std::shared_ptr does not work

Orgad Shaneh orgads at gmail.com
Mon Nov 21 10:30:02 CET 2016


On Mon, Nov 21, 2016 at 11:04 AM, Christoph Mathys <eraserix at gmail.com>
wrote:

> Hi,
>
> I'm trying to find out why std::shared_ptr does not work in our
> project sometimes. I could not nail it down to a specific change in
> our project so far. The project is on Linux, cmake, gcc-4.9, ninja,
> and QtCreator 4.1 with the QtCreator codemodel. The clang codemodel
> recognizes the shared_ptr correctly.
>
> So far I'm under the impression that QtCreator just ignores all C++11
> headers from <memory>. If I include <bits/shared_ptr.h> directly,
> completion works. The macro guarding the shared_ptr stuff in <memory>
> is __cplusplus. The code model inspector states that it is defined to
> 201103L, which should be fine.
>
> Any ideas on how I can get to the bottom of this?
>

The built-in code model is more or less frozen. There was an attempt to
support std::vector and friends, but it produced many crashes and general
slowness, so it was reverted in 3.6.

The clang code model is actively developed, and it should support heavy
template classes properly.

- Orgad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20161121/03e8891a/attachment.html>


More information about the Qt-creator mailing list