Skip to content

Commit

Permalink
Update source.hpp
Browse files Browse the repository at this point in the history
Avoid the warning from clang:

out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated
  • Loading branch information
MonkeybreadSoftware authored Sep 24, 2023
1 parent 8e77f7c commit 8f635ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/jsoncons/source.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -781,8 +781,12 @@ namespace jsoncons {
return length - unread;
}
};
#if __cplusplus >= 201703L
// not needed for C++17
#else
template <class Source>
constexpr std::size_t source_reader<Source>::max_buffer_length;
#endif

#if !defined(JSONCONS_NO_DEPRECATED)
using bin_stream_source = binary_stream_source;
Expand Down

0 comments on commit 8f635ac

Please sign in to comment.