From f6e04e5e537d671a3fb383b3664e2c6face8d3fd Mon Sep 17 00:00:00 2001 From: Jonah Miller Date: Fri, 29 Nov 2024 12:24:06 -0700 Subject: [PATCH] make clang happy --- ports-of-call/portability.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ports-of-call/portability.hpp b/ports-of-call/portability.hpp index 0bb4bdf..dd34ee8 100644 --- a/ports-of-call/portability.hpp +++ b/ports-of-call/portability.hpp @@ -111,7 +111,11 @@ template PORTABLE_INLINE_FUNCTION void printf(char const *const format, Ts... ts) { // disable for hip #ifndef __HIPCC__ - std::printf(format, ts...); + if constexpr (sizeof...(Ts) > 0) { + std::printf(format, ts...); + } else { + std::printf("%s", format); + } #endif // __HIPCC__ return; }