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