teslamotors / fixed-containers

C++ Fixed Containers
MIT License
361 stars 31 forks source link

Make iterators of FixedMap/EnumMap dereference to a non-assignable type #9

Closed alexkaratarakis closed 1 year ago

alexkaratarakis commented 1 year ago

The iterator type of std::map dereferences to a non-MoveAssignable type (std::pair<const K, V>) This causes algorithms like std::remove to fail at compile-time. See https://en.cppreference.com/w/cpp/algorithm/remove#Notes for more info.

Match this behavior in FixedMap/EnumMap.