Blender V4.3
static_assert.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5/* clang-format off */
6
7/* #define static_assert triggers a bug in some clang-format versions, disable
8 * format for entire file to keep results consistent. */
9
10#ifndef __UTIL_STATIC_ASSERT_H__
11#define __UTIL_STATIC_ASSERT_H__
12
14
15#if defined(CYCLES_CUBIN_CC)
16# define static_assert(statement, message)
17#endif
18
19#define static_assert_align(st, align) \
20 static_assert((sizeof(st) % (align) == 0), "Structure must be strictly aligned") // NOLINT
21
23
24#endif /* __UTIL_STATIC_ASSERT_H__ */
#define CCL_NAMESPACE_END