[haiku-commits] Re: haiku: hrev53379 - src/kits/media

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 16 Aug 2019 10:20:03 -0400

On Fri, Aug 16, 2019, 10:18 AM Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote:

Am 16/08/2019 um 05:56 schrieb waddlesplash:
   Switched from std::map to our HashMap to get something which works in
gcc2 and
   gcc8.

Out of curiosity: why doesn't std::map work on both gcc2 and gcc8?
What's the issue here?


There is no way to remove items from a std::map while iterating without
invoking undefined behavior under C++98. (C++11 added a return value to the
remove method which makes this possible.) Our own HashMap iterators support
this case.

-waddlesplash

Other related posts: