yaml-cpp icon indicating copy to clipboard operation
yaml-cpp copied to clipboard

iterator_base::value_type should not be const

Open horenmar opened this issue 1 year ago • 4 comments

I had an issue open against my own project, that boils down to yaml-cpp providing iterators, whose value_type is const. This should not happen, values are immutable by definition*, and it causes issues in consuming code that doesn't expect this.

From a quick glance, I think it is fixable just by adding std::remove_const_t here.

* this gets a bit muddy with reference-like types, but there it is generally expected that it is the reference that cannot be modified, not the referenced thing.

horenmar avatar Oct 31 '24 13:10 horenmar