From 605421f4ebe37699e63eb5551c3dbc7887093e4f Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 1 Aug 2021 09:54:36 +0900 Subject: [PATCH] gcc 10.3.0 says "__VA_OPT__ is not available until C++2a" --- include/ruby/internal/config.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/ruby/internal/config.h b/include/ruby/internal/config.h index 67d7e0156f..b26e7eea25 100644 --- a/include/ruby/internal/config.h +++ b/include/ruby/internal/config.h @@ -126,6 +126,12 @@ #if ! defined(HAVE_VA_ARGS_MACRO) # undef HAVE___VA_OPT__ +#elif defined(__cplusplus) +# if __cplusplus > 201703L +# define HAVE___VA_OPT__ +# else +# undef HAVE___VA_OPT__ +# endif #else # /* Idea taken from: https://stackoverflow.com/a/48045656 */ # define RBIMPL_TEST3(q, w, e, ...) e