Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 22 Sep 2020 11:16:09 +0200
From: Florian Weimer <>
To: Jonathan Wakely <>
Cc: Alejandro Colomar <>,,,,
  Libc-alpha <>
Subject: Re: Re: Expose 'array_length()' macro in <sys/param.h>

* Jonathan Wakely:

>>#  define array_length(arr)	(std:size(arr))
> C++ programmers will not accept a macro for this.

I think we need a macro for C++98 support because there is no other way
to produce constant expression.

Note that this intended for C programs compiled in C++ mode.  As pointed
out, new C++ code should rather use std::size.

Red Hat GmbH, , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.