LWG 2537 fix priority_queue constructors to establish invariant
authorJonathan Wakely <jwakely@redhat.com>
Thu, 14 Feb 2019 14:10:19 +0000 (14:10 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 14 Feb 2019 14:10:19 +0000 (14:10 +0000)
commit1f4dcbf7cd8c60457ab9b156017db6e39293657b
tree6ac02bd086b09b0ffa91eed3f4b04f100fb52ea1
parent1138a19dfe5029e6ead3bb26bb344bddce9f24f0
LWG 2537 fix priority_queue constructors to establish invariant

This change is safe to make now (in stage 4), because the constructors
are currently incorrect and unusable (unless the supplied container
already contains a heap, in which case the new make_heap calls are
redundant but harmless).

* doc/xml/manual/intro.xml: Document LWG 2537 status.
* include/bits/stl_queue.h
(priority_queue(const Compare&, const Container&, const Alloc&))
(priority_queue(const Compare&, Container&&, const Alloc&)): Call
make_heap.
* testsuite/23_containers/priority_queue/dr2537.cc: New test.

From-SVN: r268878
libstdc++-v3/ChangeLog
libstdc++-v3/doc/xml/manual/intro.xml
libstdc++-v3/include/bits/stl_queue.h
libstdc++-v3/testsuite/23_containers/priority_queue/dr2537.cc [new file with mode: 0644]