Skip to content

Fix rfl::DefaultVal with rfl::Rename #587

@cacharle

Description

@cacharle

I have the following toml file:

foo = true

and cpp code:

struct Config {
    rfl::DefaultVal<rfl::Rename<"foo", bool>> Foo = false;
};

auto config = rfl::toml::load("config.toml").value();
std::println("> {}", config.Foo.get().get());

This prints false.

Am I missing something about how to compose those things or is it just not possible? I haven't tried anything else than TOML so I'm not sure if it's related to the format or not.

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