src: Remove unnecessary uses of boost::cref in make_shared and replace boost::cref/boost::ref with just cref/ref

In some cases, due to argument-dependent lookup, it is necessary to use
ndn::ref, instead of just ref.

Change-Id: I682180a007609535855f77511b49622154ad4f11
Refs: #1591
diff --git a/tests/daemon/mgmt/command-validator.cpp b/tests/daemon/mgmt/command-validator.cpp
index 834cc5b..5e1dd30 100644
--- a/tests/daemon/mgmt/command-validator.cpp
+++ b/tests/daemon/mgmt/command-validator.cpp
@@ -230,21 +230,21 @@
   config.parse(CONFIG, false, CONFIG_PATH.native());
 
   validator.validate(*fibCommand,
-                     bind(&CommandValidatorTester::onValidated, boost::ref(m_tester1), _1),
-                     bind(&CommandValidatorTester::onValidationFailed, boost::ref(m_tester1), _1, _2));
+                     bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1),
+                     bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2));
 
   BOOST_REQUIRE(m_tester1.commandValidated());
   m_tester1.resetValidation();
 
   validator.validate(*statsCommand,
-                     bind(&CommandValidatorTester::onValidated, boost::ref(m_tester1), _1),
-                     bind(&CommandValidatorTester::onValidationFailed, boost::ref(m_tester1), _1, _2));
+                     bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1),
+                     bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2));
 
   BOOST_REQUIRE(m_tester1.commandValidated());
 
   validator.validate(*facesCommand,
-                     bind(&CommandValidatorTester::onValidated, boost::ref(m_tester2), _1),
-                     bind(&CommandValidatorTester::onValidationFailed, boost::ref(m_tester2), _1, _2));
+                     bind(&CommandValidatorTester::onValidated, ref(m_tester2), _1),
+                     bind(&CommandValidatorTester::onValidationFailed, ref(m_tester2), _1, _2));
 
   BOOST_REQUIRE(m_tester2.commandValidated());
   m_tester2.resetValidation();
@@ -254,8 +254,8 @@
   generator.generateWithIdentity(*unauthorizedFibCommand, m_tester2.getIdentityName());
 
   validator.validate(*unauthorizedFibCommand,
-                     bind(&CommandValidatorTester::onValidated, boost::ref(m_tester2), _1),
-                     bind(&CommandValidatorTester::onValidationFailed, boost::ref(m_tester2), _1, _2));
+                     bind(&CommandValidatorTester::onValidated, ref(m_tester2), _1),
+                     bind(&CommandValidatorTester::onValidationFailed, ref(m_tester2), _1, _2));
 
   BOOST_REQUIRE(m_tester2.commandValidationFailed());
 }
@@ -290,21 +290,21 @@
   config.parse(CONFIG, true, CONFIG_PATH.native());
 
   validator.validate(*fibCommand,
-                     bind(&CommandValidatorTester::onValidated, boost::ref(m_tester1), _1),
-                     bind(&CommandValidatorTester::onValidationFailed, boost::ref(m_tester1), _1, _2));
+                     bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1),
+                     bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2));
 
   BOOST_REQUIRE(m_tester1.commandValidationFailed());
   m_tester1.resetValidation();
 
   validator.validate(*statsCommand,
-                     bind(&CommandValidatorTester::onValidated, boost::ref(m_tester1), _1),
-                     bind(&CommandValidatorTester::onValidationFailed, boost::ref(m_tester1), _1, _2));
+                     bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1),
+                     bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2));
 
   BOOST_REQUIRE(m_tester1.commandValidationFailed());
 
   validator.validate(*facesCommand,
-                     bind(&CommandValidatorTester::onValidated, boost::ref(m_tester2), _1),
-                     bind(&CommandValidatorTester::onValidationFailed, boost::ref(m_tester2), _1, _2));
+                     bind(&CommandValidatorTester::onValidated, ref(m_tester2), _1),
+                     bind(&CommandValidatorTester::onValidationFailed, ref(m_tester2), _1, _2));
 
   BOOST_REQUIRE(m_tester2.commandValidationFailed());
   m_tester2.resetValidation();
@@ -314,8 +314,8 @@
   generator.generateWithIdentity(*unauthorizedFibCommand, m_tester2.getIdentityName());
 
   validator.validate(*unauthorizedFibCommand,
-                     bind(&CommandValidatorTester::onValidated, boost::ref(m_tester2), _1),
-                     bind(&CommandValidatorTester::onValidationFailed, boost::ref(m_tester2), _1, _2));
+                     bind(&CommandValidatorTester::onValidated, ref(m_tester2), _1),
+                     bind(&CommandValidatorTester::onValidationFailed, ref(m_tester2), _1, _2));
 
   BOOST_REQUIRE(m_tester2.commandValidationFailed());
 }
@@ -629,25 +629,22 @@
   config.parse(WILDCARD_CERT_CONFIG, false, CONFIG_PATH.native());
 
   validator.validate(*fibCommand,
-                     bind(&CommandValidatorTester::onValidated, boost::ref(m_tester1), _1),
-                     bind(&CommandValidatorTester::onValidationFailed,
-                          boost::ref(m_tester1), _1, _2));
+                     bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1),
+                     bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2));
 
   BOOST_REQUIRE(m_tester1.commandValidationFailed());
   m_tester1.resetValidation();
 
   validator.validate(*statsCommand,
-                     bind(&CommandValidatorTester::onValidated, boost::ref(m_tester1), _1),
-                     bind(&CommandValidatorTester::onValidationFailed,
-                          boost::ref(m_tester1), _1, _2));
+                     bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1),
+                     bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2));
 
   BOOST_REQUIRE(m_tester1.commandValidated());
   m_tester1.resetValidation();
 
   validator.validate(*facesCommand,
-                     bind(&CommandValidatorTester::onValidated, boost::ref(m_tester1), _1),
-                     bind(&CommandValidatorTester::onValidationFailed,
-                          boost::ref(m_tester1), _1, _2));
+                     bind(&CommandValidatorTester::onValidated, ref(m_tester1), _1),
+                     bind(&CommandValidatorTester::onValidationFailed, ref(m_tester1), _1, _2));
 
   BOOST_REQUIRE(m_tester1.commandValidated());
   m_tester1.resetValidation();
