From f934a0ea093ef7ed408b82fb0c1e1c905846de2c Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 16 Oct 2015 13:27:28 -0400 Subject: Improve fallback static_assert implementation --- floattypes.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/floattypes.h b/floattypes.h index f3c1af6..5107af6 100644 --- a/floattypes.h +++ b/floattypes.h @@ -40,7 +40,11 @@ namespace vml_std { #include #ifndef static_assert -# define static_assert(cond, msg) +# define VML_CONCAT2(x, y) x##y +# define VML_CONCAT(x, y) VML_CONCAT2(x, y) +# define static_assert(cond, msg) \ + typedef int VML_CONCAT(vml_static_assert_, __LINE__)[(cond) ? 1 : -1] \ + __attribute__((__unused__)) #endif -- cgit v1.1