From ac86d9f5dd715af8aeea3a840e7412461f8751f0 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Sat, 7 Dec 2024 15:11:49 +0300 Subject: [PATCH] Updated cxxstd=latest for gcc and clang. Recent versions of the compilers support targeting C++26 draft. --- src/tools/clang.jam | 3 ++- src/tools/gcc.jam | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tools/clang.jam b/src/tools/clang.jam index 221d37d5ef..fa5528b3e6 100644 --- a/src/tools/clang.jam +++ b/src/tools/clang.jam @@ -55,7 +55,8 @@ rule init-cxxstd-flags ( toolset : condition * : version ) local dialects = [ feature.values ] ; dialects = [ set.difference $(dialects) : gnu iso ] ; local std ; - if [ version-ge $(version) : 12.0 ] { std = 2b ; } + if [ version-ge $(version) : 17.0 ] { std = 26 ; } + else if [ version-ge $(version) : 12.0 ] { std = 2b ; } else if [ version-ge $(version) : 10.0 ] { std = 20 ; } else if [ version-ge $(version) : 6.0 ] { std = 2a ; } else if [ version-ge $(version) : 5.0 ] { std = 17 ; } diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam index 0c69dbdb72..9b6a4d0692 100644 --- a/src/tools/gcc.jam +++ b/src/tools/gcc.jam @@ -449,7 +449,8 @@ local rule compile-link-flags ( * ) local rule init-cxxstd-flags ( condition * : version ) { local std ; - if [ version-ge $(version) : 11 ] { std = 23 ; } + if [ version-ge $(version) : 14 ] { std = 26 ; } + else if [ version-ge $(version) : 11 ] { std = 23 ; } else if [ version-ge $(version) : 10 ] { std = 20 ; } else if [ version-ge $(version) : 8 ] { std = 2a ; } else if [ version-ge $(version) : 6 ] { std = 17 ; }