mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-29 20:43:49 -06:00
Merge pull request #4055 from akva2/eclmpiserializer_map
eclmpiserializer: improve map handler
This commit is contained in:
commit
b3e517a8ef
@ -233,9 +233,8 @@ public:
|
||||
|
||||
//! \brief Handler for maps.
|
||||
//! \tparam Map map type
|
||||
//! \tparam complexType Whether or not Data in map is a complex type
|
||||
//! \param map The map to (de-)serialize
|
||||
template<class Map, bool complexType = true>
|
||||
template<class Map>
|
||||
void map(Map& data)
|
||||
{
|
||||
using Key = typename Map::key_type;
|
||||
@ -247,7 +246,7 @@ public:
|
||||
this->vector(d);
|
||||
else if constexpr (is_ptr<Data>::value)
|
||||
this->ptr(d);
|
||||
else if constexpr (complexType)
|
||||
else if constexpr (has_serializeOp<Data>::value)
|
||||
d.serializeOp(*this);
|
||||
else
|
||||
(*this)(d);
|
||||
@ -257,6 +256,8 @@ public:
|
||||
{
|
||||
if constexpr (is_pair<Key>::value)
|
||||
pair(d);
|
||||
else if constexpr (has_serializeOp<Key>::value)
|
||||
d.serializeOp(*this);
|
||||
else
|
||||
(*this)(d);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user