]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Eliminate mem_fun in include 2898/head
authorJonathan Robey <class4kayaker@gmail.com>
Sun, 31 Jul 2016 22:40:50 +0000 (15:40 -0700)
committerJonathan Robey <class4kayaker@gmail.com>
Sun, 31 Jul 2016 22:40:50 +0000 (15:40 -0700)
Replace with std_cxx11::bind

include/deal.II/numerics/time_dependent.h

index ff5adfcdb211f0046c457f52d89ab694b1cb2ffa..b7e1fe8175916f0c13468fe9790597a698a4771c 100644 (file)
@@ -251,8 +251,8 @@ template <int dim, int spacedim> class Triangulation;
  *   void
  *   TimeDependent::solve_primal_problem ()
  *   {
- *     do_loop (mem_fun(&TimeStepBase::init_for_primal_problem),
- *              mem_fun(&TimeStepBase::solve_primal_problem),
+ *     do_loop (std_cxx11::bind(&TimeStepBase::init_for_primal_problem, std_cxx11::_1),
+ *              std_cxx11::bind(&TimeStepBase::solve_primal_problem, std_cxx11::_1),
  *              timestepping_data_primal,
  *              forward);
  *   };
@@ -273,7 +273,7 @@ template <int dim, int spacedim> class Triangulation;
  * look-back and the last one denotes in which direction the loop is to be
  * run.
  *
- * Using function pointers through the @p mem_fun functions provided by the
+ * Using function pointers through the @p std_cxx11::bind functions provided by the
  * <tt>C++</tt> standard library, it is possible to do neat tricks, like the
  * following, also taken from the wave program, in this case from the function
  * @p refine_grids:
@@ -282,11 +282,11 @@ template <int dim, int spacedim> class Triangulation;
  *   compute the thresholds for refinement
  *   ...
  *
- *   do_loop (mem_fun (&TimeStepBase_Tria<dim>::init_for_refinement),
- *            std_cxx11::bind (&TimeStepBase_Wave<dim>::refine_grid,
- *                             std_cxx11::_1,
- *                             TimeStepBase_Tria<dim>::RefinementData (top_threshold,
- *                                                                     bottom_threshold)),
+ *   do_loop (std_cxx11::bind(&TimeStepBase_Tria<dim>::init_for_refinement, std_cxx11::_1),
+ *            std_cxx11::bind(&TimeStepBase_Wave<dim>::refine_grid,
+ *                            std_cxx11::_1,
+ *                            TimeStepBase_Tria<dim>::RefinementData (top_threshold,
+ *                                                                    bottom_threshold)),
  *            TimeDependent::TimeSteppingData (0,1),
  *            TimeDependent::forward);
  * @endcode
@@ -512,8 +512,8 @@ public:
    *
    * To see how this function work, note that the function @p
    * solve_primal_problem only consists of a call to <tt>do_loop
-   * (mem_fun(&TimeStepBase::init_for_primal_problem),
-   * mem_fun(&TimeStepBase::solve_primal_problem), timestepping_data_primal,
+   * (std_cxx11::bind(&TimeStepBase::init_for_primal_problem, std_cxx11::_1),
+   * std_cxx11::bind(&TimeStepBase::solve_primal_problem, std_cxx11::_1), timestepping_data_primal,
    * forward);</tt>.
    *
    * Note also, that the given class from which the two functions are taken

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.