You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I looked around for a ini file library and found your library recently.
It seems to be exactly what I am looking for.
There is a little problem though. Including toml in all our headers would let our compile times explode, so I am looking for a way to get around that.
My current idea would be, how about if there was a separate header, containing a toml::erased_value type, and this header is absolutely minimal.
The value is defined there and only supports copy, move, and all semantic operations, but no construction besides emtpy default-construction and nothing else.
Ideally this type is not even templated.
In the main header of toml there are explicit conversion functions defined, which allow me to convert a toml::Data or toml::Value into this type and back.
Then I would be able to only include the minimal header for the erased value in my API part, keeping the compile times low.
In the few places where I actually want to parse or read the values, I would then include the full library and then do the conversion and my work.
Is such a container type easy to build? How would one do this?
The text was updated successfully, but these errors were encountered:
If I understand your point correctly, you want to have something like an <iosfwd> for this library, right?
I experimentally added it to the fwd-header branch, so take a look if you have time.
Also, in the library branch, I'm trying to add an option to build toml11 as a normal (non-header-only) library in order to reduce compilation time. It might help you.
I looked around for a ini file library and found your library recently.
It seems to be exactly what I am looking for.
There is a little problem though. Including toml in all our headers would let our compile times explode, so I am looking for a way to get around that.
My current idea would be, how about if there was a separate header, containing a toml::erased_value type, and this header is absolutely minimal.
The value is defined there and only supports copy, move, and all semantic operations, but no construction besides emtpy default-construction and nothing else.
Ideally this type is not even templated.
In the main header of toml there are explicit conversion functions defined, which allow me to convert a toml::Data or toml::Value into this type and back.
Then I would be able to only include the minimal header for the erased value in my API part, keeping the compile times low.
In the few places where I actually want to parse or read the values, I would then include the full library and then do the conversion and my work.
Is such a container type easy to build? How would one do this?
The text was updated successfully, but these errors were encountered: