From d345709c3cd68e096621777b8848659b52f3d26c Mon Sep 17 00:00:00 2001 From: Arek Sredzki Date: Tue, 14 Aug 2018 23:43:20 -0700 Subject: [PATCH] Exchange use of deprecated/removed std::bind1st for std::bind when c++11 is used #86 (#87) * Exchange use of deprecated/removed std::bind1st for std::bind when c++11 is used #86 * Use ETL_CPP11_SUPPORTED instead of checking cpp verison --- include/etl/algorithm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/etl/algorithm.h b/include/etl/algorithm.h index a45f66cd..f808db86 100644 --- a/include/etl/algorithm.h +++ b/include/etl/algorithm.h @@ -617,7 +617,11 @@ namespace etl for (TIterator1 i = begin1; i != end1; ++i) { +#if ETL_CPP11_SUPPORTED + if (i == std::find_if(begin1, i, std::bind(predicate, *i, std::placeholders::_1))) +#else if (i == std::find_if(begin1, i, std::bind1st(predicate, *i))) +#endif { size_t n = std::count(begin2, end2, *i); @@ -650,7 +654,11 @@ namespace etl { for (TIterator1 i = begin1; i != end1; ++i) { +#if ETL_CPP11_SUPPORTED + if (i == std::find_if(begin1, i, std::bind(predicate, *i, std::placeholders::_1))) +#else if (i == std::find_if(begin1, i, std::bind1st(predicate, *i))) +#endif { size_t n = std::count(begin2, end2, *i);