Refactor: Modernize LibBoostAsioHandler to C++17 syntax (pt 1)#551
Open
zerodefect wants to merge 1 commit intoCopernicaMarketingSoftware:masterfrom
Open
Refactor: Modernize LibBoostAsioHandler to C++17 syntax (pt 1)#551zerodefect wants to merge 1 commit intoCopernicaMarketingSoftware:masterfrom
zerodefect wants to merge 1 commit intoCopernicaMarketingSoftware:masterfrom
Conversation
This commit updates the Boost Asio handler implementation to remove dependency on legacy Boost libraries in favor of modern C++17 standard features. Changes include: - Replaced all instances of `boost::bind` with native C++ lambdas. - Removed `boost/bind/bind.hpp` dependency. - Replaced `PTR_FROM_THIS` macro with standard `weak_from_this()`. - Standardized callback types to use `std::function` instead of `boost::function`. - Use `std::move()` semantics to reduce memory allocation(s).
Contributor
Author
|
@EmielBruijntjes , this is a good start to move the Boost::asio handler to C++-17 standards. I'll slowly work through small PRs to bring this code up-to-date. |
|
I probably didn't understand how you intend to proceed, if we both try to factorize #550 we will probably waste a lot of time. |
Contributor
Author
|
I feel your changes are too ambitious - too many changes at once. If one needs to do a git bisect, it becomes difficult to nail down a problem if too many things are globbed. |
Contributor
Author
|
For those interested, I've created a new repository which encapsulates an improved/updated implementation of LibBoostAsioHandler (aka LibBoostAsioHandler2). https://github.com/coralbay-tv/amqp-cpp-boost2 PRs welcome :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit updates the Boost Asio handler implementation to remove dependency on legacy Boost libraries in favor of modern C++17 standard features.
Changes include:
boost::bindwith native C++ lambdas.boost/bind/bind.hppdependency.PTR_FROM_THISmacro with standardweak_from_this().std::functioninstead ofboost::function.std::move()semantics to reduce memory allocation(s).