build: Fix compilation against the latest version of ndn-cxx
Change-Id: Ie19e6432231a586efa9be1975e5601cf78c2dce9
diff --git a/nsync/sync-common.h b/nsync/sync-common.h
index 982726e..6832e78 100644
--- a/nsync/sync-common.h
+++ b/nsync/sync-common.h
@@ -30,25 +30,15 @@
namespace Sync {
-using ndn::bind;
-using ndn::function;
+using std::bind;
+using std::function;
-using ndn::make_shared;
-using ndn::shared_ptr;
-using ndn::weak_ptr;
+using std::make_shared;
+using std::shared_ptr;
+using std::weak_ptr;
-using ndn::dynamic_pointer_cast;
-using ndn::static_pointer_cast;
-
-using ndn::_1;
-using ndn::_2;
-using ndn::_3;
-using ndn::_4;
-using ndn::_5;
-using ndn::_6;
-using ndn::_7;
-using ndn::_8;
-using ndn::_9;
+using std::dynamic_pointer_cast;
+using std::static_pointer_cast;
using std::tuple;
using std::make_tuple;
diff --git a/src/common.hpp b/src/common.hpp
index d5da876..3b0a4ce 100644
--- a/src/common.hpp
+++ b/src/common.hpp
@@ -26,20 +26,10 @@
namespace nlsr {
-using ndn::bind;
-using ndn::make_shared;
-using ndn::shared_ptr;
-using ndn::function;
-
-using ndn::_1;
-using ndn::_2;
-using ndn::_3;
-using ndn::_4;
-using ndn::_5;
-using ndn::_6;
-using ndn::_7;
-using ndn::_8;
-using ndn::_9;
+using std::bind;
+using std::make_shared;
+using std::shared_ptr;
+using std::function;
}
diff --git a/src/conf-file-processor.cpp b/src/conf-file-processor.cpp
index 3728a09..de36941 100644
--- a/src/conf-file-processor.cpp
+++ b/src/conf-file-processor.cpp
@@ -23,13 +23,15 @@
**/
#include <iostream>
#include <fstream>
+
+#include <ndn-cxx/name.hpp>
+
+// boost needs to be included after ndn-cxx, otherwise there will be conflict with _1, _2, ...
#include <boost/algorithm/string.hpp>
#include <boost/property_tree/info_parser.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/filesystem.hpp>
-#include <ndn-cxx/name.hpp>
-
#include "conf-parameter.hpp"
#include "conf-file-processor.hpp"
#include "adjacent.hpp"
diff --git a/src/main.cpp b/src/main.cpp
index 319e622..a21b0fd 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -21,16 +21,18 @@
* \author Yingdi Yu <yingdi@cs.ucla.edu>
*
**/
+
+#include <ndn-cxx/util/scheduler.hpp>
+
#include "conf-file-processor.hpp"
#include "logger.hpp"
#include "nlsr.hpp"
#include "version.hpp"
+// boost needs to be included after ndn-cxx, otherwise there will be conflict with _1, _2, ...
#include <boost/asio.hpp>
#include <boost/cstdint.hpp>
-#include <ndn-cxx/util/scheduler.hpp>
-
namespace nlsr {
int