conan-io / conan

Conan - The open-source C and C++ package manager
https://conan.io
MIT License
8.28k stars 981 forks source link

[feature] gcc 11.1 released, with changed default cppstd #8885

Closed memsharded closed 3 years ago

memsharded commented 3 years ago

CC 11.1 released

The default mode for C++ is now -std=gnu++17 instead of -std=gnu++14

https://gcc.gnu.org/gcc-11/changes.html

SSE4 commented 3 years ago
[root@e13776354505 /]# g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-11.1.1-20210428/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.1.1 20210428 (Red Hat 11.1.1-1) (GCC) 

default C++ standard is 17:

[root@e13776354505 /]# g++ -dM -E -x c++ /dev/null | grep __cplusplus
#define __cplusplus 201703L

supported C++ standards:

  -std=c++03                  Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum.  Same as -std=c++98.
  -std=c++0x                  Deprecated in favor of -std=c++11.  Same as -std=c++11.
  -std=c++11                  Conform to the ISO 2011 C++ standard.
  -std=c++14                  Conform to the ISO 2014 C++ standard.
  -std=c++17                  Conform to the ISO 2017 C++ standard.
  -std=c++1y                  Deprecated in favor of -std=c++14.  Same as -std=c++14.
  -std=c++1z                  Deprecated in favor of -std=c++17.  Same as -std=c++17.
  -std=c++20                  Conform to the ISO 2020 C++ standard (experimental and incomplete support).
  -std=c++23                  Conform to the ISO 2023 C++ draft standard (experimental and incomplete support).
  -std=c++2a                  Conform to the ISO 2020 C++ standard (experimental and incomplete support).  Same as -std=c++20.
  -std=c++2b                  Conform to the ISO 2023 C++ draft standard (experimental and incomplete support).  Same as -std=c++23.
  -std=c++98                  Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum.
  -std=gnu++03                Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum with GNU extensions.  Same as -std=gnu++98.
  -std=gnu++0x                Deprecated in favor of -std=gnu++11.  Same as -std=gnu++11.
  -std=gnu++11                Conform to the ISO 2011 C++ standard with GNU extensions.
  -std=gnu++14                Conform to the ISO 2014 C++ standard with GNU extensions.
  -std=gnu++17                Conform to the ISO 2017 C++ standard with GNU extensions.
  -std=gnu++1y                Deprecated in favor of -std=gnu++14.  Same as -std=gnu++14.
  -std=gnu++1z                Deprecated in favor of -std=gnu++17.  Same as -std=gnu++17.
  -std=gnu++20                Conform to the ISO 2020 C++ standard with GNU extensions (experimental and incomplete support).
  -std=gnu++23                Conform to the ISO 2023 C++ draft standard with GNU extensions (experimental and incomplete support).
  -std=gnu++2a                Conform to the ISO 2020 C++ standard with GNU extensions (experimental and incomplete support).  Same as -std=gnu++20.
  -std=gnu++2b                Conform to the ISO 2023 C++ draft standard with GNU extensions (experimental and incomplete support).  Same as -std=gnu++23.
  -std=gnu++98                Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum with GNU extensions.