development_basics: Recommend std::optional instead of absl::optional
As an exeption to the suggestion in Modern C++ use in Chromium.
Also fix the out-of-date desription and link for the pointer to
Chromium's document.
BUG=b:192529039
TEST=None
Change-Id: I69c5a0b7e196619bd2abd4cb9e8df0b5667e79b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/docs/+/3692627
Reviewed-by: Ian Barkley-Yeung <iby@chromium.org>
Tested-by: Grace Cham <hscham@chromium.org>
Reviewed-by: Qijiang Yƫki Ishii <fqj@google.com>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Grace Cham <hscham@chromium.org>
diff --git a/development_basics.md b/development_basics.md
index 66858a2..9f85abb 100644
--- a/development_basics.md
+++ b/development_basics.md
@@ -60,9 +60,14 @@
The Chromium project, and by extension the ChromiumOS project, follow the
[Google C++ style guide], with the [Chromium C++ style guide] layered on top to
-provide additional guidelines and clarify ambiguities. The [C++11 use in
-Chromium] document lists which of the many new features introduced in the C++11
-standard are allowed.
+provide additional guidelines and clarify ambiguities.
+
+The [Modern C++ use in Chromium] document lists which of the many new features
+introduced in the C++11, 14, and 17 standard are allowed. ChromiumOS follows the
+list except std::optional. It is banned on Chromium due to its undefined
+behavior when a std::nullopt is dereferenced. However, ChromiumOS C++ is
+hardened and will crash in such cases. Use std::optional instead of
+absl::optional.
New C++ programs should go into new directories in the [platform2 repository],
which is checked out to `src/platform2`.
@@ -228,7 +233,7 @@
[Rust on ChromeOS]: https://chromium.googlesource.com/chromiumos/docs/+/HEAD/rust_on_cros.md
[Google C++ style guide]: https://google.github.io/styleguide/cppguide.html
[Chromium C++ style guide]: https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++.md
-[C++11 use in Chromium]: https://chromium-cpp.appspot.com/
+[Modern C++ use in Chromium]: https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++-features.md
[platform2 repository]: platform2_primer.md
[Linux kernel coding style]: https://github.com/torvalds/linux/blob/HEAD/Documentation/process/coding-style.rst
[Kernel Development]: kernel_development.md