aboutsummaryrefslogtreecommitdiff
path: root/flang/docs/C++17.md
diff options
context:
space:
mode:
Diffstat (limited to 'flang/docs/C++17.md')
-rw-r--r--flang/docs/C++17.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/flang/docs/C++17.md b/flang/docs/C++17.md
index b20364b..f36110a 100644
--- a/flang/docs/C++17.md
+++ b/flang/docs/C++17.md
@@ -153,3 +153,8 @@ signifies a successful recognition and absence denotes a failed parse.
It is used in data structures in place of nullable pointers to
avoid indirection as well as the possible confusion over whether a pointer
is allowed to be null.
+
+`std::optional<bool>` is commonly used to denote a "tri-state"
+logical value that might be unknown.
+Please try to avoid implicit casts of `std::optional<bool>` to `bool`,
+and use `.value_or(default)` or `.has_value()` instead as appropriate.