C++ coroutines and const reference parameters
A coroutine func accepts a parameter by const reference in the code below:
#include <boost/asio.hpp>
#include <iostream>
namespace asio = boost::asio;
using asio::awaitable;
using asio::use_awaitable;
class Param
{
public:
Param(int val) : m_val(val)
{
std::cout << "Param constructor " << m_val << std::endl;
}
