gbranden pushed a commit to branch master
in repository groff.
commit 8d698e479a3369115438be6928f9b5070c1f12ea
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Dec 19 16:26:05 2025 -0600
HACKING: Update array counting advice.
---
HACKING | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/HACKING b/HACKING
index c162dcdd8..68e57f399 100644
--- a/HACKING
+++ b/HACKING
@@ -24,11 +24,9 @@ promises to be advantageous, it may be annotated in a code
comment.
Portability notes:
-* `std::size` is not available in C++98. Use the `array_length`
- template function in src/include/lib.h instead of `sizeof` and
- dividing. Types passed to template functions cannot be anonymous in
- C++98; in other words, the "tag" of a `struct` or `enum` type must not
- be empty.
+* `std::size` is not available in C++98. Use `countof()`, which is
+ provided by the gnulib module `stdcountof-h` and expected to be
+ standardized in C2y, instead of `sizeof` and dividing.
* C++98 lacks value initialization for array types.
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit