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

问题描述

在arm架构机器上编译时,遇到如下问题

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

或者

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

解决方法

尝试在CMakeLists.txt指定为C++ 11的编译版本后解决

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

猜你喜欢

转载自blog.csdn.net/qq_33594636/article/details/130122668