build: switch to C++17
Change-Id: Ie68020a04b7e20b74778b6d0370544ded55c5e26
diff --git a/tests/tools/nfdc/command-parser.t.cpp b/tests/tools/nfdc/command-parser.t.cpp
index 26c97fb..3c77c05 100644
--- a/tests/tools/nfdc/command-parser.t.cpp
+++ b/tests/tools/nfdc/command-parser.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, 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,
@@ -107,8 +107,8 @@
std::tie(noun, verb, ca, execute) = parser.parse({"route", "add", "/n", "300"}, ParseMode::ONE_SHOT);
BOOST_CHECK_EQUAL(noun, "route");
BOOST_CHECK_EQUAL(verb, "add");
- BOOST_CHECK_EQUAL(ndn::any_cast<Name>(ca.at("prefix")), "/n");
- BOOST_CHECK_EQUAL(ndn::any_cast<uint64_t>(ca.at("nexthop")), 300);
+ BOOST_CHECK_EQUAL(std::any_cast<Name>(ca.at("prefix")), "/n");
+ BOOST_CHECK_EQUAL(std::any_cast<uint64_t>(ca.at("nexthop")), 300);
std::tie(noun, verb, ca, execute) = parser.parse({"route", "add2", "/n", "300"}, ParseMode::ONE_SHOT);
BOOST_CHECK_EQUAL(noun, "route");
@@ -117,7 +117,7 @@
std::tie(noun, verb, ca, execute) = parser.parse({"route", "list", "400"}, ParseMode::ONE_SHOT);
BOOST_CHECK_EQUAL(noun, "route");
BOOST_CHECK_EQUAL(verb, "list");
- BOOST_CHECK_EQUAL(ndn::any_cast<uint64_t>(ca.at("nexthop")), 400);
+ BOOST_CHECK_EQUAL(std::any_cast<uint64_t>(ca.at("nexthop")), 400);
BOOST_CHECK_THROW(parser.parse({}, ParseMode::ONE_SHOT),
CommandParser::NoSuchCommandError);
diff --git a/tests/tools/nfdc/face-module.t.cpp b/tests/tools/nfdc/face-module.t.cpp
index e2c9a86..d99383e 100644
--- a/tests/tools/nfdc/face-module.t.cpp
+++ b/tests/tools/nfdc/face-module.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, 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,
@@ -379,7 +379,8 @@
{
protected:
void
- respond409(const Interest& interest, FacePersistency persistency, optional<uint64_t> mtu = {},
+ respond409(const Interest& interest, FacePersistency persistency,
+ std::optional<uint64_t> mtu = std::nullopt,
bool enableLpReliability = false,
bool enableCongestionMarking = false)
{
diff --git a/tests/tools/nfdc/status-fixture.hpp b/tests/tools/nfdc/status-fixture.hpp
index 96edbba..f00b135 100644
--- a/tests/tools/nfdc/status-fixture.hpp
+++ b/tests/tools/nfdc/status-fixture.hpp
@@ -64,7 +64,7 @@
class StatusFixture : public MockNfdMgmtFixture
{
protected:
- using ValidatorUniquePtr = typename std::result_of<MakeValidator(Face&, KeyChain&)>::type;
+ using ValidatorUniquePtr = std::invoke_result_t<MakeValidator, Face&, KeyChain&>;
StatusFixture()
: validator(MakeValidator()(face, m_keyChain))