error: ‘shared_ptr’ in namespace ‘std’ does not name a template type

Problem Description

When compiling on an arm architecture machine, the following problems are encountered:

error: ‘shared_ptr’ in namespace ‘std’ does not name a template type

or

ISO C++ forbids declaration of ‘node’ with no type [-fpermissive]
    for (auto& node : vt_test)

Solution

Try to solve it after specifying the compiled version in CMakeLists.txt as C++11

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

Guess you like

Origin blog.csdn.net/qq_33594636/article/details/130122668