From: Alexander A. Klimov Date: Tue, 12 Mar 2019 10:36:30 +0000 (+0100) Subject: Turn shortcut UnbufferedAsioTlsStream::Parent into a base class X-Git-Tag: v2.11.0-rc1~174^2~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7ec1e638a89f8da55a3c77ef418aab64361ac8f4;p=icinga2 Turn shortcut UnbufferedAsioTlsStream::Parent into a base class --- diff --git a/lib/base/tlsstream.hpp b/lib/base/tlsstream.hpp index 2432d16e8..5f5fc6d73 100644 --- a/lib/base/tlsstream.hpp +++ b/lib/base/tlsstream.hpp @@ -106,11 +106,10 @@ struct UnbufferedAsioTlsStreamParams const String& Hostname; }; -class UnbufferedAsioTlsStream : public boost::asio::ssl::stream -{ -private: - typedef boost::asio::ssl::stream Parent; +typedef boost::asio::ssl::stream AsioTcpTlsStream; +class UnbufferedAsioTlsStream : public AsioTcpTlsStream +{ public: inline UnbufferedAsioTlsStream(UnbufferedAsioTlsStreamParams& init) @@ -123,20 +122,20 @@ public: template inline - auto async_handshake(handshake_type type, Args&&... args) -> decltype(Parent::async_handshake(type, std::forward(args)...)) + auto async_handshake(handshake_type type, Args&&... args) -> decltype(AsioTcpTlsStream::async_handshake(type, std::forward(args)...)) { BeforeHandshake(type); - return Parent::async_handshake(type, std::forward(args)...); + return AsioTcpTlsStream::async_handshake(type, std::forward(args)...); } template inline - auto handshake(handshake_type type, Args&&... args) -> decltype(Parent::handshake(type, std::forward(args)...)) + auto handshake(handshake_type type, Args&&... args) -> decltype(AsioTcpTlsStream::handshake(type, std::forward(args)...)) { BeforeHandshake(type); - return Parent::handshake(type, std::forward(args)...); + return AsioTcpTlsStream::handshake(type, std::forward(args)...); } private: