diff --git a/rules/S7172/cfamily/rule.adoc b/rules/S7172/cfamily/rule.adoc index 9740b31ba74..46e00b79655 100644 --- a/rules/S7172/cfamily/rule.adoc +++ b/rules/S7172/cfamily/rule.adoc @@ -1,3 +1,4 @@ +This rule raises an issue when `std::optional`, `boost::optional`, or `std::expected` wrap a basic type, and a conversion from the wrapper type to `bool` is used to test the presence of a contained value. == Why is this an issue? @@ -13,7 +14,7 @@ if(flag.has_value()) { ... } When the contained type is also convertible to `bool`, using this concise syntax can be confusing. What is tested: The wrapper, or the contained value? -This rule raises an issue when `std::optional`, `boost::optional`, or `std::expected` wrap a basic type, and the conversion to `bool` is used to test presence of the value. +This rule raises an issue when `std::optional`, `boost::optional`, or `std::expected` wrap a basic type, and the conversion to `bool` is used to test the presence of the value. === What is the potential impact?