Use more C++17 features
Mainly structured bindings, inline variables, and class template
argument deduction, plus many more smaller things.
Change-Id: I810d17e0adb470426e4e30c898e03b3140ad052f
diff --git a/tests/daemon/mgmt/strategy-choice-manager.t.cpp b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
index 7fdd8fa..3e42d1c 100644
--- a/tests/daemon/mgmt/strategy-choice-manager.t.cpp
+++ b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2021, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -62,12 +62,8 @@
Name
getInstanceName(const Name& name) const
{
- bool hasEntry = false;
- Name instanceName;
- std::tie(hasEntry, instanceName) = sc.get(name);
- return hasEntry ?
- instanceName :
- Name("/no-StrategyChoice-entry-at").append(name);
+ auto [hasEntry, instanceName] = sc.get(name);
+ return hasEntry ? instanceName : Name("/no-StrategyChoice-entry-at").append(name);
}
protected: