Error details :
boost/asio/detail/io_object_impl.hpp:101:40: error: ‘const class boost::reference_wrapperboost::asio::io_context’ has no member named ‘get_executor’; did you mean ‘get_pointer’?
implementationexecutor(context.get_executor(),
I have attached a patch, which works as a workaround for the issue. (file: boost/asio/detail/io_object_impl.hpp)
[![io_object_impl](https://user-images.githubusercontent.com/26009849/59086755-4de01280-8920-11e9-8c66-37411b7306df.JPG)](https://user-images.githubusercontent.com/26009849/59086755-4de01280-8920-11e9-8c66-37411b7306df.JPG)
*This issue was moved by [chriskohlhoff](https://github.com/chriskohlhoff) from [boostorg/asio#252](https://github.com/boostorg/asio/issues/252).*
@kkumar45 commented on Jun 7, 2019, 7:02 AM UTC:
Initializing tcp::socket with boost::ref(io_context) results in compilation error. It looks like a regression in boost::asio.
It can be reproduced easily with below code.
`#include <boost/asio.hpp>
include <boost/core/ref.hpp>
int main() { boost::asio::io_context io_context; boost::asio::ip::tcp::socket socket(boost::ref(io_context)); return 0; } `
Error details : boost/asio/detail/io_object_impl.hpp:101:40: error: ‘const class boost::reference_wrapperboost::asio::io_context’ has no member named ‘get_executor’; did you mean ‘get_pointer’? implementationexecutor(context.get_executor(),