Migrate to C++17 and refactor

Change-Id: I53407266939258990a1c3a9363c3ebe9ea113fd2
diff --git a/src/detail/challenge-encoder.hpp b/src/detail/challenge-encoder.hpp
index 2013061..5c502d2 100644
--- a/src/detail/challenge-encoder.hpp
+++ b/src/detail/challenge-encoder.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2017-2021, Regents of the University of California.
+ * Copyright (c) 2017-2022, Regents of the University of California.
  *
  * This file is part of ndncert, a certificate management system based on NDN.
  *
@@ -24,8 +24,7 @@
 #include "detail/ca-request-state.hpp"
 #include "requester-request.hpp"
 
-namespace ndncert {
-namespace challengetlv {
+namespace ndncert::challengetlv {
 
 Block
 encodeDataContent(ca::RequestState& request, const Name& issuedCertName = Name());
@@ -33,7 +32,6 @@
 void
 decodeDataContent(const Block& contentBlock, requester::Request& state);
 
-} // namespace challengetlv
-} // namespace ndncert
+} // namespace ndncert::challengetlv
 
 #endif // NDNCERT_DETAIL_CHALLENGE_ENCODER_HPP