2016-11-20 47 views
0

我得到一个错误,“文字”不是编译时一个命名空间名字下面gcc和intel的icpc在redhat上无法识别命名空间std :: literals;

#include <complex> 
using namespace std::literals; 
... 

其在Windows编译罚款与MSVC,甚至在OS X上铿锵,但无论是使用GCC在RedHat 7失败和intel的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. 

英特尔编译器版本

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:即使像in this live demo简单的代码不工作:(

回答