Skip to content
Snippets Groups Projects
Commit 53321f24 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[PL] Revert ranges to for-range loop

Unfortunately with gcc-13.2.1 with optimizations there is a warning, which I was not able to correct.

    ...
    inlined from ‘std::vector<std::tuple<long int, std::reference_wrapper<ProcessLib::LocalAssemblerInterface> > > {anonymous}::collectActiveLocalAssemblers(const BaseLib::PolymorphicRandomAccessContainerView<ProcessLib::LocalAssemblerInterface>&, const std::vector<long unsigned int>&)’ at /var/lib/gitlab-runner/builds/F1XUyv4cx/1/ogs/ogs/ProcessLib/Assembly/ParallelVectorMatrixAssembler.cpp:132:62:
/usr/include/c++/13.2.1/bits/stl_iterator_base_funcs.h:175:9: warning: iteration 576460752303423487 invokes undefined behavior [-Waggressive-loop-optimizations]
  175 |         while (__n--)
      |         ^~~~~
/usr/include/c++/13.2.1/bits/stl_iterator_base_funcs.h:175:9: note: within this loop

Other compilers gcc-14, clang-17 and 18, msvc had no problems with the
former code.
parent 403ae53f
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment