guanaqo develop
Utilities for scientific software
Loading...
Searching...
No Matches
preprocessor.h File Reference

Detailed Description

Token concatenation and argument-counting helpers.

Definition in file preprocessor.h.

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GUANAQO_CONCATENATE_TOKENS_IMPL(a, b)
#define GUANAQO_CONCATENATE_TOKENS(a, b)
 Concatenate the given tokens.
#define GUANAQO_NUM_ARGS_IMPL(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...)
#define GUANAQO_NUM_ARGS(...)
#define GUANAQO_JOIN_TOKENS_ARGS_CHOOSER(N)
#define GUANAQO_JOIN_TOKENS(...)
 Join the given tokens with underscores.
#define GUANAQO_JOIN_TOKENS_ARGS_1(x1)
#define GUANAQO_JOIN_TOKENS_ARGS_2(x1, x2)
#define GUANAQO_JOIN_TOKENS_ARGS_3(x1, x2, x3)
#define GUANAQO_JOIN_TOKENS_ARGS_4(x1, x2, x3, x4)
#define GUANAQO_JOIN_TOKENS_ARGS_5(x1, x2, x3, x4, x5)
#define GUANAQO_JOIN_TOKENS_ARGS_6(x1, x2, x3, x4, x5, x6)
#define GUANAQO_JOIN_TOKENS_ARGS_7(x1, x2, x3, x4, x5, x6, x7)
#define GUANAQO_JOIN_TOKENS_ARGS_8(x1, x2, x3, x4, x5, x6, x7, x8)
#define GUANAQO_JOIN_TOKENS_ARGS_9(x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define GUANAQO_JOIN_TOKENS_ARGS_10(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define GUANAQO_JOIN_STRINGS_ARGS_CHOOSER(N)
#define GUANAQO_JOIN_STRINGS(sep, ...)
 Join the given strings with the given separator.
#define GUANAQO_JOIN_STRINGS_ARGS_1(sep, x1)
#define GUANAQO_JOIN_STRINGS_ARGS_2(sep, x1, x2)
#define GUANAQO_JOIN_STRINGS_ARGS_3(sep, x1, x2, x3)
#define GUANAQO_JOIN_STRINGS_ARGS_4(sep, x1, x2, x3, x4)
#define GUANAQO_JOIN_STRINGS_ARGS_5(sep, x1, x2, x3, x4, x5)
#define GUANAQO_JOIN_STRINGS_ARGS_6(sep, x1, x2, x3, x4, x5, x6)
#define GUANAQO_JOIN_STRINGS_ARGS_7(sep, x1, x2, x3, x4, x5, x6, x7)
#define GUANAQO_JOIN_STRINGS_ARGS_8(sep, x1, x2, x3, x4, x5, x6, x7, x8)
#define GUANAQO_JOIN_STRINGS_ARGS_9(sep, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#define GUANAQO_JOIN_STRINGS_ARGS_10(sep, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
#define GUANAQO_NOOP()
 A no-op statement (swallows a semicolon without causing warnings about empty statements).

Macro Definition Documentation

◆ GUANAQO_CONCATENATE_TOKENS_IMPL

#define GUANAQO_CONCATENATE_TOKENS_IMPL ( a,
b )
Value:
a##b

Definition at line 8 of file preprocessor.h.

◆ GUANAQO_NUM_ARGS_IMPL

#define GUANAQO_NUM_ARGS_IMPL ( _1,
_2,
_3,
_4,
_5,
_6,
_7,
_8,
_9,
_10,
N,
... )
Value:
N

Definition at line 14 of file preprocessor.h.

◆ GUANAQO_NUM_ARGS

#define GUANAQO_NUM_ARGS ( ...)
Value:
GUANAQO_NUM_ARGS_IMPL(__VA_ARGS__, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)
#define GUANAQO_NUM_ARGS_IMPL(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N,...)

Definition at line 15 of file preprocessor.h.

◆ GUANAQO_JOIN_TOKENS_ARGS_CHOOSER

#define GUANAQO_JOIN_TOKENS_ARGS_CHOOSER ( N)
Value:
GUANAQO_CONCATENATE_TOKENS(GUANAQO_JOIN_TOKENS_ARGS_, N)
#define GUANAQO_CONCATENATE_TOKENS(a, b)
Concatenate the given tokens.

Definition at line 19 of file preprocessor.h.

◆ GUANAQO_JOIN_TOKENS_ARGS_1

#define GUANAQO_JOIN_TOKENS_ARGS_1 ( x1)
Value:
x1

Definition at line 28 of file preprocessor.h.

◆ GUANAQO_JOIN_TOKENS_ARGS_2

#define GUANAQO_JOIN_TOKENS_ARGS_2 ( x1,
x2 )
Value:
x1##_##x2

Definition at line 29 of file preprocessor.h.

◆ GUANAQO_JOIN_TOKENS_ARGS_3

#define GUANAQO_JOIN_TOKENS_ARGS_3 ( x1,
x2,
x3 )
Value:
x1##_##x2##_##x3

Definition at line 30 of file preprocessor.h.

◆ GUANAQO_JOIN_TOKENS_ARGS_4

#define GUANAQO_JOIN_TOKENS_ARGS_4 ( x1,
x2,
x3,
x4 )
Value:
x1##_##x2##_##x3##_##x4

Definition at line 31 of file preprocessor.h.

◆ GUANAQO_JOIN_TOKENS_ARGS_5

#define GUANAQO_JOIN_TOKENS_ARGS_5 ( x1,
x2,
x3,
x4,
x5 )
Value:
x1##_##x2##_##x3##_##x4##_##x5

Definition at line 32 of file preprocessor.h.

