From 2fc720a1cbe51d588fecc4e0af9417bd769381d8 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 3 Feb 2024 04:07:53 +0200 Subject: [PATCH] Update documentation --- doc/system/reference.adoc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/system/reference.adoc b/doc/system/reference.adoc index 5d62df4..6a1f0b4 100644 --- a/doc/system/reference.adoc +++ b/doc/system/reference.adoc @@ -2651,6 +2651,23 @@ Remarks: :: Only enabled when the type of `f()` is either - convertible to `T` or - an instance of `result` convertible to `result`. +Example: :: ++ +``` +result query_impl( std::string_view server, request const& req ); + +result query( std::vector const& servers, request const& req ) +{ + result r = make_error_code( errc::invalid_argument ); + + for( auto const& server: servers ) + { + r |= std::bind( query_impl, server, std::ref( req ) ); + } + + return r; +} +``` #### operator&