tmp/tmpkjsikf5s/{from.md → to.md}
RENAMED
|
@@ -20,24 +20,31 @@ namespace std {
|
|
| 20 |
|
| 21 |
public:
|
| 22 |
queue() : queue(Container()) {}
|
| 23 |
explicit queue(const Container&);
|
| 24 |
explicit queue(Container&&);
|
|
|
|
|
|
|
| 25 |
template<class Alloc> explicit queue(const Alloc&);
|
| 26 |
template<class Alloc> queue(const Container&, const Alloc&);
|
| 27 |
template<class Alloc> queue(Container&&, const Alloc&);
|
| 28 |
template<class Alloc> queue(const queue&, const Alloc&);
|
| 29 |
template<class Alloc> queue(queue&&, const Alloc&);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
[[nodiscard]] bool empty() const { return c.empty(); }
|
| 32 |
size_type size() const { return c.size(); }
|
| 33 |
reference front() { return c.front(); }
|
| 34 |
const_reference front() const { return c.front(); }
|
| 35 |
reference back() { return c.back(); }
|
| 36 |
const_reference back() const { return c.back(); }
|
| 37 |
void push(const value_type& x) { c.push_back(x); }
|
| 38 |
void push(value_type&& x) { c.push_back(std::move(x)); }
|
|
|
|
| 39 |
template<class... Args>
|
| 40 |
decltype(auto) emplace(Args&&... args)
|
| 41 |
{ return c.emplace_back(std::forward<Args>(args)...); }
|
| 42 |
void pop() { c.pop_front(); }
|
| 43 |
void swap(queue& q) noexcept(is_nothrow_swappable_v<Container>)
|
|
@@ -45,15 +52,27 @@ namespace std {
|
|
| 45 |
};
|
| 46 |
|
| 47 |
template<class Container>
|
| 48 |
queue(Container) -> queue<typename Container::value_type, Container>;
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
template<class Container, class Allocator>
|
| 51 |
queue(Container, Allocator) -> queue<typename Container::value_type, Container>;
|
| 52 |
|
| 53 |
-
template<class
|
| 54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
template<class T, class Container, class Alloc>
|
| 57 |
struct uses_allocator<queue<T, Container>, Alloc>
|
| 58 |
: uses_allocator<Container, Alloc>::type { };
|
| 59 |
}
|
|
|
|
| 20 |
|
| 21 |
public:
|
| 22 |
queue() : queue(Container()) {}
|
| 23 |
explicit queue(const Container&);
|
| 24 |
explicit queue(Container&&);
|
| 25 |
+
template<class InputIterator> queue(InputIterator first, InputIterator last);
|
| 26 |
+
template<container-compatible-range<T> R> queue(from_range_t, R&& rg);
|
| 27 |
template<class Alloc> explicit queue(const Alloc&);
|
| 28 |
template<class Alloc> queue(const Container&, const Alloc&);
|
| 29 |
template<class Alloc> queue(Container&&, const Alloc&);
|
| 30 |
template<class Alloc> queue(const queue&, const Alloc&);
|
| 31 |
template<class Alloc> queue(queue&&, const Alloc&);
|
| 32 |
+
template<class InputIterator, class Alloc>
|
| 33 |
+
queue(InputIterator first, InputIterator last, const Alloc&);
|
| 34 |
+
template<container-compatible-range<T> R, class Alloc>
|
| 35 |
+
queue(from_range_t, R&& rg, const Alloc&);
|
| 36 |
|
| 37 |
[[nodiscard]] bool empty() const { return c.empty(); }
|
| 38 |
size_type size() const { return c.size(); }
|
| 39 |
reference front() { return c.front(); }
|
| 40 |
const_reference front() const { return c.front(); }
|
| 41 |
reference back() { return c.back(); }
|
| 42 |
const_reference back() const { return c.back(); }
|
| 43 |
void push(const value_type& x) { c.push_back(x); }
|
| 44 |
void push(value_type&& x) { c.push_back(std::move(x)); }
|
| 45 |
+
template<container-compatible-range<T> R> void push_range(R&& rg);
|
| 46 |
template<class... Args>
|
| 47 |
decltype(auto) emplace(Args&&... args)
|
| 48 |
{ return c.emplace_back(std::forward<Args>(args)...); }
|
| 49 |
void pop() { c.pop_front(); }
|
| 50 |
void swap(queue& q) noexcept(is_nothrow_swappable_v<Container>)
|
|
|
|
| 52 |
};
|
| 53 |
|
| 54 |
template<class Container>
|
| 55 |
queue(Container) -> queue<typename Container::value_type, Container>;
|
| 56 |
|
| 57 |
+
template<class InputIterator>
|
| 58 |
+
queue(InputIterator, InputIterator) -> queue<iter-value-type<InputIterator>>;
|
| 59 |
+
|
| 60 |
+
template<ranges::input_range R>
|
| 61 |
+
queue(from_range_t, R&&) -> queue<ranges::range_value_t<R>>;
|
| 62 |
+
|
| 63 |
template<class Container, class Allocator>
|
| 64 |
queue(Container, Allocator) -> queue<typename Container::value_type, Container>;
|
| 65 |
|
| 66 |
+
template<class InputIterator, class Allocator>
|
| 67 |
+
queue(InputIterator, InputIterator, Allocator)
|
| 68 |
+
-> queue<iter-value-type<InputIterator>, deque<iter-value-type<InputIterator>,
|
| 69 |
+
Allocator>>;
|
| 70 |
+
|
| 71 |
+
template<ranges::input_range R, class Allocator>
|
| 72 |
+
queue(from_range_t, R&&, Allocator)
|
| 73 |
+
-> queue<ranges::range_value_t<R>, deque<ranges::range_value_t<R>, Allocator>>;
|
| 74 |
|
| 75 |
template<class T, class Container, class Alloc>
|
| 76 |
struct uses_allocator<queue<T, Container>, Alloc>
|
| 77 |
: uses_allocator<Container, Alloc>::type { };
|
| 78 |
}
|