summaryrefslogtreecommitdiffstats
path: root/spec/rtems/basedefs/if/static-assert.yml
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rtems/basedefs/if/static-assert.yml')
-rw-r--r--spec/rtems/basedefs/if/static-assert.yml41
1 files changed, 41 insertions, 0 deletions
diff --git a/spec/rtems/basedefs/if/static-assert.yml b/spec/rtems/basedefs/if/static-assert.yml
new file mode 100644
index 00000000..fd95fc0a
--- /dev/null
+++ b/spec/rtems/basedefs/if/static-assert.yml
@@ -0,0 +1,41 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+brief: |
+ Asserts at compile time that the specified condition is satisfied.
+copyrights:
+- Copyright (C) 2011, 2020 embedded brains GmbH (http://www.embedded-brains.de)
+definition:
+ default: |
+ struct rtems_static_assert_ ## _msg
+ { int rtems_static_assert_ ## _msg : (_cond) ? 1 : -1; }
+ variants:
+ - definition: |
+ static_assert(_cond, # _msg)
+ enabled-by:
+ - ${/compiler/if/cplusplus:/name} >= 201103L
+ - definition: |
+ _Static_assert(_cond, # _msg)
+ enabled-by:
+ - ${/compiler/if/stdc-version:/name} >= 201112L
+description: null
+enabled-by: true
+interface-type: macro
+links:
+- role: interface-placement
+ uid: header
+- role: interface-ingroup
+ uid: group
+name: RTEMS_STATIC_ASSERT
+notes: null
+params:
+- description: |
+ is the condition this static assertion shall satisfy.
+ dir: null
+ name: _cond
+- description: |
+ is the error message in case the static assertion fails.
+ dir: null
+ name: _msg
+return:
+ return: null
+ return-values: []
+type: interface