-
Notifications
You must be signed in to change notification settings - Fork 70
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
Single header version of mp11 #47
Comments
Mp11 does not depend on any other Boost library and can be shipped independently. i.e. Users don't need a Boost distribution, they can clone (or you can package) mp11 from this repository. |
@glenfe that’s not exactly what I need for my project. I have a public header dependency on mp11 so if I ship my library binary and headers (so apps can be build against it) I need to either ask user to install boost or ship mp11 along with my headers. Although I agree it’s not a huge issue as it’s only compile time dependency on Boost (or just mp11) for end users of my projects. |
There are three options, not two:
i.e. If all of Boost is too much for them, they can get Mp11 alone. |
That’s correct. But I’d prefer to use option 1 so users need less to install. |
Related: f24d1ca |
@pdimov What was the rational behind the removal? |
I got tired of regenerating the header on every change. :-) |
But feel free to use the script and generate your own copy to distribute. My main motivation for having the single header was to be able to include it on Godbolt, and once mp11 became part of Boost and Godbolt acquired support for libraries, Boost included, this was no longer an issue. |
Thank you for the pointer! I guess I can automate it to have latest and greatest single header. |
Including individual boost libs as git submodules works great. If you don't like git submodules, CMake can also download individual libraries for you at build time including mp11. From boost.histograms's CMakeLists.txt:
|
There is one very worthwhile option which has not been discussed: drop support for any platform that does not support the latest Boost Libraries. |
It would be great to have boost.mp11 available as a single header with root namespace that can be defined from outside. This allows to distribute mp11 along with a library that needs MPL but does not otherwise depend on Boost. Having a definable namespace allows each separate library to distribute its own copy of mp11 without conflicts. For example I’d like to use mp11 in my Ppconsul project without introducing a dependency on modern Boost (one is not available on some platforms where Ppconsul is used). Currently Ppconsul uses Boost.MPL and Boost.Fusion which I want to get rid of in favor of some modern MPL library as formers are slow to compile and harder to use.
Other modern MPL libraries usually have a single header version ( I guess for exact same reason).
If there is a general interest in getting a single header mp11 I can implement it.
The text was updated successfully, but these errors were encountered: