We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7317c9b commit 225547eCopy full SHA for 225547e
src/RecordComponent.cpp
@@ -51,10 +51,11 @@ namespace internal
51
Attributable a;
52
a.setData(std::shared_ptr<AttributableData>{this, [](auto const &) {}});
53
// this check can be too costly in some setups
54
-#if 1
55
- if ((*a.containingIteration().first.value())
56
- .asInternalCopyOf<Iteration>()
57
- .closed())
+#if openPMD_USE_INVASIVE_TESTS
+
+ auto &iterationData = *a.containingIteration().first.value();
+ auto iteration = iterationData.asInternalCopyOf<Iteration>();
58
+ if (iteration.closed() && !iterationData.allow_reopening_implicitly)
59
{
60
throw error::WrongAPIUsage(
61
"Cannot write/read chunks to/from closed Iterations.");
0 commit comments