]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Eliminate ptr_fun from tests 2899/head
authorJonathan Robey <class4kayaker@gmail.com>
Sun, 31 Jul 2016 23:03:26 +0000 (16:03 -0700)
committerJonathan Robey <class4kayaker@gmail.com>
Sun, 31 Jul 2016 23:03:26 +0000 (16:03 -0700)
tests/grid/filtered_iterator.cc
tests/grid/filtered_iterator_02.cc

index ccb9553c9b8d9e86950f023ca6d2709eeaeca565..5e6111abeb352e56c697d9e05129d42e947e6de4 100644 (file)
@@ -140,9 +140,9 @@ void test ()
       bool (*predicate) (const active_cell_iterator, const unsigned int)
         = &level_equal_to<active_cell_iterator>;
       FilteredIterator<active_cell_iterator>
-      begin (std_cxx11::bind (std::ptr_fun(predicate), std_cxx11::_1, 3),
+      begin (std_cxx11::bind (predicate, std_cxx11::_1, 3),
              tria.begin_active (3)),
-                               end   (std_cxx11::bind (std::ptr_fun(predicate), std_cxx11::_1, 3),
+                               end   (std_cxx11::bind (predicate, std_cxx11::_1, 3),
                                       tria.end());
 
       Assert (std::distance (begin, end) ==
@@ -164,15 +164,15 @@ void test ()
 
       bool (*predicate) (const active_cell_iterator, const unsigned int)
         = &level_equal_to<active_cell_iterator>;
-      Assert (std::distance (FI(std_cxx11::bind (std::ptr_fun(predicate), std_cxx11::_1, 3))
+      Assert (std::distance (FI(std_cxx11::bind (predicate, std_cxx11::_1, 3))
                              .set_to_next_positive(tria.begin_active()),
-                             FI(std_cxx11::bind (std::ptr_fun(predicate), std_cxx11::_1, 3), tria.end())) ==
+                             FI(std_cxx11::bind (predicate, std_cxx11::_1, 3), tria.end())) ==
               static_cast<signed int>(tria.n_active_cells (3)),
               ExcInternalError());
       logfile << "Check 4: "
-              << (std::distance (FI(std_cxx11::bind (std::ptr_fun(predicate), std_cxx11::_1, 3))
+              << (std::distance (FI(std_cxx11::bind (predicate, std_cxx11::_1, 3))
                                  .set_to_next_positive(tria.begin_active()),
-                                 FI(std_cxx11::bind (std::ptr_fun(predicate), std_cxx11::_1, 3), tria.end())) ==
+                                 FI(std_cxx11::bind (predicate, std_cxx11::_1, 3), tria.end())) ==
                   static_cast<signed int>(tria.n_active_cells (3))
                   ?
                   "OK" : "Failed")
index e7c0499c3f85fd3113dc737c331ef9845a2ed783..571317cfe1c8e7c3d4fc178b4fc1ca92fd8c8b66 100644 (file)
@@ -139,10 +139,10 @@ void test ()
       bool (*predicate) (const active_cell_iterator, const unsigned int)
         = &level_equal_to<active_cell_iterator>;
       FilteredIterator<active_cell_iterator>
-      begin (std_cxx11::bind (std::ptr_fun(predicate), std_cxx11::_1, 3),
+      begin (std_cxx11::bind (predicate, std_cxx11::_1, 3),
              tria.begin_active (3)),
-                               end   (std_cxx11::bind (std::ptr_fun(predicate), std_cxx11::_1, 3),
-                                      tria.end());
+                               end  (std_cxx11::bind(predicate, std_cxx11::_1, 3),
+                                     tria.end());
 
       Assert (std::distance (begin, end) ==
               static_cast<signed int>(tria.n_active_cells (3)),
@@ -163,15 +163,15 @@ void test ()
 
       bool (*predicate) (const active_cell_iterator, const unsigned int)
         = &level_equal_to<active_cell_iterator>;
-      Assert (std::distance (FI(std_cxx11::bind (std::ptr_fun(predicate), std_cxx11::_1, 3))
+      Assert (std::distance (FI(std_cxx11::bind (predicate, std_cxx11::_1, 3))
                              .set_to_next_positive(tria.begin_active()),
-                             FI(std_cxx11::bind (std::ptr_fun(predicate), std_cxx11::_1, 3), tria.end())) ==
+                             FI(std_cxx11::bind (predicate, std_cxx11::_1, 3), tria.end())) ==
               static_cast<signed int>(tria.n_active_cells (3)),
               ExcInternalError());
       logfile << "Check 4: "
-              << (std::distance (FI(std_cxx11::bind (std::ptr_fun(predicate), std_cxx11::_1, 3))
+              << (std::distance (FI(std_cxx11::bind (predicate, std_cxx11::_1, 3))
                                  .set_to_next_positive(tria.begin_active()),
-                                 FI(std_cxx11::bind (std::ptr_fun(predicate), std_cxx11::_1, 3), tria.end())) ==
+                                 FI(std_cxx11::bind (predicate, std_cxx11::_1, 3), tria.end())) ==
                   static_cast<signed int>(tria.n_active_cells (3))
                   ?
                   "OK" : "Failed")

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.