summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-08-01 09:54:36 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-08-01 09:54:36 +0900
commit605421f4ebe37699e63eb5551c3dbc7887093e4f (patch)
treee18cbe3e649165947126ec03aee6dc115191541b /include
parentd99b10acb755b51664a01dabe6c4ac8af8071b0f (diff)
gcc 10.3.0 says "__VA_OPT__ is not available until C++2a"
Diffstat (limited to 'include')
-rw-r--r--include/ruby/internal/config.h6
1 files changed, 6 insertions, 0 deletions
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