Skip to content

Commit 8367782

Browse files
committed
Guard against memory selections in reading
1 parent aa8db16 commit 8367782

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

include/openPMD/RecordComponent.tpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ inline void RecordComponent::loadChunk_impl(
142142
std::shared_ptr<T_with_extent> data,
143143
internal::LoadStoreConfigWithBuffer cfg)
144144
{
145+
if (cfg.memorySelection.has_value())
146+
{
147+
throw error::WrongAPIUsage(
148+
"Unsupported: Memory selections in chunk loading.");
149+
}
145150
using T = std::remove_cv_t<std::remove_extent_t<T_with_extent>>;
146151
Datatype dtype = determineDatatype(data);
147152
if (dtype != getDatatype())

0 commit comments

Comments
 (0)