41 #ifndef PB_DS_PRIORITY_QUEUE_HPP
42 #define PB_DS_PRIORITY_QUEUE_HPP
51 template<
typename Value_Type,
53 typename Tag = pairing_heap_tag,
56 :
public detail::priority_queue_base_dispatch<Value_Type,Cmp_Fn,Tag,Allocator>::type
59 typedef typename detail::priority_queue_base_dispatch<Value_Type,Cmp_Fn,Tag,Allocator>::type base_type;
62 typedef Value_Type value_type;
63 typedef Cmp_Fn cmp_fn;
64 typedef Tag container_category;
65 typedef Allocator allocator_type;
66 typedef typename allocator_type::size_type size_type;
67 typedef typename allocator_type::difference_type difference_type;
69 typedef typename allocator_type::template rebind<value_type>::other value_rebind;
70 typedef typename value_rebind::reference reference;
71 typedef typename value_rebind::const_reference const_reference;
72 typedef typename value_rebind::pointer pointer;
73 typedef typename value_rebind::const_pointer const_pointer;
75 typedef typename base_type::const_point_iterator const_point_iterator;
76 typedef typename base_type::point_iterator point_iterator;
77 typedef typename base_type::const_iterator const_iterator;
78 typedef typename base_type::iterator iterator;
84 priority_queue(
const cmp_fn& r_cmp_fn) : base_type(r_cmp_fn) { }
90 priority_queue(It first_it, It last_it)
91 { base_type::copy_from_range(first_it, last_it); }
98 priority_queue(It first_it, It last_it,
const cmp_fn& r_cmp_fn)
100 { base_type::copy_from_range(first_it, last_it); }
102 priority_queue(
const priority_queue& other)
103 : base_type((const base_type& )other) { }
106 ~priority_queue() { }
109 operator=(
const priority_queue& other)
113 priority_queue tmp(other);
120 swap(priority_queue& other)
121 { base_type::swap(other); }
The "standard" allocator, as per [20.4].Further details: http://gcc.gnu.org/onlinedocs/libstdc++/manu...
One of the comparison functors.
GNU extensions for policy-based data structures for public use.