Log in
Sign up
See new Tweets

Conversation

Jann Horn
@tehjh
·
Apr 26
oh, C can do optional args without varargs calling convention! // default value for second parameter is 3 int add(int a, int b) { return a + b; } #define add(__a, ...) add(__a, (3,##__VA_ARGS__)) int test2(int x) { return add(x, 2); } int test3(int x) { return add(x); }
3
2
47
Jonas L
@jonasLyk
·
Apr 27
Replying to
@tehjh
hold my beer
Image
1
1
4
Jonas L
@jonasLyk
·
Apr 27
Replying to
@jonasLyk
and
@tehjh
Image
2
1
2
Hihhn
@imn000f
·
Apr 27
Replying to
@jonasLyk
and
@tehjh
https://github.com/Hirrolot/metalang99… Try this
github.com
GitHub - Hirrolot/metalang99: Full-blown preprocessor metaprogramming
Full-blown preprocessor metaprogramming. Contribute to Hirrolot/metalang99 development by creating an account on GitHub.
1
2
3
Jonas L
@jonasLyk
·
Apr 27
Replying to
@imn000f
and
@tehjh
that do actually look kinda brilliant
1
2
Hirrolot
@hirrolot
Replying to
@jonasLyk
@imn000f
and
@tehjh
Behold the true monstrosity https://github.com/boostorg/preprocessor/blob/develop/include/boost/preprocessor/detail/auto_rec.hpp… :)
github.com
preprocessor/auto_rec.hpp at develop · boostorg/preprocessor
Boost.org preprocessor module. Contribute to boostorg/preprocessor development by creating an account on GitHub.
8:26 PM · Apr 27, 2022·Twitter Web App