diff --git a/include/highfive/bits/H5Inspector_misc.hpp b/include/highfive/bits/H5Inspector_misc.hpp index 33f6cb66e..7714c9bc8 100644 --- a/include/highfive/bits/H5Inspector_misc.hpp +++ b/include/highfive/bits/H5Inspector_misc.hpp @@ -11,6 +11,7 @@ #include #include +#include #include #include "../H5Reference.hpp" @@ -369,7 +370,10 @@ struct inspector> { sizes[0] = val.size(); if (!val.empty()) { auto s = inspector::getDimensions(val[0]); - std::copy(s.begin(), s.end(), sizes.begin() + 1); + assert(s.size() + ndim == sizes.size()); + for(size_t i = 0; i < s.size(); ++i) { + sizes[i+ndim] = s[i]; + } } return sizes; }