Files
harfbuzz/src
Behdad EsfahbodandEbrahim c956a11cc7 [algs] Unify ARRAY_LENGTH with compile-time type information (#6539)
* [algs] Declare ARRAY_LENGTH also constexpr so can be used in static contexts

* [algs] Remove more use of ARRAY_LENGTH_CONST

And rename it to ARRAY_LENGTH_UNCHECKED so it will be more obvious
this is the last resort.

* [bit] Avoid use of ARRAY_LENGTH_UNCHECKED

* [algs] Move ARRAY_LENGTH_UNCHECKED to its only caller

* [algs] Return size_t from ARRAY_LENGTH

* [algs] Remove last use of ARRAY_LENGTH_UNCHECKED

* [algs] Use std::extent to get template parameter array length

It makes more sense I think.

* [algs] Make ARRAY_LENGTH usable through template reference parameters

Evaluating ARRAY_LENGTH on a reference parameter is not a constant
expression in C++11. Return std::integral_constant from a function
object so callers can extract the length from the return type without
evaluating the array expression. Ordinary calls still convert to size_t.

Use this form for all three Arabic fallback ligature table dimensions,
replacing std::extent. Document both forms and add compile-time checks
for ordinary calls, string literals, and nested template array arguments.

Validated with GCC and Clang C++11 syntax checks, a full Meson build,
and meson test -C build (296 passed, 1 skipped).

Assisted-by: OpenAI Codex

---------

Co-authored-by: Ebrahim <ebrahim@gnu.org>
2026-11-01 09:48:25 -07:00
..
2026-08-12 18:27:23 -06:00
2026-03-10 09:56:47 -03:00
2026-03-09 22:37:07 -06:00
2024-03-30 02:20:21 +02:00
2025-08-15 00:54:52 -06:00
2026-07-31 04:31:26 +03:00
2026-07-31 04:31:26 +03:00
2025-03-13 01:07:35 -06:00
…
2025-10-17 15:23:05 -06:00
2025-03-12 23:56:52 -06:00
…
2026-08-31 11:54:42 -06:00
2026-09-21 00:41:07 +03:00
2026-09-21 00:41:07 +03:00
2026-09-21 00:41:07 +03:00
2025-03-12 18:27:27 -06:00
2026-10-22 19:31:32 +03:00
2026-10-16 00:19:21 +03:00
2025-03-24 00:33:53 +02:00
2025-09-15 23:56:25 -06:00
…
…
2026-04-20 05:10:48 +02:00
2026-04-20 05:10:48 +02:00
2024-10-27 16:14:53 -07:00
…
2026-10-22 17:05:31 +03:00
2023-08-25 07:51:05 -06:00
2023-06-03 14:56:47 -06:00
2025-04-08 01:58:10 -06:00
2025-08-07 22:38:58 -06:00
2026-07-31 17:49:40 +03:00
2026-07-31 17:49:40 +03:00
2025-08-07 22:38:58 -06:00
2026-03-19 00:45:24 +02:00
2024-04-16 17:10:09 -06:00
2026-07-31 04:31:26 +03:00
2026-09-21 00:41:07 +03:00
2026-04-18 10:58:44 -06:00
2026-09-21 00:41:07 +03:00
2026-08-26 22:27:05 +03:00
2026-08-19 16:00:05 -06:00
2025-07-23 21:39:23 +03:00
2024-08-23 08:58:50 -06:00
2026-07-31 17:49:40 +03:00
2025-01-11 18:13:18 +02:00
2026-07-30 12:00:47 -06:00
2026-10-01 16:27:20 -06:00
2026-07-31 17:49:40 +03:00
…
2025-08-28 15:58:39 -06:00
2026-04-20 01:29:49 +02:00
2026-10-22 19:31:32 +03:00
2025-03-07 18:19:29 -07:00
2026-08-12 18:33:09 -06:00
…
2026-06-05 13:44:29 +02:00
…