Skip to content

Commit 7efa2e3

Browse files
committed
Reformulation of README paragraph
1 parent 524e612 commit 7efa2e3

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,15 @@ vcpkg install dbg-macro
9393

9494
### Multiple arguments
9595

96-
Passing multiple arguments to the `dbg()` macro would just work. The output of
97-
`dbg(x, y)` is same as `dbg(x); dbg(y)`. If there are unprotected commas,
98-
please wrap them with parenthesis.
96+
You can pass multiple arguments to the `dbg(…)` macro. The output of
97+
`dbg(x, y, z)` is same as `dbg(x); dbg(y); dbg(z);`:
98+
``` c++
99+
dbg(42, "hello world", false);
100+
```
99101
102+
Note that you have to wrap "unprotected commas" in parentheses:
100103
```c++
101-
dbg(42, "hello world");
102-
dbg(1, (std::vector<int>{2, 3, 4}), 5);
104+
dbg("a vector:", (std::vector<int>{2, 3, 4}));
103105
```
104106

105107
### Hexadecimal, octal and binary format

0 commit comments

Comments
 (0)