getml / reflect-cpp

A C++20 library for fast serialization, deserialization and validation using reflection. Supports JSON, BSON, CBOR, flexbuffers, msgpack, TOML, XML, YAML / msgpack.org[C++20]
https://getml.github.io/reflect-cpp/
MIT License
900 stars 76 forks source link

Reduce boilerplate #19

Closed ChemiCalChems closed 8 months ago

ChemiCalChems commented 8 months ago

After looking around the codebase, I saw some boilerplate that could be easily removed.

There is more I think could also be removed but I'm unsure whether it would be acceptable or not so I would rather discuss it with someone in the project first. Get in contact with me if you're interested.

On my machine the tests now compile a couple of seconds quicker and the binary size is reduced by 160K.

liuzicheng1987 commented 8 months ago

@ChemiCalChems I have taken a look at your commits. I think they make a lot of sense. Thank you very much. I will test this and then merge very soon.

liuzicheng1987 commented 8 months ago

@ChemiCalChems Sure, I am always open to suggestions. You can get in touch with me on Reddit or LinkedIn, whichever you prefer.

liuzicheng1987 commented 8 months ago

@ChemiCalChems , the tests run through on clang, gcc and MSVC. I am merging this. Thank you very much.