解决:function in namespace ‘std’ does not name a type + allocator_/nullptr/dellocator_ was not declare
Posted zealousness
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决:function in namespace ‘std’ does not name a type + allocator_/nullptr/dellocator_ was not declare相关的知识,希望对你有一定的参考价值。
解决方法,用到了c++11,g++命令需要加上-std=c++11选项
附:g++默认的c++标准
gcc-6.4.0 gcc-7.2.0 默认是 -std=gnu++14
gcc-4.3.6 gcc-4.4.7 gcc-4.5.4 gcc-4.6.4 gcc-4.7.4 gcc-4.8.5 gcc-4.9.4 gcc-5.4.0 默认是 -std=gnu++98
gcc-3.0.4 gcc-3.1.1 gcc-3.2.3 gcc-3.3.6 gcc-3.4.6 gcc-4.0.4 gcc-4.1.2 gcc-4.2.4 默认是 -std=gnu89
其他可能错误原因:
https://www.cnblogs.com/wjgrt/p/8059074.html
以上是关于解决:function in namespace ‘std’ does not name a type + allocator_/nullptr/dellocator_ was not declare的主要内容,如果未能解决你的问题,请参考以下文章
Namespace declaration statement has to be the very first statement in the script
The type name 'IComponentConnector' could not be found in the namespace 'System.Windows.
Unable to instantiate Action, xxxAction, defined for 'xxx' in namespace '/&a
Spark SQL: Error in query: undefined function错误的解决方法
如何在C ++中使用namespace :: function选择函数的单个重载?
Namespace declaration statement has to be the very first statement in the script