Skip to content

rfl::from_generic (numeric) conversions #548

@Curve

Description

@Curve

Hi there, thanks for the library!

I've stumbled upon an issue when reading from rfl::Generic:

auto generic = rfl::json::read<rfl::Generic>("[10, 10]").value();
auto test    = rfl::from_generic<std::tuple<double, double>>(generic);

This fails with "Could not cast the underlying value to double" - However, it works when immediately doing rfl::json::read without the intermediary rfl::Generic - but does not when using rfl::from_generic.
Is there a special flag that needs to be set to allow the conversion here? I could not find anything on the docs.

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