mirror of
https://github.com/nlohmann/json.git
synced 2026-10-18 12:08:12 +00:00
Allow the string literal parameter of the view serializer's put() for clang-tidy
The overload takes the literal by array reference so that its length is a template parameter, like scan_literal() and the C array overloads of to_json() and from_json(). Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
2 files changed
+2
-2
No files matched your search
@@ -71,7 +71,7 @@ class output_buffer
|
||||
|
||||
/// a string literal, without its terminating NUL
|
||||
template<std::size_t N>
|
||||
NLOHMANN_VIEW_ALWAYS_INLINE void put(const char (&s)[N])
|
||||
NLOHMANN_VIEW_ALWAYS_INLINE void put(const char (&s)[N]) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)
|
||||
{
|
||||
put(s, N - 1);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user