[Bug libstdc++/89065] set::find always returns const iterator

2019-01-25 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89065

Marc Glisse  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #3 from Marc Glisse  ---
.

[Bug libstdc++/89065] set::find always returns const iterator

2019-01-25 Thread 1000hz.radiowave at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89065

--- Comment #2 from baltic <1000hz.radiowave at gmail dot com> ---
Ok, i see 26.2.6.6 section of the standard: 

iterator of an associative container is of the bidirectional iterator category.
For associative containers where the value type is the same as the key type,
both iterator and const_iterator are constant iterators.

Weird though.
I think this could be closed as invalid.

Thanks!

[Bug libstdc++/89065] set::find always returns const iterator

2019-01-25 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89065

--- Comment #1 from Marc Glisse  ---
iterator and const_iterator are the same type for std::set, the elements are
always immutable...