no member named 'unique_ptr' in namespace 'std'
-
wrote on 9 Dec 2018, 16:09 last edited by
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?
TIA -
wrote on 9 Dec 2018, 16:21 last edited by
SOLVED
Add his include which is needed for std::unique_ptr
#include <memory>
Or, in case is possible to replace
std::unique_ptr<T>
it with the same Qt-style operator
QScopedPointer<T>
1/2