From 2cbc7066df0482bbb6e050d0e2ee65975f402468 Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Tue, 3 Dec 2024 20:52:54 +0100 Subject: [PATCH] Fixed a render problem in the async doc 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.