From 8f635ac7264b9c691c326dcbf0fd3947cf8aff49 Mon Sep 17 00:00:00 2001 From: MonkeybreadSoftware Date: Sun, 24 Sep 2023 10:32:25 +0200 Subject: [PATCH] Update source.hpp Avoid the warning from clang: out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated --- include/jsoncons/source.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/jsoncons/source.hpp b/include/jsoncons/source.hpp index bae4385c5b..3ce0519616 100644 --- a/include/jsoncons/source.hpp +++ b/include/jsoncons/source.hpp @@ -781,8 +781,12 @@ namespace jsoncons { return length - unread; } }; +#if __cplusplus >= 201703L +// not needed for C++17 +#else template constexpr std::size_t source_reader::max_buffer_length; +#endif #if !defined(JSONCONS_NO_DEPRECATED) using bin_stream_source = binary_stream_source;