]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix remainig occurrences of std::bind1st and std::bind2nd in bundled boost 6126/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 30 Mar 2018 16:10:47 +0000 (18:10 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 30 Mar 2018 16:29:11 +0000 (18:29 +0200)
bundled/boost-1.62.0/include/boost/container/string.hpp
bundled/boost-1.62.0/include/boost/graph/distributed/detail/mpi_process_group.ipp
bundled/boost-1.62.0/include/boost/random/uniform_on_sphere.hpp
bundled/boost-1.62.0/include/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp

index 1e47abaaf0745d83a4bf9f3a5bd8052fa8d5751b..6dfdeee1ac211846c3013a3b62b9b1d4a76c8601 100644 (file)
@@ -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<Tr>(), x)) == m_last;
+                             [](const argument_type &ch) {return Eq_traits<Tr>(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<Traits>(), c));
+                         [](const argument_type &ch) {return Eq_traits<Tr>(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<Traits>(), c));
+                         [](const argument_type &ch) {return Eq_traits<Tr>(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<Traits>(), c)));
+            = std::find_if_not(addr + pos, finish,
+                               [](const argument_type &ch) {return Eq_traits<Tr>(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<Traits>(), c)));
+            std::find_if_not(const_reverse_iterator(last), rend(),
+                             [](const argument_type &ch) {return Eq_traits<Tr>(ch, c)});
          return rresult != rend() ? (rresult.base() - 1) - begin() : npos;
       }
    }
index c157387be93e83dd61281c8dca8ff00ad26ab509..c495deb63a355b692f6ff6cdea3ec0f1b59edb14 100644 (file)
@@ -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<int>(), sizeof(T)));
+                 [](const int& size){return std::multiplies<int>(size, sizeof(T))});
 
   // Compute displacements
   std::vector<int> displacements;
index ce2e35237e05c6ff39703296bf6b878518ea57ed..cad1a77701afe2fdf12ed1ebfb29ad887d7028bf 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <vector>
 #include <algorithm>     // std::transform
-#include <functional>    // std::bind2nd, std::divides
+#include <functional>    // std::divides
 #include <boost/assert.hpp>
 #include <boost/random/detail/config.hpp>
 #include <boost/random/detail/operators.hpp>
index 96677e70201e8fd81b0e1a532bb0a8a219577995..41822a9c037f66d71f8bf7bea7f6f776f9c07fd7 100644 (file)
@@ -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<GrammarT> 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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.