/Users/dylu/Documents/tun2socks/socks5/socks5_client.cpp:128:21: error: no viable conversion from 'boost::system::error_code' to 'const boost::system::system_error'
make_error_code(TUN2SOCKSErrorCode::SOCKS5_WRONG_VERSION));
^~~~~~~~~~~~~
/usr/local/include/boost/system/system_error.hpp:22:32: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'boost::system::error_code' to 'const boost::system::system_error &' for 1st argument
class BOOST_SYMBOL_VISIBLE system_error : public std::runtime_error
^
/usr/local/include/boost/system/detail/error_code.hpp:163:5: note: candidate function
operator std::error_code () const
^
/Users/dylu/Documents/tun2socks/./socks5/socks5_client.h:75:60: note: passing argument to parameter 'err' here
void mayCallOnError(const boost::system::system_error& err);
^
/Users/dylu/Documents/tun2socks/socks5/socks5_client.cpp:132:34: error: no viable conversion from 'boost::system::error_code' to 'const boost::system::system_error'
this->mayCallOnError(make_error_code(
^~~~
/usr/local/include/boost/system/system_error.hpp:22:32: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'boost::system::error_code' to 'const boost::system::system_error &' for 1st argument
class BOOST_SYMBOL_VISIBLE system_error : public std::runtime_error
/Users/dylu/Documents/tun2socks/socks5/socks5_client.cpp:128:21: error: no viable conversion from 'boost::system::error_code' to 'const boost::system::system_error' make_error_code(TUN2SOCKSErrorCode::SOCKS5_WRONG_VERSION)); ^
~~~~~~~~~~~~ /usr/local/include/boost/system/system_error.hpp:22:32: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'boost::system::error_code' to 'const boost::system::system_error &' for 1st argument class BOOST_SYMBOL_VISIBLE system_error : public std::runtime_error ^ /usr/local/include/boost/system/detail/error_code.hpp:163:5: note: candidate function operator std::error_code () const ^ /Users/dylu/Documents/tun2socks/./socks5/socks5_client.h:75:60: note: passing argument to parameter 'err' here void mayCallOnError(const boost::system::system_error& err); ^ /Users/dylu/Documents/tun2socks/socks5/socks5_client.cpp:132:34: error: no viable conversion from 'boost::system::error_code' to 'const boost::system::system_error' this->mayCallOnError(make_error_code( ^~~~/usr/local/include/boost/system/system_error.hpp:22:32: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'boost::system::error_code' to 'const boost::system::system_error &' for 1st argument class BOOST_SYMBOL_VISIBLE system_error : public std::runtime_error