Fix old clang: do not declare the defaulted document_data() noexcept

With the nested struct object_index, clang 4 (and, by the same bug, the
clang 3.x of ci_test_compilers_clang) rejects the explicitly noexcept
defaulted constructor: "default member initializer for 'indexes' needed
within definition of enclosing class 'document_data' outside of member
functions". Nothing depends on the constructor being noexcept, so let it
take the implicit exception specification.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann
2026-09-30 00:29:09 +02:00
parent fa58c6e6da
commit 448c9dd680
2 changed files with 2 additions and 2 deletions

View File

@@ -77,7 +77,7 @@ struct document_data
}
};
document_data() noexcept = default;
document_data() = default;
document_data(const document_data&) = delete;
document_data(document_data&&) = delete;
document_data& operator=(const document_data&) = delete;

View File

@@ -320,7 +320,7 @@ struct document_data
}
};
document_data() noexcept = default;
document_data() = default;
document_data(const document_data&) = delete;
document_data(document_data&&) = delete;
document_data& operator=(const document_data&) = delete;