From 65f8fafef99aa8fa8dd60b2a14bd5974058a8d6f Mon Sep 17 00:00:00 2001 From: AWE Henry Date: Fri, 4 Oct 2024 12:36:52 +0800 Subject: [PATCH] Remove redundant `__VA_OPT__`-related code --- example/info.cpp | 4 ---- include/papilio/detail/config.hpp | 11 ----------- 2 files changed, 15 deletions(-) diff --git a/example/info.cpp b/example/info.cpp index a27a1d4..c26e2e8 100644 --- a/example/info.cpp +++ b/example/info.cpp @@ -58,10 +58,6 @@ int main() println("PAPILIO_HAS_LIB_EXPECTED = {:d}L", PAPILIO_HAS_LIB_EXPECTED); #endif -#ifdef PAPILIO_HAS_VA_OPT - println("PAPILIO_HAS_VA_OPT defined"); -#endif - println("PAPILIO_HAS_UNREACHABLE = {}", PAPILIO_HAS_UNREACHABLE); #ifdef PAPILIO_HAS_ENUM_NAME println("PAPILIO_HAS_ENUM_NAME = {}", PAPILIO_HAS_ENUM_NAME); diff --git a/include/papilio/detail/config.hpp b/include/papilio/detail/config.hpp index b2ce69e..accb362 100644 --- a/include/papilio/detail/config.hpp +++ b/include/papilio/detail/config.hpp @@ -63,17 +63,6 @@ # pragma clang diagnostic ignored "-Wc++98-compat-pedantic" #endif -#define PAPILIO_HAS_VA_OPT_HELPER(_0, _1, result, ...) result -#define PAPILIO_HAS_VA_OPT_IMPL(...) \ - PAPILIO_HAS_VA_OPT_HELPER(__VA_OPT__(, ), 1, 0) - -#if PAPILIO_HAS_VA_OPT_IMPL(_0) == 1 -# define PAPILIO_HAS_VA_OPT 1 -#endif - -#undef PAPILIO_HAS_VA_OPT_HELPER -#undef PAPILIO_HAS_VA_OPT_IMPL - #ifdef PAPILIO_COMPILER_CLANG # pragma clang diagnostic pop #endif