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: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2017-01-04 14:59:44 -07:00 committed by Ben Walker
parent f1a9afa9fc
commit c720c8a342

View File

@ -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