main.cpp: In function 'int main()':
main.cpp:68:55: error: no matching function for call to 'bind(<unresolved overloaded function type>, std::reference_wrapper<boost::asio::basic_stream_socket<boost::asio::ip::tcp> >)'
std::thread thread(std::bind(read, std::ref(socket)));
^
In file included from /usr/local/Cellar/gcc/5.3.0/include/c++/5.3.0/memory:79:0,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/addressof.hpp:21,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/handler_alloc_helpers.hpp:19,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/bind_handler.hpp:19,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/wrapped_handler.hpp:18,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/io_service.hpp:24,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/basic_io_object.hpp:19,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/basic_socket.hpp:20,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/basic_datagram_socket.hpp:20,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio.hpp:21,
from main.cpp:12:
/usr/local/Cellar/gcc/5.3.0/include/c++/5.3.0/functional:1462:5: note: candidate: template<class _Func, class ... _BoundArgs> typename std::_Bind_helper<std::__is_socketlike<_Func>::value, _Func, _BoundArgs ...>::type std::bind(_Func&&, _BoundArgs&& ...)
bind(_Func&& __f, _BoundArgs&&... __args)
^
/usr/local/Cellar/gcc/5.3.0/include/c++/5.3.0/functional:1462:5: note: template argument deduction/substitution failed:
main.cpp:68:55: note: couldn't deduce template parameter '_Func'
std::thread thread(std::bind(read, std::ref(socket)));
^
In file included from /usr/local/Cellar/gcc/5.3.0/include/c++/5.3.0/memory:79:0,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/addressof.hpp:21,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/handler_alloc_helpers.hpp:19,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/bind_handler.hpp:19,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/wrapped_handler.hpp:18,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/io_service.hpp:24,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/basic_io_object.hpp:19,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/basic_socket.hpp:20,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/basic_datagram_socket.hpp:20,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio.hpp:21,
from main.cpp:12:
/usr/local/Cellar/gcc/5.3.0/include/c++/5.3.0/functional:1490:5: note: candidate: template<class _Result, class _Func, class ... _BoundArgs> typename std::_Bindres_helper<_Result, _Func, _BoundArgs>::type std::bind(_Func&&, _BoundArgs&& ...)
bind(_Func&& __f, _BoundArgs&&... __args)
^
/usr/local/Cellar/gcc/5.3.0/include/c++/5.3.0/functional:1490:5: note: template argument deduction/substitution failed:
main.cpp:68:55: note: couldn't deduce template parameter '_Result'
std::thread thread(std::bind(read, std::ref(socket)));
^
In file included from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/throw_error.hpp:19:0,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/impl/posix_tss_ptr.ipp:23,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/posix_tss_ptr.hpp:76,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/tss_ptr.hpp:27,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/call_stack.hpp:20,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/impl/handler_alloc_hook.ipp:19,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/handler_alloc_hook.hpp:80,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/handler_alloc_helpers.hpp:21,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/bind_handler.hpp:19,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/wrapped_handler.hpp:18,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/io_service.hpp:24,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/basic_io_object.hpp:19,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/basic_socket.hpp:20,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/basic_datagram_socket.hpp:20,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio.hpp:21,
from main.cpp:12:
/usr/local/Cellar/boost/1.60.0_1/include/boost/system/error_code.hpp: At global scope:
/usr/local/Cellar/boost/1.60.0_1/include/boost/system/error_code.hpp:221:36: warning: 'boost::system::posix_category' defined but not used [-Wunused-variable]
static const error_category & posix_category = generic_category();
^
/usr/local/Cellar/boost/1.60.0_1/include/boost/system/error_code.hpp:222:36: warning: 'boost::system::errno_ecat' defined but not used [-Wunused-variable]
static const error_category & errno_ecat = generic_category();
^
/usr/local/Cellar/boost/1.60.0_1/include/boost/system/error_code.hpp:223:36: warning: 'boost::system::native_ecat' defined but not used [-Wunused-variable]
static const error_category & native_ecat = system_category();
^
In file included from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/impl/posix_tss_ptr.ipp:24:0,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/posix_tss_ptr.hpp:76,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/tss_ptr.hpp:27,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/call_stack.hpp:20,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/impl/handler_alloc_hook.ipp:19,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/handler_alloc_hook.hpp:80,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/handler_alloc_helpers.hpp:21,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/bind_handler.hpp:19,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/detail/wrapped_handler.hpp:18,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/io_service.hpp:24,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/basic_io_object.hpp:19,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/basic_socket.hpp:20,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio/basic_datagram_socket.hpp:20,
from /usr/local/Cellar/boost/1.60.0_1/include/boost/asio.hpp:21,
from main.cpp:12:
/usr/local/Cellar/boost/1.60.0_1/include/boost/asio/error.hpp:258:45: warning: 'boost::asio::error::system_category' defined but not used [-Wunused-variable]
static const boost::system::error_category& system_category
^
/usr/local/Cellar/boost/1.60.0_1/include/boost/asio/error.hpp:260:45: warning: 'boost::asio::error::netdb_category' defined but not used [-Wunused-variable]
static const boost::system::error_category& netdb_category
^
/usr/local/Cellar/boost/1.60.0_1/include/boost/asio/error.hpp:262:45: warning: 'boost::asio::error::addrinfo_category' defined but not used [-Wunused-variable]
static const boost::system::error_category& addrinfo_category
^
/usr/local/Cellar/boost/1.60.0_1/include/boost/asio/error.hpp:264:45: warning: 'boost::asio::error::misc_category' defined but not used [-Wunused-variable]
static const boost::system::error_category& misc_category