This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH] support: Define support_static_assert for use from C and C++


Florian Weimer wrote:
_Static_assert is reserved in C++ as well, so I don't want to touch it. The GCC headers might eventually use it in a way which is not strictly equivalent to static_assert.

If we don't care about the difference (what is it, by the way?), then something like this should work:

#ifndef __cplusplus
# define static_assert _Static_assert
#endif

since "static_assert" is not reserved in C.

I wish these committees would coordinate better....


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