From ac4611c05be13fef3121f1845b75c752c72d7c68 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Tue, 2 Jan 2024 18:20:43 +0300 Subject: [PATCH] Fix incorrect code markup in IO operator docs. The previous IO operator declarations were made up from multiple code phrase markups with line breaks, where the markup was broken and some of the line breaks were not translated propertly into output. Replace this with proper code blocks. This also resolves the QuickBook warning about line breaks potentially producing invalid BoostBook output. --- doc/23_ref_optional_io.qbk | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/doc/23_ref_optional_io.qbk b/doc/23_ref_optional_io.qbk index 22b2583..57f0677 100644 --- a/doc/23_ref_optional_io.qbk +++ b/doc/23_ref_optional_io.qbk @@ -41,10 +41,11 @@ template [#reference_operator_ostream] - -`template ` [br] - std::basic_ostream&` [br] - operator<<(std::basic_ostream& out, optional const& v);` +``` +template +std::basic_ostream& +operator<<(std::basic_ostream& out, optional const& v); +``` * [*Effect:] Outputs an implementation-defined string. The output contains the information about whether the optional object contains a value or not. If `v` contains a value, the output contains result of calling `out << *v`. * [*Returns:] `out`. @@ -52,9 +53,11 @@ template __SPACE__ [#reference_operator_ostream_none] -`template ` [br] - std::basic_ostream&` [br] - operator<<(std::basic_ostream& out, none_t);` +``` +template +std::basic_ostream& +operator<<(std::basic_ostream& out, none_t); +``` * [*Effect:] Outputs an implementation-defined string. * [*Returns:] `out`. @@ -62,9 +65,11 @@ __SPACE__ __SPACE__ [#reference_operator_istream] -`template ` [br] - std::basic_ostream&` [br] - operator>>(std::basic_istream& in, optional& v);` +``` +template +std::basic_ostream& +operator>>(std::basic_istream& in, optional& v); +``` * [*Requires:] `T` is __STD_DEFAULT_CONSTRUCTIBLE__ and __MOVE_CONSTRUCTIBLE__. * [*Effect:] Reads the value of optional object from `in`. If the string representation indicates that the optional object should contain a value, `v` contains a value and its contained value is obtained as if by default-constructing an object `o` of type `T` and then calling `in >> o`; otherwise `v` does not contain a value, and the previously contained value (if any) has been destroyed.