Skip to content

Use std::visit to exhaust std::variant possibilities.#30773

Open
anntzer wants to merge 1 commit into
matplotlib:mainfrom
anntzer:visit
Open

Use std::visit to exhaust std::variant possibilities.#30773
anntzer wants to merge 1 commit into
matplotlib:mainfrom
anntzer:visit

Conversation

@anntzer
Copy link
Copy Markdown
Contributor

@anntzer anntzer commented Nov 21, 2025

This makes it unnecessary to silence impossible "unhandled" cases. See #30607 (comment).

PR summary

PR checklist

Copy link
Copy Markdown
Member

@QuLogic QuLogic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC, the reason for the std::get_if with an else instead of a plain std::get was that some old macOS deployment target didn't have the implementation. Since cibuildwheel appears okay with this build, I think this should be okay for us and looks clearer, for the most part.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants