This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] support: Define support_static_assert for use from C and C++
On 12/31/2017 09:25 PM, Paul Eggert wrote:
Florian Weimer wrote:
+/* Static assertion, under a common name for both C++ and C11. */
+# define support_static_assert static_assert
+# define support_static_assert _Static_assert
Wouldn't it be simpler to do this?
# define _Static_assert static_assert
and then use _Static_assert everywhere? Or do it the other way around.
It seems odd to introduce yet another name "support_static_assert" for
_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. I don't feel very strongly about this, though.