From Jason Turner

[priqueue.overview]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpqu6mgqx4/{from.md → to.md} +37 -34
tmp/tmpqu6mgqx4/{from.md → to.md} RENAMED
@@ -12,67 +12,70 @@ defines a strict weak ordering [[alg.sorting]].
12
  namespace std {
13
  template<class T, class Container = vector<T>,
14
  class Compare = less<typename Container::value_type>>
15
  class priority_queue {
16
  public:
17
- using value_type = typename Container::value_type;
18
- using reference = typename Container::reference;
19
- using const_reference = typename Container::const_reference;
20
- using size_type = typename Container::size_type;
21
  using container_type = Container;
22
  using value_compare = Compare;
23
 
24
  protected:
25
  Container c;
26
  Compare comp;
27
 
28
  public:
29
- priority_queue() : priority_queue(Compare()) {}
30
- explicit priority_queue(const Compare& x) : priority_queue(x, Container()) {}
31
- priority_queue(const Compare& x, const Container&);
32
- priority_queue(const Compare& x, Container&&);
33
  template<class InputIterator>
34
- priority_queue(InputIterator first, InputIterator last, const Compare& x = Compare());
 
35
  template<class InputIterator>
36
- priority_queue(InputIterator first, InputIterator last, const Compare& x,
37
  const Container&);
38
  template<class InputIterator>
39
- priority_queue(InputIterator first, InputIterator last, const Compare& x,
40
  Container&&);
41
  template<container-compatible-range<T> R>
42
- priority_queue(from_range_t, R&& rg, const Compare& x = Compare());
43
- template<class Alloc> explicit priority_queue(const Alloc&);
44
- template<class Alloc> priority_queue(const Compare&, const Alloc&);
45
- template<class Alloc> priority_queue(const Compare&, const Container&, const Alloc&);
46
- template<class Alloc> priority_queue(const Compare&, Container&&, const Alloc&);
47
- template<class Alloc> priority_queue(const priority_queue&, const Alloc&);
48
- template<class Alloc> priority_queue(priority_queue&&, const Alloc&);
 
49
  template<class InputIterator, class Alloc>
50
- priority_queue(InputIterator, InputIterator, const Alloc&);
51
  template<class InputIterator, class Alloc>
52
- priority_queue(InputIterator, InputIterator, const Compare&, const Alloc&);
53
  template<class InputIterator, class Alloc>
54
- priority_queue(InputIterator, InputIterator, const Compare&, const Container&,
55
  const Alloc&);
56
  template<class InputIterator, class Alloc>
57
- priority_queue(InputIterator, InputIterator, const Compare&, Container&&, const Alloc&);
 
58
  template<container-compatible-range<T> R, class Alloc>
59
- priority_queue(from_range_t, R&& rg, const Compare&, const Alloc&);
60
  template<container-compatible-range<T> R, class Alloc>
61
- priority_queue(from_range_t, R&& rg, const Alloc&);
62
 
63
- [[nodiscard]] bool empty() const { return c.empty(); }
64
- size_type size() const { return c.size(); }
65
- const_reference top() const { return c.front(); }
66
- void push(const value_type& x);
67
- void push(value_type&& x);
68
  template<container-compatible-range<T> R>
69
- void push_range(R&& rg);
70
- template<class... Args> void emplace(Args&&... args);
71
- void pop();
72
- void swap(priority_queue& q) noexcept(is_nothrow_swappable_v<Container> &&
73
- is_nothrow_swappable_v<Compare>)
74
  { using std::swap; swap(c, q.c); swap(comp, q.comp); }
75
  };
76
 
77
  template<class Compare, class Container>
78
  priority_queue(Compare, Container)
 
12
  namespace std {
13
  template<class T, class Container = vector<T>,
14
  class Compare = less<typename Container::value_type>>
15
  class priority_queue {
16
  public:
17
+ using value_type = Container::value_type;
18
+ using reference = Container::reference;
19
+ using const_reference = Container::const_reference;
20
+ using size_type = Container::size_type;
21
  using container_type = Container;
22
  using value_compare = Compare;
23
 
24
  protected:
25
  Container c;
26
  Compare comp;
27
 
28
  public:
29
+ constexpr priority_queue() : priority_queue(Compare()) {}
30
+ constexpr explicit priority_queue(const Compare& x) : priority_queue(x, Container()) {}
31
+ constexpr priority_queue(const Compare& x, const Container&);
32
+ constexpr priority_queue(const Compare& x, Container&&);
33
  template<class InputIterator>
34
+ constexpr priority_queue(InputIterator first, InputIterator last,
35
+ const Compare& x = Compare());
36
  template<class InputIterator>
37
+ constexpr priority_queue(InputIterator first, InputIterator last, const Compare& x,
38
  const Container&);
39
  template<class InputIterator>
40
+ constexpr priority_queue(InputIterator first, InputIterator last, const Compare& x,
41
  Container&&);
42
  template<container-compatible-range<T> R>
43
+ constexpr priority_queue(from_range_t, R&& rg, const Compare& x = Compare());
44
+ template<class Alloc> constexpr explicit priority_queue(const Alloc&);
45
+ template<class Alloc> constexpr priority_queue(const Compare&, const Alloc&);
46
+ template<class Alloc>
47
+ constexpr priority_queue(const Compare&, const Container&, const Alloc&);
48
+ template<class Alloc> constexpr priority_queue(const Compare&, Container&&, const Alloc&);
49
+ template<class Alloc> constexpr priority_queue(const priority_queue&, const Alloc&);
50
+ template<class Alloc> constexpr priority_queue(priority_queue&&, const Alloc&);
51
  template<class InputIterator, class Alloc>
52
+ constexpr priority_queue(InputIterator, InputIterator, const Alloc&);
53
  template<class InputIterator, class Alloc>
54
+ constexpr priority_queue(InputIterator, InputIterator, const Compare&, const Alloc&);
55
  template<class InputIterator, class Alloc>
56
+ constexpr priority_queue(InputIterator, InputIterator, const Compare&, const Container&,
57
  const Alloc&);
58
  template<class InputIterator, class Alloc>
59
+ constexpr priority_queue(InputIterator, InputIterator, const Compare&, Container&&,
60
+ const Alloc&);
61
  template<container-compatible-range<T> R, class Alloc>
62
+ constexpr priority_queue(from_range_t, R&& rg, const Compare&, const Alloc&);
63
  template<container-compatible-range<T> R, class Alloc>
64
+ constexpr priority_queue(from_range_t, R&& rg, const Alloc&);
65
 
66
+ constexpr bool empty() const { return c.empty(); }
67
+ constexpr size_type size() const { return c.size(); }
68
+ constexpr const_reference top() const { return c.front(); }
69
+ constexpr void push(const value_type& x);
70
+ constexpr void push(value_type&& x);
71
  template<container-compatible-range<T> R>
72
+ constexpr void push_range(R&& rg);
73
+ template<class... Args> constexpr void emplace(Args&&... args);
74
+ constexpr void pop();
75
+ constexpr void swap(priority_queue& q)
76
+ noexcept(is_nothrow_swappable_v<Container> && is_nothrow_swappable_v<Compare>)
77
  { using std::swap; swap(c, q.c); swap(comp, q.comp); }
78
  };
79
 
80
  template<class Compare, class Container>
81
  priority_queue(Compare, Container)