-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Add helper macros #139
Comments
Sounds nice. I think I can implement it quickly. |
I'm struggling with the difference in the preprocessor implementation between gcc/clang and MSVC. If you are using gcc/clang, here is the working code. If you are using MSVC, please wait a bit more. https://github.com/ToruNiina/toml11/blob/auto-conversion-macro/toml/macros.hpp |
Looks like Microsoft added a preprocessor flag that enables well-behaved
Perhaps toml11 could require the flag to be set?
|
Thank you very much @glebm ! It works! |
In
nlohmann/json
we have https://github.com/nlohmann/json#simplify-your-life-with-macrosso that I could simply define both serializer and deserializer in one line:
which makes it possible to convert from/to
I'd like to have similar macros to generate
into_toml
andfrom_toml
for simple structs. Something likeTOML11_DEFINE_NON_INTRUSIVE
.The text was updated successfully, but these errors were encountered: