2
0
mirror of https://github.com/boostorg/asio.git synced 2026-01-29 19:12:09 +00:00

Serial port get_option() should be const.

This commit is contained in:
chris.kohlhoff
2019-07-09 19:42:35 +10:00
parent 539145bb74
commit 8a8d83fb2d

View File

@@ -554,7 +554,7 @@ public:
* boost::asio::serial_port_base::character_size
*/
template <typename GettableSerialPortOption>
void get_option(GettableSerialPortOption& option)
void get_option(GettableSerialPortOption& option) const
{
boost::system::error_code ec;
impl_.get_service().get_option(impl_.get_implementation(), option, ec);
@@ -579,7 +579,7 @@ public:
*/
template <typename GettableSerialPortOption>
BOOST_ASIO_SYNC_OP_VOID get_option(GettableSerialPortOption& option,
boost::system::error_code& ec)
boost::system::error_code& ec) const
{
impl_.get_service().get_option(impl_.get_implementation(), option, ec);
BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);