supress unused capture warning with clang

a bug in clang causes it to emit unused lambda captures
here due to the if constexpr usage. use standard (void)
trick to suppress it
This commit is contained in:
Arne Morten Kvarving 2023-05-31 09:33:44 +02:00
parent 3ca1102d6f
commit 127ddd44a2
2 changed files with 2 additions and 0 deletions

View File

@ -1078,6 +1078,7 @@ namespace Opm
auto obtain = [this](const Eval& value)
{
if constexpr (std::is_same_v<Value, Scalar>) {
(void)this; // suppress clang warning
return getValue(value);
} else {
return this->extendEval(value);

View File

@ -869,6 +869,7 @@ namespace Opm
auto obtain = [this](const Eval& value)
{
if constexpr (std::is_same_v<Value, Scalar>) {
(void)this; // suppress clang warning
return getValue(value);
} else {
return this->extendEval(value);