This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Hide _S_n_primes from user code


On 22/04/15 22:11 +0200, François Dumont wrote:
+    constexpr auto __n_primes
+      = sizeof(__prime_list) / sizeof(unsigned long) - 1;

Normally I'd say

       sizeof(__prime_list) / sizeof(*__prime_list) - 1

would be better, but since it's very unlikely we'll change the element
type in the array what you have should be safe.

OK for trunk.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]