方法1:通过man 查看
# man gcc


方法2:man 无法正常使用,查看当前版本,然后根据版本查询官网
例如当前7.5.0
查询 https://gcc.gnu.org/onlinedocs/gcc-7.5.0/gcc/Standards.html
获取到下列信息:

标明它支持默认支持14,但支持17
方法3:查看默认支持标准
root@ubuntu:~ # g++ -dM -E -x c++ /dev/null |grep -i __cplusplus
#define __cplusplus 201402L
根据获取信息,再从官网查询(亦可简单推测)
或写一个程序使用 g++ -std=c++17 test.cpp -o test 不报错就证明支持
1182






