Suppress bugprone-return-const-ref-from-parameter in key_for_message

The reference is only passed to concat() within the full-expression that
holds the key, like the similar helpers in binary_writer.hpp.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann committed 2026-10-10 05:49:44 +02:00
1 parent 37bee747e9
commit 6c28a26123
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -3366,7 +3366,7 @@ public:
template < typename KeyType, detail::enable_if_t < !std::is_constructible<string_t, const KeyType&>::value, int > = 0 >
static const KeyType & key_for_message(const KeyType& key)
{
return key;
return key; // NOLINT(bugprone-return-const-ref-from-parameter): the result is only passed to concat() within the full-expression that holds key
}
/// @brief checked array element access used by the at() overloads taking an index