• Jö Fahlke's avatar
    SIMD test: fix implicit this capture warnings · 5a14116e
    Jö Fahlke authored
    C++20 deprecates implicit capture of `this` using `[=]`, and gcc9 warns about
    that.  Unfortunately, in C++ before 20 listing `this` together with a
    capture-default of `=` is illegal, and GCC 8 emits a warning about that that
    apparently can't be silenced.  So the only option if we want to appease both
    pre- and post-C++20 is to list each entity to be captures explicitly.
    Luckily, that is not too hard in this case.
    
    See https://gitlab.dune-project.org/core/dune-common/-/jobs/139584#L486
    (debian:11 gcc-9-20):
    ```
    [ 40%] Building CXX object dune/common/CMakeFiles/dunecommon.dir/simd/test.cc.o
    In file included from /builds/core/dune-common/dune/common/simd/test.cc:6:
    /builds/core/dune-common/dune/common/simd/test.hh: In lambda function:
    /builds/core/dune-common/dune/common/simd/test.hh:334:36: warning: implicit capture of 'this' via '[=]' is deprecated in C++20 [-Wdeprecated]
      334 |         Hybrid::forEach(Rebinds{}, [=](auto target) {
          |                                    ^
    /builds/core/dune-common/dune/common/simd/test.hh:334:36: note: add explicit 'this' or '*this' capture
    ```
    5a14116e
Name
Last commit
Last update
bin Loading commit data...
cmake Loading commit data...
doc Loading commit data...
dune Loading commit data...
lib Loading commit data...
share Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
.mailmap Loading commit data...
CHANGELOG.md Loading commit data...
CMakeLists.txt Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING Loading commit data...
INSTALL Loading commit data...
LICENSE.md Loading commit data...
README.md Loading commit data...
TODO Loading commit data...
config.h.cmake Loading commit data...
dune-common.pc.in Loading commit data...
dune.module Loading commit data...