Commit c720c8a3 authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Ben Walker
Browse files

assert.h: document SPDK_STATIC_ASSERT



The Doxygen build does not define static_assert, so the doc comment
needs to be on the definition under the #else branch.

Change-Id: Ib05ddc729c274810d2963716995ac7c9ce68896b
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent f1a9afa9
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -47,6 +47,14 @@ extern "C" {
#ifdef static_assert
#define SPDK_STATIC_ASSERT(cond, msg) static_assert(cond, msg)
#else
/**
 * Compatibility wrapper for static_assert.
 *
 * This won't actually enforce the condition when compiled with an environment that doesn't support
 * C11 static_assert; it is only intended to allow end users with old compilers to build the package.
 *
 * Developers should use a recent compiler that provides static_assert.
 */
#define SPDK_STATIC_ASSERT(cond, msg)
#endif