build: migrate to C++17
Change-Id: Ic5c01274f62556764ea96fc232cf3d835c4ab659
diff --git a/src/detail/bzip2-helper.cpp b/src/detail/bzip2-helper.cpp
index 4c5617e..a774b50 100644
--- a/src/detail/bzip2-helper.cpp
+++ b/src/detail/bzip2-helper.cpp
@@ -1,6 +1,6 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
/*
- * Copyright (c) 2012-2021 University of California, Los Angeles
+ * Copyright (c) 2012-2022 University of California, Los Angeles
*
* This file is part of ChronoSync, synchronization library for distributed realtime
* applications for NDN.
@@ -27,8 +27,7 @@
#include <ndn-cxx/encoding/buffer-stream.hpp>
-namespace chronosync {
-namespace bzip2 {
+namespace chronosync::bzip2 {
namespace bio = boost::iostreams;
@@ -56,5 +55,4 @@
return os.buf();
}
-} // namespace bzip2
-} // namespace chronosync
+} // namespace chronosync::bzip2
diff --git a/src/detail/bzip2-helper.hpp b/src/detail/bzip2-helper.hpp
index 47ff5ac..9eb966d 100644
--- a/src/detail/bzip2-helper.hpp
+++ b/src/detail/bzip2-helper.hpp
@@ -1,6 +1,6 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
/*
- * Copyright (c) 2012-2021 University of California, Los Angeles
+ * Copyright (c) 2012-2022 University of California, Los Angeles
*
* This file is part of ChronoSync, synchronization library for distributed realtime
* applications for NDN.
@@ -22,8 +22,7 @@
#include <ndn-cxx/encoding/buffer.hpp>
-namespace chronosync {
-namespace bzip2 {
+namespace chronosync::bzip2 {
/**
* @brief Compress @p buffer of size @p bufferSize with bzip2
@@ -37,7 +36,6 @@
std::shared_ptr<ndn::Buffer>
decompress(const char* buffer, size_t bufferSize);
-} // namespace bzip2
-} // namespace chronosync
+} // namespace chronosync::bzip2
#endif // CHRONOSYNC_DETAIL_BZIP2_HELPER_HPP
diff --git a/src/detail/common.hpp b/src/detail/common.hpp
index dffd218..cb75626 100644
--- a/src/detail/common.hpp
+++ b/src/detail/common.hpp
@@ -1,6 +1,6 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
/*
- * Copyright (c) 2012-2021 University of California, Los Angeles
+ * Copyright (c) 2012-2022 University of California, Los Angeles
*
* This file is part of ChronoSync, synchronization library for distributed realtime
* applications for NDN.
@@ -65,9 +65,7 @@
using std::size_t;
using std::bind;
-using std::function;
using std::make_shared;
-using std::ref;
using std::shared_ptr;
using ndn::Block;
@@ -79,8 +77,9 @@
using ndn::security::ValidationError;
namespace name = ndn::name;
-namespace time = ndn::time;
namespace security = ndn::security;
+namespace time = ndn::time;
+using namespace ndn::time_literals;
} // namespace chronosync
diff --git a/src/detail/tlv.hpp b/src/detail/tlv.hpp
index 5f9bd31..2a4b9b1 100644
--- a/src/detail/tlv.hpp
+++ b/src/detail/tlv.hpp
@@ -1,6 +1,6 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
/*
- * Copyright (c) 2012-2021 University of California, Los Angeles
+ * Copyright (c) 2012-2022 University of California, Los Angeles
*
* This file is part of ChronoSync, synchronization library for distributed realtime
* applications for NDN.
@@ -22,8 +22,7 @@
#ifndef CHRONOSYNC_DETAIL_TLV_HPP
#define CHRONOSYNC_DETAIL_TLV_HPP
-namespace chronosync {
-namespace tlv {
+namespace chronosync::tlv {
/**
* @brief Type value of sync reply related TLVs
@@ -35,7 +34,6 @@
SeqNo = 130, // 0x82
};
-} // namespace tlv
-} // namespace chronosync
+} // namespace chronosync::tlv
#endif // CHRONOSYNC_DETAIL_TLV_HPP