Skip to content

Conversation

@zerodefect
Copy link
Contributor

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).

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).
@zerodefect
Copy link
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.

@paolopas
Copy link

paolopas commented Dec 8, 2025

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.
See #553 and your previous comment #550 (comment)

@zerodefect
Copy link
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.

@zerodefect zerodefect changed the title Refactor: Modernize LibBoostAsioHandler to C++17 syntax Refactor: Modernize LibBoostAsioHandler to C++17 syntax (pt 1) Dec 8, 2025
@zerodefect
Copy link
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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants