opm-common icon indicating copy to clipboard operation
opm-common copied to clipboard

OilPvtMultiplexer: Replace unholy trinity with visitor overload sets

Open akva2 opened this issue 3 years ago • 1 comments

Sits on top of https://github.com/OPM/opm-common/pull/3278 Waiting for https://github.com/OPM/opm-common/pull/3246

I realize this may be controversial, and that it might have runtime implications (which we need to benchmark) but; This replaces what I consider the unholy trinity (void pointers, macros and SFINAE) with the visitor overload set idiom in the gas multiplexer.

As a bonus we avoid the need to have explicit ctors, copy ctors, assignment and comparison operators.

akva2 avatar Dec 14 '22 12:12 akva2

Wow! I like this. Looking forward to the benchmark

blattms avatar Dec 14 '22 16:12 blattms