diff --git a/rules/S7172/cfamily/rule.adoc b/rules/S7172/cfamily/rule.adoc index 0ef3efe935c..286b411e04e 100644 --- a/rules/S7172/cfamily/rule.adoc +++ b/rules/S7172/cfamily/rule.adoc @@ -90,7 +90,7 @@ void perform(Node node, optional recursive, Action action) { } ---- -In this simple case, the use of both `recursive` and `++*recursive++` hints that recursive is more than a simple `bool`. However, it is possible to write the code with a higher level semantic: +In this simple case, the use of both `recursive` and `++*recursive++` hints that recursive is more than a simple `bool`. However, it is possible to write the code with a higher level semantic (see S6023): [source,cpp] ---- @@ -117,6 +117,11 @@ void perform(optional recursive) { This syntax is more complex, but it is also more flexible, especially when chaining operations on `optional` or `expected` values. == Resources + +=== Related rules + +* S6023 - "std::optional" member function "value_or" should be used + === Documentation * {cpp} reference - https://en.cppreference.com/w/cpp/utility/optional[`std::optional`]