Skip to content

Conversation

@MBkkt
Copy link
Contributor

@MBkkt MBkkt commented Dec 19, 2022

@jmr
Copy link
Member

jmr commented Dec 19, 2022

I'm not sure why this is using a multi_map instead of a priority_queue, but looks good for now. Thanks.

@jmr jmr merged commit ad5ef6c into google:master Dec 19, 2022
@MBkkt
Copy link
Contributor Author

MBkkt commented Dec 19, 2022

@jmr probably because priority_queue::top return const reference and it's cannot be used with unique_ptr.

But of course exist way to avoid this issue:

  1. std::vector + push_heap/pop_heap
  2. const_cast

@jmr
Copy link
Member

jmr commented Dec 20, 2022

That would make sense, but this was written before unique_ptr was used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants