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/daemon/mgmt/strategy-choice-manager.cpp b/daemon/mgmt/strategy-choice-manager.cpp
index 9be09d2..ea0c056 100644
--- a/daemon/mgmt/strategy-choice-manager.cpp
+++ b/daemon/mgmt/strategy-choice-manager.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,
@@ -63,9 +63,7 @@
}
NFD_LOG_DEBUG("strategy-choice/set(" << prefix << "," << strategy << "): OK");
- bool hasEntry = false;
- Name instanceName;
- std::tie(hasEntry, instanceName) = m_table.get(prefix);
+ auto [hasEntry, instanceName] = m_table.get(prefix);
BOOST_ASSERT_MSG(hasEntry, "StrategyChoice entry must exist after StrategyChoice::insert");
parameters.setStrategy(instanceName);
return done(ControlResponse(200, "OK").setBody(parameters.wireEncode()));