From e0d5599b408115d9305ad379135b76c38e09b027 Mon Sep 17 00:00:00 2001 From: Yao Zi Date: Tue, 20 Oct 2026 09:38:30 +0000 Subject: [PATCH] Settings: Add a message for the static_assert against setting_id_t::LAST static_assert() without message is introduced in C++ 17, thus Clang complains about it since we're targetting C++ 11. Add a message to it. --- src/settings.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/settings.cc b/src/settings.cc index df776c3b..e06d4964 100644 --- a/src/settings.cc +++ b/src/settings.cc @@ -83,6 +83,7 @@ setting_details all_settings[] = { }; static_assert((sizeof(all_settings)/sizeof(all_settings[0])) - == static_cast(setting_id_t::LAST) + 1); + == static_cast(setting_id_t::LAST) + 1, + "setting_id_t::LAST doesn't match the size of all_settings[]"); } // dinit_load namespace