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
It would be nice to be able to support our own custom types to the TOML parser through templates, so that we could simply write value.as<My_t>() for any My_t that we want . Based on my reading of the source, it's already possible without touching the source by adding new template specialization for a few types. I made a macro in my project to do this; I haven't tested it yet, but would you be interested in a pull request to add this type of functionality?
I'd also like to provide an automatic way to deserialize a custom type, but I'm not sure how to do that yet; it might require source modification.
Edit: forgot to mention, I also used this in my project to provide parsers for all the different integer and float types, because the project currently only accepts int64_t and double. Would you be interested in that as well?
The text was updated successfully, but these errors were encountered:
It would be nice to be able to support our own custom types to the TOML parser through templates, so that we could simply write
value.as<My_t>()
for anyMy_t
that we want . Based on my reading of the source, it's already possible without touching the source by adding new template specialization for a few types. I made a macro in my project to do this; I haven't tested it yet, but would you be interested in a pull request to add this type of functionality?I'd also like to provide an automatic way to deserialize a custom type, but I'm not sure how to do that yet; it might require source modification.
Edit: forgot to mention, I also used this in my project to provide parsers for all the different integer and float types, because the project currently only accepts
int64_t
anddouble
. Would you be interested in that as well?The text was updated successfully, but these errors were encountered: