diff --git a/configure.ac b/configure.ac index 4e8099777..56e566ed6 100644 --- a/configure.ac +++ b/configure.ac @@ -41,7 +41,8 @@ AC_PROG_LIBTOOL AC_PROG_MAKE_SET AC_LANG(C++) -AX_CXX_COMPILE_STDCXX([17], [gnu], [mandatory], 201703) +AX_CXX_COMPILE_STDCXX([20], [gnu], [optional], 202002) +AX_CXX_COMPILE_STDCXX([2a], [gnu], [mandatory], 201709) dnl *************************************************************************** @@ -2558,7 +2559,7 @@ RB_HELP_STRING([--with-included-boost[[[=shared]]]], [Use the boost sources from boost_linkage="$withval" boost_version="boost-${BOOST_VERSION_MIN}.${BOOST_VERSION_MIN_PATCH}" - boost_cxxflags="-std=gnu++17" + boost_cxxflags="-std=gnu++20" bash tools/boostrap.sh $BTOOLSET $BOOST_BUILT_LIBS $boost_variant $withval multi $boost_version $boost_cxxflags AS_IF([ test $? != 0 ], [ diff --git a/tools/m4/ax_cxx_compile_stdcxx.m4 b/tools/m4/ax_cxx_compile_stdcxx.m4 index 9bc83430b..4005f9f3a 100644 --- a/tools/m4/ax_cxx_compile_stdcxx.m4 +++ b/tools/m4/ax_cxx_compile_stdcxx.m4 @@ -48,6 +48,7 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl m4_if([$1], [11], [], [$1], [14], [], [$1], [17], [], + [$1], [2a], [], [$1], [20], [], [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl m4_if([$2], [], [], @@ -157,6 +158,22 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17], _AX_CXX_COMPILE_STDCXX_testbody_new_in_14($1) ) +dnl Test body for checking C++2a support + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_2a], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11($1) + _AX_CXX_COMPILE_STDCXX_testbody_new_in_14($1) + _AX_CXX_COMPILE_STDCXX_testbody_new_in_17($1) +) + +dnl Test body for checking C++20 support + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_20], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_11($1) + _AX_CXX_COMPILE_STDCXX_testbody_new_in_14($1) + _AX_CXX_COMPILE_STDCXX_testbody_new_in_17($1) +) + dnl Tests for new features in C++11 @@ -573,3 +590,15 @@ namespace cxx14 #endif // __cplusplus >= $1L ]]) + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[ + +]]) + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_2a], [[ + +]]) + +m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_20], [[ + +]])