Allow c++23 in gcc-11.

pull/12331/head
Benjamin Redelings 1 year ago committed by Jussi Pakkanen
parent 49a6a99c7f
commit 84b8d257e4
  1. 2
      mesonbuild/compilers/cpp.py
  2. 4
      unittests/linuxliketests.py

@ -426,7 +426,7 @@ class GnuCPPCompiler(_StdCPPLibMixin, GnuCompiler, CPPCompiler):
'c++98', 'c++03', 'c++11', 'c++14', 'c++17', 'c++1z',
'c++2a', 'c++20',
]
if version_compare(self.version, '>=12.2.0'):
if version_compare(self.version, '>=11.0.0'):
cppstd_choices.append('c++23')
if version_compare(self.version, '>=14.0.0'):
cppstd_choices.append('c++26')

@ -520,10 +520,10 @@ class LinuxlikeTests(BasePlatformTests):
compiler.get_id() == 'gcc' and version_compare(compiler.version, '>=10.0.0'))
has_cpp2b = (compiler.get_id() not in {'clang', 'gcc'} or
compiler.get_id() == 'clang' and _clang_at_least(compiler, '>=12.0.0', None) or
compiler.get_id() == 'gcc' and version_compare(compiler.version, '>=12.2.0'))
compiler.get_id() == 'gcc' and version_compare(compiler.version, '>=11.0.0'))
has_cpp23 = (compiler.get_id() not in {'clang', 'gcc'} or
compiler.get_id() == 'clang' and _clang_at_least(compiler, '>=17.0.0', None) or
compiler.get_id() == 'gcc' and version_compare(compiler.version, '>=12.2.0'))
compiler.get_id() == 'gcc' and version_compare(compiler.version, '>=11.0.0'))
has_cpp26 = (compiler.get_id() not in {'clang', 'gcc'} or
compiler.get_id() == 'clang' and _clang_at_least(compiler, '>=17.0.0', None) or
compiler.get_id() == 'gcc' and version_compare(compiler.version, '>=14.0.0'))

Loading…
Cancel
Save