From 581cb257c640ceea5189488ecfcf67c929f56d12 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Sun, 3 Apr 2022 07:40:02 +0200 Subject: [PATCH] static_assert without message is C++17 --- radio/src/strhelpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radio/src/strhelpers.h b/radio/src/strhelpers.h index 2ec059137..04fcf58f5 100644 --- a/radio/src/strhelpers.h +++ b/radio/src/strhelpers.h @@ -127,7 +127,7 @@ void copyToTerminated(char (&dest)[DL], const char (&src)[SL], static_assert(dl > 0, "wrong sizes or offset"); static constexpr size_t len = (dl < SL) ? dl : SL; strncpy(&dest[O], &src[0], len); - static_assert((len + O) < DL); + static_assert((len + O) < DL, "wrong sizes of offset"); dest[len + O] = '\0'; }