From 601c9222755a75cf053181a8771ef7fcadb9a015 Mon Sep 17 00:00:00 2001 From: bangerth Date: Mon, 30 May 2011 00:16:00 +0000 Subject: [PATCH]
  • Changed: deal.II has a namespace std_cxx1x that was used to import classes from BOOST that are part of the upcoming C++ 1x standard. On the other hand, if your compiler supported a sufficiently large subset of C++ 1x, we had code that simply did @code namespace std_cxx1x = std; @endcode allowing you to refer to everything that was part of the compiler's namespace std under the alternative name. This turned out to be untenable in connection to the changed outlined below for _1, _2, etc. Consequently, if the compiler used supports C++ 1x, we now selectively import elements of the compiler's namespace std into namespace std_cxx1x as well. This may lead to incompatibilities if you are already using elements of the C++ 1x standard by refering to them through the std_cxx1x namespace and these elements are not on the list of selectively imported ones.
    (Wolfgang Bangerth, 2011/05/29)
  • Changed: Previously, placeholder arguments like _1, _2, etc that are used in conjunction with the std_cxx1x::bind function could be referenced as if they are part of the global namespace. This was achieved by importing the corresponding elements of namespace std::placeholders into the global namespace if your compiler supported this part of the C++ 1x standard, or otherwise using the BOOST counterparts which are already in the global namespace. However, this leads to a conflict if one has a C++ 1x enabled compiler (e.g. GCC 4.6) and #includes certain BOOST headers, since the importation of symbols into the global namespace now leads to ambiguous names. The only solution to the problem is to not import names into the global namespace, but rather import the names from either BOOST or namespace std into the deal.II namespace std_cxx1x. The downside is that all code that uses _1, _2, etc needs to be changed to use std_cxx1x::_1, std_cxx1x::_2, etc from now on.
    (Wolfgang Bangerth, 2011/05/29) git-svn-id: https://svn.dealii.org/trunk@23752 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/doc/news/changes.h | 40 +++++++++++++++++-- deal.II/examples/step-32/step-32.cc | 34 ++++++++-------- deal.II/examples/step-37/step-37.cc | 6 +-- deal.II/include/deal.II/base/parallel.h | 2 +- .../include/deal.II/base/std_cxx1x/array.h | 7 +++- deal.II/include/deal.II/base/std_cxx1x/bind.h | 24 ++++++++++- .../base/std_cxx1x/condition_variable.h | 9 ++++- .../include/deal.II/base/std_cxx1x/function.h | 7 +++- .../include/deal.II/base/std_cxx1x/mutex.h | 7 +++- .../deal.II/base/std_cxx1x/shared_ptr.h | 8 +++- .../include/deal.II/base/std_cxx1x/thread.h | 7 +++- .../include/deal.II/base/std_cxx1x/tuple.h | 10 ++++- .../include/deal.II/base/thread_management.h | 36 ++++++++--------- deal.II/include/deal.II/base/work_stream.h | 4 +- .../deal.II/lac/sparse_matrix.templates.h | 10 ++--- deal.II/include/deal.II/lac/vector.h | 6 +-- .../deal.II/numerics/mesh_worker_loop.h | 5 ++- .../source/distributed/solution_transfer.cc | 12 +++--- deal.II/source/numerics/data_out.cc | 4 +- deal.II/source/numerics/data_out_faces.cc | 4 +- deal.II/source/numerics/data_out_rotation.cc | 4 +- deal.II/source/numerics/error_estimator.cc | 4 +- deal.II/source/numerics/matrices.cc | 16 ++++---- 23 files changed, 180 insertions(+), 86 deletions(-) diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index d49a6a01e8..1bdf4f2e38 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -21,7 +21,39 @@ inconvenience this causes.

      -
    1. +
    2. Changed: deal.II has a namespace std_cxx1x that was used to +import classes from BOOST that are part of the upcoming C++ 1x standard. On +the other hand, if your compiler supported a sufficiently large subset +of C++ 1x, we had code that simply did +@code + namespace std_cxx1x = std; +@endcode +allowing you to refer to everything that was part of the compiler's namespace +std under the alternative name. This turned out to be untenable +in connection to the changed outlined below for _1, _2, etc. Consequently, +if the compiler used supports C++ 1x, we now selectively import elements of the +compiler's namespace std into namespace std_cxx1x as well. This may lead to +incompatibilities if you are already using elements of the C++ 1x +standard by refering to them through the std_cxx1x namespace and these elements +are not on the list of selectively imported ones. +
      +(Wolfgang Bangerth, 2011/05/29) + +
    3. Changed: Previously, placeholder arguments like _1, _2, etc that are used +in conjunction with the std_cxx1x::bind function could be referenced as if +they are part of the global namespace. This was achieved by importing the +corresponding elements of namespace std::placeholders into the global namespace +if your compiler supported this part of the C++ 1x standard, or otherwise using +the BOOST counterparts which are already in the global namespace. However, +this leads to a conflict if one has a C++ 1x enabled compiler (e.g. GCC 4.6) +and #includes certain BOOST headers, since the importation of symbols +into the global namespace now leads to ambiguous names. The only solution to +the problem is to not import names into the global namespace, but rather +import the names from either BOOST or namespace std into the deal.II namespace +std_cxx1x. The downside is that all code that uses _1, _2, etc needs to be +changed to use std_cxx1x::_1, std_cxx1x::_2, etc from now on. +
      +(Wolfgang Bangerth, 2011/05/29)
    @@ -34,7 +66,7 @@ for the GNU Scientific Library (GSL) in version 7.0 but didn't actually use any of the GSL functions. The corresponding code has therefore been removed again.
    -(WB, 2011/05/22) +(Wolfgang Bangerth, 2011/05/22)
  • Changed: Traditionally, include directories were set through the @@ -53,13 +85,13 @@ This change has been made throughout the library and tutorial programs. However, the old way of using include directories will continue to work for at least one release for backward compatibility.
    -(WB, 2011/05/16) +(Wolfgang Bangerth, 2011/05/16)
  • Changed: The version of BOOST we ship with deal.II has been upgraded to 1.46.1. BOOST now also resides in the directory contrib/boost-1.46.1 instead of an unversioned directory.
    -(WB, 2011/05/16) +(Wolfgang Bangerth, 2011/05/16)
  • New: The SparseDirectUMFPACK class can now also deal with matrices provided in SparseMatrixEZ format. diff --git a/deal.II/examples/step-32/step-32.cc b/deal.II/examples/step-32/step-32.cc index 17899a2fa0..cc3bdbff0b 100644 --- a/deal.II/examples/step-32/step-32.cc +++ b/deal.II/examples/step-32/step-32.cc @@ -2185,7 +2185,7 @@ copy_local_to_global_stokes_preconditioner (const Assembly::CopyData::StokesPrec // std_cxx1x::bind to create a // function object that is compatible with // the WorkStream class. It uses placeholders - // _1, _2, _3 for the local + // _1, std_cxx1x::_2, _3 for the local // assembly function that specify cell, // scratch data, and copy data, as well as // the placeholder _1 for the @@ -2249,13 +2249,13 @@ BoussinesqFlowProblem::assemble_stokes_preconditioner () std_cxx1x::bind (&BoussinesqFlowProblem:: local_assemble_stokes_preconditioner, this, - _1, - _2, - _3), + std_cxx1x::_1, + std_cxx1x::_2, + std_cxx1x::_3), std_cxx1x::bind (&BoussinesqFlowProblem:: copy_local_to_global_stokes_preconditioner, this, - _1), + std_cxx1x::_1), Assembly::Scratch:: StokesPreconditioner (stokes_fe, quadrature_formula, mapping, @@ -2456,13 +2456,13 @@ void BoussinesqFlowProblem::assemble_stokes_system () std_cxx1x::bind (&BoussinesqFlowProblem:: local_assemble_stokes_system, this, - _1, - _2, - _3), + std_cxx1x::_1, + std_cxx1x::_2, + std_cxx1x::_3), std_cxx1x::bind (&BoussinesqFlowProblem:: copy_local_to_global_stokes_system, this, - _1), + std_cxx1x::_1), Assembly::Scratch:: StokesSystem (stokes_fe, mapping, quadrature_formula, (update_values | @@ -2583,13 +2583,13 @@ void BoussinesqFlowProblem::assemble_temperature_matrix () std_cxx1x::bind (&BoussinesqFlowProblem:: local_assemble_temperature_matrix, this, - _1, - _2, - _3), + std_cxx1x::_1, + std_cxx1x::_2, + std_cxx1x::_3), std_cxx1x::bind (&BoussinesqFlowProblem:: copy_local_to_global_temperature_matrix, this, - _1), + std_cxx1x::_1), Assembly::Scratch:: TemperatureMatrix (temperature_fe, mapping, quadrature_formula), Assembly::CopyData:: @@ -2868,13 +2868,13 @@ void BoussinesqFlowProblem::assemble_temperature_system (const double maxim this, global_T_range, maximal_velocity, - _1, - _2, - _3), + std_cxx1x::_1, + std_cxx1x::_2, + std_cxx1x::_3), std_cxx1x::bind (&BoussinesqFlowProblem:: copy_local_to_global_temperature_rhs, this, - _1), + std_cxx1x::_1), Assembly::Scratch:: TemperatureRHS (temperature_fe, stokes_fe, mapping, quadrature_formula), diff --git a/deal.II/examples/step-37/step-37.cc b/deal.II/examples/step-37/step-37.cc index 8db716eb03..bbc6b85f0e 100644 --- a/deal.II/examples/step-37/step-37.cc +++ b/deal.II/examples/step-37/step-37.cc @@ -647,7 +647,7 @@ MatrixFree::Tvmult_add (Vector &dst, // three arguments (in the first case) or one // argument (in the second), which is what // the WorkStream::run function expects. The - // placeholders _1, _2, _3 in + // placeholders _1, std_cxx1x::_2, _3 in // the local vmult specify variable input // values, given by the chunk information, // scratch data and copy data that the @@ -680,10 +680,10 @@ MatrixFree::vmult_add (Vector &dst, WorkStream::run (matrix_sizes.chunks.begin(), matrix_sizes.chunks.end(), std_cxx1x::bind(&MatrixFree:: template local_vmult, - this, _1, _2, _3, boost::cref(src)), + this, std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::_3, boost::cref(src)), std_cxx1x::bind(&MatrixFree:: template copy_local_to_global, - this, _1, boost::ref(dst)), + this, std_cxx1x::_1, boost::ref(dst)), WorkStreamData::ScratchData(), WorkStreamData::CopyData(), 2*multithread_info.n_default_threads,1); diff --git a/deal.II/include/deal.II/base/parallel.h b/deal.II/include/deal.II/base/parallel.h index b4b8172b3c..7387e3a630 100644 --- a/deal.II/include/deal.II/base/parallel.h +++ b/deal.II/include/deal.II/base/parallel.h @@ -446,7 +446,7 @@ namespace parallel tbb::parallel_for (tbb::blocked_range (begin, end, grainsize), std_cxx1x::bind (&internal::apply_to_subranges, - _1, + std_cxx1x::_1, std_cxx1x::cref(f)), tbb::auto_partitioner()); #endif diff --git a/deal.II/include/deal.II/base/std_cxx1x/array.h b/deal.II/include/deal.II/base/std_cxx1x/array.h index 971a786a19..53797cc183 100644 --- a/deal.II/include/deal.II/base/std_cxx1x/array.h +++ b/deal.II/include/deal.II/base/std_cxx1x/array.h @@ -19,11 +19,16 @@ #ifdef DEAL_II_CAN_USE_CXX1X # include +DEAL_II_NAMESPACE_OPEN +namespace std_cxx1x +{ + using std::array; +} +DEAL_II_NAMESPACE_CLOSE #else #include - DEAL_II_NAMESPACE_OPEN namespace std_cxx1x { diff --git a/deal.II/include/deal.II/base/std_cxx1x/bind.h b/deal.II/include/deal.II/base/std_cxx1x/bind.h index 0667cd1fc3..8cf368b807 100644 --- a/deal.II/include/deal.II/base/std_cxx1x/bind.h +++ b/deal.II/include/deal.II/base/std_cxx1x/bind.h @@ -23,8 +23,16 @@ DEAL_II_NAMESPACE_OPEN // in boost, the placeholders _1, _2, ... are in the global namespace. in // C++0x, they are in namespace std::placeholders, which makes them awkward to -// use. import them into the deal.II namespace -using namespace std::placeholders; +// use. import them into the deal.II::std_cxx1x namespace instead and do them +// same below if we use boost instead. +namespace std_cxx1x +{ + using namespace std::placeholders; + using std::bind; + using std::ref; + using std::cref; + using std::reference_wrapper; +} DEAL_II_NAMESPACE_CLOSE #else @@ -38,6 +46,18 @@ namespace std_cxx1x using boost::ref; using boost::cref; using boost::reference_wrapper; + + // now also import the _1, _2 placeholders from the global namespace + // into the current one as suggested above + using ::_1; + using ::_2; + using ::_3; + using ::_4; + using ::_5; + using ::_6; + using ::_7; + using ::_8; + using ::_9; } DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/include/deal.II/base/std_cxx1x/condition_variable.h b/deal.II/include/deal.II/base/std_cxx1x/condition_variable.h index ceae7c723c..6cc7125205 100644 --- a/deal.II/include/deal.II/base/std_cxx1x/condition_variable.h +++ b/deal.II/include/deal.II/base/std_cxx1x/condition_variable.h @@ -19,11 +19,18 @@ #ifdef DEAL_II_CAN_USE_CXX1X # include +DEAL_II_NAMESPACE_OPEN +namespace std_cxx1x +{ + using std::condition_variable; + using std::unique_lock; + using std::adopt_lock; +} +DEAL_II_NAMESPACE_CLOSE #else # include - DEAL_II_NAMESPACE_OPEN namespace std_cxx1x { diff --git a/deal.II/include/deal.II/base/std_cxx1x/function.h b/deal.II/include/deal.II/base/std_cxx1x/function.h index 52e8829a53..8140fa1c7e 100644 --- a/deal.II/include/deal.II/base/std_cxx1x/function.h +++ b/deal.II/include/deal.II/base/std_cxx1x/function.h @@ -19,11 +19,16 @@ #ifdef DEAL_II_CAN_USE_CXX1X # include +DEAL_II_NAMESPACE_OPEN +namespace std_cxx1x +{ + using std::function; +} +DEAL_II_NAMESPACE_CLOSE #else #include - DEAL_II_NAMESPACE_OPEN namespace std_cxx1x { diff --git a/deal.II/include/deal.II/base/std_cxx1x/mutex.h b/deal.II/include/deal.II/base/std_cxx1x/mutex.h index 8218212353..d58330ae00 100644 --- a/deal.II/include/deal.II/base/std_cxx1x/mutex.h +++ b/deal.II/include/deal.II/base/std_cxx1x/mutex.h @@ -19,11 +19,16 @@ #ifdef DEAL_II_CAN_USE_CXX1X # include +DEAL_II_NAMESPACE_OPEN +namespace std_cxx1x +{ + using std::mutex; +} +DEAL_II_NAMESPACE_CLOSE #else # include - DEAL_II_NAMESPACE_OPEN namespace std_cxx1x { diff --git a/deal.II/include/deal.II/base/std_cxx1x/shared_ptr.h b/deal.II/include/deal.II/base/std_cxx1x/shared_ptr.h index 4f928ae403..71a784d359 100644 --- a/deal.II/include/deal.II/base/std_cxx1x/shared_ptr.h +++ b/deal.II/include/deal.II/base/std_cxx1x/shared_ptr.h @@ -19,11 +19,17 @@ #ifdef DEAL_II_CAN_USE_CXX1X # include +DEAL_II_NAMESPACE_OPEN +namespace std_cxx1x +{ + using std::shared_ptr; + using std::enable_shared_from_this; +} +DEAL_II_NAMESPACE_CLOSE #else #include - DEAL_II_NAMESPACE_OPEN namespace std_cxx1x { diff --git a/deal.II/include/deal.II/base/std_cxx1x/thread.h b/deal.II/include/deal.II/base/std_cxx1x/thread.h index af2454fa58..f471d8d0e8 100644 --- a/deal.II/include/deal.II/base/std_cxx1x/thread.h +++ b/deal.II/include/deal.II/base/std_cxx1x/thread.h @@ -19,11 +19,16 @@ #ifdef DEAL_II_CAN_USE_CXX1X # include +DEAL_II_NAMESPACE_OPEN +namespace std_cxx1x +{ + using std::thread; +} +DEAL_II_NAMESPACE_CLOSE #else # include - DEAL_II_NAMESPACE_OPEN namespace std_cxx1x { diff --git a/deal.II/include/deal.II/base/std_cxx1x/tuple.h b/deal.II/include/deal.II/base/std_cxx1x/tuple.h index 1f8f577f68..293c1a45b9 100644 --- a/deal.II/include/deal.II/base/std_cxx1x/tuple.h +++ b/deal.II/include/deal.II/base/std_cxx1x/tuple.h @@ -19,11 +19,19 @@ #ifdef DEAL_II_CAN_USE_CXX1X # include +DEAL_II_NAMESPACE_OPEN +namespace std_cxx1x +{ + using std::tuple; + using std::get; + using std::tuple_size; + using std::tuple_element; +} +DEAL_II_NAMESPACE_CLOSE #else #include - DEAL_II_NAMESPACE_OPEN namespace std_cxx1x { diff --git a/deal.II/include/deal.II/base/thread_management.h b/deal.II/include/deal.II/base/thread_management.h index eebcd2c6e5..c8b63b30d7 100644 --- a/deal.II/include/deal.II/base/thread_management.h +++ b/deal.II/include/deal.II/base/thread_management.h @@ -2155,7 +2155,7 @@ namespace Threads { return std_cxx1x::function >::type> - (std_cxx1x::bind(fun_ptr, std_cxx1x::ref(c), _1)); + (std_cxx1x::bind(fun_ptr, std_cxx1x::ref(c), std_cxx1x::_1)); } /** @@ -2172,7 +2172,7 @@ namespace Threads { return std_cxx1x::function >::type> - (std_cxx1x::bind(fun_ptr, std_cxx1x::cref(c), _1)); + (std_cxx1x::bind(fun_ptr, std_cxx1x::cref(c), std_cxx1x::_1)); } @@ -2209,7 +2209,7 @@ namespace Threads { return std_cxx1x::function >::type> - (std_cxx1x::bind(fun_ptr, std_cxx1x::ref(c), _1, _2)); + (std_cxx1x::bind(fun_ptr, std_cxx1x::ref(c), std_cxx1x::_1, std_cxx1x::_2)); } /** @@ -2226,7 +2226,7 @@ namespace Threads { return std_cxx1x::function >::type> - (std_cxx1x::bind(fun_ptr, std_cxx1x::cref(c), _1, _2)); + (std_cxx1x::bind(fun_ptr, std_cxx1x::cref(c), std_cxx1x::_1, std_cxx1x::_2)); } @@ -2265,7 +2265,7 @@ namespace Threads { return std_cxx1x::function >::type> - (std_cxx1x::bind(fun_ptr, std_cxx1x::ref(c), _1, _2, _3)); + (std_cxx1x::bind(fun_ptr, std_cxx1x::ref(c), std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::_3)); } /** @@ -2283,7 +2283,7 @@ namespace Threads { return std_cxx1x::function >::type> - (std_cxx1x::bind(fun_ptr, std_cxx1x::cref(c), _1, _2, _3)); + (std_cxx1x::bind(fun_ptr, std_cxx1x::cref(c), std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::_3)); } @@ -2323,7 +2323,7 @@ namespace Threads { return std_cxx1x::function >::type> - (std_cxx1x::bind(fun_ptr, std_cxx1x::ref(c), _1, _2, _3, _4)); + (std_cxx1x::bind(fun_ptr, std_cxx1x::ref(c), std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::_3, std_cxx1x::_4)); } /** @@ -2341,7 +2341,7 @@ namespace Threads { return std_cxx1x::function >::type> - (std_cxx1x::bind(fun_ptr, std_cxx1x::cref(c), _1, _2, _3, _4)); + (std_cxx1x::bind(fun_ptr, std_cxx1x::cref(c), std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::_3, std_cxx1x::_4)); } @@ -2382,7 +2382,7 @@ namespace Threads { return std_cxx1x::function >::type> - (std_cxx1x::bind(fun_ptr, std_cxx1x::ref(c), _1, _2, _3, _4, _5)); + (std_cxx1x::bind(fun_ptr, std_cxx1x::ref(c), std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::_3, std_cxx1x::_4, std_cxx1x::_5)); } /** @@ -2401,7 +2401,7 @@ namespace Threads { return std_cxx1x::function >::type> - (std_cxx1x::bind(fun_ptr, std_cxx1x::cref(c), _1, _2, _3, _4, _5)); + (std_cxx1x::bind(fun_ptr, std_cxx1x::cref(c), std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::_3, std_cxx1x::_4, std_cxx1x::_5)); } @@ -2442,7 +2442,7 @@ namespace Threads { return std_cxx1x::function >::type> - (std_cxx1x::bind(fun_ptr, std_cxx1x::ref(c), _1, _2, _3, _4, _5, _6)); + (std_cxx1x::bind(fun_ptr, std_cxx1x::ref(c), std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::_3, std_cxx1x::_4, std_cxx1x::_5, std_cxx1x::_6)); } /** @@ -2462,7 +2462,7 @@ namespace Threads { return std_cxx1x::function >::type> - (std_cxx1x::bind(fun_ptr, std_cxx1x::cref(c), _1, _2, _3, _4, _5, _6)); + (std_cxx1x::bind(fun_ptr, std_cxx1x::cref(c), std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::_3, std_cxx1x::_4, std_cxx1x::_5, std_cxx1x::_6)); } @@ -2507,7 +2507,7 @@ namespace Threads { return std_cxx1x::function >::type> - (std_cxx1x::bind(fun_ptr, std_cxx1x::ref(c), _1, _2, _3, _4, _5, _6, _7)); + (std_cxx1x::bind(fun_ptr, std_cxx1x::ref(c), std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::_3, std_cxx1x::_4, std_cxx1x::_5, std_cxx1x::_6, std_cxx1x::_7)); } /** @@ -2529,7 +2529,7 @@ namespace Threads { return std_cxx1x::function >::type> - (std_cxx1x::bind(fun_ptr, std_cxx1x::cref(c), _1, _2, _3, _4, _5, _6, _7)); + (std_cxx1x::bind(fun_ptr, std_cxx1x::cref(c), std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::_3, std_cxx1x::_4, std_cxx1x::_5, std_cxx1x::_6, std_cxx1x::_7)); } @@ -2578,7 +2578,7 @@ namespace Threads { return std_cxx1x::function >::type> - (std_cxx1x::bind(fun_ptr, std_cxx1x::ref(c), _1, _2, _3, _4, _5, _6, _7, _8)); + (std_cxx1x::bind(fun_ptr, std_cxx1x::ref(c), std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::_3, std_cxx1x::_4, std_cxx1x::_5, std_cxx1x::_6, std_cxx1x::_7, std_cxx1x::_8)); } /** @@ -2602,7 +2602,7 @@ namespace Threads { return std_cxx1x::function >::type> - (std_cxx1x::bind(fun_ptr, std_cxx1x::cref(c), _1, _2, _3, _4, _5, _6, _7, _8)); + (std_cxx1x::bind(fun_ptr, std_cxx1x::cref(c), std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::_3, std_cxx1x::_4, std_cxx1x::_5, std_cxx1x::_6, std_cxx1x::_7, std_cxx1x::_8)); } @@ -2651,7 +2651,7 @@ namespace Threads { return std_cxx1x::function >::type> - (std_cxx1x::bind(fun_ptr, std_cxx1x::ref(c), _1, _2, _3, _4, _5, _6, _7, _8, _9)); + (std_cxx1x::bind(fun_ptr, std_cxx1x::ref(c), std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::_3, std_cxx1x::_4, std_cxx1x::_5, std_cxx1x::_6, std_cxx1x::_7, std_cxx1x::_8, std_cxx1x::_9)); } /** @@ -2675,7 +2675,7 @@ namespace Threads { return std_cxx1x::function >::type> - (std_cxx1x::bind(fun_ptr, std_cxx1x::cref(c), _1, _2, _3, _4, _5, _6, _7, _8, _9)); + (std_cxx1x::bind(fun_ptr, std_cxx1x::cref(c), std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::_3, std_cxx1x::_4, std_cxx1x::_5, std_cxx1x::_6, std_cxx1x::_7, std_cxx1x::_8, std_cxx1x::_9)); } diff --git a/deal.II/include/deal.II/base/work_stream.h b/deal.II/include/deal.II/base/work_stream.h index ab5937e040..1f4d247d75 100644 --- a/deal.II/include/deal.II/base/work_stream.h +++ b/deal.II/include/deal.II/base/work_stream.h @@ -629,10 +629,10 @@ namespace WorkStream run (begin, end, std_cxx1x::bind (worker, std_cxx1x::ref (main_object), - _1, _2, _3), + std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::_3), std_cxx1x::bind (copier, std_cxx1x::ref (main_object), - _1), + std_cxx1x::_1), sample_scratch_data, sample_copy_data, queue_length, diff --git a/deal.II/include/deal.II/lac/sparse_matrix.templates.h b/deal.II/include/deal.II/lac/sparse_matrix.templates.h index d45f270ae4..a06ca9236e 100644 --- a/deal.II/include/deal.II/lac/sparse_matrix.templates.h +++ b/deal.II/include/deal.II/lac/sparse_matrix.templates.h @@ -638,7 +638,7 @@ SparseMatrix::vmult (OutVector& dst, parallel::apply_to_subranges (0U, m(), std_cxx1x::bind (&internal::SparseMatrix::vmult_on_subrange , - _1, _2, + std_cxx1x::_1, std_cxx1x::_2, val, cols->rowstart, cols->colnums, @@ -693,7 +693,7 @@ SparseMatrix::vmult_add (OutVector& dst, parallel::apply_to_subranges (0U, m(), std_cxx1x::bind (&internal::SparseMatrix::vmult_on_subrange , - _1, _2, + std_cxx1x::_1, std_cxx1x::_2, val, cols->rowstart, cols->colnums, @@ -781,7 +781,7 @@ SparseMatrix::matrix_norm_square (const Vector& v) const parallel::accumulate_from_subranges (std_cxx1x::bind (&internal::SparseMatrix::matrix_norm_sqr_on_subrange >, - _1, _2, + std_cxx1x::_1, std_cxx1x::_2, val, cols->rowstart, cols->colnums, std_cxx1x::cref(v)), 0, m(), @@ -846,7 +846,7 @@ SparseMatrix::matrix_scalar_product (const Vector& u, parallel::accumulate_from_subranges (std_cxx1x::bind (&internal::SparseMatrix::matrix_scalar_product_on_subrange >, - _1, _2, + std_cxx1x::_1, std_cxx1x::_2, val, cols->rowstart, cols->colnums, std_cxx1x::cref(u), std_cxx1x::cref(v)), @@ -1254,7 +1254,7 @@ SparseMatrix::residual (Vector &dst, std::sqrt (parallel::accumulate_from_subranges (std_cxx1x::bind (&internal::SparseMatrix::residual_sqr_on_subrange ,Vector >, - _1, _2, + std_cxx1x::_1, std_cxx1x::_2, val, cols->rowstart, cols->colnums, std_cxx1x::cref(u), std_cxx1x::cref(b), diff --git a/deal.II/include/deal.II/lac/vector.h b/deal.II/include/deal.II/lac/vector.h index 89f795b72f..551f3169a8 100644 --- a/deal.II/include/deal.II/lac/vector.h +++ b/deal.II/include/deal.II/lac/vector.h @@ -1163,7 +1163,7 @@ Vector & Vector::operator = (const Number s) parallel::apply_to_subranges (0U, vec_size, std_cxx1x::bind(&internal::Vector::template set_subrange, - s, _1, _2, std_cxx1x::ref(*this)), + s, std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::ref(*this)), internal::Vector::minimum_parallel_grain_size); else if (vec_size > 0) internal::Vector::set_subrange(s, 0U, vec_size, *this); @@ -1202,7 +1202,7 @@ Vector::operator = (const Vector& v) parallel::apply_to_subranges (0U, vec_size, std_cxx1x::bind(&internal::Vector::template copy_subrange, - std_cxx1x::cref(v), _1, _2, + std_cxx1x::cref(v), std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::ref(*this)), internal::Vector::minimum_parallel_grain_size); else if (vec_size > 0) @@ -1225,7 +1225,7 @@ Vector::operator = (const Vector& v) parallel::apply_to_subranges (0U, vec_size, std_cxx1x::bind(&internal::Vector::template copy_subrange_ext, - std_cxx1x::cref(v), _1, _2, + std_cxx1x::cref(v), std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::ref(*this)), internal::Vector::minimum_parallel_grain_size); else if (vec_size > 0) diff --git a/deal.II/include/deal.II/numerics/mesh_worker_loop.h b/deal.II/include/deal.II/numerics/mesh_worker_loop.h index 1552c8ebfb..35e143e1af 100644 --- a/deal.II/include/deal.II/numerics/mesh_worker_loop.h +++ b/deal.II/include/deal.II/numerics/mesh_worker_loop.h @@ -262,9 +262,10 @@ namespace MeshWorker // Loop over all cells #ifdef DEAL_II_MESHWORKER_PARALLEL WorkStream::run(begin, end, - std_cxx1x::bind(&cell_action, _1, _3, _2, + std_cxx1x::bind(&cell_action, + std_cxx1x::_1, std_cxx1x::_3, std_cxx1x::_2, cell_worker, boundary_worker, face_worker, cells_first, true), - std_cxx1x::bind(&internal::assemble, _1, &assembler), + std_cxx1x::bind(&internal::assemble, std_cxx1x::_1, &assembler), info, dof_info); #else for (ITERATOR cell = begin; cell != end; ++cell) diff --git a/deal.II/source/distributed/solution_transfer.cc b/deal.II/source/distributed/solution_transfer.cc index 415244dc6c..d1253a3fdb 100644 --- a/deal.II/source/distributed/solution_transfer.cc +++ b/deal.II/source/distributed/solution_transfer.cc @@ -109,9 +109,9 @@ namespace parallel (get_data_size() * input_vectors.size()), std_cxx1x::bind(&SolutionTransfer::pack_callback, ptr, - _1, - _2, - _3)); + std_cxx1x::_1, + std_cxx1x::_2, + std_cxx1x::_3)); } @@ -145,9 +145,9 @@ namespace parallel tria->notify_ready_to_unpack(offset, std_cxx1x::bind(&SolutionTransfer::unpack_callback, this, - _1, - _2, - _3, + std_cxx1x::_1, + std_cxx1x::_2, + std_cxx1x::_3, std_cxx1x::ref(all_out))); for (typename std::vector::iterator it=all_out.begin(); diff --git a/deal.II/source/numerics/data_out.cc b/deal.II/source/numerics/data_out.cc index ee56350de5..7ddccfe5d0 100644 --- a/deal.II/source/numerics/data_out.cc +++ b/deal.II/source/numerics/data_out.cc @@ -1097,10 +1097,10 @@ void DataOut::build_patches (const Mapping::build_one_patch, - *this, _1, _2, _3, + *this, std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::_3, curved_cell_region), std_cxx1x::bind(&internal::DataOut::append_patch_to_list, - _1, std_cxx1x::ref(this->patches)), + std_cxx1x::_1, std_cxx1x::ref(this->patches)), thread_data, sample_patch); } diff --git a/deal.II/source/numerics/data_out_faces.cc b/deal.II/source/numerics/data_out_faces.cc index 10f52da6e4..56e49aeafd 100644 --- a/deal.II/source/numerics/data_out_faces.cc +++ b/deal.II/source/numerics/data_out_faces.cc @@ -363,10 +363,10 @@ void DataOutFaces::build_patches (const Mapping &mapping, WorkStream::run (&all_faces[0], &all_faces[0]+all_faces.size(), std_cxx1x::bind(&DataOutFaces::build_one_patch, - *this, _1, _2, _3), + *this, std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::_3), std_cxx1x::bind(&internal::DataOutFaces:: append_patch_to_list, - _1, std_cxx1x::ref(this->patches)), + std_cxx1x::_1, std_cxx1x::ref(this->patches)), thread_data, sample_patch); } diff --git a/deal.II/source/numerics/data_out_rotation.cc b/deal.II/source/numerics/data_out_rotation.cc index b381adcd5b..a9523cc64e 100644 --- a/deal.II/source/numerics/data_out_rotation.cc +++ b/deal.II/source/numerics/data_out_rotation.cc @@ -504,10 +504,10 @@ void DataOutRotation::build_patches (const unsigned int n_patches_per_ci WorkStream::run (&all_cells[0], &all_cells[0]+all_cells.size(), std_cxx1x::bind(&DataOutRotation::build_one_patch, - *this, _1, _2, _3), + *this, std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::_3), std_cxx1x::bind(&internal::DataOutRotation ::append_patch_to_list, - _1, std_cxx1x::ref(this->patches)), + std_cxx1x::_1, std_cxx1x::ref(this->patches)), thread_data, new_patches); } diff --git a/deal.II/source/numerics/error_estimator.cc b/deal.II/source/numerics/error_estimator.cc index 6116ea31a8..9c12d2fa5d 100644 --- a/deal.II/source/numerics/error_estimator.cc +++ b/deal.II/source/numerics/error_estimator.cc @@ -1636,9 +1636,9 @@ estimate (const Mapping &mapping, WorkStream::run (dof_handler.begin_active(), static_cast(dof_handler.end()), std_cxx1x::bind (&internal::estimate_one_cell, - _1, _2, _3, std_cxx1x::ref(solutions)), + std_cxx1x::_1, std_cxx1x::_2, std_cxx1x::_3, std_cxx1x::ref(solutions)), std_cxx1x::bind (&internal::copy_local_to_global, - _1, std_cxx1x::ref(face_integrals)), + std_cxx1x::_1, std_cxx1x::ref(face_integrals)), parallel_data, sample_local_face_integrals); diff --git a/deal.II/source/numerics/matrices.cc b/deal.II/source/numerics/matrices.cc index 0ec2f2092e..3b5c5d0761 100644 --- a/deal.II/source/numerics/matrices.cc +++ b/deal.II/source/numerics/matrices.cc @@ -611,7 +611,7 @@ void MatrixCreator::create_mass_matrix (const Mapping &mappi &internal::MatrixCreator::mass_assembler::active_cell_iterator>, std_cxx1x::bind (&internal::MatrixCreator:: copy_local_to_global, Vector >, - _1, &matrix, (Vector*)0), + std_cxx1x::_1, &matrix, (Vector*)0), assembler_data, copy_data); } @@ -662,7 +662,7 @@ void MatrixCreator::create_mass_matrix (const Mapping &mappi &internal::MatrixCreator::mass_assembler::active_cell_iterator>, std_cxx1x::bind(&internal::MatrixCreator:: copy_local_to_global, Vector >, - _1, &matrix, &rhs_vector), + std_cxx1x::_1, &matrix, &rhs_vector), assembler_data, copy_data); } @@ -713,7 +713,7 @@ void MatrixCreator::create_mass_matrix (const hp::MappingCollection::active_cell_iterator>, std_cxx1x::bind (&internal::MatrixCreator:: copy_local_to_global, Vector >, - _1, &matrix, (Vector*)0), + std_cxx1x::_1, &matrix, (Vector*)0), assembler_data, copy_data); } @@ -763,7 +763,7 @@ void MatrixCreator::create_mass_matrix (const hp::MappingCollection::active_cell_iterator>, std_cxx1x::bind (&internal::MatrixCreator:: copy_local_to_global, Vector >, - _1, &matrix, &rhs_vector), + std_cxx1x::_1, &matrix, &rhs_vector), assembler_data, copy_data); } @@ -1686,7 +1686,7 @@ void MatrixCreator::create_laplace_matrix (const Mapping &m static_cast::active_cell_iterator>(dof.end()), &internal::MatrixCreator::laplace_assembler::active_cell_iterator>, std_cxx1x::bind (copy_local_to_global, - _1, &matrix, (Vector*)0), + std_cxx1x::_1, &matrix, (Vector*)0), assembler_data, copy_data); } @@ -1741,7 +1741,7 @@ void MatrixCreator::create_laplace_matrix (const Mapping &m static_cast::active_cell_iterator>(dof.end()), &internal::MatrixCreator::laplace_assembler::active_cell_iterator>, std_cxx1x::bind (copy_local_to_global, - _1, &matrix, &rhs_vector), + std_cxx1x::_1, &matrix, &rhs_vector), assembler_data, copy_data); } @@ -1797,7 +1797,7 @@ void MatrixCreator::create_laplace_matrix (const hp::MappingCollection::active_cell_iterator>(dof.end()), &internal::MatrixCreator::laplace_assembler::active_cell_iterator>, std_cxx1x::bind (copy_local_to_global, - _1, &matrix, (Vector*)0), + std_cxx1x::_1, &matrix, (Vector*)0), assembler_data, copy_data); } @@ -1852,7 +1852,7 @@ void MatrixCreator::create_laplace_matrix (const hp::MappingCollection::active_cell_iterator>(dof.end()), &internal::MatrixCreator::laplace_assembler::active_cell_iterator>, std_cxx1x::bind (copy_local_to_global, - _1, &matrix, &rhs_vector), + std_cxx1x::_1, &matrix, &rhs_vector), assembler_data, copy_data); } -- 2.39.5