chriskohlhoff / asio

Asio C++ Library
http://think-async.com/Asio
4.72k stars 1.19k forks source link

Issue with execute in 1.29 #1417

Open diehard2 opened 5 months ago

diehard2 commented 5 months ago

This worked in 1.28.x and is failing in 1.29. Reduced to simplest reproducer for brevity

include "asio.hpp" // NOLINT

error: ‘execute’ is not a member of ‘asio::execution’

#include "asio.hpp"  // NOLINT
struct DummyExecutor {
    template<typename F>
    void execute(F&&) const {};
};

void foo() 
{
  asio::execution::execute(DummyExecutor{}, []() mutable {
  });
}
justend29 commented 5 months ago

@diehard2 execute was deprecated and recently removed. The documentation indicates to use the member function instead.