summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorIca <82805019+burak-efe@users.noreply.github.com>2024-11-22 10:52:03 +0300
committerGitHub <noreply@github.com>2024-11-21 23:52:03 -0800
commitd7c735fadfd497942dc0ce6f0819019568b6e563 (patch)
tree3450fb88ba22cc1e75f75f2f8c05a7cd66d8d294 /docs
parente25683661bbd20d92a46f5032825f3c6ce8b0edf (diff)
[Docs] Optional<T> - fix small typo on example (#5637)
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/user-guide/03-convenience-features.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/user-guide/03-convenience-features.md b/docs/user-guide/03-convenience-features.md
index 38f021113..65357ce1a 100644
--- a/docs/user-guide/03-convenience-features.md
+++ b/docs/user-guide/03-convenience-features.md
@@ -431,7 +431,7 @@ struct MyType
int useVal(Optional<MyType> p)
{
- if (p == none) // Equivalent to `p.hasValue`
+ if (p == none) // Equivalent to `!p.hasValue`
return 0;
return p.value.val;
}