skystrife / cpptoml

cpptoml is a header-only library for parsing TOML

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I duplicate a cpptoml::table

gegles opened this issue · comments

I have a const table (parsed from a TOML file) and I would like to duplicate it in order to create a modifiable copy of the table.

Since the copy constructors are private, how would I go about doing this?

In general, I am building an app that uses a toml file as its config. I would like to be able to parse/load, duplicate, modify and then finally save the config from and to a file....

Any example of any project doing that with cpptoml?

I've just added a clone() function to the TOML value classes, so you should be able to use that now.