From 1a077fd7d6894135c1bc4d94f3ec6abc8fb98a98 Mon Sep 17 00:00:00 2001 From: Jan Schultke Date: Wed, 24 Jan 2024 23:03:57 +0100 Subject: [PATCH] elaborate on optional/expected Co-authored-by: Jonathan Wakely --- CppCoreGuidelines.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 9aa5ad33a..13ca559b0 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -3333,6 +3333,7 @@ For example: The overly generic `pair` and `tuple` should be used only when the value returned represents independent entities rather than an abstraction. Another option is to use `optional` or `expected`, rather than `pair` or `tuple`. +When used appropriately these types convey more information about what the members mean than `pair` or `pair` do. ##### Note