I don't know asio very well, but adding the requested parameter fixes the issue.
t.async_wait([&] ( const boost::system::error_code& ) {
print(&t, &count);
});
It looks like a quirk or bug of Boost.Bind allows additional, ignored arguments to a bind expression generated from a function pointer. It's probably better not to rely on this, but to explicitly accept and discard the error code.