bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: proposed support for C1X-style static_assert


From: Bruno Haible
Subject: Re: proposed support for C1X-style static_assert
Date: Thu, 5 May 2011 10:10:21 +0200
User-agent: KMail/1.9.9

Hi Paul,

> it's also nice to support the standard syntax.

Nice work, thanks. Just three remarks:

- A doc update of doc/posix-headers/assert.texi would be useful.

- Use of __ prefixed identifiers:
> +  struct __gl_verify_type {
> ...
> +       int __gl_dummy;                          \
> ...
> +     struct { unsigned int __gl_verify_error_if_negative: (R) ? 1 : -1; }

  Identifiers starting with __ are in the namespace of compiler and libc
  implementation. We've been using identifiers starting with _gl_ in
  gnulib for many years, with success: no collisions with compiler
  internals nor with third-party libraries and programs have appeared.
  Why change that? I would continue to consistently prefix gnulib
  internals with _gl_ (or _GL_ for the macros).

- Can the new static_assert be used in an ISO C++ compatible way [1], that is,
  as a member declaration in a struct or class? If not, a comment should
  indicate this limitation. (I haven't tested it.)

Bruno

[1] http://lists.gnu.org/archive/html/bug-gnulib/2011-04/msg00104.html
-- 
In memoriam Peter van Pels <http://en.wikipedia.org/wiki/Peter_van_Pels>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]