Random access priority queue

后端 未结 2 568
抹茶落季
抹茶落季 2021-01-15 11:29

Continuing List to priority queue

I\'m implementing a improved priority_queue with random access.

template 

        
2条回答
  •  囚心锁ツ
    2021-01-15 12:06

    Doesn't look that great to me:

    • The unary constructor should take argument by const reference.
    • The assignment operator doesn't check for self-assignment.
    • The getContainer() method shows a lack of clarity in the interface - why would you simply expose the implementation detail like that?
    • Most importantly: why do you want a "random access priority queue"?

提交回复
热议问题