opm-common
opm-common copied to clipboard
OilPvtMultiplexer: Replace unholy trinity with visitor overload sets
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.
Wow! I like this. Looking forward to the benchmark