Skip to content

Feature request, C++, support for std::variant / std::visit #8761

@ulfhammarqvist-st

Description

@ulfhammarqvist-st

Parsing unions in c++ can be error prone, in the sense there's no compile time guarantee to handle all cases unless using some combination of the enum and corresponding x_as_y.

A more modern alternative is to use std::variants and std::visit, however flatc is not producing the required variants, or any means to convert to such (afaik).

... is this something that was ever discussed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions