cpptoml icon indicating copy to clipboard operation
cpptoml copied to clipboard

How can I use inline table

Open injae opened this issue 7 years ago • 2 comments

Code

 if(!deps) deps = cpptoml::make_table();
 auto dep = deps->get_table(name);
 if(!dep)  dep  = cpptoml::make_table();
 dep->insert("module"    ,cmake_name);
 deps->insert(name, dep);

result

[dependencies]
	[dependencies.cpptoml]
		module = "cpptoml"

but I want results like this

[dependencies]
cpptoml = {module = "cpptoml"}

how can i use inline table

injae avatar Dec 26 '18 10:12 injae

I'm having the same trouble. It looks like cpptoml can parse inline tables, but cannot write them out? I tried setting the is_inline to true when I called make_table_array, but it made no difference.

tfiner avatar Feb 04 '19 23:02 tfiner

Writing inline tables seems not implemented. I would like to see this working properly as well.

klapstoelpiloot avatar Sep 06 '19 11:09 klapstoelpiloot