From d64e5f718c2223d78c9d7810859ef0f6f3113a1e Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Wed, 30 Oct 2019 19:50:54 -0700 Subject: [PATCH] Add basic_stream::rebind_executor --- CHANGELOG.md | 1 + include/boost/beast/core/basic_stream.hpp | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ccd70a9b..3760a4e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ Version 275: * Async init-fns use the executor's default token +* Add basic_stream::rebind_executor -------------------------------------------------------------------------------- diff --git a/include/boost/beast/core/basic_stream.hpp b/include/boost/beast/core/basic_stream.hpp index c8a33483..9b4ae5cd 100644 --- a/include/boost/beast/core/basic_stream.hpp +++ b/include/boost/beast/core/basic_stream.hpp @@ -217,6 +217,15 @@ public: */ using executor_type = beast::executor_type; + /// Rebinds the stream type to another executor. + template + struct rebind_executor + { + /// The stream type when rebound to the specified executor. + using other = basic_stream< + Protocol, Executor1, RatePolicy>; + }; + /// The protocol type. using protocol_type = Protocol;