Skip to content

iterator_base::value_type should not be const #1326

@horenmar

Description

@horenmar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions