using namespace isc::asiolink;
using namespace isc::dns;
using namespace isc::util;
-using namespace std::placeholders;
using namespace std;
+namespace ph = std::placeholders;
namespace isc {
namespace asiodns {
// Initiate a read on the socket.
cumulative_ = 0;
socket->async_receive(boost::asio::buffer(receive_buffer_, sizeof(receive_buffer_)),
- std::bind(&IOFetchTest::tcpReceiveHandler, this, socket, _1, _2));
+ std::bind(&IOFetchTest::tcpReceiveHandler, this, socket, ph::_1, ph::_2));
}
/// \brief Completion handler for receiving TCP data
if (!complete) {
socket->async_receive(boost::asio::buffer((receive_buffer_ + cumulative_),
(sizeof(receive_buffer_) - cumulative_)),
- std::bind(&IOFetchTest::tcpReceiveHandler, this, socket, _1, _2));
+ std::bind(&IOFetchTest::tcpReceiveHandler, this, socket, ph::_1, ph::_2));
return;
}
// argument of the send callback, as a check.
socket->async_send(boost::asio::buffer(send_ptr, amount),
std::bind(&IOFetchTest::tcpSendHandler, this,
- amount, socket, _1, _2));
+ amount, socket, ph::_1, ph::_2));
}
/// \brief Completion Handler for Sending TCP data
tcp::acceptor acceptor(service_.get_io_service(),
tcp::endpoint(tcp::v4(), TEST_PORT));
acceptor.async_accept(socket,
- std::bind(&IOFetchTest::tcpAcceptHandler, this, &socket, _1));
+ std::bind(&IOFetchTest::tcpAcceptHandler, this, &socket, ph::_1));
// Post the TCP fetch object to send the query and receive the response.
service_.get_io_service().post(tcp_fetch_);
remote,
std::bind(&IOFetchTest::udpReceiveHandler,
this, &remote, &socket,
- _1, _2, bad_qid, second_send));
+ ph::_1, ph::_2, bad_qid, second_send));
service_.get_io_service().post(udp_fetch_);
if (debug_) {
cout << "udpSendReceive: async_receive_from posted,"
using namespace isc::data;
using namespace isc::hooks;
-using namespace std::placeholders;
+namespace ph = std::placeholders;
namespace {
BaseCommandMgr::BaseCommandMgr() {
registerCommand("list-commands", std::bind(&BaseCommandMgr::listCommandsHandler,
- this, _1, _2));
+ this, ph::_1, ph::_2));
}
void
// code, just in tests.
handlers_.clear();
registerCommand("list-commands",
- std::bind(&BaseCommandMgr::listCommandsHandler, this, _1, _2));
+ std::bind(&BaseCommandMgr::listCommandsHandler, this, ph::_1, ph::_2));
}
isc::data::ConstElementPtr
using namespace isc::asiolink;
using namespace isc::config;
using namespace isc::data;
-using namespace std::placeholders;
+namespace ph = std::placeholders;
namespace {
void doReceive() {
socket_->asyncReceive(&buf_[0], sizeof(buf_),
std::bind(&Connection::receiveHandler,
- shared_from_this(), _1, _2));
+ shared_from_this(), ph::_1, ph::_2));
}
/// @brief Starts asynchronous send over the unix domain socket.
void doSend() {
size_t chunk_size = (response_.size() < BUF_SIZE) ? response_.size() : BUF_SIZE;
socket_->asyncSend(&response_[0], chunk_size,
- std::bind(&Connection::sendHandler, shared_from_this(), _1, _2));
+ std::bind(&Connection::sendHandler, shared_from_this(), ph::_1, ph::_2));
// Asynchronous send has been scheduled and we need to indicate this
// to break the synchronous select(). The handler should clear this
using namespace isc::stats;
using namespace isc::util;
using namespace isc::data;
-using namespace std::placeholders;
+namespace ph = std::placeholders;
namespace {
LeaseMgr& lease_mgr = LeaseMgrFactory::instance();
reclaimLeaseInDatabase<Lease6Ptr>(lease, remove_lease,
std::bind(&LeaseMgr::updateLease6,
- &lease_mgr, _1));
+ &lease_mgr, ph::_1));
}
}
LeaseMgr& lease_mgr = LeaseMgrFactory::instance();
reclaimLeaseInDatabase<Lease4Ptr>(lease, remove_lease,
std::bind(&LeaseMgr::updateLease4,
- &lease_mgr, _1));
+ &lease_mgr, ph::_1));
}
}