From 75c7421aa35abeb5c31c6567d54195dc26ba6842 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Sun, 5 Mar 2017 22:53:49 +0100 Subject: [PATCH] Fix pre-C++11 issues --- include/deal.II/matrix_free/operators.h | 4 +++- tests/matrix_free/matrix_vector_stokes_base.cc | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/deal.II/matrix_free/operators.h b/include/deal.II/matrix_free/operators.h index 8f35118acd..a52c638595 100644 --- a/include/deal.II/matrix_free/operators.h +++ b/include/deal.II/matrix_free/operators.h @@ -779,9 +779,11 @@ namespace MatrixFreeOperators Base::Base () : Subscriptor(), - data(NULL), have_interface_matrices(false) { + // boost-1.62.0 doesn't allow initializing a shared_ptr + // with NULL. Make sure the default constructor does that. + Assert(data.get() == NULL, ExcInternalError()); } diff --git a/tests/matrix_free/matrix_vector_stokes_base.cc b/tests/matrix_free/matrix_vector_stokes_base.cc index dc68467922..26ed95f6b3 100644 --- a/tests/matrix_free/matrix_vector_stokes_base.cc +++ b/tests/matrix_free/matrix_vector_stokes_base.cc @@ -119,7 +119,7 @@ test() dof_u.distribute_dofs(fe_u); dof_p.distribute_dofs(fe_p); - std::shared_ptr > mf_data; + std_cxx11::shared_ptr > mf_data; dof.distribute_dofs(fe); ConstraintMatrix constraints, constraints_u, constraints_p; @@ -179,7 +179,7 @@ test() const FEValuesExtractors::Vector velocities(0); const FEValuesExtractors::Scalar pressure(dim); - std::vector> phi_grads_u(dofs_per_cell); + std::vector > phi_grads_u(dofs_per_cell); std::vector div_phi_u(dofs_per_cell); std::vector phi_p(dofs_per_cell); @@ -242,7 +242,7 @@ test() mf_system_rhs.block(1)(j) = val; } - mf_data = std::shared_ptr >(new MatrixFree()); + mf_data = std_cxx11::shared_ptr >(new MatrixFree()); // setup matrix-free structure { std::vector*> dofs; -- 2.39.5