diff options
Diffstat (limited to 'src/common/Asio/Strand.h')
-rw-r--r-- | src/common/Asio/Strand.h | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/common/Asio/Strand.h b/src/common/Asio/Strand.h index c27407d1a3c..5beef144c60 100644 --- a/src/common/Asio/Strand.h +++ b/src/common/Asio/Strand.h @@ -19,11 +19,8 @@ #define Strand_h__ #include "IoContext.h" -#include <boost/asio/strand.hpp> - -#if BOOST_VERSION >= 106600 #include <boost/asio/bind_executor.hpp> -#endif +#include <boost/asio/strand.hpp> namespace Trinity { @@ -32,21 +29,13 @@ namespace Trinity /** Hack to make it possible to forward declare strand (which is a inner class) */ - class Strand : public IoContextBaseNamespace::IoContextBase::strand + class Strand : public boost::asio::io_context::strand { public: - Strand(IoContext& ioContext) : IoContextBaseNamespace::IoContextBase::strand(ioContext) { } + Strand(IoContext& ioContext) : boost::asio::io_context::strand(ioContext) { } }; -#if BOOST_VERSION >= 106600 using boost::asio::bind_executor; -#else - template<typename T> - inline decltype(auto) bind_executor(Strand& strand, T&& t) - { - return strand.wrap(std::forward<T>(t)); - } -#endif } } |