aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/queue.h
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:15 +0300
commit72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch)
treeda2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /util/generic/queue.h
parent778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff)
downloadydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic/queue.h')
-rw-r--r--util/generic/queue.h54
1 files changed, 27 insertions, 27 deletions
diff --git a/util/generic/queue.h b/util/generic/queue.h
index f5959f68f2..14348f6250 100644
--- a/util/generic/queue.h
+++ b/util/generic/queue.h
@@ -1,28 +1,28 @@
-#pragma once
-
+#pragma once
+
#include "fwd.h"
-#include "deque.h"
-#include "vector.h"
-#include "utility.h"
-
-#include <util/str_stl.h>
-
-#include <queue>
-
+#include "deque.h"
+#include "vector.h"
+#include "utility.h"
+
+#include <util/str_stl.h>
+
+#include <queue>
+
template <class T, class S>
class TQueue: public std::queue<T, S> {
- using TBase = std::queue<T, S>;
-
-public:
+ using TBase = std::queue<T, S>;
+
+public:
using TBase::TBase;
-
+
inline explicit operator bool() const noexcept {
return !this->empty();
}
- inline void clear() {
- this->c.clear();
- }
+ inline void clear() {
+ this->c.clear();
+ }
inline S& Container() {
return this->c;
@@ -31,23 +31,23 @@ public:
inline const S& Container() const {
return this->c;
}
-};
-
+};
+
template <class T, class S, class C>
class TPriorityQueue: public std::priority_queue<T, S, C> {
using TBase = std::priority_queue<T, S, C>;
-
-public:
+
+public:
using TBase::TBase;
-
+
inline explicit operator bool() const noexcept {
return !this->empty();
}
- inline void clear() {
- this->c.clear();
- }
-
+ inline void clear() {
+ this->c.clear();
+ }
+
inline S& Container() {
return this->c;
}
@@ -55,4 +55,4 @@ public:
inline const S& Container() const {
return this->c;
}
-};
+};