◆ GUANAQO_JOIN_TOKENS_ARGS_6

#define GUANAQO_JOIN_TOKENS_ARGS_6 ( x1,
x2,
x3,
x4,
x5,
x6 )
Value:
x1##_##x2##_##x3##_##x4##_##x5##_##x6

Definition at line 33 of file preprocessor.h.

◆ GUANAQO_JOIN_TOKENS_ARGS_7

#define GUANAQO_JOIN_TOKENS_ARGS_7 ( x1,
x2,
x3,
x4,
x5,
x6,
x7 )
Value:
x1##_##x2##_##x3##_##x4##_##x5##_##x6##_##x7

Definition at line 34 of file preprocessor.h.

◆ GUANAQO_JOIN_TOKENS_ARGS_8

#define GUANAQO_JOIN_TOKENS_ARGS_8 ( x1,
x2,
x3,
x4,
x5,
x6,
x7,
x8 )
Value:
x1##_##x2##_##x3##_##x4##_##x5##_##x6##_##x7##_##x8

Definition at line 35 of file preprocessor.h.

◆ GUANAQO_JOIN_TOKENS_ARGS_9

#define GUANAQO_JOIN_TOKENS_ARGS_9 ( x1,
x2,
x3,
x4,
x5,
x6,
x7,
x8,
x9 )
Value:
x1##_##x2##_##x3##_##x4##_##x5##_##x6##_##x7##_##x8##_##x9

Definition at line 36 of file preprocessor.h.

◆ GUANAQO_JOIN_TOKENS_ARGS_10

#define GUANAQO_JOIN_TOKENS_ARGS_10 ( x1,
x2,
x3,
x4,
x5,
x6,
x7,
x8,
x9,
x10 )
Value:
x1##_##x2##_##x3##_##x4##_##x5##_##x6##_##x7##_##x8##_##x9##_##x10

Definition at line 37 of file preprocessor.h.

◆ GUANAQO_JOIN_STRINGS_ARGS_CHOOSER

#define GUANAQO_JOIN_STRINGS_ARGS_CHOOSER ( N)
Value:
GUANAQO_CONCATENATE_TOKENS(GUANAQO_JOIN_STRINGS_ARGS_, N)

Definition at line 41 of file preprocessor.h.

◆ GUANAQO_JOIN_STRINGS_ARGS_1

#define GUANAQO_JOIN_STRINGS_ARGS_1 ( sep,
x1 )
Value:
#x1

Definition at line 51 of file preprocessor.h.

◆ GUANAQO_JOIN_STRINGS_ARGS_2

#define GUANAQO_JOIN_STRINGS_ARGS_2 ( sep,
x1,
x2 )
Value:
#x1 sep #x2

Definition at line 52 of file preprocessor.h.

◆ GUANAQO_JOIN_STRINGS_ARGS_3

#define GUANAQO_JOIN_STRINGS_ARGS_3 ( sep,
x1,
x2,
x3 )
Value:
#x1 sep #x2 sep #x3

Definition at line 53 of file preprocessor.h.

◆ GUANAQO_JOIN_STRINGS_ARGS_4

#define GUANAQO_JOIN_STRINGS_ARGS_4 ( sep,
x1,
x2,
x3,
x4 )
Value:
#x1 sep #x2 sep #x3 sep #x4

Definition at line 54 of file preprocessor.h.

◆ GUANAQO_JOIN_STRINGS_ARGS_5

#define GUANAQO_JOIN_STRINGS_ARGS_5 ( sep,
x1,
x2,
x3,
x4,
x5 )
Value:
#x1 sep #x2 sep #x3 sep #x4 sep #x5

Definition at line 55 of file preprocessor.h.

◆ GUANAQO_JOIN_STRINGS_ARGS_6

#define GUANAQO_JOIN_STRINGS_ARGS_6 ( sep,
x1,
x2,
x3,
x4,
x5,
x6 )
Value:
#x1 sep #x2 sep #x3 sep #x4 sep #x5 sep #x6

Definition at line 56 of file preprocessor.h.

◆ GUANAQO_JOIN_STRINGS_ARGS_7

#define GUANAQO_JOIN_STRINGS_ARGS_7 ( sep,
x1,
x2,
x3,
x4,
x5,
x6,
x7 )
Value:
#x1 sep #x2 sep #x3 sep #x4 sep #x5 sep #x6 sep #x7

Definition at line 57 of file preprocessor.h.

◆ GUANAQO_JOIN_STRINGS_ARGS_8

#define GUANAQO_JOIN_STRINGS_ARGS_8 ( sep,
x1,
x2,
x3,
x4,
x5,
x6,
x7,
x8 )
Value:
#x1 sep #x2 sep #x3 sep #x4 sep #x5 sep #x6 sep #x7 sep #x8

Definition at line 58 of file preprocessor.h.

◆ GUANAQO_JOIN_STRINGS_ARGS_9

#define GUANAQO_JOIN_STRINGS_ARGS_9 ( sep,
x1,
x2,
x3,
x4,
x5,
x6,
x7,
x8,
x9 )
Value:
#x1 sep #x2 sep #x3 sep #x4 sep #x5 sep #x6 sep #x7 sep #x8 sep #x9

Definition at line 59 of file preprocessor.h.

◆ GUANAQO_JOIN_STRINGS_ARGS_10

#define GUANAQO_JOIN_STRINGS_ARGS_10 ( sep,
x1,
x2,
x3,
x4,
x5,
x6,
x7,
x8,
x9,
x10 )
Value:
#x1 sep #x2 sep #x3 sep #x4 sep #x5 sep #x6 sep #x7 sep #x8 sep #x9 sep #x10

Definition at line 60 of file preprocessor.h.