build: Fix build when std::to_string is not available
Change-Id: If34fcebe17bd7e3de23655680957fa6e0df27676 Refs: #4393
This commit is contained in:
@@ -44,7 +44,7 @@ AccessStrategy::AccessStrategy(Forwarder& forwarder, const Name& name)
|
||||
}
|
||||
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
|
||||
BOOST_THROW_EXCEPTION(std::invalid_argument(
|
||||
"AccessStrategy does not support version " + std::to_string(*parsed.version)));
|
||||
"AccessStrategy does not support version " + to_string(*parsed.version)));
|
||||
}
|
||||
this->setInstanceName(makeInstanceName(name, getStrategyName()));
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ AsfStrategy::AsfStrategy(Forwarder& forwarder, const Name& name)
|
||||
}
|
||||
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
|
||||
BOOST_THROW_EXCEPTION(std::invalid_argument(
|
||||
"AsfStrategy does not support version " + std::to_string(*parsed.version)));
|
||||
"AsfStrategy does not support version " + to_string(*parsed.version)));
|
||||
}
|
||||
this->setInstanceName(makeInstanceName(name, getStrategyName()));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/**
|
||||
* Copyright (c) 2014-2016, Regents of the University of California,
|
||||
/*
|
||||
* Copyright (c) 2014-2017, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -69,7 +69,7 @@ BestRouteStrategy::BestRouteStrategy(Forwarder& forwarder, const Name& name)
|
||||
}
|
||||
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
|
||||
BOOST_THROW_EXCEPTION(std::invalid_argument(
|
||||
"BestRouteStrategy does not support version " + std::to_string(*parsed.version)));
|
||||
"BestRouteStrategy does not support version " + to_string(*parsed.version)));
|
||||
}
|
||||
this->setInstanceName(makeInstanceName(name, getStrategyName()));
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ BestRouteStrategy2::BestRouteStrategy2(Forwarder& forwarder, const Name& name)
|
||||
}
|
||||
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
|
||||
BOOST_THROW_EXCEPTION(std::invalid_argument(
|
||||
"BestRouteStrategy2 does not support version " + std::to_string(*parsed.version)));
|
||||
"BestRouteStrategy2 does not support version " + to_string(*parsed.version)));
|
||||
}
|
||||
this->setInstanceName(makeInstanceName(name, getStrategyName()));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/**
|
||||
* Copyright (c) 2014-2016, Regents of the University of California,
|
||||
/*
|
||||
* Copyright (c) 2014-2017, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -41,7 +41,7 @@ ClientControlStrategy::ClientControlStrategy(Forwarder& forwarder, const Name& n
|
||||
}
|
||||
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
|
||||
BOOST_THROW_EXCEPTION(std::invalid_argument(
|
||||
"ClientControlStrategy does not support version " + std::to_string(*parsed.version)));
|
||||
"ClientControlStrategy does not support version " + to_string(*parsed.version)));
|
||||
}
|
||||
this->setInstanceName(makeInstanceName(name, getStrategyName()));
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ MulticastStrategy::MulticastStrategy(Forwarder& forwarder, const Name& name)
|
||||
}
|
||||
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
|
||||
BOOST_THROW_EXCEPTION(std::invalid_argument(
|
||||
"MulticastStrategy does not support version " + std::to_string(*parsed.version)));
|
||||
"MulticastStrategy does not support version " + to_string(*parsed.version)));
|
||||
}
|
||||
this->setInstanceName(makeInstanceName(name, getStrategyName()));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/**
|
||||
* Copyright (c) 2014-2016, Regents of the University of California,
|
||||
/*
|
||||
* Copyright (c) 2014-2017, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -45,7 +45,7 @@ NccStrategy::NccStrategy(Forwarder& forwarder, const Name& name)
|
||||
}
|
||||
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
|
||||
BOOST_THROW_EXCEPTION(std::invalid_argument(
|
||||
"NccStrategy does not support version " + std::to_string(*parsed.version)));
|
||||
"NccStrategy does not support version " + to_string(*parsed.version)));
|
||||
}
|
||||
this->setInstanceName(makeInstanceName(name, getStrategyName()));
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ CongestionMarkStrategy::CongestionMarkStrategy(Forwarder& forwarder, const Name&
|
||||
|
||||
if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
|
||||
BOOST_THROW_EXCEPTION(std::invalid_argument(
|
||||
"CongestionMarkStrategy does not support version " + std::to_string(*parsed.version)));
|
||||
"CongestionMarkStrategy does not support version " + to_string(*parsed.version)));
|
||||
}
|
||||
this->setInstanceName(makeInstanceName(name, getStrategyName()));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2014-2017, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
@@ -391,7 +391,7 @@ BOOST_AUTO_TEST_CASE(MultipleFaces)
|
||||
cmd.validateRequest(req);
|
||||
cmd.applyDefaultsToRequest(req);
|
||||
BOOST_CHECK_EQUAL(req.getName(), "/nm5y8X8b2");
|
||||
BOOST_CHECK_MESSAGE(faceIds.erase(req.getFaceId()), "expected face " + std::to_string(req.getFaceId()));
|
||||
BOOST_CHECK_MESSAGE(faceIds.erase(req.getFaceId()), "expected face " + to_string(req.getFaceId()));
|
||||
BOOST_CHECK_EQUAL(req.getOrigin(), ndn::nfd::ROUTE_ORIGIN_STATIC);
|
||||
|
||||
this->succeedCommand(interest, req);
|
||||
|
||||
@@ -190,7 +190,7 @@ NdnFchDiscovery::doStart()
|
||||
}
|
||||
if (statusCode != 200) {
|
||||
boost::trim(statusMessage);
|
||||
BOOST_THROW_EXCEPTION(HttpException("HTTP request failed: " + std::to_string(statusCode) + " " + statusMessage));
|
||||
BOOST_THROW_EXCEPTION(HttpException("HTTP request failed: " + to_string(statusCode) + " " + statusMessage));
|
||||
}
|
||||
std::string header;
|
||||
while (std::getline(requestStream, header) && header != "\r")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/**
|
||||
/*
|
||||
* Copyright (c) 2014-2017, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
@@ -134,7 +134,7 @@ FindFace::query()
|
||||
};
|
||||
auto failureCb = [this] (uint32_t code, const std::string& reason) {
|
||||
m_res = Code::ERROR;
|
||||
m_errorReason = "Error " + std::to_string(code) + " when querying face: " + reason;
|
||||
m_errorReason = "Error " + to_string(code) + " when querying face: " + reason;
|
||||
};
|
||||
|
||||
if (m_filter.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user