core: drop std::function and ndn::Exclude from common.hpp, add ndn::optional

Change-Id: Ie3983d8b6f9929430efd8ada8d942e3f95755cd4
diff --git a/rib/readvertise/client-to-nlsr-readvertise-policy.cpp b/rib/readvertise/client-to-nlsr-readvertise-policy.cpp
index aba5fdb..ca54132 100644
--- a/rib/readvertise/client-to-nlsr-readvertise-policy.cpp
+++ b/rib/readvertise/client-to-nlsr-readvertise-policy.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -28,21 +28,21 @@
 namespace nfd {
 namespace rib {
 
-ndn::optional<ReadvertiseAction>
+optional<ReadvertiseAction>
 ClientToNlsrReadvertisePolicy::handleNewRoute(const RibRouteRef& ribRoute) const
 {
   if (ribRoute.route->origin == ndn::nfd::ROUTE_ORIGIN_CLIENT) {
     return ReadvertiseAction{ribRoute.entry->getName(), ndn::security::SigningInfo()};
   }
   else {
-    return ndn::nullopt;
+    return nullopt;
   }
 }
 
 time::milliseconds
 ClientToNlsrReadvertisePolicy::getRefreshInterval() const
 {
-  return time::seconds(3600);
+  return 1_h;
 }
 
 } // namespace rib
diff --git a/rib/readvertise/client-to-nlsr-readvertise-policy.hpp b/rib/readvertise/client-to-nlsr-readvertise-policy.hpp
index af1481a..fd87360 100644
--- a/rib/readvertise/client-to-nlsr-readvertise-policy.hpp
+++ b/rib/readvertise/client-to-nlsr-readvertise-policy.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -41,7 +41,7 @@
    *  If the route origin is "client" (typically from auto prefix propagation), readvertise it
    *  using the default signing identity.
    */
-  ndn::optional<ReadvertiseAction>
+  optional<ReadvertiseAction>
   handleNewRoute(const RibRouteRef& ribRoute) const override;
 
   time::milliseconds
diff --git a/rib/readvertise/readvertise-policy.hpp b/rib/readvertise/readvertise-policy.hpp
index dce10b1..0f63745 100644
--- a/rib/readvertise/readvertise-policy.hpp
+++ b/rib/readvertise/readvertise-policy.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2017,  Regents of the University of California,
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -50,7 +50,7 @@
 
   /** \brief decide whether to readvertise a route, and what prefix to readvertise
    */
-  virtual ndn::optional<ReadvertiseAction>
+  virtual optional<ReadvertiseAction>
   handleNewRoute(const RibRouteRef& ribRoute) const = 0;
 
   /** \return how often readvertisements made by this policy should be refreshed.
diff --git a/rib/readvertise/readvertise.cpp b/rib/readvertise/readvertise.cpp
index c585bf5..344bc7e 100644
--- a/rib/readvertise/readvertise.cpp
+++ b/rib/readvertise/readvertise.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -64,7 +64,7 @@
 void
 Readvertise::afterAddRoute(const RibRouteRef& ribRoute)
 {
-  ndn::optional<ReadvertiseAction> action = m_policy->handleNewRoute(ribRoute);
+  optional<ReadvertiseAction> action = m_policy->handleNewRoute(ribRoute);
   if (!action) {
     NFD_LOG_DEBUG("add-route " << ribRoute.entry->getName() << '(' << ribRoute.route->faceId <<
                   ',' << ribRoute.route->origin << ") not-readvertising");