mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-26 07:30:08 -05:00
eclmpiserializer: improve array handler
use has_serializeOp trait
This commit is contained in:
1 parent
e7624b7a27
commit
3ed2a25470
1 file changed
+4
-4
@@ -135,7 +135,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
template <class Array, bool complexType = true>
|
||||
template <class Array>
|
||||
void array(Array& data)
|
||||
{
|
||||
using T = typename Array::value_type;
|
||||
@@ -146,10 +146,10 @@ public:
|
||||
pair(it);
|
||||
else if constexpr (is_ptr<T>::value)
|
||||
ptr(it);
|
||||
else if constexpr (!complexType)
|
||||
(*this)(it);
|
||||
else
|
||||
else if constexpr (has_serializeOp<T>::value)
|
||||
it.serializeOp(*this);
|
||||
else
|
||||
(*this)(it);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user