-
Notifications
You must be signed in to change notification settings - Fork 88
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
Boost.variant requirement #2
Comments
I implemented All tests are passed, with the following memory characteristics (reported by Valgrind for all tests in a single run):
It may be optimized further, I haven't even used a union - used a plain class. VS2013 makes unions problematic though. I am not creating a PR - doubt that it's worth it, Boost.Variant variant is cleaner and avoids a lot of runtime checks. Feel free to pull this change of course - it is under MIT as the whole mstch. |
I can try and patch up the cmake file, so users can choose if they want boost::variant or eggs::variant, which might be better in terms of package download size, but that would conflict with my other pull request, so that should be merged first. Is the maintainer still around, or can somebody fork and sort out the PRs? |
@jeremyong, @staticlibs I've integrated @mbits-libs take on replacing Boost is only required for running the tests. |
Using |
Given that C++11 (and beyond) union requirements have been relaxed, I'm curious as to whether boost variant is truly necessary, or even the best option for providing the JSON-structure like mstch::node object. The only weakness is that you lose constructor/destructor semantics but providing this as part of the constructor and destructor of a thin wrapper around the union is easy enough.
Removing the boost dependency would make the library a bit lighter and easier to integrate into other codebases.
Thanks for this library!
The text was updated successfully, but these errors were encountered: