Skip to content

How to remove element from toml::basic_value<toml::ordered_type_config>? #282

@SunPodder

Description

@SunPodder

As the title says, how to remove a element from a ordered table? After a bit of searching I've found a solution for toml::value but seems it doesn't work for the ordered_type_config.

auto data = toml::parse<toml::ordered_type_config>(manifestPath);
auto &deps = data["dependencies"];

if (deps.contains(name)) {
	// No member named 'erase' in 'toml::ordered_map<std::basic_string<char>, toml::basic_value<toml::ordered_type_config>>'
	deps.as_table().erase(name);
}

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