From 397036f68ac59b1163db5ff6658a961c55c22761 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Wed, 28 Oct 2015 22:31:06 -0500 Subject: [PATCH] Bugfix: Add additional braces around subobject initializers.. Hopefully this makes icc happy --- tests/base/tensor_accessors_02.cc | 2 +- tests/lac/block_linear_operator_01.cc | 17 ++++++++--------- tests/lac/block_linear_operator_02.cc | 5 ++--- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/tests/base/tensor_accessors_02.cc b/tests/base/tensor_accessors_02.cc index 965ad27e79..2e7880b3b0 100644 --- a/tests/base/tensor_accessors_02.cc +++ b/tests/base/tensor_accessors_02.cc @@ -78,7 +78,7 @@ int main() // via std::array: #ifdef DEAL_II_WITH_CXX11 - std::array temp {2, 1, 0, 2, 1}; + std::array temp {{2, 1, 0, 2, 1}}; deallog << TensorAccessors::extract<5>(foo, temp) << std::endl; #else deallog << 42. << std::endl; diff --git a/tests/lac/block_linear_operator_01.cc b/tests/lac/block_linear_operator_01.cc index 7bf25fe531..75d622e0e9 100644 --- a/tests/lac/block_linear_operator_01.cc +++ b/tests/lac/block_linear_operator_01.cc @@ -107,9 +107,8 @@ int main() auto op_b10 = linear_operator(a.block(1, 0)); auto op_b11 = linear_operator(a.block(1, 1)); - std::array, 2> temp {op_b00, op_b01, op_b10, - op_b11 - }; + std::array, 2> temp{ + {op_b00, op_b01, op_b10, op_b11}}; auto op_b = block_operator<2, 2, BlockVector>(temp); { @@ -185,10 +184,8 @@ int main() // And finally complicated block structures: - std::array, 3> temp2 - { - op_b00, op_b01, op_b00, op_b10, op_b11, op_b10, op_b10, op_b11, op_b10 - }; + std::array, 3> temp2{ + {op_b00, op_b01, op_b00, op_b10, op_b11, op_b10, op_b10, op_b11, op_b10}}; auto op_upp_x_upu = block_operator<3, 3, BlockVector>(temp2); op_upp_x_upu.reinit_domain_vector(u, false); @@ -206,10 +203,12 @@ int main() op_upp_x_upu.vmult_add(v, u); PRINTME("v", v); - std::array, 3> temp3 {op_b01, op_b11, op_b11}; + std::array, 3> temp3{ + {op_b01, op_b11, op_b11}}; auto op_upp_x_p = block_operator<3, 1, BlockVector>(temp3); - std::array, 1> temp4 {op_b00, op_b01, op_b00}; + std::array, 1> temp4{ + {op_b00, op_b01, op_b00}}; auto op_u_x_upu = block_operator<1, 3, BlockVector>(temp4); auto op_long = op_u_x_upu * transpose_operator(op_upp_x_upu) * op_upp_x_p; diff --git a/tests/lac/block_linear_operator_02.cc b/tests/lac/block_linear_operator_02.cc index 6fe6df9a82..55cacb8641 100644 --- a/tests/lac/block_linear_operator_02.cc +++ b/tests/lac/block_linear_operator_02.cc @@ -84,8 +84,7 @@ int main() auto op_b1 = linear_operator(a.block(1, 1)); auto op_b2 = linear_operator(a.block(2, 2)); - - std::array temp {op_b0, op_b1, op_b2}; + std::array temp{{op_b0, op_b1, op_b2}}; auto op_b = block_diagonal_operator<3, BlockVector>(temp); @@ -157,7 +156,7 @@ int main() // And finally the other block_diagonal_operator variant: - std::array temp2 {op_b0, op_b0, op_b0, op_b0, op_b0}; + std::array temp2{{op_b0, op_b0, op_b0, op_b0, op_b0}}; auto op_c = block_diagonal_operator<5, BlockVector>(temp2); auto op_d = block_diagonal_operator<5, BlockVector>(op_b0); -- 2.39.5