I was wondering if this was somehow possible:

#define RTE_VERIFY(exp) do { \
+       if (__rte_constant(exp)) \
+               FAIL_AT_BUILD_TIME(); \
        if (unlikely(!(exp))) \
                rte_panic("line %d\tassert \"%s\" failed\n", __LINE__, #exp); \
} while (0)

I tried static_assert(), but it cannot be used in this way.

-Morten

Reply via email to