DART 6.13.2
Loading...
Searching...
No Matches
Macros.hpp File Reference
#include <cassert>
#include "dart/common/Logging.hpp"

Go to the source code of this file.

Macros

#define DETAIL_DART_NUM_ARGS(z, a, b, c, d, e, f, cnt, ...)   cnt
 
#define DART_NUM_ARGS(...)    DETAIL_DART_NUM_ARGS(, ##__VA_ARGS__, 6, 5, 4, 3, 2, 1, 0)
 
#define DETAIL_DART_CONCAT(a, b)   a##b
 
#define DART_CONCAT(a, b)   DETAIL_DART_CONCAT(a, b)
 
#define DETAIL_DART_UNUSED_0()
 
#define DETAIL_DART_UNUSED_1(a)   (void)(a)
 
#define DETAIL_DART_UNUSED_2(a, b)   (void)(a), DETAIL_DART_UNUSED_1(b)
 
#define DETAIL_DART_UNUSED_3(a, b, c)   (void)(a), DETAIL_DART_UNUSED_2(b, c)
 
#define DETAIL_DART_UNUSED_4(a, b, c, d)    (void)(a), DETAIL_DART_UNUSED_3(b, c, d)
 
#define DETAIL_DART_UNUSED_5(a, b, c, d, e)    (void)(a), DETAIL_DART_UNUSED_4(b, c, d, e)
 
#define DETAIL_DART_UNUSED_6(a, b, c, d, e, f)    (void)(a), DETAIL_DART_UNUSED_5(b, c, d, e, f)
 
#define DART_UNUSED(...)    DART_CONCAT(DETAIL_DART_UNUSED_, DART_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__)
 
#define DETAIL_DART_ASSERT_1(condition)   assert(condition)
 
#define DETAIL_DART_ASSERT_2(condition, message)   assert((condition) && #message)
 
#define DART_ASSERT(...)
 
#define DART_NOT_IMPLEMENTED
 

Macro Definition Documentation

◆ DART_ASSERT

#define DART_ASSERT (   ...)
Value:
DART_CONCAT(DETAIL_DART_ASSERT_, DART_NUM_ARGS(__VA_ARGS__)) \
(__VA_ARGS__)
#define DART_NUM_ARGS(...)
Definition Macros.hpp:42
#define DART_CONCAT(a, b)
Definition Macros.hpp:47

◆ DART_CONCAT

#define DART_CONCAT (   a,
 
)    DETAIL_DART_CONCAT(a, b)

◆ DART_NOT_IMPLEMENTED

#define DART_NOT_IMPLEMENTED
Value:
DART_FATAL("Not implemented: {}:{}", __FILE__, __LINE__); \
void(0)
#define DART_FATAL(...)
Definition Logging.hpp:82

◆ DART_NUM_ARGS

#define DART_NUM_ARGS (   ...)     DETAIL_DART_NUM_ARGS(, ##__VA_ARGS__, 6, 5, 4, 3, 2, 1, 0)

◆ DART_UNUSED

#define DART_UNUSED (   ...)     DART_CONCAT(DETAIL_DART_UNUSED_, DART_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__)

◆ DETAIL_DART_ASSERT_1

#define DETAIL_DART_ASSERT_1 (   condition)    assert(condition)

◆ DETAIL_DART_ASSERT_2

#define DETAIL_DART_ASSERT_2 (   condition,
  message 
)    assert((condition) && #message)

◆ DETAIL_DART_CONCAT

#define DETAIL_DART_CONCAT (   a,
 
)    a##b

◆ DETAIL_DART_NUM_ARGS

#define DETAIL_DART_NUM_ARGS (   z,
  a,
  b,
  c,
  d,
  e,
  f,
  cnt,
  ... 
)    cnt

◆ DETAIL_DART_UNUSED_0

#define DETAIL_DART_UNUSED_0 ( )

◆ DETAIL_DART_UNUSED_1

#define DETAIL_DART_UNUSED_1 (   a)    (void)(a)

◆ DETAIL_DART_UNUSED_2

#define DETAIL_DART_UNUSED_2 (   a,
 
)    (void)(a), DETAIL_DART_UNUSED_1(b)

◆ DETAIL_DART_UNUSED_3

#define DETAIL_DART_UNUSED_3 (   a,
  b,
 
)    (void)(a), DETAIL_DART_UNUSED_2(b, c)

◆ DETAIL_DART_UNUSED_4

#define DETAIL_DART_UNUSED_4 (   a,
  b,
  c,
 
)     (void)(a), DETAIL_DART_UNUSED_3(b, c, d)

◆ DETAIL_DART_UNUSED_5

#define DETAIL_DART_UNUSED_5 (   a,
  b,
  c,
  d,
 
)     (void)(a), DETAIL_DART_UNUSED_4(b, c, d, e)

◆ DETAIL_DART_UNUSED_6

#define DETAIL_DART_UNUSED_6 (   a,
  b,
  c,
  d,
  e,
 
)     (void)(a), DETAIL_DART_UNUSED_5(b, c, d, e, f)