How to turn on C++0x of Intel C++ Compiler 12.1.2

后端 未结 2 1776
南旧
南旧 2020-12-21 09:17

I installed the latest version of Intel C++ Compiler v12.1.2 on Arch Linux 3.2.1. When I used icpc to compile my C++ file

icpc -O3 -DNDEBUG -std=gnu++0x -o o         


        
相关标签:
2条回答
  • 2020-12-21 09:39

    Check here. It seems that C++0x is not fully supported

    0 讨论(0)
  • 2020-12-21 09:40

    I had to fight my way through this, but a quick solution seems to be:

    1. Install libstdc++4.5 (or earlier)
    2. compile with icpc -gcc-name=gcc-4.5 -std=c++0x

    The problem is that Intel compilers do not support all the C++0x features that GNU compilers do starting from version 4.6. This causes incompatibilities with GNU libstdc++ headers since at present all the C++0x features are protected by a unique macro __GXX_EXPERIMENTAL_CXX0X__ and cannot be enabled or disabled singularly.

    0 讨论(0)
提交回复
热议问题