[Dune-devel] [Dune-Commit] [Commit] dune-grid - 2c64554: [vtktest][subsamplingvtktest] Don't initialize an array function argument with an initializer list.
Markus Blatt
markus at dr-blatt.de
Tue Mar 31 12:16:48 CEST 2015
On Thu, Mar 19, 2015 at 12:13:27AM +0100, Jö Fahlke wrote:
> New commit, appeared at Thu Mar 19 00:13:27 2015 +0100
> as part of the following ref changes:
>
> branch refs/heads/master updated from b91b5f0 -> c5e7a95
>
> Browsable version: http://cgit.dune-project.org/repositories/dune-grid/commit/?id=2c64554e937dfe15a29086e1ded5a79c0240d53d
>
> ======================================================================
>
> commit 2c64554e937dfe15a29086e1ded5a79c0240d53d
> Author: Jö Fahlke <jorrit at jorrit.de>
> Date: Wed Mar 18 22:58:54 2015 +0100
>
> [vtktest][subsamplingvtktest] Don't initialize an array function argument with
> an initializer list.
>
> This appears to be broken with g++-4.7. Instead, use Dune::make_array.
>
> dune/grid/io/file/test/subsamplingvtktest.cc | 7 ++++---
> dune/grid/io/file/test/vtktest.cc | 7 ++++---
> 2 files changed, 8 insertions(+), 6 deletions(-)
>
>
>
> diff --git a/dune/grid/io/file/test/subsamplingvtktest.cc b/dune/grid/io/file/test/subsamplingvtktest.cc
> index 76e7687..6f91c1b 100644
> --- a/dune/grid/io/file/test/subsamplingvtktest.cc
> +++ b/dune/grid/io/file/test/subsamplingvtktest.cc
> @@ -149,10 +149,11 @@ int main(int argc, char **argv)
> << std::endl;
>
> int result = 0; // pass by default
> + using Dune::make_array;
>
> - acc(result, vtkCheck<1>({5}, {1.0}));
> - acc(result, vtkCheck<2>({5,5}, {1.0, 2.0}));
> - acc(result, vtkCheck<3>({5,5,5}, {1.0, 2.0, 3.0}));
> + acc(result, vtkCheck<1>(make_array(5), {1.0}));
> + acc(result, vtkCheck<2>(make_array(5,5), {1.0, 2.0}));
> + acc(result, vtkCheck<3>(make_array(5,5,5), {1.0, 2.0, 3.0}));
Great catch! Now everything builds with g++-4.4. This solution would
never have crossed my mind. Thanks!
Markus
--
Do you need more support with DUNE or HPC in general?
Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
Tel.: +49 (0) 160 97590858
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20150331/df43eade/attachment.sig>
More information about the Dune-devel
mailing list