From: Jonathan Robey Date: Sun, 31 Jul 2016 23:03:26 +0000 (-0700) Subject: Eliminate ptr_fun from tests X-Git-Tag: v8.5.0-rc1~824^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f770eacb16b86056e981f92915dbb5560dc11c9;p=dealii.git Eliminate ptr_fun from tests --- diff --git a/tests/grid/filtered_iterator.cc b/tests/grid/filtered_iterator.cc index ccb9553c9b..5e6111abeb 100644 --- a/tests/grid/filtered_iterator.cc +++ b/tests/grid/filtered_iterator.cc @@ -140,9 +140,9 @@ void test () bool (*predicate) (const active_cell_iterator, const unsigned int) = &level_equal_to; FilteredIterator - 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; - 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(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(tria.n_active_cells (3)) ? "OK" : "Failed") diff --git a/tests/grid/filtered_iterator_02.cc b/tests/grid/filtered_iterator_02.cc index e7c0499c3f..571317cfe1 100644 --- a/tests/grid/filtered_iterator_02.cc +++ b/tests/grid/filtered_iterator_02.cc @@ -139,10 +139,10 @@ void test () bool (*predicate) (const active_cell_iterator, const unsigned int) = &level_equal_to; FilteredIterator - 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(tria.n_active_cells (3)), @@ -163,15 +163,15 @@ void test () bool (*predicate) (const active_cell_iterator, const unsigned int) = &level_equal_to; - 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(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(tria.n_active_cells (3)) ? "OK" : "Failed")