From: Daniel Arndt Date: Fri, 30 Mar 2018 16:10:47 +0000 (+0200) Subject: Fix remainig occurrences of std::bind1st and std::bind2nd in bundled boost X-Git-Tag: v9.0.0-rc1~262^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6126%2Fhead;p=dealii.git Fix remainig occurrences of std::bind1st and std::bind2nd in bundled boost --- diff --git a/bundled/boost-1.62.0/include/boost/container/string.hpp b/bundled/boost-1.62.0/include/boost/container/string.hpp index 1e47abaaf0..6dfdeee1ac 100644 --- a/bundled/boost-1.62.0/include/boost/container/string.hpp +++ b/bundled/boost-1.62.0/include/boost/container/string.hpp @@ -535,7 +535,7 @@ class basic_string bool operator()(const typename Tr::char_type& x) const { return std::find_if(m_first, m_last, - std::bind1st(Eq_traits(), x)) == m_last; + [](const argument_type &ch) {return Eq_traits(x, ch)}) == m_last; } }; #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED @@ -2116,7 +2116,7 @@ class basic_string pointer finish = addr + sz; const const_iterator result = std::find_if(addr + pos, finish, - std::bind2nd(Eq_traits(), c)); + [](const argument_type &ch) {return Eq_traits(ch, c)}); return result != finish ? result - begin() : npos; } } @@ -2176,7 +2176,7 @@ class basic_string const const_iterator last = begin() + container_detail::min_value(len - 1, pos) + 1; const_reverse_iterator rresult = std::find_if(const_reverse_iterator(last), rend(), - std::bind2nd(Eq_traits(), c)); + [](const argument_type &ch) {return Eq_traits(ch, c)}); return rresult != rend() ? (rresult.base() - 1) - begin() : npos; } } @@ -2319,8 +2319,8 @@ class basic_string const pointer addr = this->priv_addr(); const pointer finish = addr + this->priv_size(); const const_iterator result - = std::find_if(addr + pos, finish, - std::not1(std::bind2nd(Eq_traits(), c))); + = std::find_if_not(addr + pos, finish, + [](const argument_type &ch) {return Eq_traits(ch, c)}); return result != finish ? result - begin() : npos; } } @@ -2375,8 +2375,8 @@ class basic_string else { const const_iterator last = begin() + container_detail::min_value(len - 1, pos) + 1; const const_reverse_iterator rresult = - std::find_if(const_reverse_iterator(last), rend(), - std::not1(std::bind2nd(Eq_traits(), c))); + std::find_if_not(const_reverse_iterator(last), rend(), + [](const argument_type &ch) {return Eq_traits(ch, c)}); return rresult != rend() ? (rresult.base() - 1) - begin() : npos; } } diff --git a/bundled/boost-1.62.0/include/boost/graph/distributed/detail/mpi_process_group.ipp b/bundled/boost-1.62.0/include/boost/graph/distributed/detail/mpi_process_group.ipp index c157387be9..c495deb63a 100644 --- a/bundled/boost-1.62.0/include/boost/graph/distributed/detail/mpi_process_group.ipp +++ b/bundled/boost-1.62.0/include/boost/graph/distributed/detail/mpi_process_group.ipp @@ -842,7 +842,7 @@ all_gather(const mpi_process_group& pg, InputIterator first, // Adjust sizes based on the number of bytes std::transform(sizes.begin(), sizes.end(), sizes.begin(), - std::bind2nd(std::multiplies(), sizeof(T))); + [](const int& size){return std::multiplies(size, sizeof(T))}); // Compute displacements std::vector displacements; diff --git a/bundled/boost-1.62.0/include/boost/random/uniform_on_sphere.hpp b/bundled/boost-1.62.0/include/boost/random/uniform_on_sphere.hpp index ce2e35237e..cad1a77701 100644 --- a/bundled/boost-1.62.0/include/boost/random/uniform_on_sphere.hpp +++ b/bundled/boost-1.62.0/include/boost/random/uniform_on_sphere.hpp @@ -19,7 +19,7 @@ #include #include // std::transform -#include // std::bind2nd, std::divides +#include // std::divides #include #include #include diff --git a/bundled/boost-1.62.0/include/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp b/bundled/boost-1.62.0/include/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp index 96677e7020..41822a9c03 100644 --- a/bundled/boost-1.62.0/include/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp +++ b/bundled/boost-1.62.0/include/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp @@ -291,18 +291,10 @@ struct grammar_definition helper_list_t& helpers = grammartract_helper_list::do_(self); -# if defined(BOOST_INTEL_CXX_VERSION) typedef typename helper_list_t::vector_t::reverse_iterator iterator_t; for (iterator_t i = helpers.rbegin(); i != helpers.rend(); ++i) (*i)->undefine(self); -# else - typedef impl::grammar_helper_base helper_base_t; - - std::for_each(helpers.rbegin(), helpers.rend(), - std::bind2nd(std::mem_fun(&helper_base_t::undefine), self)); -# endif - #else (void)self; #endif