[libc-coord] Re: Expose 'array_length()' macro in <sys/param.h>
Florian Weimer
fweimer@redhat.com
Tue Sep 22 09:16:09 GMT 2020
* 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.
Thanks,
Florian
--
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill
More information about the Libc-alpha
mailing list