BOUT-dev icon indicating copy to clipboard operation
BOUT-dev copied to clipboard

Replace `mpark.variant` with `std::variant`

Open ZedThree opened this issue 1 year ago • 3 comments

ZedThree avatar Jan 26 '24 10:01 ZedThree

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Jan 26 '24 10:01 github-actions[bot]

It seems std::variant is broken with old gcc versions?

I guess that we should delay this move for now?

It might also be good to check with intel compilers by the time we switch ...

dschwoerer avatar Jan 26 '24 10:01 dschwoerer

Bah, there is a C++17DR for making std::visit work when inheriting from std::variant. The fix is in gcc 11 and clang 15. This works fine in Intel.

So options are:

  1. hold off on this for now, which is pretty safe. I think mpark::variant even falls back to std::variant for C++17
  2. bump minimum compiler version required to gcc 11. This is mostly safe, most OSes with earlier versions are either EOL or close to EOL.

ZedThree avatar Jan 26 '24 11:01 ZedThree