Skip to content

Replace mpark.variant with std::variant#2851

Open
ZedThree wants to merge 3 commits into
nextfrom
cpp-17-variant
Open

Replace mpark.variant with std::variant#2851
ZedThree wants to merge 3 commits into
nextfrom
cpp-17-variant

Conversation

@ZedThree

Copy link
Copy Markdown
Member

No description provided.

@github-actions

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@dschwoerer

Copy link
Copy Markdown
Contributor

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 ...

@ZedThree

Copy link
Copy Markdown
Member Author

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.

@dschwoerer

Copy link
Copy Markdown
Contributor

I suppose we could revisit this now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants