2016-11-20 107 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簡單的代碼不工作:(

回答