Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Visual Studio expand modified
#include <stdio.h> #include <boost/preprocessor/cat.hpp> #include <boost/preprocessor/seq/for_each.hpp> #include <boost/preprocessor/stringize.hpp> #include <boost/preprocessor/facilities/expand.hpp> #include <boost/preprocessor/seq/elem.hpp> #define OVERLOADED_TWOARGS(_extra_arg, SEQ) extra_arg=_extra_arg, x=BOOST_PP_SEQ_ELEM(0,SEQ), y=BOOST_PP_SEQ_ELEM(1,SEQ) /* DO_STUFF(some, TWOARGS(1, 2)) should expand to: OVERLOADED_TWOARGS(some, 1, 2) */ #define LAZY_EVAL(NAME,SUF_AND_ARGS) BOOST_PP_CAT(BOOST_PP_CAT(NAME,SUF_AND_ARGS),BOOST_PP_EMPTY()) #define DO_STUFF(extra_arg, suf_and_args) BOOST_PP_EXPAND(LAZY_EVAL(_MKNAME_, suf_and_args) (extra_arg, LAZY_EVAL(_UNPAR_, suf_and_args)) ) #define _MKNAME_TWOARGS(a,b) OVERLOADED_TWOARGS #define _UNPAR_TWOARGS(a,b) (a)(b) int main(int argc, char *argv[]) { printf("%s\n", BOOST_PP_STRINGIZE((expansion : \n DO_STUFF(some, TWOARGS(1, 2)) \n))); return 0; }
run
|
edit
|
history
|
help
0
Revers find file in windows
virtual test
лаб1
MSVC-IsBaseOf
No UD
Ctor takes const reference but pass in a non-const array
Program of cube
c++ pure apstraction
visual-wtf
sharedptr emptiness