|
Message-ID: <CAFk2RUbEtvgFb_FZmcM9L4-g1kG_E7S2p9gveM0Z5Fe=zEDm9w@mail.gmail.com> Date: Tue, 22 Sep 2020 01:13:57 +0300 From: Ville Voutilainen <ville.voutilainen@...il.com> To: Jonathan Wakely <jwakely@...hat.com> Cc: Alejandro Colomar <colomar.6.4.3@...il.com>, Florian Weimer <fweimer@...hat.com>, gcc@....gnu.org, "libstdc++" <libstdc++@....gnu.org>, Libc-alpha <libc-alpha@...rceware.org>, libc-coord@...ts.openwall.com Subject: Re: Expose 'array_length()' macro in <sys/param.h> On Tue, 22 Sep 2020 at 01:07, Jonathan Wakely via Libstdc++ <libstdc++@....gnu.org> wrote: > ># define array_length(arr) (std:size(arr)) > > C++ programmers will not accept a macro for this. ..in other words, the C++17 version of it needs to be an inline function that returns std::size of an array, not a macro. All C++ versions need to be functions, and there should not be any #defines in any of the C++ code. Why should this be array_length and not __array_length? This is a vendor extension, so it should use a name that is reserved for such?
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.