Code: Select all
error: variable 'process_arg' set but not used [-Werror=unused-but-set-variable]
const auto process_arg = [&](const T& arg) -> bool
< /code>
#include
template
concept Computable = std::integral || std::floating_point;
template
bool foo(const double&, Args... args)
{
const auto process_arg = [&](const T& /*arg*/) -> bool
{
return true;
};
if (!(process_arg(args) && ...))
{
return false;
}
return true;
}
afaict, dies geschieht, da auf foo () nur das anfängliche Double bestanden und keine anderen Argumente bestanden haben. PrettyPrint-Override ">
Code: Select all
[[maybe_unused]] const auto process_arg = [&](const T& /*arg*/) -> bool