compiation issues with gcc 11
$ gcc-11 --version
gcc-11 (Ubuntu 11-20210310-1ubuntu1) 11.0.1 20210310 (experimental) [master revision 8dc225d311e:2453ef06221:5987d8a79cda1069c774e5c302d5597310270026]
Arch: x86-64
[ 26%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/applied_forces/densityfitting/densityfitting.cpp.o
In file included from /usr/include/c++/11/bits/move.h:57,
from /usr/include/c++/11/bits/stl_pair.h:59,
from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/memory:63,
from /home/pszilard/tmp/gromacs/src/gromacs/applied_forces/densityfitting/densityfitting.h:38,
from /home/pszilard/tmp/gromacs/src/gromacs/applied_forces/densityfitting/densityfitting.cpp:44:
/usr/include/c++/11/type_traits: In instantiation of ‘struct std::is_invocable_r<void, gmx::{anonymous}::DensityFitting::subscribeToPreProcessingNotifications(gmx::MdModulesNotifier*)::<lambda(const gmx::IndexGroupsAndNames&)>&, gmx::IndexGroupsAndNames>’:
/usr/include/c++/11/type_traits:3011:46: required from ‘constexpr const bool std::is_invocable_r_v<void, gmx::{anonymous}::DensityFitting::subscribeToPreProcessingNotifications(gmx::MdModulesNotifier*)::<lambda(const gmx::IndexGroupsAndNames&)>&, gmx::IndexGroupsAndNames>’
/usr/include/c++/11/bits/invoke.h:102:27: required by substitution of ‘template<class _Res, class _Callable, class ... _Args> constexpr std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = void; _Callable = gmx::{anonymous}::DensityFitting::subscribeToPreProcessingNotifications(gmx::MdModulesNotifier*)::<lambda(const gmx::IndexGroupsAndNames&)>&; _Args = {gmx::IndexGroupsAndNames}]’
/usr/include/c++/11/bits/std_function.h:291:30: required from ‘static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = void; _Functor = gmx::{anonymous}::DensityFitting::subscribeToPreProcessingNotifications(gmx::MdModulesNotifier*)::<lambda(const gmx::IndexGroupsAndNames&)>; _ArgTypes = {gmx::IndexGroupsAndNames}]’
/usr/include/c++/11/bits/std_function.h:422:21: required from ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = gmx::{anonymous}::DensityFitting::subscribeToPreProcessingNotifications(gmx::MdModulesNotifier*)::<lambda(const gmx::IndexGroupsAndNames&)>; <template-parameter-2-2> = void; <template-parameter-2-3> = void; _Res = void; _ArgTypes = {gmx::IndexGroupsAndNames}]’
/home/pszilard/tmp/gromacs/src/gromacs/applied_forces/densityfitting/densityfitting.cpp:257:83: required from here
/usr/include/c++/11/type_traits:2954:7: error: static assertion failed: each argument type must be a complete class or an unbounded array
2954 | static_assert((std::__is_complete_or_unbounded(
| ^~~~~~~~~~~~~
/usr/include/c++/11/type_traits:2954:7: note: ‘std::__is_complete_or_unbounded<std::__type_identity<gmx::IndexGroupsAndNames> >((std::__type_identity<gmx::IndexGroupsAndNames>{}, std::__type_identity<gmx::IndexGroupsAndNames>()))’ evaluates to false
/usr/include/c++/11/type_traits: In instantiation of ‘struct std::is_nothrow_invocable_r<void, gmx::{anonymous}::DensityFitting::subscribeToPreProcessingNotifications(gmx::MdModulesNotifier*)::<lambda(const gmx::IndexGroupsAndNames&)>&, gmx::IndexGroupsAndNames>’:
/usr/include/c++/11/type_traits:3016:54: required from ‘constexpr const bool std::is_nothrow_invocable_r_v<void, gmx::{anonymous}::DensityFitting::subscribeToPreProcessingNotifications(gmx::MdModulesNotifier*)::<lambda(const gmx::IndexGroupsAndNames&)>&, gmx::IndexGroupsAndNames>’
/usr/include/c++/11/bits/invoke.h:104:14: required from ‘constexpr std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = void; _Callable = gmx::{anonymous}::DensityFitting::subscribeToPreProcessingNotifications(gmx::MdModulesNotifier*)::<lambda(const gmx::IndexGroupsAndNames&)>&; _Args = {gmx::IndexGroupsAndNames}; std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> = void]’
/usr/include/c++/11/bits/std_function.h:291:30: required from ‘static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = void; _Functor = gmx::{anonymous}::DensityFitting::subscribeToPreProcessingNotifications(gmx::MdModulesNotifier*)::<lambda(const gmx::IndexGroupsAndNames&)>; _ArgTypes = {gmx::IndexGroupsAndNames}]’
/usr/include/c++/11/bits/std_function.h:422:21: required from ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = gmx::{anonymous}::DensityFitting::subscribeToPreProcessingNotifications(gmx::MdModulesNotifier*)::<lambda(const gmx::IndexGroupsAndNames&)>; <template-parameter-2-2> = void; <template-parameter-2-3> = void; _Res = void; _ArgTypes = {gmx::IndexGroupsAndNames}]’
/home/pszilard/tmp/gromacs/src/gromacs/applied_forces/densityfitting/densityfitting.cpp:257:83: required from here
/usr/include/c++/11/type_traits:2992:7: error: static assertion failed: each argument type must be a complete class or an unbounded array
2992 | static_assert((std::__is_complete_or_unbounded(
| ^~~~~~~~~~~~~
/usr/include/c++/11/type_traits:2992:7: note: ‘std::__is_complete_or_unbounded<std::__type_identity<gmx::IndexGroupsAndNames> >((std::__type_identity<gmx::IndexGroupsAndNames>{}, std::__type_identity<gmx::IndexGroupsAndNames>()))’ evaluates to false
make[2]: *** [src/gromacs/CMakeFiles/libgromacs.dir/build.make:8188: src/gromacs/CMakeFiles/libgromacs.dir/applied_forces/densityfitting/densityfitting.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:4865: src/gromacs/CMakeFiles/libgromacs.dir/all] Error 2
make: *** [Makefile:182: all] Error 2