From 6307700710bcd0c8aef8ba6495f8037edfad2e29 Mon Sep 17 00:00:00 2001 From: Jeremy <51220084+jeremy-rifkin@users.noreply.github.com> Date: Thu, 23 May 2024 22:29:31 -0500 Subject: [PATCH] Fix ASSERT macro under -Wpedantic --- src/utils/error.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/error.hpp b/src/utils/error.hpp index 0446b0b..4365f93 100644 --- a/src/utils/error.hpp +++ b/src/utils/error.hpp @@ -98,7 +98,7 @@ namespace detail { // this method doesn't do anything and is never called. } - #define PHONY_USE(E) (nullfn()) + #define PHONY_USE(...) (nullfn()) // Work around a compiler warning template @@ -163,7 +163,7 @@ namespace detail { ) #else // Check condition in both debug. std::runtime_error on failure. - #define ASSERT(c, ...) PHONY_USE(c) + #define ASSERT(...) PHONY_USE(__VA_ARGS__) #endif } }