From: Michal Krol Date: Thu, 19 May 2005 10:22:28 +0000 (+0000) Subject: add static_assert macro X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e5ff2b94ff16a05d4c5928a85199291e2e7f234e;p=mesa.git add static_assert macro --- diff --git a/src/mesa/shader/slang/slang_utility.h b/src/mesa/shader/slang/slang_utility.h index 6eb5369acd1..0240385e8d5 100644 --- a/src/mesa/shader/slang/slang_utility.h +++ b/src/mesa/shader/slang/slang_utility.h @@ -29,6 +29,8 @@ extern "C" { #endif +#define static_assert(expr) do { int _array[(expr) ? 1 : 0]; _array[0]; } while (0) + void slang_alloc_free (void *); void *slang_alloc_malloc (unsigned int); void *slang_alloc_realloc (void *, unsigned int, unsigned int);