Loading...
Searching...
No Matches
Go to the documentation of this file.
33#ifndef DART_COMMON_MACROS_HPP_
34#define DART_COMMON_MACROS_HPP_
41#define DETAIL_DART_NUM_ARGS(z, a, b, c, d, e, f, cnt, ...) cnt
42#define DART_NUM_ARGS(...) \
43 DETAIL_DART_NUM_ARGS(, ##__VA_ARGS__, 6, 5, 4, 3, 2, 1, 0)
46#define DETAIL_DART_CONCAT(a, b) a##b
47#define DART_CONCAT(a, b) DETAIL_DART_CONCAT(a, b)
53#define DETAIL_DART_UNUSED_0()
54#define DETAIL_DART_UNUSED_1(a) (void)(a)
55#define DETAIL_DART_UNUSED_2(a, b) (void)(a), DETAIL_DART_UNUSED_1(b)
56#define DETAIL_DART_UNUSED_3(a, b, c) (void)(a), DETAIL_DART_UNUSED_2(b, c)
57#define DETAIL_DART_UNUSED_4(a, b, c, d) \
58 (void)(a), DETAIL_DART_UNUSED_3(b, c, d)
59#define DETAIL_DART_UNUSED_5(a, b, c, d, e) \
60 (void)(a), DETAIL_DART_UNUSED_4(b, c, d, e)
61#define DETAIL_DART_UNUSED_6(a, b, c, d, e, f) \
62 (void)(a), DETAIL_DART_UNUSED_5(b, c, d, e, f)
63#define DART_UNUSED(...) \
64 DART_CONCAT(DETAIL_DART_UNUSED_, DART_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__)
67#define DETAIL_DART_ASSERT_1(condition) assert(condition)
68#define DETAIL_DART_ASSERT_2(condition, message) assert((condition) && #message)
69#define DART_ASSERT(...) \
70 DART_CONCAT(DETAIL_DART_ASSERT_, DART_NUM_ARGS(__VA_ARGS__)) \
74#define DART_NOT_IMPLEMENTED \
75 DART_FATAL("Not implemented: {}:{}", __FILE__, __LINE__); \