Hi @swensontec,
I wanted to share a practical use case for your excellent map-macro library.
I’ve created a tiny header-only project called ezprintf (https://github.com/qxov/ezprintf). It provides explicit format-argument binding for standard printf based on your recursive MAP/MAP_LIST implementation.
Instead of separating a massive format string from its arguments, it allows syntax like this:
ezprintf(
"test ", _i32(10), "\n",
_x16("04", 123), ("A = %s\n", "asd")
);
How your library makes this possible:
- It automatically normalizes bare string literals into tuples via
MAP_LIST.
- It then uses
MAP to seamlessly isolate and concatenate all format strings into a single C string literal at compile time.
- Finally, it unpacks and places the remaining arguments right after the format string.
Just wanted to say a huge thank you for creating map-macro! It’s a fantastic piece of metaprogramming.
Feel free to close this issue whenever you like, as it's purely a "Show and Tell" to let you know how your work is being utilized in the wild.
Best regards,
Andrey
Hi @swensontec,
I wanted to share a practical use case for your excellent
map-macrolibrary.I’ve created a tiny header-only project called ezprintf (https://github.com/qxov/ezprintf). It provides explicit format-argument binding for standard
printfbased on your recursiveMAP/MAP_LISTimplementation.Instead of separating a massive format string from its arguments, it allows syntax like this:
How your library makes this possible:
MAP_LIST.MAPto seamlessly isolate and concatenate all format strings into a single C string literal at compile time.Just wanted to say a huge thank you for creating
map-macro! It’s a fantastic piece of metaprogramming.Feel free to close this issue whenever you like, as it's purely a "Show and Tell" to let you know how your work is being utilized in the wild.
Best regards,
Andrey