Allow (and use) std::hardware_destructive_interference_size.
Bug: none
Change-Id: Ic3282588f4c6e75c7fcbff6f9c64827b5c18a10d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5767325
Reviewed-by: Jeremy Roman <[email protected]>
Commit-Queue: Peter Kasting <[email protected]>
Owners-Override: Peter Kasting <[email protected]>
Auto-Submit: Peter Kasting <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1350762}
diff --git a/styleguide/c++/c++-features.md b/styleguide/c++/c++-features.md
index 020666f..50da4b1 100644
--- a/styleguide/c++/c++-features.md
+++ b/styleguide/c++/c++-features.md
@@ -574,35 +574,6 @@
easier to use correctly.
***
-### std::hardware_{con,de}structive_interference_size <sup>[banned]</sup>
-
-```c++
-struct SharedData {
- ReadOnlyFrequentlyUsed data;
- alignas(std::hardware_destructive_interference_size) std::atomic<size_t> counter;
-};
-```
-
-**Description:** The `std::hardware_destructive_interference_size` constant is
-useful to avoid false sharing (destructive interference) between variables that
-would otherwise occupy the same cacheline. In contrast,
-`std::hardware_constructive_interference_size` is helpful to promote true
-sharing (constructive interference), e.g. to support better locality for
-non-contended data.
-
-**Documentation:**
-[`std::hardware_destructive_interference_size`](https://en.cppreference.com/w/cpp/thread/hardware_destructive_interference_size),
-[`std::hardware_constructive_interference_size`](https://en.cppreference.com/w/cpp/thread/hardware_destructive_interference_size)
-
-**Notes:**
-*** promo
-Banned for now since these are
-[not supported yet](https://github.com/llvm/llvm-project/issues/60174). Allow
-once supported.
-
-[Discussion thread](https://groups.google.com/a/chromium.org/g/cxx/c/cwktrFxxUY4)
-***
-
### std::in_place{_type,_index}[_t] <sup>[banned]</sup>
```c++
@@ -1206,6 +1177,31 @@
[Migration bug](https://crbug.com/1414639)
***
+### std::hardware_{con,de}structive_interference_size <sup>[allowed]</sup>
+
+```c++
+struct SharedData {
+ ReadOnlyFrequentlyUsed data;
+ alignas(std::hardware_destructive_interference_size) std::atomic<size_t> counter;
+};
+```
+
+**Description:** The `std::hardware_destructive_interference_size` constant is
+useful to avoid false sharing (destructive interference) between variables that
+would otherwise occupy the same cacheline. In contrast,
+`std::hardware_constructive_interference_size` is helpful to promote true
+sharing (constructive interference), e.g. to support better locality for
+non-contended data.
+
+**Documentation:**
+[`std::hardware_destructive_interference_size`](https://en.cppreference.com/w/cpp/thread/hardware_destructive_interference_size),
+[`std::hardware_constructive_interference_size`](https://en.cppreference.com/w/cpp/thread/hardware_destructive_interference_size)
+
+**Notes:**
+*** promo
+[Discussion thread](https://groups.google.com/a/chromium.org/g/cxx/c/cwktrFxxUY4)
+***
+
### std::is_[un]bounded_array <sup>[allowed]</sup>
```c++