build: migrate to C++17

Change-Id: Ic66b1703fc7d1d51d61c442de859e0921c0bdd7a
diff --git a/.jenkins.d/40-headers-check.sh b/.jenkins.d/40-headers-check.sh
index da13efa..ad23cee 100755
--- a/.jenkins.d/40-headers-check.sh
+++ b/.jenkins.d/40-headers-check.sh
@@ -18,7 +18,7 @@
 fi
 
 CXX=${CXX:-g++}
-STD=-std=c++14
+STD=-std=c++17
 CXXFLAGS="-O2 -Wall -Wno-unneeded-internal-declaration -Wno-unused-const-variable $(pkg-config --cflags libndn-cxx $PCFILE)"
 INCLUDEDIR="$(pkg-config --variable=includedir $PCFILE)"/$PROJ
 
diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index f086c17..7c6d282 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -136,7 +136,7 @@
     """
     def getGeneralFlags(self, conf):
         flags = super(GccBasicFlags, self).getGeneralFlags(conf)
-        flags['CXXFLAGS'] += ['-std=c++14']
+        flags['CXXFLAGS'] += ['-std=c++17']
         if Utils.unversioned_sys_platform() == 'linux':
             flags['LINKFLAGS'] += ['-fuse-ld=gold']
         elif Utils.unversioned_sys_platform() == 'freebsd':
diff --git a/PSync/consumer.hpp b/PSync/consumer.hpp
index b081937..07c3443 100644
--- a/PSync/consumer.hpp
+++ b/PSync/consumer.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  The University of Memphis
+ * Copyright (c) 2014-2022,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -119,12 +119,12 @@
     return m_subscriptionList.find(prefix) != m_subscriptionList.end();
   }
 
-  ndn::optional<uint64_t>
+  std::optional<uint64_t>
   getSeqNo(const ndn::Name& prefix) const
   {
     auto it = m_prefixes.find(prefix);
     if (it == m_prefixes.end()) {
-      return ndn::nullopt;
+      return std::nullopt;
     }
     return it->second;
   }
diff --git a/PSync/detail/bloom-filter.cpp b/PSync/detail/bloom-filter.cpp
index 041ead0..cdc7345 100644
--- a/PSync/detail/bloom-filter.cpp
+++ b/PSync/detail/bloom-filter.cpp
@@ -53,8 +53,7 @@
 #include <cstdlib>
 #include <limits>
 
-namespace psync {
-namespace detail {
+namespace psync::detail {
 
 // https://github.com/ArashPartow/bloom
 
@@ -376,5 +375,4 @@
   }
 }
 
-} // namespace detail
-} // namespace psync
+} // namespace psync::detail
diff --git a/PSync/detail/bloom-filter.hpp b/PSync/detail/bloom-filter.hpp
index 8ed7028..611e2eb 100644
--- a/PSync/detail/bloom-filter.hpp
+++ b/PSync/detail/bloom-filter.hpp
@@ -52,8 +52,7 @@
 #include <string>
 #include <vector>
 
-namespace psync {
-namespace detail {
+namespace psync::detail {
 
 class bloom_parameters;
 
@@ -142,7 +141,6 @@
   double                  desired_false_positive_probability_ = 0.0;
 };
 
-} // namespace detail
-} // namespace psync
+} // namespace psync::detail
 
 #endif // PSYNC_DETAIL_BLOOM_FILTER_HPP
diff --git a/PSync/detail/iblt.cpp b/PSync/detail/iblt.cpp
index b62b893..9f38f6e 100644
--- a/PSync/detail/iblt.cpp
+++ b/PSync/detail/iblt.cpp
@@ -48,8 +48,7 @@
 
 #include <ndn-cxx/util/exception.hpp>
 
-namespace psync {
-namespace detail {
+namespace psync::detail {
 
 namespace be = boost::endian;
 
@@ -267,5 +266,4 @@
   return os;
 }
 
-} // namespace detail
-} // namespace psync
+} // namespace psync::detail
diff --git a/PSync/detail/iblt.hpp b/PSync/detail/iblt.hpp
index b81809b..65b2a5e 100644
--- a/PSync/detail/iblt.hpp
+++ b/PSync/detail/iblt.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis
+ * Copyright (c) 2014-2022,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -53,8 +53,7 @@
 #include <set>
 #include <string>
 
-namespace psync {
-namespace detail {
+namespace psync::detail {
 
 class HashTableEntry
 {
@@ -162,8 +161,8 @@
 
 private:
   std::vector<HashTableEntry> m_hashTable;
-  static const int INSERT = 1;
-  static const int ERASE = -1;
+  static constexpr int INSERT = 1;
+  static constexpr int ERASE = -1;
   CompressionScheme m_compressionScheme;
 };
 
@@ -176,7 +175,6 @@
 std::ostream&
 operator<<(std::ostream& os, const IBLT& iblt);
 
-} // namespace detail
-} // namespace psync
+} // namespace psync::detail
 
 #endif // PSYNC_DETAIL_IBLT_HPP
diff --git a/PSync/detail/state.cpp b/PSync/detail/state.cpp
index 2f7f1b6..3f9146f 100644
--- a/PSync/detail/state.cpp
+++ b/PSync/detail/state.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis
+ * Copyright (c) 2014-2022,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -22,8 +22,7 @@
 #include <ndn-cxx/util/exception.hpp>
 #include <ndn-cxx/util/ostream-joiner.hpp>
 
-namespace psync {
-namespace detail {
+namespace psync::detail {
 
 State::State(const ndn::Block& block)
 {
@@ -76,8 +75,7 @@
 State::wireDecode(const ndn::Block& wire)
 {
   if (wire.type() != tlv::PSyncContent) {
-    NDN_THROW(ndn::tlv::Error("Expected PSyncContent element, but TLV has type " +
-                              ndn::to_string(wire.type())));
+    NDN_THROW(ndn::tlv::Error("PSyncContent", wire.type()));
   }
 
   m_content.clear();
@@ -90,8 +88,7 @@
       m_content.emplace_back(*it);
     }
     else {
-      NDN_THROW(ndn::tlv::Error("Expected Name element, but TLV has type " +
-                                ndn::to_string(it->type())));
+      NDN_THROW(ndn::tlv::Error("Name", it->type()));
     }
   }
 }
@@ -108,5 +105,4 @@
   return os;
 }
 
-} // namespace detail
-} // namespace psync
+} // namespace psync::detail
diff --git a/PSync/detail/state.hpp b/PSync/detail/state.hpp
index 90f5ab3..c7211ab 100644
--- a/PSync/detail/state.hpp
+++ b/PSync/detail/state.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis
+ * Copyright (c) 2014-2022,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -22,16 +22,15 @@
 
 #include <ndn-cxx/name.hpp>
 
-namespace psync {
-namespace tlv {
+namespace psync::tlv {
 
 enum {
   PSyncContent = 128
 };
 
-} // namespace tlv
+} // namespace psync::tlv
 
-namespace detail {
+namespace psync::detail {
 
 class State
 {
@@ -82,7 +81,6 @@
 std::ostream&
 operator<<(std::ostream& os, const State& State);
 
-} // namespace detail
-} // namespace psync
+} // namespace psync::detail
 
 #endif // PSYNC_DETAIL_STATE_HPP
diff --git a/PSync/detail/util.cpp b/PSync/detail/util.cpp
index 9a3e5cf..c1450ef 100644
--- a/PSync/detail/util.cpp
+++ b/PSync/detail/util.cpp
@@ -46,8 +46,7 @@
   #include <boost/iostreams/filter/zstd.hpp>
 #endif
 
-namespace psync {
-namespace detail {
+namespace psync::detail {
 
 namespace bio = boost::iostreams;
 
@@ -96,9 +95,9 @@
   switch (len & 3)
   {
     case 3: k1 ^= tail[2] << 16;
-            NDN_CXX_FALLTHROUGH;
+            [[fallthrough]];
     case 2: k1 ^= tail[1] << 8;
-            NDN_CXX_FALLTHROUGH;
+            [[fallthrough]];
     case 1: k1 ^= tail[0];
             k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1;
   }
@@ -235,5 +234,4 @@
   return out.buf();
 }
 
-} // namespace detail
-} // namespace psync
+} // namespace psync::detail
diff --git a/PSync/detail/util.hpp b/PSync/detail/util.hpp
index cf405f8..3610c1b 100644
--- a/PSync/detail/util.hpp
+++ b/PSync/detail/util.hpp
@@ -25,8 +25,7 @@
 #include <ndn-cxx/encoding/buffer.hpp>
 #include <ndn-cxx/util/span.hpp>
 
-namespace psync {
-namespace detail {
+namespace psync::detail {
 
 uint32_t
 murmurHash3(const void* key, size_t len, uint32_t seed);
@@ -49,7 +48,6 @@
 std::shared_ptr<ndn::Buffer>
 decompress(CompressionScheme scheme, ndn::span<const uint8_t> buffer);
 
-} // namespace detail
-} // namespace psync
+} // namespace psync::detail
 
 #endif // PSYNC_DETAIL_UTIL_HPP
diff --git a/PSync/full-producer.cpp b/PSync/full-producer.cpp
index 70e7a52..d899965 100644
--- a/PSync/full-producer.cpp
+++ b/PSync/full-producer.cpp
@@ -65,7 +65,7 @@
 }
 
 void
-FullProducer::publishName(const ndn::Name& prefix, ndn::optional<uint64_t> seq)
+FullProducer::publishName(const ndn::Name& prefix, std::optional<uint64_t> seq)
 {
   if (m_prefixes.find(prefix) == m_prefixes.end()) {
     NDN_LOG_WARN("Prefix not added: " << prefix);
@@ -73,11 +73,8 @@
   }
 
   uint64_t newSeq = seq.value_or(m_prefixes[prefix] + 1);
-
   NDN_LOG_INFO("Publish: " << prefix << "/" << newSeq);
-
   updateSeqNo(prefix, newSeq);
-
   satisfyPendingInterests();
 }
 
@@ -296,7 +293,6 @@
     NDN_LOG_ERROR("Cannot parse received sync Data: " << e.what());
     return;
   }
-
   NDN_LOG_DEBUG("Sync Data received: " << state);
 
   std::vector<MissingDataInfo> updates;
diff --git a/PSync/full-producer.hpp b/PSync/full-producer.hpp
index 53d09b5..d660b66 100644
--- a/PSync/full-producer.hpp
+++ b/PSync/full-producer.hpp
@@ -80,7 +80,7 @@
    * @param seq the sequence number of the prefix
    */
   void
-  publishName(const ndn::Name& prefix, ndn::optional<uint64_t> seq = ndn::nullopt);
+  publishName(const ndn::Name& prefix, std::optional<uint64_t> seq = std::nullopt);
 
 PSYNC_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   /**
diff --git a/PSync/partial-producer.cpp b/PSync/partial-producer.cpp
index 202935c..852a68e 100644
--- a/PSync/partial-producer.cpp
+++ b/PSync/partial-producer.cpp
@@ -54,18 +54,15 @@
 }
 
 void
-PartialProducer::publishName(const ndn::Name& prefix, ndn::optional<uint64_t> seq)
+PartialProducer::publishName(const ndn::Name& prefix, std::optional<uint64_t> seq)
 {
   if (m_prefixes.find(prefix) == m_prefixes.end()) {
     return;
   }
 
   uint64_t newSeq = seq.value_or(m_prefixes[prefix] + 1);
-
   NDN_LOG_INFO("Publish: " << prefix << "/" << newSeq);
-
   updateSeqNo(prefix, newSeq);
-
   satisfyPendingSyncInterests(prefix);
 }
 
diff --git a/PSync/partial-producer.hpp b/PSync/partial-producer.hpp
index 07ffabd..48ff01e 100644
--- a/PSync/partial-producer.hpp
+++ b/PSync/partial-producer.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  The University of Memphis
+ * Copyright (c) 2014-2022,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -76,7 +76,7 @@
    * @param seq the sequence number of the prefix
    */
   void
-  publishName(const ndn::Name& prefix, ndn::optional<uint64_t> seq = ndn::nullopt);
+  publishName(const ndn::Name& prefix, std::optional<uint64_t> seq = std::nullopt);
 
 private:
   /**
diff --git a/PSync/producer-base.hpp b/PSync/producer-base.hpp
index 123b360..29e682d 100644
--- a/PSync/producer-base.hpp
+++ b/PSync/producer-base.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  The University of Memphis
+ * Copyright (c) 2014-2022,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -79,12 +79,12 @@
    *
    * @param prefix prefix to get the sequence number of
    */
-  ndn::optional<uint64_t>
+  std::optional<uint64_t>
   getSeqNo(const ndn::Name& prefix) const
   {
     auto it = m_prefixes.find(prefix);
     if (it == m_prefixes.end()) {
-      return ndn::nullopt;
+      return std::nullopt;
     }
     return it->second;
   }
diff --git a/README.md b/README.md
index 6523357..8d03a64 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
 
 [![CI](https://github.com/named-data/PSync/actions/workflows/ci.yml/badge.svg)](https://github.com/named-data/PSync/actions/workflows/ci.yml)
 [![Docs](https://github.com/named-data/PSync/actions/workflows/docs.yml/badge.svg)](https://github.com/named-data/PSync/actions/workflows/docs.yml)
-![Language](https://img.shields.io/badge/C%2B%2B-14-blue)
+![Language](https://img.shields.io/badge/C%2B%2B-17-blue)
 ![Latest version](https://img.shields.io/github/v/tag/named-data/PSync?label=Latest%20version)
 
 The PSync library implements the
diff --git a/examples/full-sync.cpp b/examples/full-sync.cpp
index f92149d..01da1dd 100644
--- a/examples/full-sync.cpp
+++ b/examples/full-sync.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  The University of Memphis
+ * Copyright (c) 2014-2022,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -53,7 +53,7 @@
   {
     // Add user prefixes and schedule updates for them in specified interval
     for (int i = 0; i < m_numDataStreams; i++) {
-      ndn::Name prefix(userPrefix + "-" + ndn::to_string(i));
+      ndn::Name prefix(userPrefix + "-" + std::to_string(i));
       m_fullProducer.addUserNode(prefix);
       m_scheduler.schedule(ndn::time::milliseconds(m_rangeUniformRandom(m_rng)),
                            [this, prefix] { doUpdate(prefix); });
diff --git a/examples/producer.cpp b/examples/producer.cpp
index 6fcbb25..a6f4ca1 100644
--- a/examples/producer.cpp
+++ b/examples/producer.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  The University of Memphis
+ * Copyright (c) 2014-2022,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -47,7 +47,7 @@
   {
     // Add user prefixes and schedule updates for them
     for (int i = 0; i < m_nDataStreams; i++) {
-      ndn::Name updateName(userPrefix + "-" + ndn::to_string(i));
+      ndn::Name updateName(userPrefix + "-" + std::to_string(i));
 
       // Add the user prefix to the producer
       // Note that this does not add the already added userPrefix-0 in the constructor
diff --git a/tests/clock-fixture.cpp b/tests/clock-fixture.cpp
index 0b4e04a..d47f695 100644
--- a/tests/clock-fixture.cpp
+++ b/tests/clock-fixture.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013-2020  Regents of the University of California
+ * Copyright (c) 2013-2022  Regents of the University of California
  *                          The University of Memphis
  *
  * This file is part of PSync.
@@ -19,8 +19,7 @@
 
 #include "tests/clock-fixture.hpp"
 
-namespace ndn {
-namespace tests {
+namespace ndn::tests {
 
 ClockFixture::ClockFixture()
   : m_steadyClock(make_shared<time::UnitTestSteadyClock>())
@@ -50,5 +49,4 @@
   }
 }
 
-} // namespace tests
-} // namespace ndn
+} // namespace ndn::tests
diff --git a/tests/clock-fixture.hpp b/tests/clock-fixture.hpp
index c340526..6f79950 100644
--- a/tests/clock-fixture.hpp
+++ b/tests/clock-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013-2020  Regents of the University of California
+ * Copyright (c) 2013-2022  Regents of the University of California
  *                          The University of Memphis
  *
  * This file is part of PSync.
@@ -22,8 +22,7 @@
 
 #include <ndn-cxx/util/time-unit-test-clock.hpp>
 
-namespace ndn {
-namespace tests {
+namespace ndn::tests {
 
 /** \brief A test fixture that overrides steady clock and system clock.
  */
@@ -77,7 +76,6 @@
   shared_ptr<time::UnitTestSystemClock> m_systemClock;
 };
 
-} // namespace tests
-} // namespace ndn
+} // namespace ndn::tests
 
 #endif // PSYNC_TESTS_CLOCK_FIXTURE_HPP
diff --git a/tests/io-fixture.hpp b/tests/io-fixture.hpp
index d15a8ed..cdd2713 100644
--- a/tests/io-fixture.hpp
+++ b/tests/io-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013-2020  Regents of the University of California
+ * Copyright (c) 2013-2022  Regents of the University of California
  *                          The University of Memphis
  *
  * This file is part of PSync.
@@ -24,8 +24,7 @@
 
 #include <boost/asio/io_service.hpp>
 
-namespace ndn {
-namespace tests {
+namespace ndn::tests {
 
 class IoFixture : public ClockFixture
 {
@@ -47,7 +46,6 @@
   boost::asio::io_service m_io;
 };
 
-} // namespace tests
-} // namespace ndn
+} // namespace ndn::tests
 
 #endif // PSYNC_TESTS_IO_FIXTURE_HPP
diff --git a/tests/test-full-sync.cpp b/tests/test-full-sync.cpp
index d3d9e03..16ba4bc 100644
--- a/tests/test-full-sync.cpp
+++ b/tests/test-full-sync.cpp
@@ -30,7 +30,6 @@
 namespace psync {
 
 using ndn::Name;
-using ndn::optional;
 using ndn::util::DummyClientFace;
 
 class FullSyncFixture : public ndn::tests::IoFixture
@@ -99,7 +98,7 @@
    * @param seq expected sequence number.
    */
   void
-  batchCheck(int id, int origin, int min, int max, optional<uint64_t> seq)
+  batchCheck(int id, int origin, int min, int max, std::optional<uint64_t> seq)
   {
     uint64_t expected = seq.value_or(NOT_EXIST);
     FullProducer& node = *nodes.at(id);
@@ -170,15 +169,13 @@
 
 protected:
   const Name syncPrefix = "/psync";
-  static const int MAX_NODES = 4;
+  static constexpr int MAX_NODES = 4;
   std::array<std::shared_ptr<DummyClientFace>, MAX_NODES> faces;
   std::array<Name, MAX_NODES> userPrefixes;
   std::array<std::shared_ptr<FullProducer>, MAX_NODES> nodes;
-  static const uint64_t NOT_EXIST = std::numeric_limits<uint64_t>::max();
+  static constexpr uint64_t NOT_EXIST = std::numeric_limits<uint64_t>::max();
 };
 
-const uint64_t FullSyncFixture::NOT_EXIST;
-
 BOOST_FIXTURE_TEST_SUITE(TestFullSync, FullSyncFixture)
 
 BOOST_AUTO_TEST_CASE(TwoNodesSimple)
diff --git a/tests/test-iblt.cpp b/tests/test-iblt.cpp
index 1f00564..e5ce12f 100644
--- a/tests/test-iblt.cpp
+++ b/tests/test-iblt.cpp
@@ -91,9 +91,7 @@
   iblt2.insert(hash);
   Name ibltName2("/sync");
   iblt2.appendToName(ibltName2);
-  BOOST_CHECK_EQUAL_COLLECTIONS(IBF, IBF + sizeof(IBF),
-                                ibltName2.at(-1).wireEncode().begin(),
-                                ibltName2.at(-1).wireEncode().end());
+  BOOST_TEST(ibltName2.at(-1).wireEncode() == IBF, boost::test_tools::per_element());
 
   Name malformedName("/test");
   auto compressed = compress(CompressionScheme::DEFAULT,
diff --git a/tests/test-partial-sync.cpp b/tests/test-partial-sync.cpp
index 6235310..7353c5e 100644
--- a/tests/test-partial-sync.cpp
+++ b/tests/test-partial-sync.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis
+ * Copyright (c) 2014-2022,  The University of Memphis
  *
  * This file is part of PSync.
  * See AUTHORS.md for complete list of PSync authors and contributors.
@@ -112,7 +112,7 @@
   {
     // zeroth is added through constructor
     for (int i = 1; i < numOfUserNodes; i++) {
-      producer->addUserNode(prefix + "-" + to_string(i));
+      producer->addUserNode(prefix + "-" + std::to_string(i));
     }
   }
 
@@ -291,7 +291,7 @@
   util::DummyClientFace face2(m_io, {true, true});
   PartialProducer replicatedProducer(40, face2, syncPrefix, userPrefix);
   for (int i = 1; i < 10; i++) {
-      replicatedProducer.addUserNode("testUser-" + to_string(i));
+      replicatedProducer.addUserNode("testUser-" + std::to_string(i));
   }
   advanceClocks(ndn::time::milliseconds(10));
   replicatedProducer.publishName("testUser-2");
@@ -326,7 +326,7 @@
 
   oldSeqMap = producer->m_prefixes;
   for (int i = 0; i < 50; i++) {
-    Name prefix("testUser-" + to_string(i));
+    Name prefix("testUser-" + std::to_string(i));
     producer->updateSeqNo(prefix, producer->getSeqNo(prefix).value() + 1);
   }
   // Next sync interest should trigger the nack
@@ -387,7 +387,7 @@
 
   std::vector<std::string> subscribeTo;
   for (int i = 1; i < 10; i++) {
-    subscribeTo.push_back(longNameToExceedDataSize.toUri() + "-" + to_string(i));
+    subscribeTo.push_back(longNameToExceedDataSize.toUri() + "-" + std::to_string(i));
   }
   addConsumer(0, subscribeTo);
 
@@ -404,7 +404,7 @@
 
   oldSeqMap = producer->m_prefixes;
   for (int i = 1; i < 10; i++) {
-    producer->updateSeqNo(longNameToExceedDataSize.toUri() + "-" + to_string(i), 1);
+    producer->updateSeqNo(longNameToExceedDataSize.toUri() + "-" + std::to_string(i), 1);
   }
 
   advanceClocks(ndn::time::milliseconds(999));
diff --git a/tests/test-producer-base.cpp b/tests/test-producer-base.cpp
index 30cf4c3..deab560 100644
--- a/tests/test-producer-base.cpp
+++ b/tests/test-producer-base.cpp
@@ -34,7 +34,7 @@
 BOOST_AUTO_TEST_CASE(Constructor)
 {
   util::DummyClientFace face;
-  BOOST_REQUIRE_NO_THROW(ProducerBase(40, face, Name("/psync"), Name("/testUser")));
+  BOOST_CHECK_NO_THROW(ProducerBase(40, face, Name("/psync"), Name("/testUser")));
 }
 
 BOOST_AUTO_TEST_CASE(Basic)
@@ -55,7 +55,7 @@
   BOOST_CHECK_EQUAL(prefix.getPrefix(-1), userNode);
 
   producerBase.removeUserNode(userNode);
-  BOOST_CHECK(producerBase.getSeqNo(userNode) == nullopt);
+  BOOST_CHECK(producerBase.getSeqNo(userNode) == std::nullopt);
   BOOST_CHECK(producerBase.m_biMap.right.find(prefixWithSeq) == producerBase.m_biMap.right.end());
   BOOST_CHECK(producerBase.m_biMap.left.find(hash) == producerBase.m_biMap.left.end());
 
diff --git a/wscript b/wscript
index 4253101..b368414 100644
--- a/wscript
+++ b/wscript
@@ -98,8 +98,7 @@
         bld.recurse('examples')
 
     headers = bld.path.ant_glob('PSync/**/*.hpp')
-    bld.install_files(bld.env.INCLUDEDIR, headers,
-                      relative_trick=True)
+    bld.install_files('${INCLUDEDIR}', headers, relative_trick=True)
 
     bld.install_files('${INCLUDEDIR}/PSync/detail',
                       bld.path.find_resource('PSync/detail/config.hpp'))