ess-dmsc / h5cpp

C++ wrapper for the HDF5 C-library
https://ess-dmsc.github.io/h5cpp/
GNU Lesser General Public License v2.1
116 stars 19 forks source link

Range conform NodeIterator #645

Closed FlyingSamson closed 4 months ago

FlyingSamson commented 4 months ago

I was wondering if you would consider switching from a deleted default constructor for NodeIterator to a defaulted one, to make the NodeView c++20-range compatible.

The concept std::ranges::range requires that NodeIterator (return value of NodeView::end()) is a sentinel for NodeIterator (return value of NodeView::begin()), which in turn requires that NodeIterator is default constructable.

If you wish, I can also directly provide a PR with this change.