src: minor updates to common.hpp and common-pch.hpp

Also remove redundant includes.

Change-Id: I0e1f55abcf852b95a4fd8c9a0e3a30aa153f892c
diff --git a/src/common-pch.hpp b/src/common-pch.hpp
index ad4bbff..16bd531 100644
--- a/src/common-pch.hpp
+++ b/src/common-pch.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2016 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -45,10 +45,10 @@
 #include <boost/iostreams/categories.hpp>
 #include <boost/iostreams/stream.hpp>
 #include <boost/lexical_cast.hpp>
-#include <boost/property_tree/ptree.hpp>
-#include <boost/property_tree/info_parser.hpp>
+#include <boost/multi_index_container.hpp>
+#include <boost/range/adaptors.hpp>
+#include <boost/range/algorithm/copy.hpp>
 #include <boost/regex.hpp>
-#include <boost/system/error_code.hpp>
 
 // Other useful headers to precompile
 #include "security/v1/cryptopp.hpp"
diff --git a/src/common.hpp b/src/common.hpp
index bc34cbd..b4d70d8 100644
--- a/src/common.hpp
+++ b/src/common.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2016 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -52,8 +52,9 @@
 #include <algorithm>
 #include <cstddef>
 #include <cstdint>
-#include <cstring>
+#include <exception>
 #include <functional>
+#include <iosfwd>
 #include <limits>
 #include <memory>
 #include <stdexcept>
diff --git a/src/encoding/tlv.hpp b/src/encoding/tlv.hpp
index c9a6520..b15ec14 100644
--- a/src/encoding/tlv.hpp
+++ b/src/encoding/tlv.hpp
@@ -22,14 +22,12 @@
 #ifndef NDN_ENCODING_TLV_HPP
 #define NDN_ENCODING_TLV_HPP
 
-#include <stdexcept>
-#include <iostream>
-#include <iterator>
-#include <limits>
-
 #include "buffer.hpp"
 #include "endian.hpp"
 
