- A new trick: placeholder substitution in the preprocessor https://holyblackcat.github.io/blog/2024/10/22/macro-placeholders.html 38 comments cpp
Linked pages
- Compiler Explorer http://gcc.godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(j:1,options:(colouriseAsm:%270%27,compileOnChange:%270%27),source:%27//+Compare+multiple+compilers+at+once%0A//+using+the+!%27%2B!%27+button.%0Aint+testFunction(int*+input,+int+length)+%7B%0A++int+sum+%3D+0%3B%0A++for+(int+i+%3D+0%3B+i+%3C+length%3B+%2B%2Bi)+%7B%0A++++sum+%2B%3D+input%5Bi%5D%3B%0A++%7D%0A++return+sum%3B%0A%7D%0A%27),l:%275%27,n:%271%27,o:%27C%2B%2B+source+%231%27,t:%270%27)),k:27.612542007477654,l:%274%27,n:%270%27,o:%27%27,s:0,t:%270%27),(g:!((h:compiler,i:(compiler:g62,filters:(b:%270%27,commentOnly:%270%27,directives:%270%27,intel:%270%27),options:%27-O2%27),l:%275%27,n:%270%27,o:%27%231+with+x86-64+gcc+6.2%27,t:%270%27)),k:26.189215099875707,l:%274%27,m:100,n:%270%27,o:%27%27,s:0,t:%270%27),(g:!((h:compiler,i:(compiler:icc17,filters:(b:%270%27,commentOnly:%270%27,directives:%270%27,intel:%270%27),options:%27-O2%27),l:%275%27,n:%270%27,o:%27%231+with+x86-64+icc+17%27,t:%270%27)),k:46.19824289264664,l:%274%27,n:%270%27,o:%27%27,s:0,t:%270%27)),l:%272%27,n:%270%27,o:%27%27,t:%270%27)),version:4 410 comments
- GitHub - Neargye/magic_enum: Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate code https://github.com/Neargye/magic_enum 56 comments
- X macro - Wikipedia https://en.wikipedia.org/wiki/X_Macro 1 comment
Would you like to stay up to date with C & C++? Checkout C & C++
Weekly.
Related searches:
Search whole site: site:holyblackcat.github.io
Search title: Placeholder substitution in the preprocessor | Egor’s blog
See how to search.