summaryrefslogtreecommitdiffstats
path: root/spec/rtems/basedefs/if/static-assert.yml
blob: 152cd2917cc5a260ae7ee28f4c2851cede964430 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
brief: |
  Asserts at compile time that the condition is satisfied.
copyrights:
- Copyright (C) 2011, 2020 embedded brains GmbH & Co. KG
definition:
  default:
    attributes: null
    body: |
      struct rtems_static_assert_ ## ${.:/params[1]/name}
        { int rtems_static_assert_ ## ${.:/params[1]/name} : ( ${.:/params[0]/name} ) ? 1 : -1; }
    params: []
    return: null
  variants:
  - definition:
      attributes: null
      body: |
        static_assert( ${.:/params[0]/name}, # ${.:/params[1]/name} )
      params: []
      return: null
    enabled-by:
    - ${/compiler/if/cplusplus:/name} >= 201103L
  - definition:
      attributes: null
      body: |
        _Static_assert( ${.:/params[0]/name}, # ${.:/params[1]/name} )
      params: []
      return: null
    enabled-by:
    - ${/compiler/if/stdc-version:/name} >= 201112L
description: null
enabled-by: true
index-entries: []
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: null
type: interface