+#include <iostream>
+#include <iterator>
+
 namespace ndn {
 
 /** @brief practical limit of network layer packet size
diff --git a/src/interest.cpp b/src/interest.cpp
index fa58a33..17a7aa4 100644
--- a/src/interest.cpp
+++ b/src/interest.cpp
@@ -24,6 +24,8 @@
 #include "util/crypto.hpp"
 #include "data.hpp"
 
+#include <cstring>
+
 namespace ndn {
 
 BOOST_CONCEPT_ASSERT((boost::EqualityComparable<Interest>));
diff --git a/src/link.cpp b/src/link.cpp
index 587f480..ebdb245 100644
--- a/src/link.cpp
+++ b/src/link.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2015 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -25,9 +25,7 @@
 #include "util/crypto.hpp"
 #include "security/key-chain.hpp"
 
-#include <algorithm>
-
-#include <boost/range/adaptors.hpp>
+#include <boost/range/adaptor/reversed.hpp>
 
 namespace ndn {
 
@@ -160,7 +158,7 @@
     try {
       preference = static_cast<uint32_t>(readNonNegativeInteger(*val));
     }
-    catch (tlv::Error&) {
+    catch (const tlv::Error&) {
       BOOST_THROW_EXCEPTION(Error("Missing Preference field in Link Encoding"));
     }
     ++val;
diff --git a/src/lp/field.hpp b/src/lp/field.hpp
index 712bd86..37105e8 100644
--- a/src/lp/field.hpp
+++ b/src/lp/field.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2015 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -24,10 +24,7 @@
 
 #include "../common.hpp"
 #include "../encoding/encoding-buffer.hpp"
-
-#include <boost/concept/assert.hpp>
-#include <boost/concept/usage.hpp>
-#include <boost/type_traits.hpp>
+#include "../util/concepts.hpp"
 
 namespace ndn {
 namespace lp {
@@ -63,11 +60,11 @@
 template<class X>
 struct Field
 {
-  BOOST_CONCEPT_ASSERT((boost::is_base_of<field_location_tags::Base, typename X::FieldLocation>));
-  BOOST_CONCEPT_ASSERT((boost::DefaultConstructible<typename X::ValueType>));
+  static_assert(std::is_base_of<field_location_tags::Base, typename X::FieldLocation>::value, "");
+  static_assert(std::is_same<typename X::TlvType::value_type, uint64_t>::value, "");
+  static_assert(std::is_same<typename X::IsRepeatable::value_type, bool>::value, "");
+  NDN_CXX_ASSERT_DEFAULT_CONSTRUCTIBLE(typename X::ValueType);
   BOOST_CONCEPT_ASSERT((boost::CopyConstructible<typename X::ValueType>));
-  BOOST_CONCEPT_ASSERT((boost::is_same<typename X::TlvType::value_type, uint64_t>));
-  BOOST_CONCEPT_ASSERT((boost::is_same<typename X::IsRepeatable::value_type, bool>));
   BOOST_CONCEPT_USAGE(Field)
   {
     Block wire;
diff --git a/src/mgmt/dispatcher.cpp b/src/mgmt/dispatcher.cpp
index a7fac52..b9d62a2 100644
--- a/src/mgmt/dispatcher.cpp
+++ b/src/mgmt/dispatcher.cpp
@@ -23,8 +23,6 @@
 #include "../lp/tags.hpp"
 #include "../util/logger.hpp"
 
-#include <algorithm>
-
 NDN_LOG_INIT(ndn.mgmt.Dispatcher);
 
 namespace ndn {
diff --git a/src/security/transform/private-key.cpp b/src/security/transform/private-key.cpp
index 368eec1..9cad918 100644
--- a/src/security/transform/private-key.cpp
+++ b/src/security/transform/private-key.cpp
@@ -20,16 +20,16 @@
  */
 
 #include "private-key.hpp"
-#include "buffer-source.hpp"
-#include "stream-source.hpp"
-#include "base64-encode.hpp"
 #include "base64-decode.hpp"
+#include "base64-encode.hpp"
+#include "buffer-source.hpp"
 #include "stream-sink.hpp"
-#include "../../encoding/buffer-stream.hpp"
+#include "stream-source.hpp"
 #include "../detail/openssl-helper.hpp"
 #include "../key-params.hpp"
+#include "../../encoding/buffer-stream.hpp"
 
-#include <string.h>
+#include <cstring>
 
 #define ENSURE_PRIVATE_KEY_LOADED(key) \
   do { \
diff --git a/src/util/face-uri.cpp b/src/util/face-uri.cpp
index c09da8a..e58dd1d 100644
--- a/src/util/face-uri.cpp
+++ b/src/util/face-uri.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2016, Regents of the University of California,
+ * Copyright (c) 2014-2017, Regents of the University of California,
  *                          Arizona Board of Regents,
  *                          Colorado State University,
  *                          University Pierre & Marie Curie, Sorbonne University,
@@ -29,7 +29,6 @@
 #include "dns.hpp"
 #include "ethernet.hpp"
 
-#include <boost/concept_check.hpp>
 #include <boost/lexical_cast.hpp>
 #include <boost/mpl/vector.hpp>
 #include <boost/mpl/for_each.hpp>
diff --git a/src/util/logger.cpp b/src/util/logger.cpp
index 04ad954..8cb7d80 100644
--- a/src/util/logger.cpp
+++ b/src/util/logger.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2016 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -26,7 +26,6 @@
 
 #include <cinttypes>
 #include <stdio.h>
-#include <type_traits>
 
 namespace ndn {
 namespace util {
diff --git a/src/util/notification-subscriber.hpp b/src/util/notification-subscriber.hpp
index 9387a24..be36d31 100644
--- a/src/util/notification-subscriber.hpp
+++ b/src/util/notification-subscriber.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2016 Regents of the University of California,
+ * Copyright (c) 2014-2017 Regents of the University of California,
  *                         Arizona Board of Regents,
  *                         Colorado State University,
  *                         University Pierre & Marie Curie, Sorbonne University,
@@ -34,7 +34,6 @@
 #include "time.hpp"
 #include "scheduler.hpp"
 #include "scheduler-scoped-event-id.hpp"
-#include <boost/concept_check.hpp>
 
 namespace ndn {
 namespace util {
diff --git a/tests/boost-test.hpp b/tests/boost-test.hpp
index 70e5426..1d21b3f 100644
--- a/tests/boost-test.hpp
+++ b/tests/boost-test.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2014 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -27,7 +27,7 @@
 #pragma clang system_header
 
 #include <boost/test/unit_test.hpp>
-#include <boost/concept_check.hpp>
 #include <boost/test/output_test_stream.hpp>
+#include <boost/concept_check.hpp>
 
 #endif // NDN_TESTS_BOOST_TEST_HPP
diff --git a/tests/unit-tests/util/sqlite3-statement.t.cpp b/tests/unit-tests/util/sqlite3-statement.t.cpp
index b440f7a..78e8664 100644
--- a/tests/unit-tests/util/sqlite3-statement.t.cpp
+++ b/tests/unit-tests/util/sqlite3-statement.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2016 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -24,6 +24,7 @@
 #include "boost-test.hpp"
 
 #include <boost/filesystem.hpp>
+#include <cstring>
 #include <sqlite3.h>
 
 namespace ndn {