Compile c++14-code with g++

前端 未结 4 1352
执笔经年
执笔经年 2020-12-02 16:35

I\'m using g++ 4.8.4 on Ubuntu 14.04 LTS. When trying to compile with \'-std=c++14\', I get this error:

g++: error unrecognized command line option \'-std=c+         


        
4条回答
  •  萌比男神i
    2020-12-02 17:22

    The -std=c++14 flag is not supported on GCC 4.8. If you want to use C++14 features you need to compile with -std=c++1y. Using godbolt.org it appears that the earilest version to support -std=c++14 is GCC 4.9.0 or Clang 3.5.0

提交回复
热议问题