samedi 27 juin 2015

Qt Creator autocomplete doesn't recognize std::function<..> (but it recognizes function<..>)?

I am using Qt Creator 3.0.1 (since that's the version on the repo for Ubuntu 14.04 LTS, which I have).

#include <functional>
std::function<double(double)> some_func;

Here, autocomplete won't recognize std::function. If I righ-click that and select "Follow Symbol Under Cursor", it won't work.

However, if I write instead:

#include <functional>
using namespace std;
function<double(double)> some_func;

it works fine. This time autocomplete shows up while I am writing function, and if I right-click function and select "Follow Symbol Under Cursor", it will take me to the declaration of function in the functional header of the standard library.

What's going on here? How can I fix this issue?

Aucun commentaire:

Enregistrer un commentaire