0

I am trying to upgrade code from boost 1.60 to boost 1.82

The following methods are not available anymore and i can't find information what methods should be used instead, could you please help me to upgrade the code.

Methods are not available:

timer(port.get_io_service());//boost::asio::deadline_timer timer;
port.get_io_service().reset();//boost::asio::serial_port& port;
boost::asio::async_read(port, boost::asio::buffer(&c, 1);
port.get_io_service().run();
πάντα ῥεῖ
  • 1
  • 13
  • 116
  • 190
al072
  • 79
  • 2
  • 14
  • There was a big change to those parts somewhere around 1.70 if I remember correctly. Perhaps you can find and read the release notes from 1.69-1.72 and see if you find any hints there. – Ted Lyngmo Aug 06 '23 at 13:30
  • do you mean `get_io_service`? It's changed to `get_executor().context()` – Alan Birtles Aug 06 '23 at 13:37
  • @AlanBirtles may suggest suggesting to use executors instead of tying implementations to a specific execution context type. That approach negates the benefits of executor abstraction and is error prone because it can lead to runtime cast exceptions. – sehe Aug 07 '23 at 21:12

0 Answers0