41 #ifndef PB_DS_PRIORITY_QUEUE_HPP
42 #define PB_DS_PRIORITY_QUEUE_HPP
52 template<
typename Value_Type,
54 typename Tag = pairing_heap_tag,
57 :
public detail::priority_queue_base_dispatch<Value_Type,
58 Cmp_Fn,Tag,Allocator>::type
62 detail::priority_queue_base_dispatch<Value_Type, Cmp_Fn,
63 Tag, Allocator>::type base_type;
66 typedef Value_Type value_type;
67 typedef Cmp_Fn cmp_fn;
68 typedef Tag container_category;
69 typedef Allocator allocator_type;
70 typedef typename allocator_type::size_type size_type;
71 typedef typename allocator_type::difference_type difference_type;
73 typedef typename allocator_type::template rebind<value_type>::other value_rebind;
74 typedef typename value_rebind::reference reference;
75 typedef typename value_rebind::const_reference const_reference;
76 typedef typename value_rebind::pointer pointer;
77 typedef typename value_rebind::const_pointer const_pointer;
79 typedef typename base_type::const_point_iterator const_point_iterator;
80 typedef typename base_type::point_iterator point_iterator;
81 typedef typename base_type::const_iterator const_iterator;
82 typedef typename base_type::iterator iterator;
88 priority_queue(
const cmp_fn& r_cmp_fn) : base_type(r_cmp_fn) { }
94 priority_queue(It first_it, It last_it)
95 { base_type::copy_from_range(first_it, last_it); }
101 template<
typename It>
102 priority_queue(It first_it, It last_it,
const cmp_fn& r_cmp_fn)
103 : base_type(r_cmp_fn)
104 { base_type::copy_from_range(first_it, last_it); }
106 priority_queue(
const priority_queue& other)
107 : base_type((const base_type& )other) { }
110 ~priority_queue() { }
113 operator=(
const priority_queue& other)
117 priority_queue tmp(other);
124 swap(priority_queue& other)
125 { base_type::swap(other); }
One of the comparison functors.
The standard allocator, as per [20.4].Further details: http://gcc.gnu.org/onlinedocs/libstdc++/manual...