在编译以下内容时,我得到一个错误,即“文本”不是名称空间名称
#include <complex>
using namespace std::literals;
...它在使用MSVC的Windows上编译得很好,甚至在OS上用clang编译,但在redhat 7上使用gcc和英特尔的icpc都失败了。
更多细节: 制度
cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)gcc版本
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.Intel编译器版本
icpc --version
icpc (ICC) 16.0.3 20160415
Copyright (C) 1985-2016 Intel Corporation. All rights reserved.编译器调用
gcc filename.cpp -std=c++1y
icpc filename.cpp -std=c++14我遗漏了什么?
ps:即使像在这个现场演示中这样的简单代码也不起作用:
发布于 2016-11-20 03:49:43
GCC附带的libstdc++ 4.8.x没有这些文字;他们从GCC 4.9.0开始装船。
https://stackoverflow.com/questions/40700418
复制相似问题