mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
avoid declaring t1 outside lambda
clang doesn't want us to capture t1, and g++-14 requires us to capture t1. this workaround avoids warnings with both.
This commit is contained in:
parent
0af94eef27
commit
501ee0f818
@ -272,13 +272,12 @@ bool DamarisVar<T>::TestType(const std::string& variable_name)
|
|||||||
has_error_ = true;
|
has_error_ = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
T test_id;
|
|
||||||
const std::type_info& t1 = typeid(test_id);
|
|
||||||
|
|
||||||
auto check = [&variable_name,this](auto td)
|
auto check = [&variable_name,this](auto td)
|
||||||
{
|
{
|
||||||
|
const std::type_info& t1 = typeid(T);
|
||||||
const std::type_info& t2 = typeid(td);
|
const std::type_info& t2 = typeid(td);
|
||||||
if (t1 != t2) {
|
if (typeid(T) != t2) {
|
||||||
formatTypeError(variable_name, t1.name(), t2.name());
|
formatTypeError(variable_name, t1.name(), t2.name());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user