Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
a062f94a
Commit
a062f94a
authored
Jun 24, 2014
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Workaround a bug in VC++ variadic macro implementation.
parent
302b8f44
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
format.h
format.h
+10
-9
No files found.
format.h
View file @
a062f94a
...
...
@@ -2099,31 +2099,32 @@ inline void FormatDec(char *&buffer, T value) {
#define FMT_CONCATENATE1(arg1, arg2) FMT_CONCATENATE2(arg1, arg2)
#define FMT_CONCATENATE2(arg1, arg2) arg1##arg2
#define FMT_EXPAND(args) args
#define FMT_FOR_EACH_1(func, x, ...) func(x, 1)
#define FMT_FOR_EACH_2(func, x, ...) \
func(x, 2), FMT_
FOR_EACH_1(func, __VA_ARGS__
)
func(x, 2), FMT_
EXPAND(FMT_FOR_EACH_1(func, __VA_ARGS__)
)
#define FMT_FOR_EACH_3(func, x, ...) \
func(x, 3), FMT_
FOR_EACH_2(func, __VA_ARGS__
)
func(x, 3), FMT_
EXPAND(FMT_FOR_EACH_2(func, __VA_ARGS__)
)
#define FMT_FOR_EACH_4(func, x, ...) \
func(x, 4), FMT_
FOR_EACH_3(func, __VA_ARGS__
)
func(x, 4), FMT_
EXPAND(FMT_FOR_EACH_3(func, __VA_ARGS__)
)
#define FMT_FOR_EACH_5(func, x, ...) \
func(x, 5), FMT_
FOR_EACH_4(func, __VA_ARGS__
)
func(x, 5), FMT_
EXPAND(FMT_FOR_EACH_4(func, __VA_ARGS__)
)
#define FMT_FOR_EACH_6(func, x, ...) \
func(x, 6), FMT_
FOR_EACH_5(func, __VA_ARGS__
)
func(x, 6), FMT_
EXPAND(FMT_FOR_EACH_5(func, __VA_ARGS__)
)
#define FMT_FOR_EACH_7(func, x, ...) \
func(x, 7), FMT_
FOR_EACH_6(func, __VA_ARGS__
)
func(x, 7), FMT_
EXPAND(FMT_FOR_EACH_6(func, __VA_ARGS__)
)
#define FMT_FOR_EACH_8(func, x, ...) \
func(x, 8), FMT_
FOR_EACH_7(func, __VA_ARGS__
)
func(x, 8), FMT_
EXPAND(FMT_FOR_EACH_7(func, __VA_ARGS__)
)
#define FMT_FOR_EACH_NARG(...) FMT_FOR_EACH_NARG_(__VA_ARGS__, FMT_FOR_EACH_RSEQ_N())
#define FMT_FOR_EACH_NARG_(...) FMT_
FOR_EACH_ARG_N(__VA_ARGS__
)
#define FMT_FOR_EACH_NARG_(...) FMT_
EXPAND(FMT_FOR_EACH_ARG_N(__VA_ARGS__)
)
#define FMT_FOR_EACH_ARG_N(_1, _2, _3, _4, _5, _6, _7, _8, N, ...) N
#define FMT_FOR_EACH_RSEQ_N() 8, 7, 6, 5, 4, 3, 2, 1, 0
#define FMT_FOR_EACH_(N, func, ...) \
FMT_CONCATENATE(FMT_FOR_EACH_, N)(func, __VA_ARGS__)
#define FMT_FOR_EACH(func, ...) \
FMT_
FOR_EACH_(FMT_FOR_EACH_NARG(__VA_ARGS__), func, __VA_ARGS__
)
FMT_
EXPAND(FMT_FOR_EACH_(FMT_FOR_EACH_NARG(__VA_ARGS__), func, __VA_ARGS__)
)
#define FMT_ADD_ARG_NAME(type, index) type arg##index
#define FMT_GET_ARG_NAME(type, index) arg##index
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment