summaryrefslogtreecommitdiffstats
path: root/vespalib/src/tests/arrayqueue/arrayqueue.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-12-21 18:37:21 +0100
committerGitHub <noreply@github.com>2022-12-21 18:37:21 +0100
commit541a88143878c25d771a6878376ef66416d54102 (patch)
tree6a2d66962f39b0bb362e5dfdfc1536d1fcf7b9fb /vespalib/src/tests/arrayqueue/arrayqueue.cpp
parent766ee34d38c47deb1a234590eba6413d075d822a (diff)
parent13c416cd71b9927b60cc5ea4c9bcecafe472e8c9 (diff)
Merge pull request #25325 from vespa-engine/geirst/typedef-to-using-in-cpp-code
Change from typedef to using in C++ code.
Diffstat (limited to 'vespalib/src/tests/arrayqueue/arrayqueue.cpp')
-rw-r--r--vespalib/src/tests/arrayqueue/arrayqueue.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/vespalib/src/tests/arrayqueue/arrayqueue.cpp b/vespalib/src/tests/arrayqueue/arrayqueue.cpp
index ff957bd60f4..95ec92d5879 100644
--- a/vespalib/src/tests/arrayqueue/arrayqueue.cpp
+++ b/vespalib/src/tests/arrayqueue/arrayqueue.cpp
@@ -52,21 +52,21 @@ struct FunkyItem {
};
struct Copy {
- typedef ArrayQueue<Int> Q;
+ using Q = ArrayQueue<Int>;
static void push(Q &q, int v) { Int value(v); q.push(value); }
static void pushFront(Q &q, int v) { Int value(v); q.pushFront(value); }
static void set(Q &q, int idx, int val) { q.access(idx) = val; }
};
struct Move {
- typedef ArrayQueue<std::unique_ptr<Int> > Q;
+ using Q = ArrayQueue<std::unique_ptr<Int> >;
static void push(Q &q, int v) { q.push(std::unique_ptr<Int>(new Int(v))); }
static void pushFront(Q &q, int v) { q.pushFront(std::unique_ptr<Int>(new Int(v))); }
static void set(Q &q, int idx, int val) { *q.access(idx) = val; }
};
struct Emplace {
- typedef ArrayQueue<FunkyItem> Q;
+ using Q = ArrayQueue<FunkyItem>;
static void push(Q &q, int v) { q.emplace(v, v); }
static void pushFront(Q &q, int v) { q.emplaceFront(v, v); }
static void set(Q &q, int idx, int val) {
@@ -199,7 +199,7 @@ template <typename T> void subTestCopy() { TEST_ERROR("undefined"); }
template <> void subTestCopy<Emplace>() {}
template <> void subTestCopy<Move>() {}
template <> void subTestCopy<Copy>() {
- typedef Copy T;
+ using T = Copy;
{ // copy construct queue
T::Q q1;
T::push(q1, 1);