AMReX-Codes / amrex

AMReX: Software Framework for Block Structured AMR
https://amrex-codes.github.io/amrex
Other
539 stars 344 forks source link

GCC 11: C++17 Warning BaseFab #2068

Open ax3l opened 3 years ago

ax3l commented 3 years ago

I saw the following warning with GCC 11.1.0 on Ookami today:

Src/Base/AMReX_BaseFab.H: In instantiation of ‘std::pair<_FIter, _FIter> amrex::BaseFab<T>::minmax(const amrex::Box&, int) const [with amrex::RunOn run_on = amrex::RunOn::Gpu; T = double]’:
Src/Base/AMReX_VisMF.cpp:684:70:   required from here
Src/Base/AMReX_BaseFab.H:2494:1: note: parameter passing for argument of type ‘std::pair<double, double>’ when C++17 is enabled changed to match C++14 in GCC 10.1
 2494 | BaseFab<T>::minmax (const Box& subbox, int comp) const noexcept
ax3l commented 3 years ago

Note that GCC 11+ compiles with C++17 by default: https://gist.github.com/ax3l/53db9fa8a4f4c21ecc5c4100c0d93c94