diff --git a/tests/daemon/mgmt/face-manager.cpp b/tests/daemon/mgmt/face-manager.cpp
index 14b62d4..974e417 100644
--- a/tests/daemon/mgmt/face-manager.cpp
+++ b/tests/daemon/mgmt/face-manager.cpp
@@ -1591,8 +1591,8 @@
                    .setFlags(0);
 
   getFace()->onReceiveData +=
-    bind(&FaceFixture::callbackDispatch, this, _1,
-         command->getName(), 200, "Success", boost::ref(encodedParameters), expectedFaceEvent);
+    bind(&FaceFixture::callbackDispatch, this, _1, command->getName(),
+         200, "Success", ref(encodedParameters), expectedFaceEvent);
 
   destroyFace(*command, parameters);
 
diff --git a/tests/daemon/mgmt/fib-enumeration-publisher-common.hpp b/tests/daemon/mgmt/fib-enumeration-publisher-common.hpp
index d972d79..301d396 100644
--- a/tests/daemon/mgmt/fib-enumeration-publisher-common.hpp
+++ b/tests/daemon/mgmt/fib-enumeration-publisher-common.hpp
@@ -125,8 +125,8 @@
 
     std::set<shared_ptr<fib::Entry> >::const_iterator referenceIter =
       std::find_if(m_referenceEntries.begin(), m_referenceEntries.end(),
-                   boost::bind(&FibEnumerationPublisherFixture::entryHasPrefix,
-                               this, _1, prefix));
+                   bind(&FibEnumerationPublisherFixture::entryHasPrefix,
+                        this, _1, prefix));
 
     BOOST_REQUIRE(referenceIter != m_referenceEntries.end());
 
diff --git a/tests/daemon/mgmt/fib-manager.cpp b/tests/daemon/mgmt/fib-manager.cpp
index b38c3b8..2305c2c 100644
--- a/tests/daemon/mgmt/fib-manager.cpp
+++ b/tests/daemon/mgmt/fib-manager.cpp
@@ -160,10 +160,8 @@
   }
 
 protected:
-    FibManagerFixture()
-      : m_manager(boost::ref(m_fib),
-                  bind(&FibManagerFixture::getFace, this, _1),
-                  m_face)
+  FibManagerFixture()
+    : m_manager(ref(m_fib), bind(&FibManagerFixture::getFace, this, _1), m_face)
     , m_callbackFired(false)
   {
   }
diff --git a/tests/daemon/mgmt/internal-face.cpp b/tests/daemon/mgmt/internal-face.cpp
index 04ef4a2..e76d80f 100644
--- a/tests/daemon/mgmt/internal-face.cpp
+++ b/tests/daemon/mgmt/internal-face.cpp
@@ -108,7 +108,7 @@
 
   bool didPutData = false;
   Name dataName("/hello");
-  face->onReceiveData += bind(&validatePutData, boost::ref(didPutData), dataName, _1);
+  face->onReceiveData += bind(&validatePutData, ref(didPutData), dataName, _1);
 
   Data testData(dataName);
   face->sign(testData);
diff --git a/tests/daemon/mgmt/status-server.cpp b/tests/daemon/mgmt/status-server.cpp
index 75b4114..d9f3129 100644
--- a/tests/daemon/mgmt/status-server.cpp
+++ b/tests/daemon/mgmt/status-server.cpp
@@ -50,7 +50,7 @@
   Forwarder forwarder;
   shared_ptr<InternalFace> internalFace = make_shared<InternalFace>();
   internalFace->onReceiveData += &interceptResponse;
-  StatusServer statusServer(internalFace, boost::ref(forwarder));
+  StatusServer statusServer(internalFace, ref(forwarder));
   time::system_clock::TimePoint t2 = time::system_clock::now();
 
   // populate tables
diff --git a/tests/daemon/mgmt/strategy-choice-manager.cpp b/tests/daemon/mgmt/strategy-choice-manager.cpp
index 99d5636..9b5f2c5 100644
--- a/tests/daemon/mgmt/strategy-choice-manager.cpp
+++ b/tests/daemon/mgmt/strategy-choice-manager.cpp
@@ -50,7 +50,8 @@
     , m_manager(m_strategyChoice, m_face)
     , m_callbackFired(false)
   {
-    m_strategyChoice.install(make_shared<DummyStrategy>(boost::ref(m_forwarder), "/localhost/nfd/strategy/test-strategy-a"));
+    m_strategyChoice.install(make_shared<DummyStrategy>(ref(m_forwarder),
+                                                        "/localhost/nfd/strategy/test-strategy-a"));
     m_strategyChoice.insert("ndn:/", "/localhost/nfd/strategy/test-strategy-a");
   }
 
@@ -169,7 +170,8 @@
 public:
   AllStrategiesFixture()
   {
-    m_strategyChoice.install(make_shared<DummyStrategy>(boost::ref(m_forwarder), "/localhost/nfd/strategy/test-strategy-b"));
+    m_strategyChoice.install(make_shared<DummyStrategy>(ref(m_forwarder),
+                                                        "/localhost/nfd/strategy/test-strategy-b"));
   }
 
   virtual