[#bsl-priority_queue-034-2constructor-093] = xref:bsl.adoc[bsl]::xref:bsl/priority_queue-034.adoc[priority_queue]::priority_queue :relfileprefix: ../../ :mrdocs: Create a priority queue from `container` using `basicAllocator`. == Synopsis Declared in `<bslstl_priorityqueue.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ALLOCATOR> priority_queue( COMPARATOR const& comparator, CONTAINER const& container, ALLOCATOR const& basicAllocator) requires bsl::uses_allocator<CONTAINER, ALLOCATOR>::value; ---- == Description Create a priority queue, adapting the specified `container` that uses the specified `basicAllocator` to supply memory, and the specified `comparator` to order elements in the priority queue. Note that this constructor is only defined if the underlying container uses allocator. Otherwise this constructor is disabled. == Parameters [cols="1,4"] |=== | Name| Description | *comparator* | comparator used to order elements | *container* | container whose contents initialize this priority queue | *basicAllocator* | allocator used to supply memory |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#