mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-11 06:15:34 -06:00
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:
parent
3ca1102d6f
commit
127ddd44a2
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user