`throw` in C++20's `consteval` function results in an ill-formed
program. Useful as parameters of such functions aren't const-
expressions, and thus are unsuitable for `static_assert`.
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
? _CEPH_ASSERT_VOID_CAST (0) \
: ::ceph::__ceph_assertf_fail (__STRING(expr), __FILE__, __LINE__, __CEPH_ASSERT_FUNCTION, __VA_ARGS__))
+#define consteval_assert(expr, msg) \
+ do { \
+ if (!(expr)) { \
+ throw (msg); \
+ } \
+ } while(false)
#endif