[#BSLS_MACROREPEAT_COMMA]
= BSLS&lowbar;MACROREPEAT&lowbar;COMMA
:mrdocs:

Expand to `N` comma&hyphen;separated invocations of `MACRO`&period;

== Synopsis

Declared in `&lt;bsls&lowbar;macrorepeat&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
#define BSLS&lowbar;MACROREPEAT&lowbar;COMMA(N, MACRO)

----

== Description

Expand to `N` comma&hyphen;separated invocations of `MACRO(x)`, where `x` in each invocation is the next number in the sequence from `1` to `N`&period; If `N` is `0`, then the expansion is empty&period; For example `BSLS&lowbar;MACROREPEAT&lowbar;COMMA(3, XYZ)` expands to `XYZ(1), XYZ(2), XYZ(3)`&period; The behavior is undefined unless `N` is a decimal integer (or is a macro that expands to a decimal integer) in the range 0 to 20&period; Note that `MACRO` is typically a macro with one argument, but may also be a function or functor&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *N*
| number of repetitions in the range 0 to 20
| *MACRO*
| one&hyphen;argument macro, function, or functor to invoke
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
