build: Always build in C++11 mode.
Change-Id: Id8c26bc5951a0b60c4f2f0868ad0167b2f0d56af
Refs: #2103
diff --git a/src/interest-container.hpp b/src/interest-container.hpp
index 9b30b19..bf971eb 100644
--- a/src/interest-container.hpp
+++ b/src/interest-container.hpp
@@ -57,8 +57,8 @@
ndn::EventId expirationEvent;
};
-typedef boost::shared_ptr<UnsatisfiedInterest> UnsatisfiedInterestPtr;
-typedef boost::shared_ptr<const UnsatisfiedInterest> ConstUnsatisfiedInterestPtr;
+typedef shared_ptr<UnsatisfiedInterest> UnsatisfiedInterestPtr;
+typedef shared_ptr<const UnsatisfiedInterest> ConstUnsatisfiedInterestPtr;
/**
* @brief Container for unsatisfied Sync Interests
diff --git a/src/interest-table.cpp b/src/interest-table.cpp
index ef7193a..5b97f0a 100644
--- a/src/interest-table.cpp
+++ b/src/interest-table.cpp
@@ -44,20 +44,27 @@
bool doesExist = erase(digest);
UnsatisfiedInterestPtr request =
- boost::make_shared<UnsatisfiedInterest>(interest, digest, isKnown);
+ make_shared<UnsatisfiedInterest>(interest, digest, isKnown);
time::milliseconds entryLifetime = interest->getInterestLifetime();
if (entryLifetime < time::milliseconds::zero())
entryLifetime = ndn::DEFAULT_INTEREST_LIFETIME;
request->expirationEvent =
- m_scheduler.scheduleEvent(entryLifetime, ndn::bind(&InterestTable::erase, this, digest));
+ m_scheduler.scheduleEvent(entryLifetime,
+ [=] () { quiteErase(digest); });
m_table.insert(request);
return doesExist;
}
+void
+InterestTable::quiteErase(ndn::ConstBufferPtr digest)
+{
+ erase(digest);
+}
+
bool
InterestTable::erase(ndn::ConstBufferPtr digest)
{
diff --git a/src/interest-table.hpp b/src/interest-table.hpp
index 288ed9b..d85661c 100644
--- a/src/interest-table.hpp
+++ b/src/interest-table.hpp
@@ -82,6 +82,9 @@
bool
erase(ndn::ConstBufferPtr digest);
+ void
+ quiteErase(ndn::ConstBufferPtr digest);
+
const_iterator
begin() const
{
diff --git a/src/leaf.hpp b/src/leaf.hpp
index 635c087..b26b975 100644
--- a/src/leaf.hpp
+++ b/src/leaf.hpp
@@ -82,8 +82,8 @@
mutable ndn::util::Sha256 m_digest;
};
-typedef boost::shared_ptr<Leaf> LeafPtr;
-typedef boost::shared_ptr<const Leaf> ConstLeafPtr;
+typedef shared_ptr<Leaf> LeafPtr;
+typedef shared_ptr<const Leaf> ConstLeafPtr;
std::ostream&
operator<<(std::ostream& os, const Leaf& leaf);
diff --git a/src/logger.hpp b/src/logger.hpp
index c4eee03..2ac782a 100644
--- a/src/logger.hpp
+++ b/src/logger.hpp
@@ -57,13 +57,12 @@
#ifdef _DEBUG
-#include <boost/date_time/posix_time/posix_time.hpp>
-#include <boost/thread/thread_time.hpp>
-#include <boost/thread/thread.hpp>
+#include <thread>
#include <iostream>
+#include <ndn-cxx/util/time.hpp>
#define _LOG_DEBUG(x) \
- std::clog << boost::get_system_time() << " " << boost::this_thread::get_id() << \
+ std::clog << ndn::time::system_clock::now() << " " << std::this_thread::get_id() << \
" " << x << std::endl
#else // _DEBUG
diff --git a/src/logic.hpp b/src/logic.hpp
index 2be8636..cd5cd29 100644
--- a/src/logic.hpp
+++ b/src/logic.hpp
@@ -148,7 +148,7 @@
std::set<Name>
getSessionNames() const;
-PUBLIC_WITH_TESTS_ELSE_PRIVATE:
+CHRONOSYNC_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
void
printState(std::ostream& os) const;
diff --git a/src/state.cpp b/src/state.cpp
index 9d434ec..251d46b 100644
--- a/src/state.cpp
+++ b/src/state.cpp
@@ -57,7 +57,7 @@
SeqNo old = (*leaf)->getSeq();
m_leaves.modify(leaf,
- bind(&Leaf::setSeq, _1, seq));
+ [=] (LeafPtr& leaf) { leaf->setSeq(seq); } );
return make_tuple(false, true, old);
}
}