diff --git a/include/openPMD/snapshots/ContainerTraits.hpp b/include/openPMD/snapshots/ContainerTraits.hpp index 8c7b278ecc..90e2d0ee1f 100644 --- a/include/openPMD/snapshots/ContainerTraits.hpp +++ b/include/openPMD/snapshots/ContainerTraits.hpp @@ -14,7 +14,8 @@ class OpaqueSeriesIterator friend class Series; friend class StatefulSnapshotsContainer; friend class RandomAccessIteratorContainer; - using parent_t = AbstractSeriesIterator; + using parent_t = + AbstractSeriesIterator; // no shared_ptr since copied iterators should not share state std::unique_ptr> m_internal_iterator; diff --git a/include/openPMD/snapshots/RandomAccessIterator.hpp b/include/openPMD/snapshots/RandomAccessIterator.hpp index 7b6253d3a6..bc5d494137 100644 --- a/include/openPMD/snapshots/RandomAccessIterator.hpp +++ b/include/openPMD/snapshots/RandomAccessIterator.hpp @@ -41,7 +41,9 @@ class RandomAccessIterator { private: friend class RandomAccessIteratorContainer; - using parent_t = AbstractSeriesIterator>; + using parent_t = AbstractSeriesIterator< + RandomAccessIterator, + detail::iterator_to_value_type>; RandomAccessIterator(iterator_t it); diff --git a/include/openPMD/snapshots/StatefulIterator.hpp b/include/openPMD/snapshots/StatefulIterator.hpp index 6fc6df6c95..1a6becdbf9 100644 --- a/include/openPMD/snapshots/StatefulIterator.hpp +++ b/include/openPMD/snapshots/StatefulIterator.hpp @@ -148,7 +148,9 @@ class StatefulIterator auto get() -> SharedData &; auto get() const -> SharedData const &; - using parent_t = AbstractSeriesIterator; + using parent_t = AbstractSeriesIterator< + StatefulIterator, + Container::value_type>; public: using value_type = diff --git a/src/IO/ADIOS/ADIOS2IOHandler.cpp b/src/IO/ADIOS/ADIOS2IOHandler.cpp index 08fac073cf..61bcc82453 100644 --- a/src/IO/ADIOS/ADIOS2IOHandler.cpp +++ b/src/IO/ADIOS/ADIOS2IOHandler.cpp @@ -1588,6 +1588,7 @@ detail::ADIOS2File &ADIOS2IOHandlerImpl::getFileData( { return *it->second; } + throw std::runtime_error("Unreachable!"); } void ADIOS2IOHandlerImpl::dropFileData(InvalidatableFile const &file) diff --git a/src/snapshots/StatefulIterator.cpp b/src/snapshots/StatefulIterator.cpp index 678fd977a4..59cce4412c 100644 --- a/src/snapshots/StatefulIterator.cpp +++ b/src/snapshots/StatefulIterator.cpp @@ -535,7 +535,6 @@ std::optional StatefulIterator::loopBody() try { iterations.at(current_iteration).open(); - [[fallthrough]]; } catch (error::ReadError const &err) { @@ -545,6 +544,7 @@ std::optional StatefulIterator::loopBody() option.value()->deactivateDeadIteration(current_iteration); return std::nullopt; } + [[fallthrough]]; case internal::CloseStatus::Open: return option; case internal::CloseStatus::ClosedInBackend: