From c438f26731e36c2db6457705ec5dbb9f7657db2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anarthal=20=28Rub=C3=A9n=20P=C3=A9rez=29?= <34971811+anarthal@users.noreply.github.com> Date: Wed, 4 Dec 2024 17:01:40 +0100 Subject: [PATCH] Fixed a render problem in the async discussion page --- doc/qbk/13_async.qbk | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/qbk/13_async.qbk b/doc/qbk/13_async.qbk index a1efc01c..e7aa8052 100644 --- a/doc/qbk/13_async.qbk +++ b/doc/qbk/13_async.qbk @@ -89,10 +89,14 @@ with this library. Here are some of the most common: [reflink with_diagnostics] is a completion token adapter that you can use with async operations when using exceptions. `with_diagnostics` makes your operations throw [reflink error_with_diagnostics], like sync functions do. -For example: -[async_with_diagnostics_cpp20] -[async_with_diagnostics_cpp11] +`with_diagnostics(asio::deferred)` is the default completion token for most +operations in this library. If you're using C++20 coroutines as suggested in the +tutorials, you're already using it. + +When using other completion styles that involve exceptions, like +`asio::yield_context`, you may need to use `with_diagnostics` explicitly. +[link mysql.examples.coroutines_cpp11 This example] shows how to do it. `with_diagnostics` only makes sense when using exceptions. When using error codes, you can keep using `asio::as_tuple` and `asio::redirect_error` normally.