Important: Please read the Qt Code of Conduct -

no member named 'unique_ptr' in namespace 'std'

  • I am trying to use std::unique_ptr in the main.cpp
    but I get this error error: no member named 'unique_ptr' in namespace 'std'
    In the .pro file I have CONFIG += c++14
    Library : Qt5.11
    Compiler: gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10)

    What am I missing?


    Add his include which is needed for std::unique_ptr

    #include <memory>  

    Or, in case is possible to replace


    it with the same Qt-style operator


Log in to reply