23 Containers library [containers]

23.6 Container adaptors [container.adaptors]

23.6.4 Class template priority_queue [priority.queue]

23.6.4.2 Constructors [priqueue.cons]

constexpr priority_queue(const Compare& x, const Container& y); constexpr priority_queue(const Compare& x, Container&& y);
Effects: Initializes comp with x and c with y (copy constructing or move constructing as appropriate); calls make_heap(c.begin(), c.end(), comp).
template<class InputIterator> constexpr priority_queue(InputIterator first, InputIterator last, const Compare& x = Compare();
Effects: Initializes c with first as the first argument and last as the second argument, and initializes comp with x; then calls make_heap(c.begin(), c.end(), comp).
template<class InputIterator> constexpr priority_queue(InputIterator first, InputIterator last, const Compare& x, const Container& y); template<class InputIterator> constexpr priority_queue(InputIterator first, InputIterator last, const Compare& x, Container&& y);
Effects: Initializes comp with x and c with y (copy constructing or move constructing as appropriate); calls c.insert(c.end(), first, last); and finally calls make_heap(c.begin(), c.end(), comp).
template<container-compatible-range<T> R> constexpr priority_queue(from_range_t, R&& rg, const Compare& x = Compare();
Effects: Initializes comp with x and c with ranges​::​to<Container>(std​::​forward<R>(rg)) and finally calls make_heap(c.begin(), c.end(), comp).

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant