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 requirement #857
Comments
It sounds like you are conflating two distinct things: header-only and self-contained. |
@os12 sorry my question wasnt clear - let me rephrase:
|
Yes, Boost is required as this lib uses Boost ASIO. |
@os12 - thanks can you also point to where this requirement is noted in the CPP-NETLIB documentation? |
Not sure whether it is explicitly stated... this was written (I believe) to be a part of Boost and uses it extensively (asio, spirit, algorithms, variant, etc). |
i found this - not explicit but pretty close:
|
Why are you looking at glynos/cpp-netlib ? @glynos It might be worth transferring the "rootness" of the project over to cpp-netlib/cpp-netlib to avoid confusion. I think GitHub has support for this sort of thing. |
Also, we've stopped with the header-only business for a while now. If there's something in the documentation that's misleading, we should fix it. |
@deanberris i think it would be helpful to make it explicit that this project requires boost. boost is a heavy dependency and people might want to avoid |
@cup We tried in 0.12.0 to not require boost. The documentation in 0.12.0 is wrong if it mentions using anything related to Boost. We may be in the Boost namespace but that doesn't mean we needed Boost in 0.12.0. We've rolled that decision back in 0.13-devel because it turns out the std::future implementation didn't have a way of querying whether a future is ready. So now we're back to that situation where we're using Boost.Thread. If/when the std::future implementation is ready (or until we decide to implement something on our own) then we can remove the dependency on Boost. If in 0.13-devel there's no mention on the dependency on Boost, then we should fix that indeed. Pull requests are definitely welcome to the documentation. However if I look at the docs hosted on the website: https://cpp-netlib.org/0.13.0/getting_started.html We mention that we do need Boost: https://cpp-netlib.org/0.13.0/getting_started.html#getting-boost
If this is not sufficient, then please help us improve the situation. Cheers |
@deanberris perhaps i can give a fresh perspective, as someone looking on this in both cases you are presented with this: using namespace boost::network;
using namespace boost::network::http; and on neither of those pages does it say that boost is a requirement. now one |
@cup I completely agree. We should fix those moving forward (or maybe retroactively). You can send some pull requests against the ReStructuredText documentation in https://github.com/cpp-netlib/cpp-netlib/blob/master/libs/network/doc/index.rst -- to help make this more explicit to someone new to the project. Cheers |
@deanberris What do you mean by :
Standard library does provide a way to query the state of the future!
https://en.cppreference.com/w/cpp/thread/future_status Or do you mean something else by the |
This is not guaranteed to be wait-free. It's under-specified whether |
@deanberris Yes but as far as I know boost doesn't give you that guarantee neither.
I don't think you can get any faster than 0 + scheduling and resource contention delays when querying for the future's state. |
Oh, you're right! Thanks for pointing that out, @xirius! I thought that In that case there's hope yet, but if we want to move away from Boost, we might need to implement our own future+promise-like thing anyway -- one that attempts to use wait-free atomic operations if it's available for the platform, either through I must admit it's been a while since I gave this thought, but it might actually be feasible to remove the dependency on Boost if we update the required language to C++14 (or even C++17). That's a bit of work that might be worth doing... but it's worth exploring anyway. Cheers |
from http://github.com/glynos/cpp-netlib:
from http://cpp-netlib.org/0.12.0/index.html:
how can this be header only if it requires boost - can someone please clarify
The text was updated successfully, but these errors were encountered: