Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifdef DEBUG
- #define macro(labmda) \
- do { \
- labmda; \
- } while (0)
- #define macro_call(labmda) \
- macro(labmda())
- #else
- #define macro(labmda)
- #define macro_call(labmda)
- #endif
- #include <stdio.h>
- int main(int argc, char *argv[]) {
- int x = 100;
- macro([&]() {
- printf("hello %d\n", x); }()
- );
- macro([](int x) { printf("hello %d\n", x); }(x));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement