]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix pre-C++11 issues 4037/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sun, 5 Mar 2017 21:53:49 +0000 (22:53 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 6 Mar 2017 10:10:52 +0000 (11:10 +0100)
include/deal.II/matrix_free/operators.h
tests/matrix_free/matrix_vector_stokes_base.cc

index 8f35118acd1953d6b6415a85d43abeae2651044f..a52c63859585d8cac13b40a5be2be61d448ddae5 100644 (file)
@@ -779,9 +779,11 @@ namespace MatrixFreeOperators
   Base<dim,VectorType>::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());
   }
 
 
index dc68467922602d59c43b364e207c63bf5c58b2ac..26ed95f6b3be3fe8e6ec1bf6fa6bd8a5b82ef48f 100644 (file)
@@ -119,7 +119,7 @@ test()
   dof_u.distribute_dofs(fe_u);
   dof_p.distribute_dofs(fe_p);
 
-  std::shared_ptr<MatrixFree<dim, double> > mf_data;
+  std_cxx11::shared_ptr<MatrixFree<dim, double> > 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<SymmetricTensor<2, dim>> phi_grads_u(dofs_per_cell);
+    std::vector<SymmetricTensor<2, dim> > phi_grads_u(dofs_per_cell);
     std::vector<double> div_phi_u(dofs_per_cell);
     std::vector<double> phi_p(dofs_per_cell);
 
@@ -242,7 +242,7 @@ test()
         mf_system_rhs.block(1)(j) = val;
       }
 
-  mf_data = std::shared_ptr<MatrixFree<dim, double> >(new MatrixFree<dim, double>());
+  mf_data = std_cxx11::shared_ptr<MatrixFree<dim, double> >(new MatrixFree<dim, double>());
   // setup matrix-free structure
   {
     std::vector<const DoFHandler<dim>*> dofs;

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.