xref: /OK3568_Linux_fs/kernel/include/linux/const.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun #ifndef _LINUX_CONST_H
2*4882a593Smuzhiyun #define _LINUX_CONST_H
3*4882a593Smuzhiyun 
4*4882a593Smuzhiyun #include <vdso/const.h>
5*4882a593Smuzhiyun 
6*4882a593Smuzhiyun /*
7*4882a593Smuzhiyun  * This returns a constant expression while determining if an argument is
8*4882a593Smuzhiyun  * a constant expression, most importantly without evaluating the argument.
9*4882a593Smuzhiyun  * Glory to Martin Uecker <Martin.Uecker@med.uni-goettingen.de>
10*4882a593Smuzhiyun  */
11*4882a593Smuzhiyun #define __is_constexpr(x) \
12*4882a593Smuzhiyun 	(sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun #endif /* _LINUX_CONST_H */
15