build: switch to C++17

Change-Id: Ie68020a04b7e20b74778b6d0370544ded55c5e26
diff --git a/tests/daemon/table/cs-fixture.hpp b/tests/daemon/table/cs-fixture.hpp
index 0dced9c..82fbb7e 100644
--- a/tests/daemon/table/cs-fixture.hpp
+++ b/tests/daemon/table/cs-fixture.hpp
@@ -92,12 +92,12 @@
   size_t
   erase(const Name& prefix, size_t limit)
   {
-    optional<size_t> nErased;
-    cs.erase(prefix, limit, [&] (size_t nErased1) { nErased = nErased1; });
+    std::optional<size_t> nErased;
+    cs.erase(prefix, limit, [&] (size_t n) { nErased = n; });
 
     // current Cs::erase implementation is synchronous
     // if callback was not invoked, bad_optional_access would occur
-    return *nErased;
+    return nErased.value();
   }
 
 protected:
diff --git a/tests/daemon/table/name-tree.t.cpp b/tests/daemon/table/name-tree.t.cpp
index d51474d..2649834 100644
--- a/tests/daemon/table/name-tree.t.cpp
+++ b/tests/daemon/table/name-tree.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,
@@ -28,6 +28,8 @@
 #include "tests/test-common.hpp"
 #include "tests/daemon/global-io-fixture.hpp"
 
+#include <unordered_set>
+
 namespace nfd {
 namespace name_tree {
 namespace tests {
diff --git a/tests/daemon/table/pit-entry.t.cpp b/tests/daemon/table/pit-entry.t.cpp
index d5b71fc..6f97a1c 100644
--- a/tests/daemon/table/pit-entry.t.cpp
+++ b/tests/daemon/table/pit-entry.t.cpp
@@ -51,7 +51,7 @@
   auto interest1 = makeInterest("/B");
   BOOST_CHECK_EQUAL(entry.canMatch(*interest1), false);
 
-  auto interest2 = makeInterest("/A", false, nullopt, 27956);
+  auto interest2 = makeInterest("/A", false, std::nullopt, 27956);
   BOOST_CHECK_EQUAL(entry.canMatch(*interest2), true);
 
   auto interest3 = makeInterest("/A", false, 6210_ms);
diff --git a/tests/daemon/table/pit.t.cpp b/tests/daemon/table/pit.t.cpp
index ca9ac3c..03438d4 100644
--- a/tests/daemon/table/pit.t.cpp
+++ b/tests/daemon/table/pit.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,
@@ -70,7 +70,7 @@
   bool isNew = false;
 
   // base
-  auto interestA = makeInterest(name1, false, nullopt, 2148);
+  auto interestA = makeInterest(name1, false, std::nullopt, 2148);
   std::tie(entry, isNew) = pit.insert(*interestA);
   BOOST_CHECK_EQUAL(isNew, true);
   BOOST_CHECK_EQUAL(pit.size(), 1);