This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++17 status.
priority_queue
taking allocators should call make_heap
Section: 23.6.4.3 [priqueue.cons.alloc] Status: C++17 Submitter: Eric Schmidt Opened: 2015-09-19 Last modified: 2017-07-30
Priority: 0
View all issues with C++17 status.
Discussion:
priority_queue
constructors taking both Container
and Alloc
arguments should
finish by calling make_heap
, just as with the constructors that do not have allocator parameters.
[2015-10, Kona issue prioritization]
Priority 0, move to Ready
Proposed resolution:
This wording is relative to N4527.
Change 23.6.4.3 [priqueue.cons.alloc] as indicated:
template <class Alloc> priority_queue(const Compare& compare, const Container& cont, const Alloc& a);-4- Effects: Initializes
c
withcont
as the first argument anda
as the second argument, and initializescomp
withcompare
; callsmake_heap(c.begin(), c.end(), comp)
.template <class Alloc> priority_queue(const Compare& compare, Container&& cont, const Alloc& a);-5- Effects: Initializes
c
withstd::move(cont)
as the first argument anda
as the second argument, and initializescomp
withcompare
; callsmake_heap(c.begin(), c.end(), comp)
.