Skip to content

Static assert when identical alternatives not tagged in std::variant #2945

Description

@vsmcea

Hi,
Would it be possible to add a static_assert if two identical alternatives of a std::variant are not tagged?
Imagine someone relies on the type of the alternative (retrieved from the json) to construct an object for example.
It would avoid possibly complex to debug issues.
Thank you.
Best regards,
Vincent

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions