xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
add_last_arg_to_command.h
Go to the documentation of this file.
1 #pragma once
5 
6 #ifndef add_last_arg_to_command_
7 #define __add_last_arg_to_command1_args__(command, last_arg, arg1) command(arg1, last_arg)
9 #define __add_last_arg_to_command2_args__(command, last_arg, arg1, arg2) command(arg1, arg2, last_arg)
10 #define __add_last_arg_to_command3_args__(command, last_arg, arg1, arg2, arg3) command(arg1, arg2, arg3, last_arg)
11 #define __add_last_arg_to_command4_args__(command, last_arg, arg1, arg2, arg3, arg4) command(arg1, arg2, arg3, arg4, last_arg)
12 #define __add_last_arg_to_command5_args__(command, last_arg, arg1, arg2, arg3, arg4, arg5) command(arg1, arg2, arg3, arg4, arg5, last_arg)
13 #define __add_last_arg_to_command6_args__(command, last_arg, arg1, arg2, arg3, arg4, arg5, arg6) command(arg1, arg2, arg3, arg4, arg5, arg6, last_arg)
14 #define __add_last_arg_to_command7_args__(command, last_arg, arg1, arg2, arg3, arg4, arg5, arg6, arg7) command(arg1, arg2, arg3, arg4, arg5, arg6, arg7, last_arg)
15 #define __add_last_arg_to_command8_args__(command, last_arg, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) command(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, last_arg)
16 #define __add_last_arg_to_command9_args__(command, last_arg, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) command(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, last_arg)
17 #define __add_last_arg_to_command10_args__(command, last_arg, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) command(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, last_arg)
18 #define __get_add_last_arg_to_command_maximum_args__(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, ...) arg11
19 #define __add_last_arg_to_command_chooser__(command, last_arg, ...) __get_add_last_arg_to_command_maximum_args__(__VA_ARGS__, __add_last_arg_to_command10_args__, __add_last_arg_to_command9_args__, __add_last_arg_to_command8_args__, __add_last_arg_to_command7_args__, __add_last_arg_to_command6_args__, __add_last_arg_to_command5_args__, __add_last_arg_to_command4_args__, __add_last_arg_to_command3_args__, __add_last_arg_to_command2_args__, __add_last_arg_to_command1_args__, )
20 
34 #define add_last_arg_to_command_(command, last_arg, ...) \
35  __add_last_arg_to_command_chooser__(command, last_arg, __VA_ARGS__)(command, last_arg, __VA_ARGS__)
36 #endif