Qt Creator syntax checking C++14



  • Hi
    Seems Qt Creator 3.3.2, 3.4 give red underline syntax checking for C++14.
    Is there a way to fix that or disable it?

    std::vector<int> v {1 ,4 , 7};
    int sum=8'000'000;
    std::for_each(v.begin(), end(v), [&Mysum = sum] (int x){ Mysum+=x; });


  • Hi,

    I don't think Qt Creator supports C++14.
    BTW I don't know if is possible to disable syntax checking



  • @mcosta Thanks for the quick reply.

    I hope at least there is a quick fix till they add support.


  • Moderators

    You might want to try the clang code model.
    Go to Help -> About Plugins and enable ClangCodeModel and restart Creator.
    Then go to Tools -> Options -> C++ -> Code Model and switch model for C++ to clang. Restart Creator again.

    It's a little slower and has some issues too. It still shows squiggles at the 8'000'000, but at least the lambda is recognized correctly. It will get better as time flies.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.