[PATCH v2] <sys/param.h>: Add nitems() and snitems() macros

Jonathan Wakely jwakely@redhat.com
Fri Sep 25 17:42:52 GMT 2020


On 25/09/20 18:30 +0200, Alejandro Colomar via Libstdc++ wrote:
>I have a similar number of ARRAY_SIZE() and ARRAY_SSIZE().
>I could have '#define snitems(arr) ((ptrdiff_t)nitems(arr))' in my projects,
>but is it really necessary?

The barrier for adding something to glibc headers should be a LOT
higher than "I could [do it in my own code], but is it really
necessary?"

>Did I convince you? :-)

No.




More information about the Libstdc++ mailing list