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
This commit is contained in:
Arek Sredzki 2018-08-14 23:43:20 -07:00 committed by John Wellbelove
parent bec1e40c55
commit d345709c3c

View File

@ -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);