3189. Missing requirement for std::priority_queue

Section: 24.6.7 [priority.queue] Status: New Submitter: Jonathan Wakely Opened: 2019-02-21 Last modified: 2019-03-05 18:54:44 UTC

Priority: 3

View all other issues in [priority.queue].

View all issues with New status.


We don't require that the Compare template parameter can be invoked with arguments of the queue's value type. It seems like something we can use Mandates: for, since it'll be ill-formed otherwise. Something like is_invocable_r_v<bool, Compare&, value_type&, value_type&>.

This might also apply to the Compare parameter for the merge and sort functions of forward_list and list.

[2019-03-05 Priority set to 3 after reflector discussion]

Proposed resolution: