Merge branch 'json-view/21-images' into json-view/22-view-dump-fast

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann committed 2026-10-08 16:37:49 +02:00
commit 8d27a4afbd
47 files changed
+698 -187

No files matched your search

+9 -1
View File
@@ -705,11 +705,19 @@ class basic_json_view
return detail::view::view_side<BasicJsonType, basic_json_view>(v);
}
/// the template argument as a runtime condition: testing it directly in
/// `Editable && ...` makes the condition constant, which MSVC reports as
/// C4127
static bool editable() noexcept
{
return Editable;
}
/// the number of source bytes of this value (estimated for values with
/// decoded strings)
std::size_t source_extent() const noexcept
{
if (Editable && m_doc->edits != nullptr)
if (editable() && m_doc->edits != nullptr)
{
// positions of moved and new values are not source offsets
return m_node == m_doc->tape ? m_doc->size + m_doc->edits->text_used : 64;