-
Notifications
You must be signed in to change notification settings - Fork 53
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
Replaced boost by c++11 and asio #59
Conversation
- include asio.hpp and define ASIO_STANDALONE - boost > std: (enabled_shared_from_this, shared_ptr, bind, asio::placeholders, system::, thread) - boost::asio > asio (ip::tcp::socket, ip::tcp::acceptor, ip::tcp::endpoint, io_service, error_code, streambuf, async_write) - boost::asio::deadline_timer becomes asio::steady_timer (to work with std::chrono) - boost::posix_time > std::chrono
Yep, compiles on Ubuntu 16.04. |
Cool, that works great for me on Debian testing! All the ugly Boost stuff in
I think it makes sense to define Or probably it would be even better to do something like this (and removing the #if !defined(ASIO_STANDALONE)
#define ASIO_STANDALONE
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool stuff, I've just added a little comment regarding the docs.
@@ -1312,17 +1318,6 @@ This happens when two or more instances of the SSR are started with the IP serve | |||
Start all (or at least all instances higher than 1) with the ``-I`` flag to disable the | |||
IP interface. | |||
|
|||
IP interface isn't selected although boost libraries are installed | |||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't remove this. Instead, add "This issue was resolved in ...".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the appropriate SSR version number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be the correct version number? 0.4.3? Or would a larger version jump be more appropriate? Especially if this is combined with the upgrade of qt5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think 0.5.0, but @JensAhrens will make the release and he will decide if this PR will be included or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chohner When you are done, can you please squash your commits?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, 0.5.0 is it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and I'm happy to include this PR.
+ 2 whitespace fixes
maybe the use of something like |
That switch would then add boost dependencies deep inside the asio library that you would need to tell the compiler/linker about and so on. I don't think there is a good reason for it anyways (as you also mention). |
are these dependencies build-deps or runtime dependencies? why does asio provide a non-standalone option (and even defaults to that) if it is not desirable to use it? |
Build time.
I think only for historical reasons. The standalone option is still (comparatively) new and relies on c11. Since afaik there's plenty of c11 code throughout SSR, the only upside of building with boost (building with on std<c11) disappears. Additionally, some problems we were seeing on OS X also disappeared on this build so I don't think there's any reason to allow building with boost. |
Small update from my side: I can confirm the interface to be working with the SSR android app. |
Added a line on being fixed in version
|
Thanks @chohner. You squashing your commits (or somehow else pushing them into shape) places the burden of coming up with commit messages on you, that's all. Anyway, @JensAhrens will merge it, so I don't really care. |
Tested in a compound version (https://github.com/chris-hld/ssr/tree/beta) and it works great for WFS. |
Apparently, I've approved this too quickly. Creating the manual produces a few errors now. |
I fixed the manual. |
This completely strips Boost from the network interface:
asio::placeholders, system::, thread)
ip::tcp::endpoint, io_service, error_code, streambuf, async_write)
std::chrono)
This should compile already after installing asio (
brew install asio
on OSX,apt-get install libasio-dev
on unix).Todo: