This is an automated email from the ASF dual-hosted git repository.
bennoe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
The following commit(s) were added to refs/heads/master by this push:
new 0273fbc Added namespace qualifications for std algorithms.
0273fbc is described below
commit 0273fbc2638c581528cc5819da2e0c9b1a9c235e
Author: James Wright <[email protected]>
AuthorDate: Tue Oct 29 12:41:30 2019 +0100
Added namespace qualifications for std algorithms.
Several locations were relying on ADL to discover algorithms
from the standard library namespace which was in turn relying on
an implementation detail of protobuf, in particular the fact that
`protobuf::internal::RepeatedPtrIterator` is derived
from `std::iterator`.
This caused compilation errors on FreeBSD.
Upstreamed from https://reviews.freebsd.org/D20251
---
src/common/protobuf_utils.cpp | 4 ++--
src/common/resources_utils.cpp | 4 ++--
src/master/quota.cpp | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/common/protobuf_utils.cpp b/src/common/protobuf_utils.cpp
index 8f143e5..7fe4a44 100644
--- a/src/common/protobuf_utils.cpp
+++ b/src/common/protobuf_utils.cpp
@@ -1375,7 +1375,7 @@ void addMinimumCapability(
const MasterInfo::Capability::Type& capability)
{
int capabilityIndex =
- find_if(
+ std::find_if(
capabilities->begin(),
capabilities->end(),
[&](const Registry::MinimumCapability& mc) {
@@ -1396,7 +1396,7 @@ void removeMinimumCapability(
const MasterInfo::Capability::Type& capability)
{
int capabilityIndex =
- find_if(
+ std::find_if(
capabilities->begin(),
capabilities->end(),
[&](const Registry::MinimumCapability& mc) {
diff --git a/src/common/resources_utils.cpp b/src/common/resources_utils.cpp
index cbdad4b..5e78997 100644
--- a/src/common/resources_utils.cpp
+++ b/src/common/resources_utils.cpp
@@ -914,7 +914,7 @@ Resources shrinkResources(const Resources& resources,
ResourceQuantities target)
// TODO(mzhu): Add a `shuffle()` method in `Resources` to avoid this copy.
google::protobuf::RepeatedPtrField<Resource> resourceVector = resources;
- random_shuffle(resourceVector.begin(), resourceVector.end());
+ std::random_shuffle(resourceVector.begin(), resourceVector.end());
Resources result;
foreach (Resource& resource, resourceVector) {
@@ -947,7 +947,7 @@ Resources shrinkResources(const Resources& resources,
ResourceLimits target)
// TODO(mzhu): Add a `shuffle()` method in `Resources` to avoid this copy.
google::protobuf::RepeatedPtrField<Resource> resourceVector = resources;
- random_shuffle(resourceVector.begin(), resourceVector.end());
+ std::random_shuffle(resourceVector.begin(), resourceVector.end());
Resources result;
foreach (Resource resource, resourceVector) {
diff --git a/src/master/quota.cpp b/src/master/quota.cpp
index dea2ef6..905937c 100644
--- a/src/master/quota.cpp
+++ b/src/master/quota.cpp
@@ -80,7 +80,7 @@ Try<bool> UpdateQuota::perform(
foreach (const QuotaConfig& config, configs) {
// Check if there is already quota stored for the role.
- int configIndex = find_if(
+ int configIndex = std::find_if(
registryConfigs.begin(),
registryConfigs.end(),
[&](const QuotaConfig& registryConfig) {