blob: 435ddd72d2c464fdedd33889190009dde0a3bda9 [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001#ifndef _LINUX_CONST_H
2#define _LINUX_CONST_H
3
Olivier Deprez157378f2022-04-04 15:47:50 +02004#include <vdso/const.h>
David Brazdil0f672f62019-12-10 10:32:29 +00005
Olivier Deprez157378f2022-04-04 15:47:50 +02006/*
7 * This returns a constant expression while determining if an argument is
8 * a constant expression, most importantly without evaluating the argument.
9 * Glory to Martin Uecker <Martin.Uecker@med.uni-goettingen.de>
10 */
11#define __is_constexpr(x) \
12 (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
David Brazdil0f672f62019-12-10 10:32:29 +000013
14#endif /* _LINUX_CONST_H */