diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index 6fa3cf98a..656ec2238 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -3366,7 +3366,7 @@ public: template < typename KeyType, detail::enable_if_t < !std::is_constructible::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 diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index d5a504619..4a2919bb6 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -31277,7 +31277,7 @@ public: template < typename KeyType, detail::enable_if_t < !std::is_constructible::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