COMMS
Template library intended to help with implementation of communication protocols.
Loading...
Searching...
No Matches
include
comms
details
reverse_macro_args.h
1
//
2
// Copyright 2017 - 2024 (C). Alex Robenko. All rights reserved.
3
//
4
// This Source Code Form is subject to the terms of the Mozilla Public
5
// License, v. 2.0. If a copy of the MPL was not distributed with this
6
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
8
#pragma once
9
10
#include "macro_common.h"
11
12
13
//#define COMMS_DO_REVERSE_MACRO_ARGS_0()
14
#define COMMS_DO_REVERSE_MACRO_ARGS_1(n_) COMMS_EXPAND(n_)
15
#define COMMS_DO_REVERSE_MACRO_ARGS_2(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_1(__VA_ARGS__)) , COMMS_EXPAND(n_)
16
#define COMMS_DO_REVERSE_MACRO_ARGS_3(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_2(__VA_ARGS__)) , COMMS_EXPAND(n_)
17
#define COMMS_DO_REVERSE_MACRO_ARGS_4(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_3(__VA_ARGS__)) , COMMS_EXPAND(n_)
18
#define COMMS_DO_REVERSE_MACRO_ARGS_5(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_4(__VA_ARGS__)) , COMMS_EXPAND(n_)
19
#define COMMS_DO_REVERSE_MACRO_ARGS_6(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_5(__VA_ARGS__)) , COMMS_EXPAND(n_)
20
#define COMMS_DO_REVERSE_MACRO_ARGS_7(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_6(__VA_ARGS__)) , COMMS_EXPAND(n_)
21
#define COMMS_DO_REVERSE_MACRO_ARGS_8(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_7(__VA_ARGS__)) , COMMS_EXPAND(n_)
22
#define COMMS_DO_REVERSE_MACRO_ARGS_9(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_8(__VA_ARGS__)) , COMMS_EXPAND(n_)
23
#define COMMS_DO_REVERSE_MACRO_ARGS_10(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_9(__VA_ARGS__)) , COMMS_EXPAND(n_)
24
#define COMMS_DO_REVERSE_MACRO_ARGS_11(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_10(__VA_ARGS__)) , COMMS_EXPAND(n_)
25
#define COMMS_DO_REVERSE_MACRO_ARGS_12(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_11(__VA_ARGS__)) , COMMS_EXPAND(n_)
26
#define COMMS_DO_REVERSE_MACRO_ARGS_13(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_12(__VA_ARGS__)) , COMMS_EXPAND(n_)
27
#define COMMS_DO_REVERSE_MACRO_ARGS_14(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_13(__VA_ARGS__)) , COMMS_EXPAND(n_)
28
#define COMMS_DO_REVERSE_MACRO_ARGS_15(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_14(__VA_ARGS__)) , COMMS_EXPAND(n_)
29
#define COMMS_DO_REVERSE_MACRO_ARGS_16(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_15(__VA_ARGS__)) , COMMS_EXPAND(n_)
30
#define COMMS_DO_REVERSE_MACRO_ARGS_17(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_16(__VA_ARGS__)) , COMMS_EXPAND(n_)
31
#define COMMS_DO_REVERSE_MACRO_ARGS_18(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_17(__VA_ARGS__)) , COMMS_EXPAND(n_)
32
#define COMMS_DO_REVERSE_MACRO_ARGS_19(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_18(__VA_ARGS__)) , COMMS_EXPAND(n_)
33
#define COMMS_DO_REVERSE_MACRO_ARGS_20(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_19(__VA_ARGS__)) , COMMS_EXPAND(n_)
34
#define COMMS_DO_REVERSE_MACRO_ARGS_21(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_20(__VA_ARGS__)) , COMMS_EXPAND(n_)
35
#define COMMS_DO_REVERSE_MACRO_ARGS_22(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_21(__VA_ARGS__)) , COMMS_EXPAND(n_)
36
#define COMMS_DO_REVERSE_MACRO_ARGS_23(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_22(__VA_ARGS__)) , COMMS_EXPAND(n_)
37
#define COMMS_DO_REVERSE_MACRO_ARGS_24(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_23(__VA_ARGS__)) , COMMS_EXPAND(n_)
38
#define COMMS_DO_REVERSE_MACRO_ARGS_25(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_24(__VA_ARGS__)) , COMMS_EXPAND(n_)
39
#define COMMS_DO_REVERSE_MACRO_ARGS_26(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_25(__VA_ARGS__)) , COMMS_EXPAND(n_)
40
#define COMMS_DO_REVERSE_MACRO_ARGS_27(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_26(__VA_ARGS__)) , COMMS_EXPAND(n_)
41
#define COMMS_DO_REVERSE_MACRO_ARGS_28(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_27(__VA_ARGS__)) , COMMS_EXPAND(n_)
42
#define COMMS_DO_REVERSE_MACRO_ARGS_29(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_28(__VA_ARGS__)) , COMMS_EXPAND(n_)
43
#define COMMS_DO_REVERSE_MACRO_ARGS_30(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_29(__VA_ARGS__)) , COMMS_EXPAND(n_)
44
#define COMMS_DO_REVERSE_MACRO_ARGS_31(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_30(__VA_ARGS__)) , COMMS_EXPAND(n_)
45
#define COMMS_DO_REVERSE_MACRO_ARGS_32(n_, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_31(__VA_ARGS__)) , COMMS_EXPAND(n_)
46
47
#define COMMS_REVERSE_MACRO_ARGS_INTERNAL_(N, ...) COMMS_EXPAND(COMMS_DO_REVERSE_MACRO_ARGS_ ## N(__VA_ARGS__))
48
#define COMMS_REVERSE_MACRO_ARGS_INTERNAL(N, ...) COMMS_EXPAND(COMMS_REVERSE_MACRO_ARGS_INTERNAL_(N, __VA_ARGS__))
49
#define COMMS_REVERSE_MACRO_ARGS(...) \
50
COMMS_EXPAND(COMMS_REVERSE_MACRO_ARGS_INTERNAL(COMMS_NUM_ARGS(__VA_ARGS__), __VA_ARGS__))
51
52
53
54
55
56
57
58
59
60
61
62
63
Generated by
1.9.8