Skip to content

Commit c3cd733

Browse files
jensmaurertkoeppe
authored andcommitted
LWG3529 priority_queue(first, last) should construct c with (first, last)
1 parent 4183259 commit c3cd733

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

source/containers.tex

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10120,12 +10120,14 @@
1012010120
explicit priority_queue(const Compare& x) : priority_queue(x, Container()) {}
1012110121
priority_queue(const Compare& x, const Container&);
1012210122
priority_queue(const Compare& x, Container&&);
10123+
template<class InputIterator>
10124+
priority_queue(InputIterator first, InputIterator last, const Compare& x = Compare());
1012310125
template<class InputIterator>
1012410126
priority_queue(InputIterator first, InputIterator last, const Compare& x,
1012510127
const Container&);
1012610128
template<class InputIterator>
10127-
priority_queue(InputIterator first, InputIterator last,
10128-
const Compare& x = Compare(), Container&& = Container());
10129+
priority_queue(InputIterator first, InputIterator last, const Compare& x,
10130+
Container&&);
1012910131
template<class Alloc> explicit priority_queue(const Alloc&);
1013010132
template<class Alloc> priority_queue(const Compare&, const Alloc&);
1013110133
template<class Alloc> priority_queue(const Compare&, const Container&, const Alloc&);
@@ -10215,13 +10217,32 @@
1021510217
\tcode{make_heap(c.begin(), c.end(), comp)}.
1021610218
\end{itemdescr}
1021710219

10220+
\indexlibraryctor{priority_queue}%
10221+
\begin{itemdecl}
10222+
template<class InputIterator>
10223+
priority_queue(InputIterator first, InputIterator last, const Compare& x = Compare());
10224+
\end{itemdecl}
10225+
10226+
\begin{itemdescr}
10227+
\pnum
10228+
\expects
10229+
\tcode{x} defines a strict weak ordering\iref{alg.sorting}.
10230+
10231+
\pnum
10232+
\effects
10233+
Initializes \tcode{c} with
10234+
\tcode{first} as the first argument and
10235+
\tcode{last} as the second argument, and
10236+
initializes \tcode{comp} with \tcode{x};
10237+
then calls \tcode{make_heap(c.begin(), c.end(), comp)}.
10238+
\end{itemdescr}
10239+
1021810240
\indexlibraryctor{priority_queue}%
1021910241
\begin{itemdecl}
1022010242
template<class InputIterator>
1022110243
priority_queue(InputIterator first, InputIterator last, const Compare& x, const Container& y);
1022210244
template<class InputIterator>
10223-
priority_queue(InputIterator first, InputIterator last, const Compare& x = Compare(),
10224-
Container&& y = Container());
10245+
priority_queue(InputIterator first, InputIterator last, const Compare& x, Container&& y);
1022510246
\end{itemdecl}
1022610247

1022710248
\begin{itemdescr}

0 commit comments

Comments
 (0)