From: Martin Kronbichler Date: Fri, 3 Nov 2017 15:34:16 +0000 (+0100) Subject: Avoid taking reference of non-existant static constexpr variables. X-Git-Tag: v9.0.0-rc1~830^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8c362a3639ffa60dd1e95779c236e9742a94e3c;p=dealii.git Avoid taking reference of non-existant static constexpr variables. --- diff --git a/tests/matrix_free/fe_evaluation_dofs_per_cell.cc b/tests/matrix_free/fe_evaluation_dofs_per_cell.cc index 274ca992c2..4e14ff7baf 100644 --- a/tests/matrix_free/fe_evaluation_dofs_per_cell.cc +++ b/tests/matrix_free/fe_evaluation_dofs_per_cell.cc @@ -31,12 +31,20 @@ template void print_info(const FEEval &eval) { - deallog << "FEEvaluation::dimension: " << FEEval::dimension << std::endl; - deallog << "FEEvaluation::n_components: " << FEEval::n_components << std::endl; - deallog << "FEEvaluation::static_n_q_points: " << FEEval::static_n_q_points << std::endl; - deallog << "FEEvaluation::static_dofs_per_component: " << FEEval::static_dofs_per_component << std::endl; - deallog << "FEEvaluation::tensor_dofs_per_cell: " << FEEval::tensor_dofs_per_cell << std::endl; - deallog << "FEEvaluation::static_dofs_per_cell: " << FEEval::static_dofs_per_cell << std::endl; + // copy static variables to int to avoid taking references (with possibly + // undefined references) when inside deallog::operator<< + unsigned int v = FEEval::dimension; + deallog << "FEEvaluation::dimension: " << v << std::endl; + v = FEEval::n_components; + deallog << "FEEvaluation::n_components: " << v << std::endl; + v = FEEval::static_n_q_points; + deallog << "FEEvaluation::static_n_q_points: " << v << std::endl; + v = FEEval::static_dofs_per_component; + deallog << "FEEvaluation::static_dofs_per_component: " << v << std::endl; + v = FEEval::tensor_dofs_per_cell; + deallog << "FEEvaluation::tensor_dofs_per_cell: " << v << std::endl; + v = FEEval::static_dofs_per_cell; + deallog << "FEEvaluation::static_dofs_per_cell: " << v << std::endl; deallog << "FEEvaluation::dofs_per_component: " << eval.dofs_per_component << std::endl; deallog << "FEEvaluation::dofs_per_cell: " << eval.dofs_per_cell << std::endl; deallog << "FEEvaluation::n_q_points: " << eval.n_q_points << std::endl;