common: stop importing std::{bind,ref,cref} into namespace ndn
And reduce the usage of std::bind() throughout the codebase.
C++14 lambdas are easier to understand for humans and more
likely to be optimized by the compiler.
Change-Id: Ia59fad34539710f8801c52914896ce426fb7e538
diff --git a/examples/consumer.cpp b/examples/consumer.cpp
index ef6cd76..5808c99 100644
--- a/examples/consumer.cpp
+++ b/examples/consumer.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2019 Regents of the University of California.
+ * Copyright (c) 2013-2021 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -46,9 +46,9 @@
std::cout << "Sending Interest " << interest << std::endl;
m_face.expressInterest(interest,
- bind(&Consumer::onData, this, _1, _2),
- bind(&Consumer::onNack, this, _1, _2),
- bind(&Consumer::onTimeout, this, _1));
+ std::bind(&Consumer::onData, this, _1, _2),
+ std::bind(&Consumer::onNack, this, _1, _2),
+ std::bind(&Consumer::onTimeout, this, _1));
// processEvents will block until the requested data is received or a timeout occurs
m_face.processEvents();